Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
swigfaiss_gpu_wrap.cpp
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.12
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15 
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17 
18 
19 #ifdef __cplusplus
20 /* SwigValueWrapper is described in swig.swg */
21 template<typename T> class SwigValueWrapper {
22  struct SwigMovePointer {
23  T *ptr;
24  SwigMovePointer(T *p) : ptr(p) { }
25  ~SwigMovePointer() { delete ptr; }
26  SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
27  } pointer;
28  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
30 public:
31  SwigValueWrapper() : pointer(0) { }
32  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
33  operator T&() const { return *pointer.ptr; }
34  T *operator&() { return pointer.ptr; }
35 };
36 
37 template <typename T> T SwigValueInit() {
38  return T();
39 }
40 #endif
41 
42 /* -----------------------------------------------------------------------------
43  * This section contains generic SWIG labels for method/variable
44  * declarations/attributes, and other compiler dependent labels.
45  * ----------------------------------------------------------------------------- */
46 
47 /* template workaround for compilers that cannot correctly implement the C++ standard */
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
52 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
53 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
54 # define SWIGTEMPLATEDISAMBIGUATOR template
55 # else
56 # define SWIGTEMPLATEDISAMBIGUATOR
57 # endif
58 #endif
59 
60 /* inline attribute */
61 #ifndef SWIGINLINE
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
64 # else
65 # define SWIGINLINE
66 # endif
67 #endif
68 
69 /* attribute recognised by some compilers to avoid 'unused' warnings */
70 #ifndef SWIGUNUSED
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
74 # else
75 # define SWIGUNUSED
76 # endif
77 # elif defined(__ICC)
78 # define SWIGUNUSED __attribute__ ((__unused__))
79 # else
80 # define SWIGUNUSED
81 # endif
82 #endif
83 
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 # endif
88 #endif
89 
90 #ifndef SWIGUNUSEDPARM
91 # ifdef __cplusplus
92 # define SWIGUNUSEDPARM(p)
93 # else
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 # endif
96 #endif
97 
98 /* internal SWIG method */
99 #ifndef SWIGINTERN
100 # define SWIGINTERN static SWIGUNUSED
101 #endif
102 
103 /* internal inline SWIG method */
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
106 #endif
107 
108 /* exporting methods */
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
113 # endif
114 # endif
115 #endif
116 
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
120 # define SWIGEXPORT
121 # else
122 # define SWIGEXPORT __declspec(dllexport)
123 # endif
124 # else
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 # else
128 # define SWIGEXPORT
129 # endif
130 # endif
131 #endif
132 
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
137 # else
138 # define SWIGSTDCALL
139 # endif
140 #endif
141 
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146 
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151 
152 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
155 #endif
156 
157 /* Intel's compiler complains if a variable which was never initialised is
158  * cast to void, which is a common idiom which we use to indicate that we
159  * are aware a variable isn't used. So we just silence that warning.
160  * See: https://github.com/swig/swig/issues/192 for more discussion.
161  */
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
164 #endif
165 
166 
167 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
168 /* Use debug wrappers with the Python release dll */
169 # undef _DEBUG
170 # include <Python.h>
171 # define _DEBUG
172 #else
173 # include <Python.h>
174 #endif
175 
176 /* -----------------------------------------------------------------------------
177  * swigrun.swg
178  *
179  * This file contains generic C API SWIG runtime support for pointer
180  * type checking.
181  * ----------------------------------------------------------------------------- */
182 
183 /* This should only be incremented when either the layout of swig_type_info changes,
184  or for whatever reason, the runtime changes incompatibly */
185 #define SWIG_RUNTIME_VERSION "4"
186 
187 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
188 #ifdef SWIG_TYPE_TABLE
189 # define SWIG_QUOTE_STRING(x) #x
190 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
191 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
192 #else
193 # define SWIG_TYPE_TABLE_NAME
194 #endif
195 
196 /*
197  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
198  creating a static or dynamic library from the SWIG runtime code.
199  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
200 
201  But only do this if strictly necessary, ie, if you have problems
202  with your compiler or suchlike.
203 */
204 
205 #ifndef SWIGRUNTIME
206 # define SWIGRUNTIME SWIGINTERN
207 #endif
208 
209 #ifndef SWIGRUNTIMEINLINE
210 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
211 #endif
212 
213 /* Generic buffer size */
214 #ifndef SWIG_BUFFER_SIZE
215 # define SWIG_BUFFER_SIZE 1024
216 #endif
217 
218 /* Flags for pointer conversions */
219 #define SWIG_POINTER_DISOWN 0x1
220 #define SWIG_CAST_NEW_MEMORY 0x2
221 
222 /* Flags for new pointer objects */
223 #define SWIG_POINTER_OWN 0x1
224 
225 
226 /*
227  Flags/methods for returning states.
228 
229  The SWIG conversion methods, as ConvertPtr, return an integer
230  that tells if the conversion was successful or not. And if not,
231  an error code can be returned (see swigerrors.swg for the codes).
232 
233  Use the following macros/flags to set or process the returning
234  states.
235 
236  In old versions of SWIG, code such as the following was usually written:
237 
238  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
239  // success code
240  } else {
241  //fail code
242  }
243 
244  Now you can be more explicit:
245 
246  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
247  if (SWIG_IsOK(res)) {
248  // success code
249  } else {
250  // fail code
251  }
252 
253  which is the same really, but now you can also do
254 
255  Type *ptr;
256  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
257  if (SWIG_IsOK(res)) {
258  // success code
259  if (SWIG_IsNewObj(res) {
260  ...
261  delete *ptr;
262  } else {
263  ...
264  }
265  } else {
266  // fail code
267  }
268 
269  I.e., now SWIG_ConvertPtr can return new objects and you can
270  identify the case and take care of the deallocation. Of course that
271  also requires SWIG_ConvertPtr to return new result values, such as
272 
273  int SWIG_ConvertPtr(obj, ptr,...) {
274  if (<obj is ok>) {
275  if (<need new object>) {
276  *ptr = <ptr to new allocated object>;
277  return SWIG_NEWOBJ;
278  } else {
279  *ptr = <ptr to old object>;
280  return SWIG_OLDOBJ;
281  }
282  } else {
283  return SWIG_BADOBJ;
284  }
285  }
286 
287  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
288  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
289  SWIG errors code.
290 
291  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
292  allows to return the 'cast rank', for example, if you have this
293 
294  int food(double)
295  int fooi(int);
296 
297  and you call
298 
299  food(1) // cast rank '1' (1 -> 1.0)
300  fooi(1) // cast rank '0'
301 
302  just use the SWIG_AddCast()/SWIG_CheckState()
303 */
304 
305 #define SWIG_OK (0)
306 #define SWIG_ERROR (-1)
307 #define SWIG_IsOK(r) (r >= 0)
308 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
309 
310 /* The CastRankLimit says how many bits are used for the cast rank */
311 #define SWIG_CASTRANKLIMIT (1 << 8)
312 /* The NewMask denotes the object was created (using new/malloc) */
313 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
314 /* The TmpMask is for in/out typemaps that use temporal objects */
315 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
316 /* Simple returning values */
317 #define SWIG_BADOBJ (SWIG_ERROR)
318 #define SWIG_OLDOBJ (SWIG_OK)
319 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
320 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
321 /* Check, add and del mask methods */
322 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
323 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
324 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
325 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
326 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
327 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
328 
329 /* Cast-Rank Mode */
330 #if defined(SWIG_CASTRANK_MODE)
331 # ifndef SWIG_TypeRank
332 # define SWIG_TypeRank unsigned long
333 # endif
334 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
335 # define SWIG_MAXCASTRANK (2)
336 # endif
337 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
338 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
339 SWIGINTERNINLINE int SWIG_AddCast(int r) {
340  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
341 }
342 SWIGINTERNINLINE int SWIG_CheckState(int r) {
343  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
344 }
345 #else /* no cast-rank mode */
346 # define SWIG_AddCast(r) (r)
347 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
348 #endif
349 
350 
351 #include <string.h>
352 
353 #ifdef __cplusplus
354 extern "C" {
355 #endif
356 
357 typedef void *(*swig_converter_func)(void *, int *);
358 typedef struct swig_type_info *(*swig_dycast_func)(void **);
359 
360 /* Structure to store information on one type */
361 typedef struct swig_type_info {
362  const char *name; /* mangled name of this type */
363  const char *str; /* human readable name of this type */
364  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
365  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
366  void *clientdata; /* language specific type data */
367  int owndata; /* flag if the structure owns the clientdata */
369 
370 /* Structure to store a type and conversion function used for casting */
371 typedef struct swig_cast_info {
372  swig_type_info *type; /* pointer to type that is equivalent to this type */
373  swig_converter_func converter; /* function to cast the void pointers */
374  struct swig_cast_info *next; /* pointer to next cast in linked list */
375  struct swig_cast_info *prev; /* pointer to the previous cast */
377 
378 /* Structure used to store module information
379  * Each module generates one structure like this, and the runtime collects
380  * all of these structures and stores them in a circularly linked list.*/
381 typedef struct swig_module_info {
382  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
383  size_t size; /* Number of types in this module */
384  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
385  swig_type_info **type_initial; /* Array of initially generated type structures */
386  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
387  void *clientdata; /* Language specific module data */
389 
390 /*
391  Compare two type names skipping the space characters, therefore
392  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
393 
394  Return 0 when the two name types are equivalent, as in
395  strncmp, but skipping ' '.
396 */
397 SWIGRUNTIME int
398 SWIG_TypeNameComp(const char *f1, const char *l1,
399  const char *f2, const char *l2) {
400  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
401  while ((*f1 == ' ') && (f1 != l1)) ++f1;
402  while ((*f2 == ' ') && (f2 != l2)) ++f2;
403  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
404  }
405  return (int)((l1 - f1) - (l2 - f2));
406 }
407 
408 /*
409  Check type equivalence in a name list like <name1>|<name2>|...
410  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
411 */
412 SWIGRUNTIME int
413 SWIG_TypeCmp(const char *nb, const char *tb) {
414  int equiv = 1;
415  const char* te = tb + strlen(tb);
416  const char* ne = nb;
417  while (equiv != 0 && *ne) {
418  for (nb = ne; *ne; ++ne) {
419  if (*ne == '|') break;
420  }
421  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
422  if (*ne) ++ne;
423  }
424  return equiv;
425 }
426 
427 /*
428  Check type equivalence in a name list like <name1>|<name2>|...
429  Return 0 if not equal, 1 if equal
430 */
431 SWIGRUNTIME int
432 SWIG_TypeEquiv(const char *nb, const char *tb) {
433  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
434 }
435 
436 /*
437  Check the typename
438 */
439 SWIGRUNTIME swig_cast_info *
440 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
441  if (ty) {
442  swig_cast_info *iter = ty->cast;
443  while (iter) {
444  if (strcmp(iter->type->name, c) == 0) {
445  if (iter == ty->cast)
446  return iter;
447  /* Move iter to the top of the linked list */
448  iter->prev->next = iter->next;
449  if (iter->next)
450  iter->next->prev = iter->prev;
451  iter->next = ty->cast;
452  iter->prev = 0;
453  if (ty->cast) ty->cast->prev = iter;
454  ty->cast = iter;
455  return iter;
456  }
457  iter = iter->next;
458  }
459  }
460  return 0;
461 }
462 
463 /*
464  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
465 */
466 SWIGRUNTIME swig_cast_info *
467 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
468  if (ty) {
469  swig_cast_info *iter = ty->cast;
470  while (iter) {
471  if (iter->type == from) {
472  if (iter == ty->cast)
473  return iter;
474  /* Move iter to the top of the linked list */
475  iter->prev->next = iter->next;
476  if (iter->next)
477  iter->next->prev = iter->prev;
478  iter->next = ty->cast;
479  iter->prev = 0;
480  if (ty->cast) ty->cast->prev = iter;
481  ty->cast = iter;
482  return iter;
483  }
484  iter = iter->next;
485  }
486  }
487  return 0;
488 }
489 
490 /*
491  Cast a pointer up an inheritance hierarchy
492 */
493 SWIGRUNTIMEINLINE void *
494 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
495  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
496 }
497 
498 /*
499  Dynamic pointer casting. Down an inheritance hierarchy
500 */
501 SWIGRUNTIME swig_type_info *
502 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
503  swig_type_info *lastty = ty;
504  if (!ty || !ty->dcast) return ty;
505  while (ty && (ty->dcast)) {
506  ty = (*ty->dcast)(ptr);
507  if (ty) lastty = ty;
508  }
509  return lastty;
510 }
511 
512 /*
513  Return the name associated with this type
514 */
515 SWIGRUNTIMEINLINE const char *
516 SWIG_TypeName(const swig_type_info *ty) {
517  return ty->name;
518 }
519 
520 /*
521  Return the pretty name associated with this type,
522  that is an unmangled type name in a form presentable to the user.
523 */
524 SWIGRUNTIME const char *
525 SWIG_TypePrettyName(const swig_type_info *type) {
526  /* The "str" field contains the equivalent pretty names of the
527  type, separated by vertical-bar characters. We choose
528  to print the last name, as it is often (?) the most
529  specific. */
530  if (!type) return NULL;
531  if (type->str != NULL) {
532  const char *last_name = type->str;
533  const char *s;
534  for (s = type->str; *s; s++)
535  if (*s == '|') last_name = s+1;
536  return last_name;
537  }
538  else
539  return type->name;
540 }
541 
542 /*
543  Set the clientdata field for a type
544 */
545 SWIGRUNTIME void
546 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
547  swig_cast_info *cast = ti->cast;
548  /* if (ti->clientdata == clientdata) return; */
549  ti->clientdata = clientdata;
550 
551  while (cast) {
552  if (!cast->converter) {
553  swig_type_info *tc = cast->type;
554  if (!tc->clientdata) {
555  SWIG_TypeClientData(tc, clientdata);
556  }
557  }
558  cast = cast->next;
559  }
560 }
561 SWIGRUNTIME void
562 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
563  SWIG_TypeClientData(ti, clientdata);
564  ti->owndata = 1;
565 }
566 
567 /*
568  Search for a swig_type_info structure only by mangled name
569  Search is a O(log #types)
570 
571  We start searching at module start, and finish searching when start == end.
572  Note: if start == end at the beginning of the function, we go all the way around
573  the circular list.
574 */
575 SWIGRUNTIME swig_type_info *
576 SWIG_MangledTypeQueryModule(swig_module_info *start,
577  swig_module_info *end,
578  const char *name) {
579  swig_module_info *iter = start;
580  do {
581  if (iter->size) {
582  size_t l = 0;
583  size_t r = iter->size - 1;
584  do {
585  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
586  size_t i = (l + r) >> 1;
587  const char *iname = iter->types[i]->name;
588  if (iname) {
589  int compare = strcmp(name, iname);
590  if (compare == 0) {
591  return iter->types[i];
592  } else if (compare < 0) {
593  if (i) {
594  r = i - 1;
595  } else {
596  break;
597  }
598  } else if (compare > 0) {
599  l = i + 1;
600  }
601  } else {
602  break; /* should never happen */
603  }
604  } while (l <= r);
605  }
606  iter = iter->next;
607  } while (iter != end);
608  return 0;
609 }
610 
611 /*
612  Search for a swig_type_info structure for either a mangled name or a human readable name.
613  It first searches the mangled names of the types, which is a O(log #types)
614  If a type is not found it then searches the human readable names, which is O(#types).
615 
616  We start searching at module start, and finish searching when start == end.
617  Note: if start == end at the beginning of the function, we go all the way around
618  the circular list.
619 */
620 SWIGRUNTIME swig_type_info *
621 SWIG_TypeQueryModule(swig_module_info *start,
622  swig_module_info *end,
623  const char *name) {
624  /* STEP 1: Search the name field using binary search */
625  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
626  if (ret) {
627  return ret;
628  } else {
629  /* STEP 2: If the type hasn't been found, do a complete search
630  of the str field (the human readable name) */
631  swig_module_info *iter = start;
632  do {
633  size_t i = 0;
634  for (; i < iter->size; ++i) {
635  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
636  return iter->types[i];
637  }
638  iter = iter->next;
639  } while (iter != end);
640  }
641 
642  /* neither found a match */
643  return 0;
644 }
645 
646 /*
647  Pack binary data into a string
648 */
649 SWIGRUNTIME char *
650 SWIG_PackData(char *c, void *ptr, size_t sz) {
651  static const char hex[17] = "0123456789abcdef";
652  const unsigned char *u = (unsigned char *) ptr;
653  const unsigned char *eu = u + sz;
654  for (; u != eu; ++u) {
655  unsigned char uu = *u;
656  *(c++) = hex[(uu & 0xf0) >> 4];
657  *(c++) = hex[uu & 0xf];
658  }
659  return c;
660 }
661 
662 /*
663  Unpack binary data from a string
664 */
665 SWIGRUNTIME const char *
666 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
667  unsigned char *u = (unsigned char *) ptr;
668  const unsigned char *eu = u + sz;
669  for (; u != eu; ++u) {
670  char d = *(c++);
671  unsigned char uu;
672  if ((d >= '0') && (d <= '9'))
673  uu = (unsigned char)((d - '0') << 4);
674  else if ((d >= 'a') && (d <= 'f'))
675  uu = (unsigned char)((d - ('a'-10)) << 4);
676  else
677  return (char *) 0;
678  d = *(c++);
679  if ((d >= '0') && (d <= '9'))
680  uu |= (unsigned char)(d - '0');
681  else if ((d >= 'a') && (d <= 'f'))
682  uu |= (unsigned char)(d - ('a'-10));
683  else
684  return (char *) 0;
685  *u = uu;
686  }
687  return c;
688 }
689 
690 /*
691  Pack 'void *' into a string buffer.
692 */
693 SWIGRUNTIME char *
694 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
695  char *r = buff;
696  if ((2*sizeof(void *) + 2) > bsz) return 0;
697  *(r++) = '_';
698  r = SWIG_PackData(r,&ptr,sizeof(void *));
699  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
700  strcpy(r,name);
701  return buff;
702 }
703 
704 SWIGRUNTIME const char *
705 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
706  if (*c != '_') {
707  if (strcmp(c,"NULL") == 0) {
708  *ptr = (void *) 0;
709  return name;
710  } else {
711  return 0;
712  }
713  }
714  return SWIG_UnpackData(++c,ptr,sizeof(void *));
715 }
716 
717 SWIGRUNTIME char *
718 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
719  char *r = buff;
720  size_t lname = (name ? strlen(name) : 0);
721  if ((2*sz + 2 + lname) > bsz) return 0;
722  *(r++) = '_';
723  r = SWIG_PackData(r,ptr,sz);
724  if (lname) {
725  strncpy(r,name,lname+1);
726  } else {
727  *r = 0;
728  }
729  return buff;
730 }
731 
732 SWIGRUNTIME const char *
733 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
734  if (*c != '_') {
735  if (strcmp(c,"NULL") == 0) {
736  memset(ptr,0,sz);
737  return name;
738  } else {
739  return 0;
740  }
741  }
742  return SWIG_UnpackData(++c,ptr,sz);
743 }
744 
745 #ifdef __cplusplus
746 }
747 #endif
748 
749 /* Errors in SWIG */
750 #define SWIG_UnknownError -1
751 #define SWIG_IOError -2
752 #define SWIG_RuntimeError -3
753 #define SWIG_IndexError -4
754 #define SWIG_TypeError -5
755 #define SWIG_DivisionByZero -6
756 #define SWIG_OverflowError -7
757 #define SWIG_SyntaxError -8
758 #define SWIG_ValueError -9
759 #define SWIG_SystemError -10
760 #define SWIG_AttributeError -11
761 #define SWIG_MemoryError -12
762 #define SWIG_NullReferenceError -13
763 
764 
765 
766 /* Compatibility macros for Python 3 */
767 #if PY_VERSION_HEX >= 0x03000000
768 
769 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
770 #define PyInt_Check(x) PyLong_Check(x)
771 #define PyInt_AsLong(x) PyLong_AsLong(x)
772 #define PyInt_FromLong(x) PyLong_FromLong(x)
773 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
774 #define PyString_Check(name) PyBytes_Check(name)
775 #define PyString_FromString(x) PyUnicode_FromString(x)
776 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
777 #define PyString_AsString(str) PyBytes_AsString(str)
778 #define PyString_Size(str) PyBytes_Size(str)
779 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
780 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
781 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
782 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
783 
784 #endif
785 
786 #ifndef Py_TYPE
787 # define Py_TYPE(op) ((op)->ob_type)
788 #endif
789 
790 /* SWIG APIs for compatibility of both Python 2 & 3 */
791 
792 #if PY_VERSION_HEX >= 0x03000000
793 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
794 #else
795 # define SWIG_Python_str_FromFormat PyString_FromFormat
796 #endif
797 
798 
799 /* Warning: This function will allocate a new string in Python 3,
800  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
801  */
802 SWIGINTERN char*
803 SWIG_Python_str_AsChar(PyObject *str)
804 {
805 #if PY_VERSION_HEX >= 0x03000000
806  char *cstr;
807  char *newstr;
808  Py_ssize_t len;
809  str = PyUnicode_AsUTF8String(str);
810  PyBytes_AsStringAndSize(str, &cstr, &len);
811  newstr = (char *) malloc(len+1);
812  memcpy(newstr, cstr, len+1);
813  Py_XDECREF(str);
814  return newstr;
815 #else
816  return PyString_AsString(str);
817 #endif
818 }
819 
820 #if PY_VERSION_HEX >= 0x03000000
821 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
822 #else
823 # define SWIG_Python_str_DelForPy3(x)
824 #endif
825 
826 
827 SWIGINTERN PyObject*
828 SWIG_Python_str_FromChar(const char *c)
829 {
830 #if PY_VERSION_HEX >= 0x03000000
831  return PyUnicode_FromString(c);
832 #else
833  return PyString_FromString(c);
834 #endif
835 }
836 
837 /* Add PyOS_snprintf for old Pythons */
838 #if PY_VERSION_HEX < 0x02020000
839 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
840 # define PyOS_snprintf _snprintf
841 # else
842 # define PyOS_snprintf snprintf
843 # endif
844 #endif
845 
846 /* A crude PyString_FromFormat implementation for old Pythons */
847 #if PY_VERSION_HEX < 0x02020000
848 
849 #ifndef SWIG_PYBUFFER_SIZE
850 # define SWIG_PYBUFFER_SIZE 1024
851 #endif
852 
853 static PyObject *
854 PyString_FromFormat(const char *fmt, ...) {
855  va_list ap;
856  char buf[SWIG_PYBUFFER_SIZE * 2];
857  int res;
858  va_start(ap, fmt);
859  res = vsnprintf(buf, sizeof(buf), fmt, ap);
860  va_end(ap);
861  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
862 }
863 #endif
864 
865 #ifndef PyObject_DEL
866 # define PyObject_DEL PyObject_Del
867 #endif
868 
869 /* A crude PyExc_StopIteration exception for old Pythons */
870 #if PY_VERSION_HEX < 0x02020000
871 # ifndef PyExc_StopIteration
872 # define PyExc_StopIteration PyExc_RuntimeError
873 # endif
874 # ifndef PyObject_GenericGetAttr
875 # define PyObject_GenericGetAttr 0
876 # endif
877 #endif
878 
879 /* Py_NotImplemented is defined in 2.1 and up. */
880 #if PY_VERSION_HEX < 0x02010000
881 # ifndef Py_NotImplemented
882 # define Py_NotImplemented PyExc_RuntimeError
883 # endif
884 #endif
885 
886 /* A crude PyString_AsStringAndSize implementation for old Pythons */
887 #if PY_VERSION_HEX < 0x02010000
888 # ifndef PyString_AsStringAndSize
889 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
890 # endif
891 #endif
892 
893 /* PySequence_Size for old Pythons */
894 #if PY_VERSION_HEX < 0x02000000
895 # ifndef PySequence_Size
896 # define PySequence_Size PySequence_Length
897 # endif
898 #endif
899 
900 /* PyBool_FromLong for old Pythons */
901 #if PY_VERSION_HEX < 0x02030000
902 static
903 PyObject *PyBool_FromLong(long ok)
904 {
905  PyObject *result = ok ? Py_True : Py_False;
906  Py_INCREF(result);
907  return result;
908 }
909 #endif
910 
911 /* Py_ssize_t for old Pythons */
912 /* This code is as recommended by: */
913 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
914 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
915 typedef int Py_ssize_t;
916 # define PY_SSIZE_T_MAX INT_MAX
917 # define PY_SSIZE_T_MIN INT_MIN
918 typedef inquiry lenfunc;
919 typedef intargfunc ssizeargfunc;
920 typedef intintargfunc ssizessizeargfunc;
921 typedef intobjargproc ssizeobjargproc;
922 typedef intintobjargproc ssizessizeobjargproc;
923 typedef getreadbufferproc readbufferproc;
924 typedef getwritebufferproc writebufferproc;
925 typedef getsegcountproc segcountproc;
926 typedef getcharbufferproc charbufferproc;
927 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
928 {
929  long result = 0;
930  PyObject *i = PyNumber_Int(x);
931  if (i) {
932  result = PyInt_AsLong(i);
933  Py_DECREF(i);
934  }
935  return result;
936 }
937 #endif
938 
939 #if PY_VERSION_HEX < 0x02050000
940 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
941 #endif
942 
943 #if PY_VERSION_HEX < 0x02040000
944 #define Py_VISIT(op) \
945  do { \
946  if (op) { \
947  int vret = visit((op), arg); \
948  if (vret) \
949  return vret; \
950  } \
951  } while (0)
952 #endif
953 
954 #if PY_VERSION_HEX < 0x02030000
955 typedef struct {
956  PyTypeObject type;
957  PyNumberMethods as_number;
958  PyMappingMethods as_mapping;
959  PySequenceMethods as_sequence;
960  PyBufferProcs as_buffer;
961  PyObject *name, *slots;
963 #endif
964 
965 #if PY_VERSION_HEX < 0x02030000
966 typedef destructor freefunc;
967 #endif
968 
969 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
970  (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
971  (PY_MAJOR_VERSION > 3))
972 # define SWIGPY_USE_CAPSULE
973 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
974 #endif
975 
976 #if PY_VERSION_HEX < 0x03020000
977 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
978 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
979 #define Py_hash_t long
980 #endif
981 
982 /* -----------------------------------------------------------------------------
983  * error manipulation
984  * ----------------------------------------------------------------------------- */
985 
986 SWIGRUNTIME PyObject*
987 SWIG_Python_ErrorType(int code) {
988  PyObject* type = 0;
989  switch(code) {
990  case SWIG_MemoryError:
991  type = PyExc_MemoryError;
992  break;
993  case SWIG_IOError:
994  type = PyExc_IOError;
995  break;
996  case SWIG_RuntimeError:
997  type = PyExc_RuntimeError;
998  break;
999  case SWIG_IndexError:
1000  type = PyExc_IndexError;
1001  break;
1002  case SWIG_TypeError:
1003  type = PyExc_TypeError;
1004  break;
1005  case SWIG_DivisionByZero:
1006  type = PyExc_ZeroDivisionError;
1007  break;
1008  case SWIG_OverflowError:
1009  type = PyExc_OverflowError;
1010  break;
1011  case SWIG_SyntaxError:
1012  type = PyExc_SyntaxError;
1013  break;
1014  case SWIG_ValueError:
1015  type = PyExc_ValueError;
1016  break;
1017  case SWIG_SystemError:
1018  type = PyExc_SystemError;
1019  break;
1020  case SWIG_AttributeError:
1021  type = PyExc_AttributeError;
1022  break;
1023  default:
1024  type = PyExc_RuntimeError;
1025  }
1026  return type;
1027 }
1028 
1029 
1030 SWIGRUNTIME void
1031 SWIG_Python_AddErrorMsg(const char* mesg)
1032 {
1033  PyObject *type = 0;
1034  PyObject *value = 0;
1035  PyObject *traceback = 0;
1036 
1037  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1038  if (value) {
1039  char *tmp;
1040  PyObject *old_str = PyObject_Str(value);
1041  PyErr_Clear();
1042  Py_XINCREF(type);
1043 
1044  PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1045  SWIG_Python_str_DelForPy3(tmp);
1046  Py_DECREF(old_str);
1047  Py_DECREF(value);
1048  } else {
1049  PyErr_SetString(PyExc_RuntimeError, mesg);
1050  }
1051 }
1052 
1053 #if defined(SWIG_PYTHON_NO_THREADS)
1054 # if defined(SWIG_PYTHON_THREADS)
1055 # undef SWIG_PYTHON_THREADS
1056 # endif
1057 #endif
1058 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1059 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1060 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1061 # define SWIG_PYTHON_USE_GIL
1062 # endif
1063 # endif
1064 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1065 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1066 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1067 # endif
1068 # ifdef __cplusplus /* C++ code */
1069  class SWIG_Python_Thread_Block {
1070  bool status;
1071  PyGILState_STATE state;
1072  public:
1073  void end() { if (status) { PyGILState_Release(state); status = false;} }
1074  SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1075  ~SWIG_Python_Thread_Block() { end(); }
1076  };
1077  class SWIG_Python_Thread_Allow {
1078  bool status;
1079  PyThreadState *save;
1080  public:
1081  void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1082  SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1083  ~SWIG_Python_Thread_Allow() { end(); }
1084  };
1085 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1086 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1087 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1088 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1089 # else /* C code */
1090 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1091 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1092 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1093 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1094 # endif
1095 # else /* Old thread way, not implemented, user must provide it */
1096 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1097 # define SWIG_PYTHON_INITIALIZE_THREADS
1098 # endif
1099 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1100 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1101 # endif
1102 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1103 # define SWIG_PYTHON_THREAD_END_BLOCK
1104 # endif
1105 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1106 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1107 # endif
1108 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1109 # define SWIG_PYTHON_THREAD_END_ALLOW
1110 # endif
1111 # endif
1112 #else /* No thread support */
1113 # define SWIG_PYTHON_INITIALIZE_THREADS
1114 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1115 # define SWIG_PYTHON_THREAD_END_BLOCK
1116 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1117 # define SWIG_PYTHON_THREAD_END_ALLOW
1118 #endif
1119 
1120 /* -----------------------------------------------------------------------------
1121  * Python API portion that goes into the runtime
1122  * ----------------------------------------------------------------------------- */
1123 
1124 #ifdef __cplusplus
1125 extern "C" {
1126 #endif
1127 
1128 /* -----------------------------------------------------------------------------
1129  * Constant declarations
1130  * ----------------------------------------------------------------------------- */
1131 
1132 /* Constant Types */
1133 #define SWIG_PY_POINTER 4
1134 #define SWIG_PY_BINARY 5
1135 
1136 /* Constant information structure */
1137 typedef struct swig_const_info {
1138  int type;
1139  char *name;
1140  long lvalue;
1141  double dvalue;
1142  void *pvalue;
1143  swig_type_info **ptype;
1144 } swig_const_info;
1145 
1146 
1147 /* -----------------------------------------------------------------------------
1148  * Wrapper of PyInstanceMethod_New() used in Python 3
1149  * It is exported to the generated module, used for -fastproxy
1150  * ----------------------------------------------------------------------------- */
1151 #if PY_VERSION_HEX >= 0x03000000
1152 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1153 {
1154  return PyInstanceMethod_New(func);
1155 }
1156 #else
1157 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1158 {
1159  return NULL;
1160 }
1161 #endif
1162 
1163 #ifdef __cplusplus
1164 }
1165 #endif
1166 
1167 
1168 /* -----------------------------------------------------------------------------
1169  * pyrun.swg
1170  *
1171  * This file contains the runtime support for Python modules
1172  * and includes code for managing global variables and pointer
1173  * type checking.
1174  *
1175  * ----------------------------------------------------------------------------- */
1176 
1177 /* Common SWIG API */
1178 
1179 /* for raw pointers */
1180 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1181 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1182 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1183 
1184 #ifdef SWIGPYTHON_BUILTIN
1185 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1186 #else
1187 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1188 #endif
1189 
1190 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1191 
1192 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1193 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1194 #define swig_owntype int
1195 
1196 /* for raw packed data */
1197 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1198 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1199 
1200 /* for class or struct pointers */
1201 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1202 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1203 
1204 /* for C or C++ function pointers */
1205 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1206 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1207 
1208 /* for C++ member pointers, ie, member methods */
1209 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1210 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1211 
1212 
1213 /* Runtime API */
1214 
1215 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1216 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1217 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1218 
1219 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1220 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1221 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1222 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1223 #define SWIG_fail goto fail
1224 
1225 
1226 /* Runtime API implementation */
1227 
1228 /* Error manipulation */
1229 
1230 SWIGINTERN void
1231 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1232  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1233  PyErr_SetObject(errtype, obj);
1234  Py_DECREF(obj);
1235  SWIG_PYTHON_THREAD_END_BLOCK;
1236 }
1237 
1238 SWIGINTERN void
1239 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1240  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1241  PyErr_SetString(errtype, msg);
1242  SWIG_PYTHON_THREAD_END_BLOCK;
1243 }
1244 
1245 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1246 
1247 /* Set a constant value */
1248 
1249 #if defined(SWIGPYTHON_BUILTIN)
1250 
1251 SWIGINTERN void
1252 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1253  PyObject *s = PyString_InternFromString(key);
1254  PyList_Append(seq, s);
1255  Py_DECREF(s);
1256 }
1257 
1258 SWIGINTERN void
1259 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1260 #if PY_VERSION_HEX < 0x02030000
1261  PyDict_SetItemString(d, (char *)name, obj);
1262 #else
1263  PyDict_SetItemString(d, name, obj);
1264 #endif
1265  Py_DECREF(obj);
1266  if (public_interface)
1267  SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1268 }
1269 
1270 #else
1271 
1272 SWIGINTERN void
1273 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1274 #if PY_VERSION_HEX < 0x02030000
1275  PyDict_SetItemString(d, (char *)name, obj);
1276 #else
1277  PyDict_SetItemString(d, name, obj);
1278 #endif
1279  Py_DECREF(obj);
1280 }
1281 
1282 #endif
1283 
1284 /* Append a value to the result obj */
1285 
1286 SWIGINTERN PyObject*
1287 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1288 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1289  if (!result) {
1290  result = obj;
1291  } else if (result == Py_None) {
1292  Py_DECREF(result);
1293  result = obj;
1294  } else {
1295  if (!PyList_Check(result)) {
1296  PyObject *o2 = result;
1297  result = PyList_New(1);
1298  PyList_SetItem(result, 0, o2);
1299  }
1300  PyList_Append(result,obj);
1301  Py_DECREF(obj);
1302  }
1303  return result;
1304 #else
1305  PyObject* o2;
1306  PyObject* o3;
1307  if (!result) {
1308  result = obj;
1309  } else if (result == Py_None) {
1310  Py_DECREF(result);
1311  result = obj;
1312  } else {
1313  if (!PyTuple_Check(result)) {
1314  o2 = result;
1315  result = PyTuple_New(1);
1316  PyTuple_SET_ITEM(result, 0, o2);
1317  }
1318  o3 = PyTuple_New(1);
1319  PyTuple_SET_ITEM(o3, 0, obj);
1320  o2 = result;
1321  result = PySequence_Concat(o2, o3);
1322  Py_DECREF(o2);
1323  Py_DECREF(o3);
1324  }
1325  return result;
1326 #endif
1327 }
1328 
1329 /* Unpack the argument tuple */
1330 
1331 SWIGINTERN Py_ssize_t
1332 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1333 {
1334  if (!args) {
1335  if (!min && !max) {
1336  return 1;
1337  } else {
1338  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1339  name, (min == max ? "" : "at least "), (int)min);
1340  return 0;
1341  }
1342  }
1343  if (!PyTuple_Check(args)) {
1344  if (min <= 1 && max >= 1) {
1345  Py_ssize_t i;
1346  objs[0] = args;
1347  for (i = 1; i < max; ++i) {
1348  objs[i] = 0;
1349  }
1350  return 2;
1351  }
1352  PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1353  return 0;
1354  } else {
1355  Py_ssize_t l = PyTuple_GET_SIZE(args);
1356  if (l < min) {
1357  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1358  name, (min == max ? "" : "at least "), (int)min, (int)l);
1359  return 0;
1360  } else if (l > max) {
1361  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1362  name, (min == max ? "" : "at most "), (int)max, (int)l);
1363  return 0;
1364  } else {
1365  Py_ssize_t i;
1366  for (i = 0; i < l; ++i) {
1367  objs[i] = PyTuple_GET_ITEM(args, i);
1368  }
1369  for (; l < max; ++l) {
1370  objs[l] = 0;
1371  }
1372  return i + 1;
1373  }
1374  }
1375 }
1376 
1377 /* A functor is a function object with one single object argument */
1378 #if PY_VERSION_HEX >= 0x02020000
1379 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1380 #else
1381 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1382 #endif
1383 
1384 /*
1385  Helper for static pointer initialization for both C and C++ code, for example
1386  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1387 */
1388 #ifdef __cplusplus
1389 #define SWIG_STATIC_POINTER(var) var
1390 #else
1391 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1392 #endif
1393 
1394 /* -----------------------------------------------------------------------------
1395  * Pointer declarations
1396  * ----------------------------------------------------------------------------- */
1397 
1398 /* Flags for new pointer objects */
1399 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1400 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1401 
1402 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1403 
1404 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1405 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1406 
1407 #ifdef __cplusplus
1408 extern "C" {
1409 #endif
1410 
1411 /* How to access Py_None */
1412 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1413 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1414 # ifndef SWIG_PYTHON_BUILD_NONE
1415 # define SWIG_PYTHON_BUILD_NONE
1416 # endif
1417 # endif
1418 #endif
1419 
1420 #ifdef SWIG_PYTHON_BUILD_NONE
1421 # ifdef Py_None
1422 # undef Py_None
1423 # define Py_None SWIG_Py_None()
1424 # endif
1425 SWIGRUNTIMEINLINE PyObject *
1426 _SWIG_Py_None(void)
1427 {
1428  PyObject *none = Py_BuildValue((char*)"");
1429  Py_DECREF(none);
1430  return none;
1431 }
1432 SWIGRUNTIME PyObject *
1433 SWIG_Py_None(void)
1434 {
1435  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1436  return none;
1437 }
1438 #endif
1439 
1440 /* The python void return value */
1441 
1442 SWIGRUNTIMEINLINE PyObject *
1443 SWIG_Py_Void(void)
1444 {
1445  PyObject *none = Py_None;
1446  Py_INCREF(none);
1447  return none;
1448 }
1449 
1450 /* SwigPyClientData */
1451 
1452 typedef struct {
1453  PyObject *klass;
1454  PyObject *newraw;
1455  PyObject *newargs;
1456  PyObject *destroy;
1457  int delargs;
1458  int implicitconv;
1459  PyTypeObject *pytype;
1461 
1462 SWIGRUNTIMEINLINE int
1463 SWIG_Python_CheckImplicit(swig_type_info *ty)
1464 {
1465  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1466  return data ? data->implicitconv : 0;
1467 }
1468 
1469 SWIGRUNTIMEINLINE PyObject *
1470 SWIG_Python_ExceptionType(swig_type_info *desc) {
1471  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1472  PyObject *klass = data ? data->klass : 0;
1473  return (klass ? klass : PyExc_RuntimeError);
1474 }
1475 
1476 
1477 SWIGRUNTIME SwigPyClientData *
1478 SwigPyClientData_New(PyObject* obj)
1479 {
1480  if (!obj) {
1481  return 0;
1482  } else {
1483  SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1484  /* the klass element */
1485  data->klass = obj;
1486  Py_INCREF(data->klass);
1487  /* the newraw method and newargs arguments used to create a new raw instance */
1488  if (PyClass_Check(obj)) {
1489  data->newraw = 0;
1490  data->newargs = obj;
1491  Py_INCREF(obj);
1492  } else {
1493 #if (PY_VERSION_HEX < 0x02020000)
1494  data->newraw = 0;
1495 #else
1496  data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1497 #endif
1498  if (data->newraw) {
1499  Py_INCREF(data->newraw);
1500  data->newargs = PyTuple_New(1);
1501  PyTuple_SetItem(data->newargs, 0, obj);
1502  } else {
1503  data->newargs = obj;
1504  }
1505  Py_INCREF(data->newargs);
1506  }
1507  /* the destroy method, aka as the C++ delete method */
1508  data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1509  if (PyErr_Occurred()) {
1510  PyErr_Clear();
1511  data->destroy = 0;
1512  }
1513  if (data->destroy) {
1514  int flags;
1515  Py_INCREF(data->destroy);
1516  flags = PyCFunction_GET_FLAGS(data->destroy);
1517 #ifdef METH_O
1518  data->delargs = !(flags & (METH_O));
1519 #else
1520  data->delargs = 0;
1521 #endif
1522  } else {
1523  data->delargs = 0;
1524  }
1525  data->implicitconv = 0;
1526  data->pytype = 0;
1527  return data;
1528  }
1529 }
1530 
1531 SWIGRUNTIME void
1532 SwigPyClientData_Del(SwigPyClientData *data) {
1533  Py_XDECREF(data->newraw);
1534  Py_XDECREF(data->newargs);
1535  Py_XDECREF(data->destroy);
1536 }
1537 
1538 /* =============== SwigPyObject =====================*/
1539 
1540 typedef struct {
1541  PyObject_HEAD
1542  void *ptr;
1543  swig_type_info *ty;
1544  int own;
1545  PyObject *next;
1546 #ifdef SWIGPYTHON_BUILTIN
1547  PyObject *dict;
1548 #endif
1549 } SwigPyObject;
1550 
1551 
1552 #ifdef SWIGPYTHON_BUILTIN
1553 
1554 SWIGRUNTIME PyObject *
1555 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1556 {
1557  SwigPyObject *sobj = (SwigPyObject *)v;
1558 
1559  if (!sobj->dict)
1560  sobj->dict = PyDict_New();
1561 
1562  Py_INCREF(sobj->dict);
1563  return sobj->dict;
1564 }
1565 
1566 #endif
1567 
1568 SWIGRUNTIME PyObject *
1569 SwigPyObject_long(SwigPyObject *v)
1570 {
1571  return PyLong_FromVoidPtr(v->ptr);
1572 }
1573 
1574 SWIGRUNTIME PyObject *
1575 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1576 {
1577  PyObject *res = NULL;
1578  PyObject *args = PyTuple_New(1);
1579  if (args) {
1580  if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1581  PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1582  if (ofmt) {
1583 #if PY_VERSION_HEX >= 0x03000000
1584  res = PyUnicode_Format(ofmt,args);
1585 #else
1586  res = PyString_Format(ofmt,args);
1587 #endif
1588  Py_DECREF(ofmt);
1589  }
1590  Py_DECREF(args);
1591  }
1592  }
1593  return res;
1594 }
1595 
1596 SWIGRUNTIME PyObject *
1597 SwigPyObject_oct(SwigPyObject *v)
1598 {
1599  return SwigPyObject_format("%o",v);
1600 }
1601 
1602 SWIGRUNTIME PyObject *
1603 SwigPyObject_hex(SwigPyObject *v)
1604 {
1605  return SwigPyObject_format("%x",v);
1606 }
1607 
1608 SWIGRUNTIME PyObject *
1609 #ifdef METH_NOARGS
1610 SwigPyObject_repr(SwigPyObject *v)
1611 #else
1612 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1613 #endif
1614 {
1615  const char *name = SWIG_TypePrettyName(v->ty);
1616  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1617  if (v->next) {
1618 # ifdef METH_NOARGS
1619  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1620 # else
1621  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1622 # endif
1623 # if PY_VERSION_HEX >= 0x03000000
1624  PyObject *joined = PyUnicode_Concat(repr, nrep);
1625  Py_DecRef(repr);
1626  Py_DecRef(nrep);
1627  repr = joined;
1628 # else
1629  PyString_ConcatAndDel(&repr,nrep);
1630 # endif
1631  }
1632  return repr;
1633 }
1634 
1635 SWIGRUNTIME int
1636 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1637 {
1638  void *i = v->ptr;
1639  void *j = w->ptr;
1640  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1641 }
1642 
1643 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1644 SWIGRUNTIME PyObject*
1645 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1646 {
1647  PyObject* res;
1648  if( op != Py_EQ && op != Py_NE ) {
1649  Py_INCREF(Py_NotImplemented);
1650  return Py_NotImplemented;
1651  }
1652  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1653  return res;
1654 }
1655 
1656 
1657 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1658 
1659 #ifdef SWIGPYTHON_BUILTIN
1660 static swig_type_info *SwigPyObject_stype = 0;
1661 SWIGRUNTIME PyTypeObject*
1662 SwigPyObject_type(void) {
1663  SwigPyClientData *cd;
1664  assert(SwigPyObject_stype);
1665  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1666  assert(cd);
1667  assert(cd->pytype);
1668  return cd->pytype;
1669 }
1670 #else
1671 SWIGRUNTIME PyTypeObject*
1672 SwigPyObject_type(void) {
1673  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1674  return type;
1675 }
1676 #endif
1677 
1678 SWIGRUNTIMEINLINE int
1679 SwigPyObject_Check(PyObject *op) {
1680 #ifdef SWIGPYTHON_BUILTIN
1681  PyTypeObject *target_tp = SwigPyObject_type();
1682  if (PyType_IsSubtype(op->ob_type, target_tp))
1683  return 1;
1684  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1685 #else
1686  return (Py_TYPE(op) == SwigPyObject_type())
1687  || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1688 #endif
1689 }
1690 
1691 SWIGRUNTIME PyObject *
1692 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1693 
1694 SWIGRUNTIME void
1695 SwigPyObject_dealloc(PyObject *v)
1696 {
1697  SwigPyObject *sobj = (SwigPyObject *) v;
1698  PyObject *next = sobj->next;
1699  if (sobj->own == SWIG_POINTER_OWN) {
1700  swig_type_info *ty = sobj->ty;
1701  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1702  PyObject *destroy = data ? data->destroy : 0;
1703  if (destroy) {
1704  /* destroy is always a VARARGS method */
1705  PyObject *res;
1706 
1707  /* PyObject_CallFunction() has the potential to silently drop
1708  the active active exception. In cases of unnamed temporary
1709  variable or where we just finished iterating over a generator
1710  StopIteration will be active right now, and this needs to
1711  remain true upon return from SwigPyObject_dealloc. So save
1712  and restore. */
1713 
1714  PyObject *val = NULL, *type = NULL, *tb = NULL;
1715  PyErr_Fetch(&val, &type, &tb);
1716 
1717  if (data->delargs) {
1718  /* we need to create a temporary object to carry the destroy operation */
1719  PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1720  res = SWIG_Python_CallFunctor(destroy, tmp);
1721  Py_DECREF(tmp);
1722  } else {
1723  PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1724  PyObject *mself = PyCFunction_GET_SELF(destroy);
1725  res = ((*meth)(mself, v));
1726  }
1727  if (!res)
1728  PyErr_WriteUnraisable(destroy);
1729 
1730  PyErr_Restore(val, type, tb);
1731 
1732  Py_XDECREF(res);
1733  }
1734 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1735  else {
1736  const char *name = SWIG_TypePrettyName(ty);
1737  printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1738  }
1739 #endif
1740  }
1741  Py_XDECREF(next);
1742  PyObject_DEL(v);
1743 }
1744 
1745 SWIGRUNTIME PyObject*
1746 SwigPyObject_append(PyObject* v, PyObject* next)
1747 {
1748  SwigPyObject *sobj = (SwigPyObject *) v;
1749 #ifndef METH_O
1750  PyObject *tmp = 0;
1751  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1752  next = tmp;
1753 #endif
1754  if (!SwigPyObject_Check(next)) {
1755  PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1756  return NULL;
1757  }
1758  sobj->next = next;
1759  Py_INCREF(next);
1760  return SWIG_Py_Void();
1761 }
1762 
1763 SWIGRUNTIME PyObject*
1764 #ifdef METH_NOARGS
1765 SwigPyObject_next(PyObject* v)
1766 #else
1767 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1768 #endif
1769 {
1770  SwigPyObject *sobj = (SwigPyObject *) v;
1771  if (sobj->next) {
1772  Py_INCREF(sobj->next);
1773  return sobj->next;
1774  } else {
1775  return SWIG_Py_Void();
1776  }
1777 }
1778 
1779 SWIGINTERN PyObject*
1780 #ifdef METH_NOARGS
1781 SwigPyObject_disown(PyObject *v)
1782 #else
1783 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1784 #endif
1785 {
1786  SwigPyObject *sobj = (SwigPyObject *)v;
1787  sobj->own = 0;
1788  return SWIG_Py_Void();
1789 }
1790 
1791 SWIGINTERN PyObject*
1792 #ifdef METH_NOARGS
1793 SwigPyObject_acquire(PyObject *v)
1794 #else
1795 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1796 #endif
1797 {
1798  SwigPyObject *sobj = (SwigPyObject *)v;
1799  sobj->own = SWIG_POINTER_OWN;
1800  return SWIG_Py_Void();
1801 }
1802 
1803 SWIGINTERN PyObject*
1804 SwigPyObject_own(PyObject *v, PyObject *args)
1805 {
1806  PyObject *val = 0;
1807 #if (PY_VERSION_HEX < 0x02020000)
1808  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1809 #elif (PY_VERSION_HEX < 0x02050000)
1810  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1811 #else
1812  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
1813 #endif
1814  {
1815  return NULL;
1816  }
1817  else
1818  {
1819  SwigPyObject *sobj = (SwigPyObject *)v;
1820  PyObject *obj = PyBool_FromLong(sobj->own);
1821  if (val) {
1822 #ifdef METH_NOARGS
1823  if (PyObject_IsTrue(val)) {
1824  SwigPyObject_acquire(v);
1825  } else {
1826  SwigPyObject_disown(v);
1827  }
1828 #else
1829  if (PyObject_IsTrue(val)) {
1830  SwigPyObject_acquire(v,args);
1831  } else {
1832  SwigPyObject_disown(v,args);
1833  }
1834 #endif
1835  }
1836  return obj;
1837  }
1838 }
1839 
1840 #ifdef METH_O
1841 static PyMethodDef
1842 swigobject_methods[] = {
1843  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1844  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
1845  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1846  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1847  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1848  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1849  {0, 0, 0, 0}
1850 };
1851 #else
1852 static PyMethodDef
1853 swigobject_methods[] = {
1854  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1855  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"},
1856  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1857  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1858  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1859  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1860  {0, 0, 0, 0}
1861 };
1862 #endif
1863 
1864 #if PY_VERSION_HEX < 0x02020000
1865 SWIGINTERN PyObject *
1866 SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1867 {
1868  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1869 }
1870 #endif
1871 
1872 SWIGRUNTIME PyTypeObject*
1873 SwigPyObject_TypeOnce(void) {
1874  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1875 
1876  static PyNumberMethods SwigPyObject_as_number = {
1877  (binaryfunc)0, /*nb_add*/
1878  (binaryfunc)0, /*nb_subtract*/
1879  (binaryfunc)0, /*nb_multiply*/
1880  /* nb_divide removed in Python 3 */
1881 #if PY_VERSION_HEX < 0x03000000
1882  (binaryfunc)0, /*nb_divide*/
1883 #endif
1884  (binaryfunc)0, /*nb_remainder*/
1885  (binaryfunc)0, /*nb_divmod*/
1886  (ternaryfunc)0,/*nb_power*/
1887  (unaryfunc)0, /*nb_negative*/
1888  (unaryfunc)0, /*nb_positive*/
1889  (unaryfunc)0, /*nb_absolute*/
1890  (inquiry)0, /*nb_nonzero*/
1891  0, /*nb_invert*/
1892  0, /*nb_lshift*/
1893  0, /*nb_rshift*/
1894  0, /*nb_and*/
1895  0, /*nb_xor*/
1896  0, /*nb_or*/
1897 #if PY_VERSION_HEX < 0x03000000
1898  0, /*nb_coerce*/
1899 #endif
1900  (unaryfunc)SwigPyObject_long, /*nb_int*/
1901 #if PY_VERSION_HEX < 0x03000000
1902  (unaryfunc)SwigPyObject_long, /*nb_long*/
1903 #else
1904  0, /*nb_reserved*/
1905 #endif
1906  (unaryfunc)0, /*nb_float*/
1907 #if PY_VERSION_HEX < 0x03000000
1908  (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1909  (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1910 #endif
1911 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1912  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1913 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1914  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1915 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1916  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1917 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1918  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1919 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1920  0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1921 #endif
1922  };
1923 
1924  static PyTypeObject swigpyobject_type;
1925  static int type_init = 0;
1926  if (!type_init) {
1927  const PyTypeObject tmp = {
1928 #if PY_VERSION_HEX >= 0x03000000
1929  PyVarObject_HEAD_INIT(NULL, 0)
1930 #else
1931  PyObject_HEAD_INIT(NULL)
1932  0, /* ob_size */
1933 #endif
1934  (char *)"SwigPyObject", /* tp_name */
1935  sizeof(SwigPyObject), /* tp_basicsize */
1936  0, /* tp_itemsize */
1937  (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1938  0, /* tp_print */
1939 #if PY_VERSION_HEX < 0x02020000
1940  (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1941 #else
1942  (getattrfunc)0, /* tp_getattr */
1943 #endif
1944  (setattrfunc)0, /* tp_setattr */
1945 #if PY_VERSION_HEX >= 0x03000000
1946  0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1947 #else
1948  (cmpfunc)SwigPyObject_compare, /* tp_compare */
1949 #endif
1950  (reprfunc)SwigPyObject_repr, /* tp_repr */
1951  &SwigPyObject_as_number, /* tp_as_number */
1952  0, /* tp_as_sequence */
1953  0, /* tp_as_mapping */
1954  (hashfunc)0, /* tp_hash */
1955  (ternaryfunc)0, /* tp_call */
1956  0, /* tp_str */
1957  PyObject_GenericGetAttr, /* tp_getattro */
1958  0, /* tp_setattro */
1959  0, /* tp_as_buffer */
1960  Py_TPFLAGS_DEFAULT, /* tp_flags */
1961  swigobject_doc, /* tp_doc */
1962  0, /* tp_traverse */
1963  0, /* tp_clear */
1964  (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1965  0, /* tp_weaklistoffset */
1966 #if PY_VERSION_HEX >= 0x02020000
1967  0, /* tp_iter */
1968  0, /* tp_iternext */
1969  swigobject_methods, /* tp_methods */
1970  0, /* tp_members */
1971  0, /* tp_getset */
1972  0, /* tp_base */
1973  0, /* tp_dict */
1974  0, /* tp_descr_get */
1975  0, /* tp_descr_set */
1976  0, /* tp_dictoffset */
1977  0, /* tp_init */
1978  0, /* tp_alloc */
1979  0, /* tp_new */
1980  0, /* tp_free */
1981  0, /* tp_is_gc */
1982  0, /* tp_bases */
1983  0, /* tp_mro */
1984  0, /* tp_cache */
1985  0, /* tp_subclasses */
1986  0, /* tp_weaklist */
1987 #endif
1988 #if PY_VERSION_HEX >= 0x02030000
1989  0, /* tp_del */
1990 #endif
1991 #if PY_VERSION_HEX >= 0x02060000
1992  0, /* tp_version_tag */
1993 #endif
1994 #if PY_VERSION_HEX >= 0x03040000
1995  0, /* tp_finalize */
1996 #endif
1997 #ifdef COUNT_ALLOCS
1998  0, /* tp_allocs */
1999  0, /* tp_frees */
2000  0, /* tp_maxalloc */
2001 #if PY_VERSION_HEX >= 0x02050000
2002  0, /* tp_prev */
2003 #endif
2004  0 /* tp_next */
2005 #endif
2006  };
2007  swigpyobject_type = tmp;
2008  type_init = 1;
2009 #if PY_VERSION_HEX < 0x02020000
2010  swigpyobject_type.ob_type = &PyType_Type;
2011 #else
2012  if (PyType_Ready(&swigpyobject_type) < 0)
2013  return NULL;
2014 #endif
2015  }
2016  return &swigpyobject_type;
2017 }
2018 
2019 SWIGRUNTIME PyObject *
2020 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
2021 {
2022  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
2023  if (sobj) {
2024  sobj->ptr = ptr;
2025  sobj->ty = ty;
2026  sobj->own = own;
2027  sobj->next = 0;
2028  }
2029  return (PyObject *)sobj;
2030 }
2031 
2032 /* -----------------------------------------------------------------------------
2033  * Implements a simple Swig Packed type, and use it instead of string
2034  * ----------------------------------------------------------------------------- */
2035 
2036 typedef struct {
2037  PyObject_HEAD
2038  void *pack;
2039  swig_type_info *ty;
2040  size_t size;
2041 } SwigPyPacked;
2042 
2043 SWIGRUNTIME int
2044 SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
2045 {
2046  char result[SWIG_BUFFER_SIZE];
2047  fputs("<Swig Packed ", fp);
2048  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2049  fputs("at ", fp);
2050  fputs(result, fp);
2051  }
2052  fputs(v->ty->name,fp);
2053  fputs(">", fp);
2054  return 0;
2055 }
2056 
2057 SWIGRUNTIME PyObject *
2058 SwigPyPacked_repr(SwigPyPacked *v)
2059 {
2060  char result[SWIG_BUFFER_SIZE];
2061  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2062  return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2063  } else {
2064  return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2065  }
2066 }
2067 
2068 SWIGRUNTIME PyObject *
2069 SwigPyPacked_str(SwigPyPacked *v)
2070 {
2071  char result[SWIG_BUFFER_SIZE];
2072  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2073  return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2074  } else {
2075  return SWIG_Python_str_FromChar(v->ty->name);
2076  }
2077 }
2078 
2079 SWIGRUNTIME int
2080 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
2081 {
2082  size_t i = v->size;
2083  size_t j = w->size;
2084  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2085  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2086 }
2087 
2088 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2089 
2090 SWIGRUNTIME PyTypeObject*
2091 SwigPyPacked_type(void) {
2092  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2093  return type;
2094 }
2095 
2096 SWIGRUNTIMEINLINE int
2097 SwigPyPacked_Check(PyObject *op) {
2098  return ((op)->ob_type == SwigPyPacked_TypeOnce())
2099  || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2100 }
2101 
2102 SWIGRUNTIME void
2103 SwigPyPacked_dealloc(PyObject *v)
2104 {
2105  if (SwigPyPacked_Check(v)) {
2106  SwigPyPacked *sobj = (SwigPyPacked *) v;
2107  free(sobj->pack);
2108  }
2109  PyObject_DEL(v);
2110 }
2111 
2112 SWIGRUNTIME PyTypeObject*
2113 SwigPyPacked_TypeOnce(void) {
2114  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2115  static PyTypeObject swigpypacked_type;
2116  static int type_init = 0;
2117  if (!type_init) {
2118  const PyTypeObject tmp = {
2119 #if PY_VERSION_HEX>=0x03000000
2120  PyVarObject_HEAD_INIT(NULL, 0)
2121 #else
2122  PyObject_HEAD_INIT(NULL)
2123  0, /* ob_size */
2124 #endif
2125  (char *)"SwigPyPacked", /* tp_name */
2126  sizeof(SwigPyPacked), /* tp_basicsize */
2127  0, /* tp_itemsize */
2128  (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2129  (printfunc)SwigPyPacked_print, /* tp_print */
2130  (getattrfunc)0, /* tp_getattr */
2131  (setattrfunc)0, /* tp_setattr */
2132 #if PY_VERSION_HEX>=0x03000000
2133  0, /* tp_reserved in 3.0.1 */
2134 #else
2135  (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2136 #endif
2137  (reprfunc)SwigPyPacked_repr, /* tp_repr */
2138  0, /* tp_as_number */
2139  0, /* tp_as_sequence */
2140  0, /* tp_as_mapping */
2141  (hashfunc)0, /* tp_hash */
2142  (ternaryfunc)0, /* tp_call */
2143  (reprfunc)SwigPyPacked_str, /* tp_str */
2144  PyObject_GenericGetAttr, /* tp_getattro */
2145  0, /* tp_setattro */
2146  0, /* tp_as_buffer */
2147  Py_TPFLAGS_DEFAULT, /* tp_flags */
2148  swigpacked_doc, /* tp_doc */
2149  0, /* tp_traverse */
2150  0, /* tp_clear */
2151  0, /* tp_richcompare */
2152  0, /* tp_weaklistoffset */
2153 #if PY_VERSION_HEX >= 0x02020000
2154  0, /* tp_iter */
2155  0, /* tp_iternext */
2156  0, /* tp_methods */
2157  0, /* tp_members */
2158  0, /* tp_getset */
2159  0, /* tp_base */
2160  0, /* tp_dict */
2161  0, /* tp_descr_get */
2162  0, /* tp_descr_set */
2163  0, /* tp_dictoffset */
2164  0, /* tp_init */
2165  0, /* tp_alloc */
2166  0, /* tp_new */
2167  0, /* tp_free */
2168  0, /* tp_is_gc */
2169  0, /* tp_bases */
2170  0, /* tp_mro */
2171  0, /* tp_cache */
2172  0, /* tp_subclasses */
2173  0, /* tp_weaklist */
2174 #endif
2175 #if PY_VERSION_HEX >= 0x02030000
2176  0, /* tp_del */
2177 #endif
2178 #if PY_VERSION_HEX >= 0x02060000
2179  0, /* tp_version_tag */
2180 #endif
2181 #if PY_VERSION_HEX >= 0x03040000
2182  0, /* tp_finalize */
2183 #endif
2184 #ifdef COUNT_ALLOCS
2185  0, /* tp_allocs */
2186  0, /* tp_frees */
2187  0, /* tp_maxalloc */
2188 #if PY_VERSION_HEX >= 0x02050000
2189  0, /* tp_prev */
2190 #endif
2191  0 /* tp_next */
2192 #endif
2193  };
2194  swigpypacked_type = tmp;
2195  type_init = 1;
2196 #if PY_VERSION_HEX < 0x02020000
2197  swigpypacked_type.ob_type = &PyType_Type;
2198 #else
2199  if (PyType_Ready(&swigpypacked_type) < 0)
2200  return NULL;
2201 #endif
2202  }
2203  return &swigpypacked_type;
2204 }
2205 
2206 SWIGRUNTIME PyObject *
2207 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2208 {
2209  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2210  if (sobj) {
2211  void *pack = malloc(size);
2212  if (pack) {
2213  memcpy(pack, ptr, size);
2214  sobj->pack = pack;
2215  sobj->ty = ty;
2216  sobj->size = size;
2217  } else {
2218  PyObject_DEL((PyObject *) sobj);
2219  sobj = 0;
2220  }
2221  }
2222  return (PyObject *) sobj;
2223 }
2224 
2225 SWIGRUNTIME swig_type_info *
2226 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2227 {
2228  if (SwigPyPacked_Check(obj)) {
2229  SwigPyPacked *sobj = (SwigPyPacked *)obj;
2230  if (sobj->size != size) return 0;
2231  memcpy(ptr, sobj->pack, size);
2232  return sobj->ty;
2233  } else {
2234  return 0;
2235  }
2236 }
2237 
2238 /* -----------------------------------------------------------------------------
2239  * pointers/data manipulation
2240  * ----------------------------------------------------------------------------- */
2241 
2242 SWIGRUNTIMEINLINE PyObject *
2243 _SWIG_This(void)
2244 {
2245  return SWIG_Python_str_FromChar("this");
2246 }
2247 
2248 static PyObject *swig_this = NULL;
2249 
2250 SWIGRUNTIME PyObject *
2251 SWIG_This(void)
2252 {
2253  if (swig_this == NULL)
2254  swig_this = _SWIG_This();
2255  return swig_this;
2256 }
2257 
2258 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2259 
2260 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2261 #if PY_VERSION_HEX>=0x03000000
2262 #define SWIG_PYTHON_SLOW_GETSET_THIS
2263 #endif
2264 
2265 SWIGRUNTIME SwigPyObject *
2266 SWIG_Python_GetSwigThis(PyObject *pyobj)
2267 {
2268  PyObject *obj;
2269 
2270  if (SwigPyObject_Check(pyobj))
2271  return (SwigPyObject *) pyobj;
2272 
2273 #ifdef SWIGPYTHON_BUILTIN
2274  (void)obj;
2275 # ifdef PyWeakref_CheckProxy
2276  if (PyWeakref_CheckProxy(pyobj)) {
2277  pyobj = PyWeakref_GET_OBJECT(pyobj);
2278  if (pyobj && SwigPyObject_Check(pyobj))
2279  return (SwigPyObject*) pyobj;
2280  }
2281 # endif
2282  return NULL;
2283 #else
2284 
2285  obj = 0;
2286 
2287 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2288  if (PyInstance_Check(pyobj)) {
2289  obj = _PyInstance_Lookup(pyobj, SWIG_This());
2290  } else {
2291  PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2292  if (dictptr != NULL) {
2293  PyObject *dict = *dictptr;
2294  obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2295  } else {
2296 #ifdef PyWeakref_CheckProxy
2297  if (PyWeakref_CheckProxy(pyobj)) {
2298  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2299  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2300  }
2301 #endif
2302  obj = PyObject_GetAttr(pyobj,SWIG_This());
2303  if (obj) {
2304  Py_DECREF(obj);
2305  } else {
2306  if (PyErr_Occurred()) PyErr_Clear();
2307  return 0;
2308  }
2309  }
2310  }
2311 #else
2312  obj = PyObject_GetAttr(pyobj,SWIG_This());
2313  if (obj) {
2314  Py_DECREF(obj);
2315  } else {
2316  if (PyErr_Occurred()) PyErr_Clear();
2317  return 0;
2318  }
2319 #endif
2320  if (obj && !SwigPyObject_Check(obj)) {
2321  /* a PyObject is called 'this', try to get the 'real this'
2322  SwigPyObject from it */
2323  return SWIG_Python_GetSwigThis(obj);
2324  }
2325  return (SwigPyObject *)obj;
2326 #endif
2327 }
2328 
2329 /* Acquire a pointer value */
2330 
2331 SWIGRUNTIME int
2332 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2333  if (own == SWIG_POINTER_OWN) {
2334  SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2335  if (sobj) {
2336  int oldown = sobj->own;
2337  sobj->own = own;
2338  return oldown;
2339  }
2340  }
2341  return 0;
2342 }
2343 
2344 /* Convert a pointer value */
2345 
2346 SWIGRUNTIME int
2347 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2348  int res;
2349  SwigPyObject *sobj;
2350  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2351 
2352  if (!obj)
2353  return SWIG_ERROR;
2354  if (obj == Py_None && !implicit_conv) {
2355  if (ptr)
2356  *ptr = 0;
2357  return SWIG_OK;
2358  }
2359 
2360  res = SWIG_ERROR;
2361 
2362  sobj = SWIG_Python_GetSwigThis(obj);
2363  if (own)
2364  *own = 0;
2365  while (sobj) {
2366  void *vptr = sobj->ptr;
2367  if (ty) {
2368  swig_type_info *to = sobj->ty;
2369  if (to == ty) {
2370  /* no type cast needed */
2371  if (ptr) *ptr = vptr;
2372  break;
2373  } else {
2374  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2375  if (!tc) {
2376  sobj = (SwigPyObject *)sobj->next;
2377  } else {
2378  if (ptr) {
2379  int newmemory = 0;
2380  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2381  if (newmemory == SWIG_CAST_NEW_MEMORY) {
2382  assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2383  if (own)
2384  *own = *own | SWIG_CAST_NEW_MEMORY;
2385  }
2386  }
2387  break;
2388  }
2389  }
2390  } else {
2391  if (ptr) *ptr = vptr;
2392  break;
2393  }
2394  }
2395  if (sobj) {
2396  if (own)
2397  *own = *own | sobj->own;
2398  if (flags & SWIG_POINTER_DISOWN) {
2399  sobj->own = 0;
2400  }
2401  res = SWIG_OK;
2402  } else {
2403  if (implicit_conv) {
2404  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2405  if (data && !data->implicitconv) {
2406  PyObject *klass = data->klass;
2407  if (klass) {
2408  PyObject *impconv;
2409  data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2410  impconv = SWIG_Python_CallFunctor(klass, obj);
2411  data->implicitconv = 0;
2412  if (PyErr_Occurred()) {
2413  PyErr_Clear();
2414  impconv = 0;
2415  }
2416  if (impconv) {
2417  SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2418  if (iobj) {
2419  void *vptr;
2420  res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2421  if (SWIG_IsOK(res)) {
2422  if (ptr) {
2423  *ptr = vptr;
2424  /* transfer the ownership to 'ptr' */
2425  iobj->own = 0;
2426  res = SWIG_AddCast(res);
2427  res = SWIG_AddNewMask(res);
2428  } else {
2429  res = SWIG_AddCast(res);
2430  }
2431  }
2432  }
2433  Py_DECREF(impconv);
2434  }
2435  }
2436  }
2437  }
2438  if (!SWIG_IsOK(res) && obj == Py_None) {
2439  if (ptr)
2440  *ptr = 0;
2441  if (PyErr_Occurred())
2442  PyErr_Clear();
2443  res = SWIG_OK;
2444  }
2445  }
2446  return res;
2447 }
2448 
2449 /* Convert a function ptr value */
2450 
2451 SWIGRUNTIME int
2452 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2453  if (!PyCFunction_Check(obj)) {
2454  return SWIG_ConvertPtr(obj, ptr, ty, 0);
2455  } else {
2456  void *vptr = 0;
2457 
2458  /* here we get the method pointer for callbacks */
2459  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2460  const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2461  if (desc)
2462  desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2463  if (!desc)
2464  return SWIG_ERROR;
2465  if (ty) {
2466  swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2467  if (tc) {
2468  int newmemory = 0;
2469  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2470  assert(!newmemory); /* newmemory handling not yet implemented */
2471  } else {
2472  return SWIG_ERROR;
2473  }
2474  } else {
2475  *ptr = vptr;
2476  }
2477  return SWIG_OK;
2478  }
2479 }
2480 
2481 /* Convert a packed value value */
2482 
2483 SWIGRUNTIME int
2484 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2485  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2486  if (!to) return SWIG_ERROR;
2487  if (ty) {
2488  if (to != ty) {
2489  /* check type cast? */
2490  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2491  if (!tc) return SWIG_ERROR;
2492  }
2493  }
2494  return SWIG_OK;
2495 }
2496 
2497 /* -----------------------------------------------------------------------------
2498  * Create a new pointer object
2499  * ----------------------------------------------------------------------------- */
2500 
2501 /*
2502  Create a new instance object, without calling __init__, and set the
2503  'this' attribute.
2504 */
2505 
2506 SWIGRUNTIME PyObject*
2507 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2508 {
2509 #if (PY_VERSION_HEX >= 0x02020000)
2510  PyObject *inst = 0;
2511  PyObject *newraw = data->newraw;
2512  if (newraw) {
2513  inst = PyObject_Call(newraw, data->newargs, NULL);
2514  if (inst) {
2515 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2516  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2517  if (dictptr != NULL) {
2518  PyObject *dict = *dictptr;
2519  if (dict == NULL) {
2520  dict = PyDict_New();
2521  *dictptr = dict;
2522  PyDict_SetItem(dict, SWIG_This(), swig_this);
2523  }
2524  }
2525 #else
2526  PyObject *key = SWIG_This();
2527  PyObject_SetAttr(inst, key, swig_this);
2528 #endif
2529  }
2530  } else {
2531 #if PY_VERSION_HEX >= 0x03000000
2532  inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2533  if (inst) {
2534  PyObject_SetAttr(inst, SWIG_This(), swig_this);
2535  Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2536  }
2537 #else
2538  PyObject *dict = PyDict_New();
2539  if (dict) {
2540  PyDict_SetItem(dict, SWIG_This(), swig_this);
2541  inst = PyInstance_NewRaw(data->newargs, dict);
2542  Py_DECREF(dict);
2543  }
2544 #endif
2545  }
2546  return inst;
2547 #else
2548 #if (PY_VERSION_HEX >= 0x02010000)
2549  PyObject *inst = 0;
2550  PyObject *dict = PyDict_New();
2551  if (dict) {
2552  PyDict_SetItem(dict, SWIG_This(), swig_this);
2553  inst = PyInstance_NewRaw(data->newargs, dict);
2554  Py_DECREF(dict);
2555  }
2556  return (PyObject *) inst;
2557 #else
2558  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2559  if (inst == NULL) {
2560  return NULL;
2561  }
2562  inst->in_class = (PyClassObject *)data->newargs;
2563  Py_INCREF(inst->in_class);
2564  inst->in_dict = PyDict_New();
2565  if (inst->in_dict == NULL) {
2566  Py_DECREF(inst);
2567  return NULL;
2568  }
2569 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2570  inst->in_weakreflist = NULL;
2571 #endif
2572 #ifdef Py_TPFLAGS_GC
2573  PyObject_GC_Init(inst);
2574 #endif
2575  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2576  return (PyObject *) inst;
2577 #endif
2578 #endif
2579 }
2580 
2581 SWIGRUNTIME void
2582 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2583 {
2584  PyObject *dict;
2585 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2586  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2587  if (dictptr != NULL) {
2588  dict = *dictptr;
2589  if (dict == NULL) {
2590  dict = PyDict_New();
2591  *dictptr = dict;
2592  }
2593  PyDict_SetItem(dict, SWIG_This(), swig_this);
2594  return;
2595  }
2596 #endif
2597  dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2598  PyDict_SetItem(dict, SWIG_This(), swig_this);
2599  Py_DECREF(dict);
2600 }
2601 
2602 
2603 SWIGINTERN PyObject *
2604 SWIG_Python_InitShadowInstance(PyObject *args) {
2605  PyObject *obj[2];
2606  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2607  return NULL;
2608  } else {
2609  SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2610  if (sthis) {
2611  SwigPyObject_append((PyObject*) sthis, obj[1]);
2612  } else {
2613  SWIG_Python_SetSwigThis(obj[0], obj[1]);
2614  }
2615  return SWIG_Py_Void();
2616  }
2617 }
2618 
2619 /* Create a new pointer object */
2620 
2621 SWIGRUNTIME PyObject *
2622 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2623  SwigPyClientData *clientdata;
2624  PyObject * robj;
2625  int own;
2626 
2627  if (!ptr)
2628  return SWIG_Py_Void();
2629 
2630  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2631  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2632  if (clientdata && clientdata->pytype) {
2633  SwigPyObject *newobj;
2634  if (flags & SWIG_BUILTIN_TP_INIT) {
2635  newobj = (SwigPyObject*) self;
2636  if (newobj->ptr) {
2637  PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2638  while (newobj->next)
2639  newobj = (SwigPyObject *) newobj->next;
2640  newobj->next = next_self;
2641  newobj = (SwigPyObject *)next_self;
2642 #ifdef SWIGPYTHON_BUILTIN
2643  newobj->dict = 0;
2644 #endif
2645  }
2646  } else {
2647  newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2648 #ifdef SWIGPYTHON_BUILTIN
2649  newobj->dict = 0;
2650 #endif
2651  }
2652  if (newobj) {
2653  newobj->ptr = ptr;
2654  newobj->ty = type;
2655  newobj->own = own;
2656  newobj->next = 0;
2657  return (PyObject*) newobj;
2658  }
2659  return SWIG_Py_Void();
2660  }
2661 
2662  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2663 
2664  robj = SwigPyObject_New(ptr, type, own);
2665  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2666  PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2667  Py_DECREF(robj);
2668  robj = inst;
2669  }
2670  return robj;
2671 }
2672 
2673 /* Create a new packed object */
2674 
2675 SWIGRUNTIMEINLINE PyObject *
2676 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2677  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2678 }
2679 
2680 /* -----------------------------------------------------------------------------*
2681  * Get type list
2682  * -----------------------------------------------------------------------------*/
2683 
2684 #ifdef SWIG_LINK_RUNTIME
2685 void *SWIG_ReturnGlobalTypeList(void *);
2686 #endif
2687 
2688 SWIGRUNTIME swig_module_info *
2689 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2690  static void *type_pointer = (void *)0;
2691  /* first check if module already created */
2692  if (!type_pointer) {
2693 #ifdef SWIG_LINK_RUNTIME
2694  type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2695 #else
2696 # ifdef SWIGPY_USE_CAPSULE
2697  type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2698 # else
2699  type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2700  (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2701 # endif
2702  if (PyErr_Occurred()) {
2703  PyErr_Clear();
2704  type_pointer = (void *)0;
2705  }
2706 #endif
2707  }
2708  return (swig_module_info *) type_pointer;
2709 }
2710 
2711 #if PY_MAJOR_VERSION < 2
2712 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2713  is copied out of Python/modsupport.c in python version 2.3.4 */
2714 SWIGINTERN int
2715 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2716 {
2717  PyObject *dict;
2718  if (!PyModule_Check(m)) {
2719  PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
2720  return SWIG_ERROR;
2721  }
2722  if (!o) {
2723  PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
2724  return SWIG_ERROR;
2725  }
2726 
2727  dict = PyModule_GetDict(m);
2728  if (dict == NULL) {
2729  /* Internal error -- modules must have a dict! */
2730  PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2731  PyModule_GetName(m));
2732  return SWIG_ERROR;
2733  }
2734  if (PyDict_SetItemString(dict, name, o))
2735  return SWIG_ERROR;
2736  Py_DECREF(o);
2737  return SWIG_OK;
2738 }
2739 #endif
2740 
2741 SWIGRUNTIME void
2742 #ifdef SWIGPY_USE_CAPSULE
2743 SWIG_Python_DestroyModule(PyObject *obj)
2744 #else
2745 SWIG_Python_DestroyModule(void *vptr)
2746 #endif
2747 {
2748 #ifdef SWIGPY_USE_CAPSULE
2749  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2750 #else
2751  swig_module_info *swig_module = (swig_module_info *) vptr;
2752 #endif
2753  swig_type_info **types = swig_module->types;
2754  size_t i;
2755  for (i =0; i < swig_module->size; ++i) {
2756  swig_type_info *ty = types[i];
2757  if (ty->owndata) {
2758  SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2759  if (data) SwigPyClientData_Del(data);
2760  }
2761  }
2762  Py_DECREF(SWIG_This());
2763  swig_this = NULL;
2764 }
2765 
2766 SWIGRUNTIME void
2767 SWIG_Python_SetModule(swig_module_info *swig_module) {
2768 #if PY_VERSION_HEX >= 0x03000000
2769  /* Add a dummy module object into sys.modules */
2770  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2771 #else
2772  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2773  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2774 #endif
2775 #ifdef SWIGPY_USE_CAPSULE
2776  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2777  if (pointer && module) {
2778  PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2779  } else {
2780  Py_XDECREF(pointer);
2781  }
2782 #else
2783  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2784  if (pointer && module) {
2785  PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2786  } else {
2787  Py_XDECREF(pointer);
2788  }
2789 #endif
2790 }
2791 
2792 /* The python cached type query */
2793 SWIGRUNTIME PyObject *
2794 SWIG_Python_TypeCache(void) {
2795  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2796  return cache;
2797 }
2798 
2799 SWIGRUNTIME swig_type_info *
2800 SWIG_Python_TypeQuery(const char *type)
2801 {
2802  PyObject *cache = SWIG_Python_TypeCache();
2803  PyObject *key = SWIG_Python_str_FromChar(type);
2804  PyObject *obj = PyDict_GetItem(cache, key);
2805  swig_type_info *descriptor;
2806  if (obj) {
2807 #ifdef SWIGPY_USE_CAPSULE
2808  descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2809 #else
2810  descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2811 #endif
2812  } else {
2813  swig_module_info *swig_module = SWIG_GetModule(0);
2814  descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2815  if (descriptor) {
2816 #ifdef SWIGPY_USE_CAPSULE
2817  obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2818 #else
2819  obj = PyCObject_FromVoidPtr(descriptor, NULL);
2820 #endif
2821  PyDict_SetItem(cache, key, obj);
2822  Py_DECREF(obj);
2823  }
2824  }
2825  Py_DECREF(key);
2826  return descriptor;
2827 }
2828 
2829 /*
2830  For backward compatibility only
2831 */
2832 #define SWIG_POINTER_EXCEPTION 0
2833 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2834 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2835 
2836 SWIGRUNTIME int
2837 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2838 {
2839  if (PyErr_Occurred()) {
2840  PyObject *type = 0;
2841  PyObject *value = 0;
2842  PyObject *traceback = 0;
2843  PyErr_Fetch(&type, &value, &traceback);
2844  if (value) {
2845  char *tmp;
2846  PyObject *old_str = PyObject_Str(value);
2847  Py_XINCREF(type);
2848  PyErr_Clear();
2849  if (infront) {
2850  PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2851  } else {
2852  PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2853  }
2854  SWIG_Python_str_DelForPy3(tmp);
2855  Py_DECREF(old_str);
2856  }
2857  return 1;
2858  } else {
2859  return 0;
2860  }
2861 }
2862 
2863 SWIGRUNTIME int
2864 SWIG_Python_ArgFail(int argnum)
2865 {
2866  if (PyErr_Occurred()) {
2867  /* add information about failing argument */
2868  char mesg[256];
2869  PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2870  return SWIG_Python_AddErrMesg(mesg, 1);
2871  } else {
2872  return 0;
2873  }
2874 }
2875 
2876 SWIGRUNTIMEINLINE const char *
2877 SwigPyObject_GetDesc(PyObject *self)
2878 {
2879  SwigPyObject *v = (SwigPyObject *)self;
2880  swig_type_info *ty = v ? v->ty : 0;
2881  return ty ? ty->str : "";
2882 }
2883 
2884 SWIGRUNTIME void
2885 SWIG_Python_TypeError(const char *type, PyObject *obj)
2886 {
2887  if (type) {
2888 #if defined(SWIG_COBJECT_TYPES)
2889  if (obj && SwigPyObject_Check(obj)) {
2890  const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2891  if (otype) {
2892  PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2893  type, otype);
2894  return;
2895  }
2896  } else
2897 #endif
2898  {
2899  const char *otype = (obj ? obj->ob_type->tp_name : 0);
2900  if (otype) {
2901  PyObject *str = PyObject_Str(obj);
2902  const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2903  if (cstr) {
2904  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2905  type, otype, cstr);
2906  SWIG_Python_str_DelForPy3(cstr);
2907  } else {
2908  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2909  type, otype);
2910  }
2911  Py_XDECREF(str);
2912  return;
2913  }
2914  }
2915  PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2916  } else {
2917  PyErr_Format(PyExc_TypeError, "unexpected type is received");
2918  }
2919 }
2920 
2921 
2922 /* Convert a pointer value, signal an exception on a type mismatch */
2923 SWIGRUNTIME void *
2924 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2925  void *result;
2926  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2927  PyErr_Clear();
2928 #if SWIG_POINTER_EXCEPTION
2929  if (flags) {
2930  SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2931  SWIG_Python_ArgFail(argnum);
2932  }
2933 #endif
2934  }
2935  return result;
2936 }
2937 
2938 #ifdef SWIGPYTHON_BUILTIN
2939 SWIGRUNTIME int
2940 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2941  PyTypeObject *tp = obj->ob_type;
2942  PyObject *descr;
2943  PyObject *encoded_name;
2944  descrsetfunc f;
2945  int res = -1;
2946 
2947 # ifdef Py_USING_UNICODE
2948  if (PyString_Check(name)) {
2949  name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2950  if (!name)
2951  return -1;
2952  } else if (!PyUnicode_Check(name))
2953 # else
2954  if (!PyString_Check(name))
2955 # endif
2956  {
2957  PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2958  return -1;
2959  } else {
2960  Py_INCREF(name);
2961  }
2962 
2963  if (!tp->tp_dict) {
2964  if (PyType_Ready(tp) < 0)
2965  goto done;
2966  }
2967 
2968  descr = _PyType_Lookup(tp, name);
2969  f = NULL;
2970  if (descr != NULL)
2971  f = descr->ob_type->tp_descr_set;
2972  if (!f) {
2973  if (PyString_Check(name)) {
2974  encoded_name = name;
2975  Py_INCREF(name);
2976  } else {
2977  encoded_name = PyUnicode_AsUTF8String(name);
2978  }
2979  PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2980  Py_DECREF(encoded_name);
2981  } else {
2982  res = f(descr, obj, value);
2983  }
2984 
2985  done:
2986  Py_DECREF(name);
2987  return res;
2988 }
2989 #endif
2990 
2991 
2992 #ifdef __cplusplus
2993 }
2994 #endif
2995 
2996 
2997 
2998 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2999 
3000 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
3001 
3002 
3003 
3004 /* -------- TYPES TABLE (BEGIN) -------- */
3005 
3006 #define SWIGTYPE_p_Crev swig_types[0]
3007 #define SWIGTYPE_p_FILE swig_types[1]
3008 #define SWIGTYPE_p_MapLong2Long swig_types[2]
3009 #define SWIGTYPE_p_Node swig_types[3]
3010 #define SWIGTYPE_p_T swig_types[4]
3011 #define SWIGTYPE_p_TI swig_types[5]
3012 #define SWIGTYPE_p_char swig_types[6]
3013 #define SWIGTYPE_p_cublasHandle_t swig_types[7]
3014 #define SWIGTYPE_p_cudaStream_t swig_types[8]
3015 #define SWIGTYPE_p_double swig_types[9]
3016 #define SWIGTYPE_p_faiss__ArrayInvertedLists swig_types[10]
3017 #define SWIGTYPE_p_faiss__AutoTuneCriterion swig_types[11]
3018 #define SWIGTYPE_p_faiss__BinaryInvertedListScanner swig_types[12]
3019 #define SWIGTYPE_p_faiss__BufferList swig_types[13]
3020 #define SWIGTYPE_p_faiss__Cloner swig_types[14]
3021 #define SWIGTYPE_p_faiss__Clustering swig_types[15]
3022 #define SWIGTYPE_p_faiss__ClusteringParameters swig_types[16]
3023 #define SWIGTYPE_p_faiss__ConcatenatedInvertedLists swig_types[17]
3024 #define SWIGTYPE_p_faiss__GenHammingComputer16 swig_types[18]
3025 #define SWIGTYPE_p_faiss__GenHammingComputer32 swig_types[19]
3026 #define SWIGTYPE_p_faiss__GenHammingComputer8 swig_types[20]
3027 #define SWIGTYPE_p_faiss__GenHammingComputerM8 swig_types[21]
3028 #define SWIGTYPE_p_faiss__HNSW swig_types[22]
3029 #define SWIGTYPE_p_faiss__HNSWStats swig_types[23]
3030 #define SWIGTYPE_p_faiss__HNSW__DistanceComputer swig_types[24]
3031 #define SWIGTYPE_p_faiss__HNSW__MinimaxHeap swig_types[25]
3032 #define SWIGTYPE_p_faiss__HammingComputer16 swig_types[26]
3033 #define SWIGTYPE_p_faiss__HammingComputer20 swig_types[27]
3034 #define SWIGTYPE_p_faiss__HammingComputer32 swig_types[28]
3035 #define SWIGTYPE_p_faiss__HammingComputer4 swig_types[29]
3036 #define SWIGTYPE_p_faiss__HammingComputer64 swig_types[30]
3037 #define SWIGTYPE_p_faiss__HammingComputer8 swig_types[31]
3038 #define SWIGTYPE_p_faiss__HammingComputerDefault swig_types[32]
3039 #define SWIGTYPE_p_faiss__HammingComputerM4 swig_types[33]
3040 #define SWIGTYPE_p_faiss__HammingComputerM8 swig_types[34]
3041 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t swig_types[35]
3042 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t swig_types[36]
3043 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t swig_types[37]
3044 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t swig_types[38]
3045 #define SWIGTYPE_p_faiss__IDSelector swig_types[39]
3046 #define SWIGTYPE_p_faiss__IDSelectorBatch swig_types[40]
3047 #define SWIGTYPE_p_faiss__IDSelectorRange swig_types[41]
3048 #define SWIGTYPE_p_faiss__IOReader swig_types[42]
3049 #define SWIGTYPE_p_faiss__IOWriter swig_types[43]
3050 #define SWIGTYPE_p_faiss__IVFPQSearchParameters swig_types[44]
3051 #define SWIGTYPE_p_faiss__IVFSearchParameters swig_types[45]
3052 #define SWIGTYPE_p_faiss__Index swig_types[46]
3053 #define SWIGTYPE_p_faiss__Index2Layer swig_types[47]
3054 #define SWIGTYPE_p_faiss__IndexBinary swig_types[48]
3055 #define SWIGTYPE_p_faiss__IndexBinaryFlat swig_types[49]
3056 #define SWIGTYPE_p_faiss__IndexBinaryFromFloat swig_types[50]
3057 #define SWIGTYPE_p_faiss__IndexBinaryHNSW swig_types[51]
3058 #define SWIGTYPE_p_faiss__IndexBinaryIVF swig_types[52]
3059 #define SWIGTYPE_p_faiss__IndexFlat swig_types[53]
3060 #define SWIGTYPE_p_faiss__IndexFlat1D swig_types[54]
3061 #define SWIGTYPE_p_faiss__IndexFlatIP swig_types[55]
3062 #define SWIGTYPE_p_faiss__IndexFlatL2 swig_types[56]
3063 #define SWIGTYPE_p_faiss__IndexFlatL2BaseShift swig_types[57]
3064 #define SWIGTYPE_p_faiss__IndexHNSW swig_types[58]
3065 #define SWIGTYPE_p_faiss__IndexHNSW2Level swig_types[59]
3066 #define SWIGTYPE_p_faiss__IndexHNSWFlat swig_types[60]
3067 #define SWIGTYPE_p_faiss__IndexHNSWPQ swig_types[61]
3068 #define SWIGTYPE_p_faiss__IndexHNSWSQ swig_types[62]
3069 #define SWIGTYPE_p_faiss__IndexIDMap swig_types[63]
3070 #define SWIGTYPE_p_faiss__IndexIDMap2 swig_types[64]
3071 #define SWIGTYPE_p_faiss__IndexIVF swig_types[65]
3072 #define SWIGTYPE_p_faiss__IndexIVFFlat swig_types[66]
3073 #define SWIGTYPE_p_faiss__IndexIVFFlatDedup swig_types[67]
3074 #define SWIGTYPE_p_faiss__IndexIVFPQ swig_types[68]
3075 #define SWIGTYPE_p_faiss__IndexIVFPQR swig_types[69]
3076 #define SWIGTYPE_p_faiss__IndexIVFPQStats swig_types[70]
3077 #define SWIGTYPE_p_faiss__IndexIVFScalarQuantizer swig_types[71]
3078 #define SWIGTYPE_p_faiss__IndexIVFStats swig_types[72]
3079 #define SWIGTYPE_p_faiss__IndexLSH swig_types[73]
3080 #define SWIGTYPE_p_faiss__IndexPQ swig_types[74]
3081 #define SWIGTYPE_p_faiss__IndexPQStats swig_types[75]
3082 #define SWIGTYPE_p_faiss__IndexPreTransform swig_types[76]
3083 #define SWIGTYPE_p_faiss__IndexRefineFlat swig_types[77]
3084 #define SWIGTYPE_p_faiss__IndexScalarQuantizer swig_types[78]
3085 #define SWIGTYPE_p_faiss__IndexShards swig_types[79]
3086 #define SWIGTYPE_p_faiss__IndexSplitVectors swig_types[80]
3087 #define SWIGTYPE_p_faiss__IntersectionCriterion swig_types[81]
3088 #define SWIGTYPE_p_faiss__InvertedListScanner swig_types[82]
3089 #define SWIGTYPE_p_faiss__InvertedLists swig_types[83]
3090 #define SWIGTYPE_p_faiss__Level1Quantizer swig_types[84]
3091 #define SWIGTYPE_p_faiss__LinearTransform swig_types[85]
3092 #define SWIGTYPE_p_faiss__LockLevels swig_types[86]
3093 #define SWIGTYPE_p_faiss__MultiIndexQuantizer swig_types[87]
3094 #define SWIGTYPE_p_faiss__MultiIndexQuantizer2 swig_types[88]
3095 #define SWIGTYPE_p_faiss__NormalizationTransform swig_types[89]
3096 #define SWIGTYPE_p_faiss__OPQMatrix swig_types[90]
3097 #define SWIGTYPE_p_faiss__OnDiskInvertedLists swig_types[91]
3098 #define SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch swig_types[92]
3099 #define SWIGTYPE_p_faiss__OneRecallAtRCriterion swig_types[93]
3100 #define SWIGTYPE_p_faiss__OperatingPoint swig_types[94]
3101 #define SWIGTYPE_p_faiss__OperatingPoints swig_types[95]
3102 #define SWIGTYPE_p_faiss__PCAMatrix swig_types[96]
3103 #define SWIGTYPE_p_faiss__ParameterRange swig_types[97]
3104 #define SWIGTYPE_p_faiss__ParameterSpace swig_types[98]
3105 #define SWIGTYPE_p_faiss__PermutationObjective swig_types[99]
3106 #define SWIGTYPE_p_faiss__PolysemousTraining swig_types[100]
3107 #define SWIGTYPE_p_faiss__ProductQuantizer swig_types[101]
3108 #define SWIGTYPE_p_faiss__RandomGenerator swig_types[102]
3109 #define SWIGTYPE_p_faiss__RandomRotationMatrix swig_types[103]
3110 #define SWIGTYPE_p_faiss__RangeSearchPartialResult swig_types[104]
3111 #define SWIGTYPE_p_faiss__RangeSearchPartialResult__QueryResult swig_types[105]
3112 #define SWIGTYPE_p_faiss__RangeSearchResult swig_types[106]
3113 #define SWIGTYPE_p_faiss__ReconstructFromNeighbors swig_types[107]
3114 #define SWIGTYPE_p_faiss__RemapDimensionsTransform swig_types[108]
3115 #define SWIGTYPE_p_faiss__ReproduceDistancesObjective swig_types[109]
3116 #define SWIGTYPE_p_faiss__ScalarQuantizer swig_types[110]
3117 #define SWIGTYPE_p_faiss__ScalarQuantizer__DistanceComputer swig_types[111]
3118 #define SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer swig_types[112]
3119 #define SWIGTYPE_p_faiss__SimulatedAnnealingParameters swig_types[113]
3120 #define SWIGTYPE_p_faiss__VectorIOReader swig_types[114]
3121 #define SWIGTYPE_p_faiss__VectorIOWriter swig_types[115]
3122 #define SWIGTYPE_p_faiss__VectorTransform swig_types[116]
3123 #define SWIGTYPE_p_faiss__VisitedTable swig_types[117]
3124 #define SWIGTYPE_p_faiss__gpu__FlatIndex swig_types[118]
3125 #define SWIGTYPE_p_faiss__gpu__GpuClonerOptions swig_types[119]
3126 #define SWIGTYPE_p_faiss__gpu__GpuIndex swig_types[120]
3127 #define SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat swig_types[121]
3128 #define SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig swig_types[122]
3129 #define SWIGTYPE_p_faiss__gpu__GpuIndexConfig swig_types[123]
3130 #define SWIGTYPE_p_faiss__gpu__GpuIndexFlat swig_types[124]
3131 #define SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig swig_types[125]
3132 #define SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP swig_types[126]
3133 #define SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2 swig_types[127]
3134 #define SWIGTYPE_p_faiss__gpu__GpuIndexIVF swig_types[128]
3135 #define SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig swig_types[129]
3136 #define SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat swig_types[130]
3137 #define SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig swig_types[131]
3138 #define SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ swig_types[132]
3139 #define SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig swig_types[133]
3140 #define SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions swig_types[134]
3141 #define SWIGTYPE_p_faiss__gpu__GpuParameterSpace swig_types[135]
3142 #define SWIGTYPE_p_faiss__gpu__GpuResources swig_types[136]
3143 #define SWIGTYPE_p_faiss__gpu__IndexProxy swig_types[137]
3144 #define SWIGTYPE_p_faiss__gpu__StandardGpuResources swig_types[138]
3145 #define SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow swig_types[139]
3146 #define SWIGTYPE_p_float swig_types[140]
3147 #define SWIGTYPE_p_idx_t swig_types[141]
3148 #define SWIGTYPE_p_int swig_types[142]
3149 #define SWIGTYPE_p_long swig_types[143]
3150 #define SWIGTYPE_p_omp_lock_t swig_types[144]
3151 #define SWIGTYPE_p_p_faiss__ArrayInvertedLists swig_types[145]
3152 #define SWIGTYPE_p_p_faiss__ConcatenatedInvertedLists swig_types[146]
3153 #define SWIGTYPE_p_p_faiss__Index swig_types[147]
3154 #define SWIGTYPE_p_p_faiss__Index2Layer swig_types[148]
3155 #define SWIGTYPE_p_p_faiss__IndexFlat swig_types[149]
3156 #define SWIGTYPE_p_p_faiss__IndexFlat1D swig_types[150]
3157 #define SWIGTYPE_p_p_faiss__IndexFlatIP swig_types[151]
3158 #define SWIGTYPE_p_p_faiss__IndexFlatL2 swig_types[152]
3159 #define SWIGTYPE_p_p_faiss__IndexFlatL2BaseShift swig_types[153]
3160 #define SWIGTYPE_p_p_faiss__IndexHNSW swig_types[154]
3161 #define SWIGTYPE_p_p_faiss__IndexHNSW2Level swig_types[155]
3162 #define SWIGTYPE_p_p_faiss__IndexHNSWFlat swig_types[156]
3163 #define SWIGTYPE_p_p_faiss__IndexHNSWPQ swig_types[157]
3164 #define SWIGTYPE_p_p_faiss__IndexHNSWSQ swig_types[158]
3165 #define SWIGTYPE_p_p_faiss__IndexIDMap swig_types[159]
3166 #define SWIGTYPE_p_p_faiss__IndexIDMap2 swig_types[160]
3167 #define SWIGTYPE_p_p_faiss__IndexIVF swig_types[161]
3168 #define SWIGTYPE_p_p_faiss__IndexIVFFlat swig_types[162]
3169 #define SWIGTYPE_p_p_faiss__IndexIVFFlatDedup swig_types[163]
3170 #define SWIGTYPE_p_p_faiss__IndexIVFPQ swig_types[164]
3171 #define SWIGTYPE_p_p_faiss__IndexIVFPQR swig_types[165]
3172 #define SWIGTYPE_p_p_faiss__IndexIVFScalarQuantizer swig_types[166]
3173 #define SWIGTYPE_p_p_faiss__IndexLSH swig_types[167]
3174 #define SWIGTYPE_p_p_faiss__IndexPQ swig_types[168]
3175 #define SWIGTYPE_p_p_faiss__IndexPreTransform swig_types[169]
3176 #define SWIGTYPE_p_p_faiss__IndexRefineFlat swig_types[170]
3177 #define SWIGTYPE_p_p_faiss__IndexScalarQuantizer swig_types[171]
3178 #define SWIGTYPE_p_p_faiss__IndexShards swig_types[172]
3179 #define SWIGTYPE_p_p_faiss__IndexSplitVectors swig_types[173]
3180 #define SWIGTYPE_p_p_faiss__InvertedLists swig_types[174]
3181 #define SWIGTYPE_p_p_faiss__LinearTransform swig_types[175]
3182 #define SWIGTYPE_p_p_faiss__MultiIndexQuantizer swig_types[176]
3183 #define SWIGTYPE_p_p_faiss__MultiIndexQuantizer2 swig_types[177]
3184 #define SWIGTYPE_p_p_faiss__NormalizationTransform swig_types[178]
3185 #define SWIGTYPE_p_p_faiss__OPQMatrix swig_types[179]
3186 #define SWIGTYPE_p_p_faiss__OnDiskInvertedLists swig_types[180]
3187 #define SWIGTYPE_p_p_faiss__PCAMatrix swig_types[181]
3188 #define SWIGTYPE_p_p_faiss__RandomRotationMatrix swig_types[182]
3189 #define SWIGTYPE_p_p_faiss__RemapDimensionsTransform swig_types[183]
3190 #define SWIGTYPE_p_p_faiss__VectorTransform swig_types[184]
3191 #define SWIGTYPE_p_p_faiss__gpu__GpuIndex swig_types[185]
3192 #define SWIGTYPE_p_p_faiss__gpu__GpuIndexFlat swig_types[186]
3193 #define SWIGTYPE_p_p_faiss__gpu__GpuIndexFlatIP swig_types[187]
3194 #define SWIGTYPE_p_p_faiss__gpu__GpuIndexFlatL2 swig_types[188]
3195 #define SWIGTYPE_p_p_faiss__gpu__GpuIndexIVF swig_types[189]
3196 #define SWIGTYPE_p_p_faiss__gpu__GpuIndexIVFFlat swig_types[190]
3197 #define SWIGTYPE_p_p_faiss__gpu__GpuIndexIVFPQ swig_types[191]
3198 #define SWIGTYPE_p_p_faiss__gpu__GpuResources swig_types[192]
3199 #define SWIGTYPE_p_p_faiss__gpu__IndexProxy swig_types[193]
3200 #define SWIGTYPE_p_p_faiss__gpu__StandardGpuResources swig_types[194]
3201 #define SWIGTYPE_p_p_void swig_types[195]
3202 #define SWIGTYPE_p_std__functionT_void_ffaiss__Index_pF_t swig_types[196]
3203 #define SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t swig_types[197]
3204 #define SWIGTYPE_p_std__mt19937 swig_types[198]
3205 #define SWIGTYPE_p_std__pairT_float_int_t swig_types[199]
3206 #define SWIGTYPE_p_std__pairT_void_p_unsigned_long_t swig_types[200]
3207 #define SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t swig_types[201]
3208 #define SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t swig_types[202]
3209 #define SWIGTYPE_p_std__unordered_mapT_long_long_t swig_types[203]
3210 #define SWIGTYPE_p_std__unordered_multimapT_long_long_t swig_types[204]
3211 #define SWIGTYPE_p_std__vectorT_char_t swig_types[205]
3212 #define SWIGTYPE_p_std__vectorT_cudaStream_t_t swig_types[206]
3213 #define SWIGTYPE_p_std__vectorT_double_t swig_types[207]
3214 #define SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t swig_types[208]
3215 #define SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t swig_types[209]
3216 #define SWIGTYPE_p_std__vectorT_faiss__Index_p_t swig_types[210]
3217 #define SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t swig_types[211]
3218 #define SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t swig_types[212]
3219 #define SWIGTYPE_p_std__vectorT_faiss__OnDiskInvertedLists__List_t swig_types[213]
3220 #define SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t swig_types[214]
3221 #define SWIGTYPE_p_std__vectorT_faiss__ParameterRange_t swig_types[215]
3222 #define SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t swig_types[216]
3223 #define SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t swig_types[217]
3224 #define SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t swig_types[218]
3225 #define SWIGTYPE_p_std__vectorT_float_t swig_types[219]
3226 #define SWIGTYPE_p_std__vectorT_int_t swig_types[220]
3227 #define SWIGTYPE_p_std__vectorT_long_t swig_types[221]
3228 #define SWIGTYPE_p_std__vectorT_omp_lock_t_t swig_types[222]
3229 #define SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t swig_types[223]
3230 #define SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t swig_types[224]
3231 #define SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t swig_types[225]
3232 #define SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_long_t_t swig_types[226]
3233 #define SWIGTYPE_p_std__vectorT_unsigned_char_t swig_types[227]
3234 #define SWIGTYPE_p_std__vectorT_unsigned_long_t swig_types[228]
3235 #define SWIGTYPE_p_storage_idx_t swig_types[229]
3236 #define SWIGTYPE_p_uint32_t swig_types[230]
3237 #define SWIGTYPE_p_unsigned_char swig_types[231]
3238 #define SWIGTYPE_p_unsigned_long swig_types[232]
3239 #define SWIGTYPE_p_void swig_types[233]
3240 static swig_type_info *swig_types[235];
3241 static swig_module_info swig_module = {swig_types, 234, 0, 0, 0, 0};
3242 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3243 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3244 
3245 /* -------- TYPES TABLE (END) -------- */
3246 
3247 #if (PY_VERSION_HEX <= 0x02000000)
3248 # if !defined(SWIG_PYTHON_CLASSIC)
3249 # error "This python version requires swig to be run with the '-classic' option"
3250 # endif
3251 #endif
3252 
3253 /*-----------------------------------------------
3254  @(target):= _swigfaiss_gpu.so
3255  ------------------------------------------------*/
3256 #if PY_VERSION_HEX >= 0x03000000
3257 # define SWIG_init PyInit__swigfaiss_gpu
3258 
3259 #else
3260 # define SWIG_init init_swigfaiss_gpu
3261 
3262 #endif
3263 #define SWIG_name "_swigfaiss_gpu"
3264 
3265 #define SWIGVERSION 0x030012
3266 #define SWIG_VERSION SWIGVERSION
3267 
3268 
3269 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3270 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3271 
3272 
3273 #include <stdexcept>
3274 
3275 
3276 namespace swig {
3278  protected:
3279  PyObject *_obj;
3280 
3281  public:
3282  SwigPtr_PyObject() :_obj(0)
3283  {
3284  }
3285 
3286  SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
3287  {
3288  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3289  Py_XINCREF(_obj);
3290  SWIG_PYTHON_THREAD_END_BLOCK;
3291  }
3292 
3293  SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
3294  {
3295  if (initial_ref) {
3296  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3297  Py_XINCREF(_obj);
3298  SWIG_PYTHON_THREAD_END_BLOCK;
3299  }
3300  }
3301 
3302  SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
3303  {
3304  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3305  Py_XINCREF(item._obj);
3306  Py_XDECREF(_obj);
3307  _obj = item._obj;
3308  SWIG_PYTHON_THREAD_END_BLOCK;
3309  return *this;
3310  }
3311 
3312  ~SwigPtr_PyObject()
3313  {
3314  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3315  Py_XDECREF(_obj);
3316  SWIG_PYTHON_THREAD_END_BLOCK;
3317  }
3318 
3319  operator PyObject *() const
3320  {
3321  return _obj;
3322  }
3323 
3324  PyObject *operator->() const
3325  {
3326  return _obj;
3327  }
3328  };
3329 }
3330 
3331 
3332 namespace swig {
3334  SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
3335 
3336  SwigVar_PyObject & operator = (PyObject* obj)
3337  {
3338  Py_XDECREF(_obj);
3339  _obj = obj;
3340  return *this;
3341  }
3342  };
3343 }
3344 
3345 
3346 
3347 
3348 #include <stdint.h>
3349 #include <omp.h>
3350 
3351 
3352 #ifdef SWIGLUA
3353 
3354 #include <pthread.h>
3355 
3356 extern "C" {
3357 
3358 #include <TH/TH.h>
3359 #include <luaT.h>
3360 #undef THTensor
3361 
3362 }
3363 
3364 #endif
3365 
3366 
3367 #ifdef SWIGPYTHON
3368 
3369 #undef popcount64
3370 
3371 #define SWIG_FILE_WITH_INIT
3372 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
3373 #include <numpy/arrayobject.h>
3374 
3375 #endif
3376 
3377 
3378 #include "IndexFlat.h"
3379 #include "VectorTransform.h"
3380 #include "IndexLSH.h"
3381 #include "IndexPQ.h"
3382 #include "IndexIVF.h"
3383 #include "IndexIVFPQ.h"
3384 #include "IndexIVFFlat.h"
3385 #include "IndexScalarQuantizer.h"
3386 #include "HNSW.h"
3387 #include "IndexHNSW.h"
3388 #include "MetaIndexes.h"
3389 #include "FaissAssert.h"
3390 
3391 #include "IndexBinaryFlat.h"
3392 #include "IndexBinaryIVF.h"
3393 #include "IndexBinaryFromFloat.h"
3394 #include "IndexBinaryHNSW.h"
3395 
3396 #include "index_io.h"
3397 
3398 #include "IVFlib.h"
3399 #include "utils.h"
3400 #include "Heap.h"
3401 #include "AuxIndexStructures.h"
3402 #include "OnDiskInvertedLists.h"
3403 
3404 #include "Clustering.h"
3405 
3406 #include "hamming.h"
3407 
3408 #include "AutoTune.h"
3409 
3410 
3411 
3412 
3413 
3414 #include <float.h>
3415 
3416 
3417 #include <math.h>
3418 
3419 
3420 /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
3421 #ifndef SWIG_isfinite
3422 /* isfinite() is a macro for C99 */
3423 # if defined(isfinite)
3424 # define SWIG_isfinite(X) (isfinite(X))
3425 # elif defined __cplusplus && __cplusplus >= 201103L
3426 /* Use a template so that this works whether isfinite() is std::isfinite() or
3427  * in the global namespace. The reality seems to vary between compiler
3428  * versions.
3429  *
3430  * Make sure namespace std exists to avoid compiler warnings.
3431  *
3432  * extern "C++" is required as this fragment can end up inside an extern "C" { } block
3433  */
3434 namespace std { }
3435 extern "C++" template<typename T>
3436 inline int SWIG_isfinite_func(T x) {
3437  using namespace std;
3438  return isfinite(x);
3439 }
3440 # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
3441 # elif defined(_MSC_VER)
3442 # define SWIG_isfinite(X) (_finite(X))
3443 # elif defined(__sun) && defined(__SVR4)
3444 # include <ieeefp.h>
3445 # define SWIG_isfinite(X) (finite(X))
3446 # endif
3447 #endif
3448 
3449 
3450 /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
3451 #ifdef SWIG_isfinite
3452 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
3453 #else
3454 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
3455 #endif
3456 
3457 
3458 SWIGINTERN int
3459 SWIG_AsVal_double (PyObject *obj, double *val)
3460 {
3461  int res = SWIG_TypeError;
3462  if (PyFloat_Check(obj)) {
3463  if (val) *val = PyFloat_AsDouble(obj);
3464  return SWIG_OK;
3465 #if PY_VERSION_HEX < 0x03000000
3466  } else if (PyInt_Check(obj)) {
3467  if (val) *val = (double) PyInt_AsLong(obj);
3468  return SWIG_OK;
3469 #endif
3470  } else if (PyLong_Check(obj)) {
3471  double v = PyLong_AsDouble(obj);
3472  if (!PyErr_Occurred()) {
3473  if (val) *val = v;
3474  return SWIG_OK;
3475  } else {
3476  PyErr_Clear();
3477  }
3478  }
3479 #ifdef SWIG_PYTHON_CAST_MODE
3480  {
3481  int dispatch = 0;
3482  double d = PyFloat_AsDouble(obj);
3483  if (!PyErr_Occurred()) {
3484  if (val) *val = d;
3485  return SWIG_AddCast(SWIG_OK);
3486  } else {
3487  PyErr_Clear();
3488  }
3489  if (!dispatch) {
3490  long v = PyLong_AsLong(obj);
3491  if (!PyErr_Occurred()) {
3492  if (val) *val = v;
3493  return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3494  } else {
3495  PyErr_Clear();
3496  }
3497  }
3498  }
3499 #endif
3500  return res;
3501 }
3502 
3503 
3504 SWIGINTERN int
3505 SWIG_AsVal_float (PyObject * obj, float *val)
3506 {
3507  double v;
3508  int res = SWIG_AsVal_double (obj, &v);
3509  if (SWIG_IsOK(res)) {
3510  if (SWIG_Float_Overflow_Check(v)) {
3511  return SWIG_OverflowError;
3512  } else {
3513  if (val) *val = static_cast< float >(v);
3514  }
3515  }
3516  return res;
3517 }
3518 
3519 
3520  #define SWIG_From_long PyInt_FromLong
3521 
3522 
3523 SWIGINTERNINLINE PyObject*
3524 SWIG_From_unsigned_SS_long (unsigned long value)
3525 {
3526  return (value > LONG_MAX) ?
3527  PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
3528 }
3529 
3530 
3531 #include <limits.h>
3532 #if !defined(SWIG_NO_LLONG_MAX)
3533 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3534 # define LLONG_MAX __LONG_LONG_MAX__
3535 # define LLONG_MIN (-LLONG_MAX - 1LL)
3536 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3537 # endif
3538 #endif
3539 
3540 
3541 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
3542 # define SWIG_LONG_LONG_AVAILABLE
3543 #endif
3544 
3545 
3546 #ifdef SWIG_LONG_LONG_AVAILABLE
3547 SWIGINTERNINLINE PyObject*
3548 SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
3549 {
3550  return (value > LONG_MAX) ?
3551  PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
3552 }
3553 #endif
3554 
3555 
3556 SWIGINTERNINLINE PyObject *
3557 SWIG_From_size_t (size_t value)
3558 {
3559 #ifdef SWIG_LONG_LONG_AVAILABLE
3560  if (sizeof(size_t) <= sizeof(unsigned long)) {
3561 #endif
3562  return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
3563 #ifdef SWIG_LONG_LONG_AVAILABLE
3564  } else {
3565  /* assume sizeof(size_t) <= sizeof(unsigned long long) */
3566  return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value));
3567  }
3568 #endif
3569 }
3570 
3571 
3572 SWIGINTERNINLINE int
3573 SWIG_CanCastAsInteger(double *d, double min, double max) {
3574  double x = *d;
3575  if ((min <= x && x <= max)) {
3576  double fx = floor(x);
3577  double cx = ceil(x);
3578  double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3579  if ((errno == EDOM) || (errno == ERANGE)) {
3580  errno = 0;
3581  } else {
3582  double summ, reps, diff;
3583  if (rd < x) {
3584  diff = x - rd;
3585  } else if (rd > x) {
3586  diff = rd - x;
3587  } else {
3588  return 1;
3589  }
3590  summ = rd + x;
3591  reps = diff/summ;
3592  if (reps < 8*DBL_EPSILON) {
3593  *d = rd;
3594  return 1;
3595  }
3596  }
3597  }
3598  return 0;
3599 }
3600 
3601 
3602 SWIGINTERN int
3603 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
3604 {
3605 #if PY_VERSION_HEX < 0x03000000
3606  if (PyInt_Check(obj)) {
3607  long v = PyInt_AsLong(obj);
3608  if (v >= 0) {
3609  if (val) *val = v;
3610  return SWIG_OK;
3611  } else {
3612  return SWIG_OverflowError;
3613  }
3614  } else
3615 #endif
3616  if (PyLong_Check(obj)) {
3617  unsigned long v = PyLong_AsUnsignedLong(obj);
3618  if (!PyErr_Occurred()) {
3619  if (val) *val = v;
3620  return SWIG_OK;
3621  } else {
3622  PyErr_Clear();
3623  return SWIG_OverflowError;
3624  }
3625  }
3626 #ifdef SWIG_PYTHON_CAST_MODE
3627  {
3628  int dispatch = 0;
3629  unsigned long v = PyLong_AsUnsignedLong(obj);
3630  if (!PyErr_Occurred()) {
3631  if (val) *val = v;
3632  return SWIG_AddCast(SWIG_OK);
3633  } else {
3634  PyErr_Clear();
3635  }
3636  if (!dispatch) {
3637  double d;
3638  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3639  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3640  if (val) *val = (unsigned long)(d);
3641  return res;
3642  }
3643  }
3644  }
3645 #endif
3646  return SWIG_TypeError;
3647 }
3648 
3649 
3650 #ifdef SWIG_LONG_LONG_AVAILABLE
3651 SWIGINTERN int
3652 SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
3653 {
3654  int res = SWIG_TypeError;
3655  if (PyLong_Check(obj)) {
3656  unsigned long long v = PyLong_AsUnsignedLongLong(obj);
3657  if (!PyErr_Occurred()) {
3658  if (val) *val = v;
3659  return SWIG_OK;
3660  } else {
3661  PyErr_Clear();
3662  res = SWIG_OverflowError;
3663  }
3664  } else {
3665  unsigned long v;
3666  res = SWIG_AsVal_unsigned_SS_long (obj,&v);
3667  if (SWIG_IsOK(res)) {
3668  if (val) *val = v;
3669  return res;
3670  }
3671  }
3672 #ifdef SWIG_PYTHON_CAST_MODE
3673  {
3674  const double mant_max = 1LL << DBL_MANT_DIG;
3675  double d;
3676  res = SWIG_AsVal_double (obj,&d);
3677  if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
3678  return SWIG_OverflowError;
3679  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
3680  if (val) *val = (unsigned long long)(d);
3681  return SWIG_AddCast(res);
3682  }
3683  res = SWIG_TypeError;
3684  }
3685 #endif
3686  return res;
3687 }
3688 #endif
3689 
3690 
3691 SWIGINTERNINLINE int
3692 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
3693 {
3694  int res = SWIG_TypeError;
3695 #ifdef SWIG_LONG_LONG_AVAILABLE
3696  if (sizeof(size_t) <= sizeof(unsigned long)) {
3697 #endif
3698  unsigned long v;
3699  res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3700  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3701 #ifdef SWIG_LONG_LONG_AVAILABLE
3702  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
3703  unsigned long long v;
3704  res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
3705  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3706  }
3707 #endif
3708  return res;
3709 }
3710 
3711 
3712  #define SWIG_From_double PyFloat_FromDouble
3713 
3714 
3715 SWIGINTERNINLINE PyObject *
3716 SWIG_From_float (float value)
3717 {
3718  return SWIG_From_double (value);
3719 }
3720 
3721 
3722 SWIGINTERN int
3723 SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
3724 {
3725  unsigned long v;
3726  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3727  if (SWIG_IsOK(res)) {
3728  if ((v > UCHAR_MAX)) {
3729  return SWIG_OverflowError;
3730  } else {
3731  if (val) *val = static_cast< unsigned char >(v);
3732  }
3733  }
3734  return res;
3735 }
3736 
3737 
3738 SWIGINTERNINLINE PyObject *
3739 SWIG_From_unsigned_SS_char (unsigned char value)
3740 {
3741  return SWIG_From_unsigned_SS_long (value);
3742 }
3743 
3744 
3745 SWIGINTERN swig_type_info*
3746 SWIG_pchar_descriptor(void)
3747 {
3748  static int init = 0;
3749  static swig_type_info* info = 0;
3750  if (!init) {
3751  info = SWIG_TypeQuery("_p_char");
3752  init = 1;
3753  }
3754  return info;
3755 }
3756 
3757 
3758 SWIGINTERN int
3759 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3760 {
3761 #if PY_VERSION_HEX>=0x03000000
3762 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3763  if (PyBytes_Check(obj))
3764 #else
3765  if (PyUnicode_Check(obj))
3766 #endif
3767 #else
3768  if (PyString_Check(obj))
3769 #endif
3770  {
3771  char *cstr; Py_ssize_t len;
3772 #if PY_VERSION_HEX>=0x03000000
3773 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3774  if (!alloc && cptr) {
3775  /* We can't allow converting without allocation, since the internal
3776  representation of string in Python 3 is UCS-2/UCS-4 but we require
3777  a UTF-8 representation.
3778  TODO(bhy) More detailed explanation */
3779  return SWIG_RuntimeError;
3780  }
3781  obj = PyUnicode_AsUTF8String(obj);
3782  if(alloc) *alloc = SWIG_NEWOBJ;
3783 #endif
3784  PyBytes_AsStringAndSize(obj, &cstr, &len);
3785 #else
3786  PyString_AsStringAndSize(obj, &cstr, &len);
3787 #endif
3788  if (cptr) {
3789  if (alloc) {
3790  /*
3791  In python the user should not be able to modify the inner
3792  string representation. To warranty that, if you define
3793  SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3794  buffer is always returned.
3795 
3796  The default behavior is just to return the pointer value,
3797  so, be careful.
3798  */
3799 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3800  if (*alloc != SWIG_OLDOBJ)
3801 #else
3802  if (*alloc == SWIG_NEWOBJ)
3803 #endif
3804  {
3805  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3806  *alloc = SWIG_NEWOBJ;
3807  } else {
3808  *cptr = cstr;
3809  *alloc = SWIG_OLDOBJ;
3810  }
3811  } else {
3812 #if PY_VERSION_HEX>=0x03000000
3813 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3814  *cptr = PyBytes_AsString(obj);
3815 #else
3816  assert(0); /* Should never reach here with Unicode strings in Python 3 */
3817 #endif
3818 #else
3819  *cptr = SWIG_Python_str_AsChar(obj);
3820 #endif
3821  }
3822  }
3823  if (psize) *psize = len + 1;
3824 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3825  Py_XDECREF(obj);
3826 #endif
3827  return SWIG_OK;
3828  } else {
3829 #if defined(SWIG_PYTHON_2_UNICODE)
3830 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3831 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3832 #endif
3833 #if PY_VERSION_HEX<0x03000000
3834  if (PyUnicode_Check(obj)) {
3835  char *cstr; Py_ssize_t len;
3836  if (!alloc && cptr) {
3837  return SWIG_RuntimeError;
3838  }
3839  obj = PyUnicode_AsUTF8String(obj);
3840  if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3841  if (cptr) {
3842  if (alloc) *alloc = SWIG_NEWOBJ;
3843  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3844  }
3845  if (psize) *psize = len + 1;
3846 
3847  Py_XDECREF(obj);
3848  return SWIG_OK;
3849  } else {
3850  Py_XDECREF(obj);
3851  }
3852  }
3853 #endif
3854 #endif
3855 
3856  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3857  if (pchar_descriptor) {
3858  void* vptr = 0;
3859  if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3860  if (cptr) *cptr = (char *) vptr;
3861  if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3862  if (alloc) *alloc = SWIG_OLDOBJ;
3863  return SWIG_OK;
3864  }
3865  }
3866  }
3867  return SWIG_TypeError;
3868 }
3869 
3870 
3871 SWIGINTERN int
3872 SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
3873 {
3874  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
3875  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
3876  if (SWIG_IsOK(res)) {
3877  /* special case of single char conversion when we don't need space for NUL */
3878  if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
3879  if (csize <= size) {
3880  if (val) {
3881  if (csize) memcpy(val, cptr, csize*sizeof(char));
3882  if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
3883  }
3884  if (alloc == SWIG_NEWOBJ) {
3885  delete[] cptr;
3886  res = SWIG_DelNewMask(res);
3887  }
3888  return res;
3889  }
3890  if (alloc == SWIG_NEWOBJ) delete[] cptr;
3891  }
3892  return SWIG_TypeError;
3893 }
3894 
3895 
3896 SWIGINTERN int
3897 SWIG_AsVal_long (PyObject *obj, long* val)
3898 {
3899 #if PY_VERSION_HEX < 0x03000000
3900  if (PyInt_Check(obj)) {
3901  if (val) *val = PyInt_AsLong(obj);
3902  return SWIG_OK;
3903  } else
3904 #endif
3905  if (PyLong_Check(obj)) {
3906  long v = PyLong_AsLong(obj);
3907  if (!PyErr_Occurred()) {
3908  if (val) *val = v;
3909  return SWIG_OK;
3910  } else {
3911  PyErr_Clear();
3912  return SWIG_OverflowError;
3913  }
3914  }
3915 #ifdef SWIG_PYTHON_CAST_MODE
3916  {
3917  int dispatch = 0;
3918  long v = PyInt_AsLong(obj);
3919  if (!PyErr_Occurred()) {
3920  if (val) *val = v;
3921  return SWIG_AddCast(SWIG_OK);
3922  } else {
3923  PyErr_Clear();
3924  }
3925  if (!dispatch) {
3926  double d;
3927  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3928  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3929  if (val) *val = (long)(d);
3930  return res;
3931  }
3932  }
3933  }
3934 #endif
3935  return SWIG_TypeError;
3936 }
3937 
3938 
3939 SWIGINTERN int
3940 SWIG_AsVal_char (PyObject * obj, char *val)
3941 {
3942  int res = SWIG_AsCharArray(obj, val, 1);
3943  if (!SWIG_IsOK(res)) {
3944  long v;
3945  res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
3946  if (SWIG_IsOK(res)) {
3947  if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
3948  if (val) *val = static_cast< char >(v);
3949  } else {
3950  res = SWIG_OverflowError;
3951  }
3952  }
3953  }
3954  return res;
3955 }
3956 
3957 
3958 SWIGINTERNINLINE PyObject *
3959 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3960 {
3961  if (carray) {
3962  if (size > INT_MAX) {
3963  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3964  return pchar_descriptor ?
3965  SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3966  } else {
3967 #if PY_VERSION_HEX >= 0x03000000
3968 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3969  return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3970 #else
3971 #if PY_VERSION_HEX >= 0x03010000
3972  return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3973 #else
3974  return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3975 #endif
3976 #endif
3977 #else
3978  return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3979 #endif
3980  }
3981  } else {
3982  return SWIG_Py_Void();
3983  }
3984 }
3985 
3986 
3987 SWIGINTERNINLINE PyObject *
3988 SWIG_FromCharPtr(const char *cptr)
3989 {
3990  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3991 }
3992 
3993 
3994 SWIGINTERNINLINE PyObject *
3995 SWIG_From_char (char c)
3996 {
3997  return SWIG_FromCharPtrAndSize(&c,1);
3998 }
3999 
4000 
4001 SWIGINTERN int
4002 SWIG_AsVal_int (PyObject * obj, int *val)
4003 {
4004  long v;
4005  int res = SWIG_AsVal_long (obj, &v);
4006  if (SWIG_IsOK(res)) {
4007  if ((v < INT_MIN || v > INT_MAX)) {
4008  return SWIG_OverflowError;
4009  } else {
4010  if (val) *val = static_cast< int >(v);
4011  }
4012  }
4013  return res;
4014 }
4015 
4016 
4017 SWIGINTERNINLINE PyObject*
4018  SWIG_From_int (int value)
4019 {
4020  return PyInt_FromLong((long) value);
4021 }
4022 
4023 
4024 #include <string>
4025 
4026 
4027 
4028 #include "gpu/StandardGpuResources.h"
4029 #include "gpu/GpuIndicesOptions.h"
4030 #include "gpu/GpuClonerOptions.h"
4031 #include "gpu/utils/MemorySpace.h"
4032 #include "gpu/GpuIndex.h"
4033 #include "gpu/GpuIndexFlat.h"
4034 #include "gpu/GpuIndexIVF.h"
4035 #include "gpu/GpuIndexIVFPQ.h"
4036 #include "gpu/GpuIndexIVFFlat.h"
4037 #include "gpu/GpuIndexBinaryFlat.h"
4038 #include "gpu/IndexProxy.h"
4039 #include "gpu/GpuAutoTune.h"
4040 #include "gpu/GpuDistance.h"
4041 
4042 int get_num_gpus()
4043 {
4044  return faiss::gpu::getNumDevices();
4045 }
4046 
4047 
4048 
4049 SWIGINTERN int
4050 SWIG_AsVal_bool (PyObject *obj, bool *val)
4051 {
4052  int r;
4053  if (!PyBool_Check(obj))
4054  return SWIG_ERROR;
4055  r = PyObject_IsTrue(obj);
4056  if (r == -1)
4057  return SWIG_ERROR;
4058  if (val) *val = r ? true : false;
4059  return SWIG_OK;
4060 }
4061 
4062 
4063 SWIGINTERNINLINE PyObject*
4064  SWIG_From_bool (bool value)
4065 {
4066  return PyBool_FromLong(value ? 1 : 0);
4067 }
4068 
4069 
4070 SWIGINTERN int
4071 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
4072 {
4073  char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
4074  if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
4075  if (buf) {
4076  if (val) *val = new std::string(buf, size - 1);
4077  if (alloc == SWIG_NEWOBJ) delete[] buf;
4078  return SWIG_NEWOBJ;
4079  } else {
4080  if (val) *val = 0;
4081  return SWIG_OLDOBJ;
4082  }
4083  } else {
4084  static int init = 0;
4085  static swig_type_info* descriptor = 0;
4086  if (!init) {
4087  descriptor = SWIG_TypeQuery("std::string" " *");
4088  init = 1;
4089  }
4090  if (descriptor) {
4091  std::string *vptr;
4092  int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
4093  if (SWIG_IsOK(res) && val) *val = vptr;
4094  return res;
4095  }
4096  }
4097  return SWIG_ERROR;
4098 }
4099 
4100 
4101 SWIGINTERNINLINE PyObject *
4102 SWIG_From_std_string (const std::string& s)
4103 {
4104  return SWIG_FromCharPtrAndSize(s.data(), s.size());
4105 }
4106 
4107 
4108 
4109 
4110 
4111 faiss::Index * downcast_index (faiss::Index *index)
4112 {
4113  return index;
4114 }
4115 faiss::VectorTransform * downcast_VectorTransform (faiss::VectorTransform *vt)
4116 {
4117  return vt;
4118 }
4119 faiss::IndexBinary * downcast_IndexBinary (faiss::IndexBinary *index)
4120 {
4121  return index;
4122 }
4123 
4124 
4125 PyObject *swig_ptr (PyObject *a)
4126 {
4127  if(!PyArray_Check(a)) {
4128  PyErr_SetString(PyExc_ValueError, "input not a numpy array");
4129  return NULL;
4130  }
4131  PyArrayObject *ao = (PyArrayObject *)a;
4132 
4133  if(!PyArray_ISCONTIGUOUS(ao)) {
4134  PyErr_SetString(PyExc_ValueError, "array is not C-contiguous");
4135  return NULL;
4136  }
4137  void * data = PyArray_DATA(ao);
4138  if(PyArray_TYPE(ao) == NPY_FLOAT32) {
4139  return SWIG_NewPointerObj(data, SWIGTYPE_p_float, 0);
4140  }
4141  if(PyArray_TYPE(ao) == NPY_FLOAT64) {
4142  return SWIG_NewPointerObj(data, SWIGTYPE_p_double, 0);
4143  }
4144  if(PyArray_TYPE(ao) == NPY_INT32) {
4145  return SWIG_NewPointerObj(data, SWIGTYPE_p_int, 0);
4146  }
4147  if(PyArray_TYPE(ao) == NPY_UINT8) {
4148  return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_char, 0);
4149  }
4150  if(PyArray_TYPE(ao) == NPY_INT8) {
4151  return SWIG_NewPointerObj(data, SWIGTYPE_p_char, 0);
4152  }
4153  if(PyArray_TYPE(ao) == NPY_UINT64) {
4154  return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0);
4155  }
4156  if(PyArray_TYPE(ao) == NPY_INT64) {
4157  return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0);
4158  }
4159  PyErr_SetString(PyExc_ValueError, "did not recognize array type");
4160  return NULL;
4161 }
4162 
4163 
4164 
4165 
4166 PyObject * rev_swig_ptr(float *src, npy_intp size) {
4167  return PyArray_SimpleNewFromData(1, &size, NPY_FLOAT32, src);
4168 }
4169 
4170 
4171 PyObject * rev_swig_ptr(int *src, npy_intp size) {
4172  return PyArray_SimpleNewFromData(1, &size, NPY_INT32, src);
4173 }
4174 
4175 
4176 PyObject * rev_swig_ptr(unsigned char *src, npy_intp size) {
4177  return PyArray_SimpleNewFromData(1, &size, NPY_UINT8, src);
4178 }
4179 
4180 
4181 PyObject * rev_swig_ptr(unsigned long *src, npy_intp size) {
4182  return PyArray_SimpleNewFromData(1, &size, NPY_UINT64, src);
4183 }
4184 
4185 
4186 PyObject * rev_swig_ptr(long *src, npy_intp size) {
4187  return PyArray_SimpleNewFromData(1, &size, NPY_INT64, src);
4188 }
4189 
4190 
4191 float * cast_integer_to_float_ptr (long x) {
4192  return (float*)x;
4193 }
4194 
4195 long * cast_integer_to_long_ptr (long x) {
4196  return (long*)x;
4197 }
4198 
4199 int * cast_integer_to_int_ptr (long x) {
4200  return (int*)x;
4201 }
4202 
4203 
4204 
4205 // may be useful for lua code launched in background from shell
4206 
4207 #include <signal.h>
4208 void ignore_SIGTTIN() {
4209  signal(SIGTTIN, SIG_IGN);
4210 }
4211 
4212 
4213 
4214 // numpy misses a hash table implementation, hence this class. It
4215 // represents not found values as -1 like in the Index implementation
4216 
4218  std::unordered_map<long, long> map;
4219 
4220  void add(size_t n, const long *keys, const long *vals) {
4221  map.reserve(map.size() + n);
4222  for (size_t i = 0; i < n; i++) {
4223  map[keys[i]] = vals[i];
4224  }
4225  }
4226 
4227  long search(long key) {
4228  if (map.count(key) == 0) {
4229  return -1;
4230  } else {
4231  return map[key];
4232  }
4233  }
4234 
4235  void search_multiple(size_t n, const long *keys, long * vals) {
4236  for (size_t i = 0; i < n; i++) {
4237  vals[i] = search(keys[i]);
4238  }
4239  }
4240 };
4241 
4242 
4243 #ifdef __cplusplus
4244 extern "C" {
4245 #endif
4246 SWIGINTERN PyObject *_wrap_new_FloatVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4247  PyObject *resultobj = 0;
4248  std::vector< float > *result = 0 ;
4249 
4250  if (!PyArg_ParseTuple(args,(char *)":new_FloatVector")) SWIG_fail;
4251  result = (std::vector< float > *)new std::vector< float >();
4252  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_NEW | 0 );
4253  return resultobj;
4254 fail:
4255  return NULL;
4256 }
4257 
4258 
4259 SWIGINTERN PyObject *_wrap_FloatVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4260  PyObject *resultobj = 0;
4261  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4262  float arg2 ;
4263  void *argp1 = 0 ;
4264  int res1 = 0 ;
4265  float val2 ;
4266  int ecode2 = 0 ;
4267  PyObject * obj0 = 0 ;
4268  PyObject * obj1 = 0 ;
4269 
4270  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_push_back",&obj0,&obj1)) SWIG_fail;
4271  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4272  if (!SWIG_IsOK(res1)) {
4273  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_push_back" "', argument " "1"" of type '" "std::vector< float > *""'");
4274  }
4275  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4276  ecode2 = SWIG_AsVal_float(obj1, &val2);
4277  if (!SWIG_IsOK(ecode2)) {
4278  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_push_back" "', argument " "2"" of type '" "float""'");
4279  }
4280  arg2 = static_cast< float >(val2);
4281  (arg1)->push_back(arg2);
4282  resultobj = SWIG_Py_Void();
4283  return resultobj;
4284 fail:
4285  return NULL;
4286 }
4287 
4288 
4289 SWIGINTERN PyObject *_wrap_FloatVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4290  PyObject *resultobj = 0;
4291  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4292  void *argp1 = 0 ;
4293  int res1 = 0 ;
4294  PyObject * obj0 = 0 ;
4295 
4296  if (!PyArg_ParseTuple(args,(char *)"O:FloatVector_clear",&obj0)) SWIG_fail;
4297  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4298  if (!SWIG_IsOK(res1)) {
4299  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_clear" "', argument " "1"" of type '" "std::vector< float > *""'");
4300  }
4301  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4302  (arg1)->clear();
4303  resultobj = SWIG_Py_Void();
4304  return resultobj;
4305 fail:
4306  return NULL;
4307 }
4308 
4309 
4310 SWIGINTERN PyObject *_wrap_FloatVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4311  PyObject *resultobj = 0;
4312  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4313  void *argp1 = 0 ;
4314  int res1 = 0 ;
4315  PyObject * obj0 = 0 ;
4316  float *result = 0 ;
4317 
4318  if (!PyArg_ParseTuple(args,(char *)"O:FloatVector_data",&obj0)) SWIG_fail;
4319  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4320  if (!SWIG_IsOK(res1)) {
4321  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_data" "', argument " "1"" of type '" "std::vector< float > *""'");
4322  }
4323  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4324  result = (float *)(arg1)->data();
4325  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
4326  return resultobj;
4327 fail:
4328  return NULL;
4329 }
4330 
4331 
4332 SWIGINTERN PyObject *_wrap_FloatVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4333  PyObject *resultobj = 0;
4334  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4335  void *argp1 = 0 ;
4336  int res1 = 0 ;
4337  PyObject * obj0 = 0 ;
4338  size_t result;
4339 
4340  if (!PyArg_ParseTuple(args,(char *)"O:FloatVector_size",&obj0)) SWIG_fail;
4341  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4342  if (!SWIG_IsOK(res1)) {
4343  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_size" "', argument " "1"" of type '" "std::vector< float > *""'");
4344  }
4345  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4346  result = (size_t)(arg1)->size();
4347  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4348  return resultobj;
4349 fail:
4350  return NULL;
4351 }
4352 
4353 
4354 SWIGINTERN PyObject *_wrap_FloatVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4355  PyObject *resultobj = 0;
4356  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4357  size_t arg2 ;
4358  void *argp1 = 0 ;
4359  int res1 = 0 ;
4360  size_t val2 ;
4361  int ecode2 = 0 ;
4362  PyObject * obj0 = 0 ;
4363  PyObject * obj1 = 0 ;
4364  float result;
4365 
4366  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_at",&obj0,&obj1)) SWIG_fail;
4367  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4368  if (!SWIG_IsOK(res1)) {
4369  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_at" "', argument " "1"" of type '" "std::vector< float > const *""'");
4370  }
4371  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4372  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4373  if (!SWIG_IsOK(ecode2)) {
4374  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_at" "', argument " "2"" of type '" "size_t""'");
4375  }
4376  arg2 = static_cast< size_t >(val2);
4377  result = (float)((std::vector< float > const *)arg1)->at(arg2);
4378  resultobj = SWIG_From_float(static_cast< float >(result));
4379  return resultobj;
4380 fail:
4381  return NULL;
4382 }
4383 
4384 
4385 SWIGINTERN PyObject *_wrap_FloatVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4386  PyObject *resultobj = 0;
4387  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4388  size_t arg2 ;
4389  void *argp1 = 0 ;
4390  int res1 = 0 ;
4391  size_t val2 ;
4392  int ecode2 = 0 ;
4393  PyObject * obj0 = 0 ;
4394  PyObject * obj1 = 0 ;
4395 
4396  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_resize",&obj0,&obj1)) SWIG_fail;
4397  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4398  if (!SWIG_IsOK(res1)) {
4399  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_resize" "', argument " "1"" of type '" "std::vector< float > *""'");
4400  }
4401  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4402  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4403  if (!SWIG_IsOK(ecode2)) {
4404  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_resize" "', argument " "2"" of type '" "size_t""'");
4405  }
4406  arg2 = static_cast< size_t >(val2);
4407  (arg1)->resize(arg2);
4408  resultobj = SWIG_Py_Void();
4409  return resultobj;
4410 fail:
4411  return NULL;
4412 }
4413 
4414 
4415 SWIGINTERN PyObject *_wrap_FloatVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4416  PyObject *resultobj = 0;
4417  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4418  std::vector< float > *arg2 = 0 ;
4419  void *argp1 = 0 ;
4420  int res1 = 0 ;
4421  void *argp2 = 0 ;
4422  int res2 = 0 ;
4423  PyObject * obj0 = 0 ;
4424  PyObject * obj1 = 0 ;
4425 
4426  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_swap",&obj0,&obj1)) SWIG_fail;
4427  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4428  if (!SWIG_IsOK(res1)) {
4429  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_swap" "', argument " "1"" of type '" "std::vector< float > *""'");
4430  }
4431  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4432  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_float_t, 0 );
4433  if (!SWIG_IsOK(res2)) {
4434  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'");
4435  }
4436  if (!argp2) {
4437  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'");
4438  }
4439  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
4440  (arg1)->swap(*arg2);
4441  resultobj = SWIG_Py_Void();
4442  return resultobj;
4443 fail:
4444  return NULL;
4445 }
4446 
4447 
4448 SWIGINTERN PyObject *_wrap_delete_FloatVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4449  PyObject *resultobj = 0;
4450  std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4451  void *argp1 = 0 ;
4452  int res1 = 0 ;
4453  PyObject * obj0 = 0 ;
4454 
4455  if (!PyArg_ParseTuple(args,(char *)"O:delete_FloatVector",&obj0)) SWIG_fail;
4456  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_DISOWN | 0 );
4457  if (!SWIG_IsOK(res1)) {
4458  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatVector" "', argument " "1"" of type '" "std::vector< float > *""'");
4459  }
4460  arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4461  delete arg1;
4462  resultobj = SWIG_Py_Void();
4463  return resultobj;
4464 fail:
4465  return NULL;
4466 }
4467 
4468 
4469 SWIGINTERN PyObject *FloatVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4470  PyObject *obj;
4471  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
4472  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_float_t, SWIG_NewClientData(obj));
4473  return SWIG_Py_Void();
4474 }
4475 
4476 SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4477  PyObject *resultobj = 0;
4478  std::vector< double > *result = 0 ;
4479 
4480  if (!PyArg_ParseTuple(args,(char *)":new_DoubleVector")) SWIG_fail;
4481  result = (std::vector< double > *)new std::vector< double >();
4482  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NEW | 0 );
4483  return resultobj;
4484 fail:
4485  return NULL;
4486 }
4487 
4488 
4489 SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4490  PyObject *resultobj = 0;
4491  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4492  double arg2 ;
4493  void *argp1 = 0 ;
4494  int res1 = 0 ;
4495  double val2 ;
4496  int ecode2 = 0 ;
4497  PyObject * obj0 = 0 ;
4498  PyObject * obj1 = 0 ;
4499 
4500  if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_push_back",&obj0,&obj1)) SWIG_fail;
4501  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4502  if (!SWIG_IsOK(res1)) {
4503  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'");
4504  }
4505  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4506  ecode2 = SWIG_AsVal_double(obj1, &val2);
4507  if (!SWIG_IsOK(ecode2)) {
4508  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "double""'");
4509  }
4510  arg2 = static_cast< double >(val2);
4511  (arg1)->push_back(arg2);
4512  resultobj = SWIG_Py_Void();
4513  return resultobj;
4514 fail:
4515  return NULL;
4516 }
4517 
4518 
4519 SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4520  PyObject *resultobj = 0;
4521  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4522  void *argp1 = 0 ;
4523  int res1 = 0 ;
4524  PyObject * obj0 = 0 ;
4525 
4526  if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_clear",&obj0)) SWIG_fail;
4527  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4528  if (!SWIG_IsOK(res1)) {
4529  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'");
4530  }
4531  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4532  (arg1)->clear();
4533  resultobj = SWIG_Py_Void();
4534  return resultobj;
4535 fail:
4536  return NULL;
4537 }
4538 
4539 
4540 SWIGINTERN PyObject *_wrap_DoubleVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4541  PyObject *resultobj = 0;
4542  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4543  void *argp1 = 0 ;
4544  int res1 = 0 ;
4545  PyObject * obj0 = 0 ;
4546  double *result = 0 ;
4547 
4548  if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_data",&obj0)) SWIG_fail;
4549  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4550  if (!SWIG_IsOK(res1)) {
4551  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_data" "', argument " "1"" of type '" "std::vector< double > *""'");
4552  }
4553  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4554  result = (double *)(arg1)->data();
4555  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
4556  return resultobj;
4557 fail:
4558  return NULL;
4559 }
4560 
4561 
4562 SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4563  PyObject *resultobj = 0;
4564  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4565  void *argp1 = 0 ;
4566  int res1 = 0 ;
4567  PyObject * obj0 = 0 ;
4568  size_t result;
4569 
4570  if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_size",&obj0)) SWIG_fail;
4571  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4572  if (!SWIG_IsOK(res1)) {
4573  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > *""'");
4574  }
4575  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4576  result = (size_t)(arg1)->size();
4577  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4578  return resultobj;
4579 fail:
4580  return NULL;
4581 }
4582 
4583 
4584 SWIGINTERN PyObject *_wrap_DoubleVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4585  PyObject *resultobj = 0;
4586  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4587  size_t arg2 ;
4588  void *argp1 = 0 ;
4589  int res1 = 0 ;
4590  size_t val2 ;
4591  int ecode2 = 0 ;
4592  PyObject * obj0 = 0 ;
4593  PyObject * obj1 = 0 ;
4594  double result;
4595 
4596  if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_at",&obj0,&obj1)) SWIG_fail;
4597  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4598  if (!SWIG_IsOK(res1)) {
4599  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_at" "', argument " "1"" of type '" "std::vector< double > const *""'");
4600  }
4601  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4602  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4603  if (!SWIG_IsOK(ecode2)) {
4604  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_at" "', argument " "2"" of type '" "size_t""'");
4605  }
4606  arg2 = static_cast< size_t >(val2);
4607  result = (double)((std::vector< double > const *)arg1)->at(arg2);
4608  resultobj = SWIG_From_double(static_cast< double >(result));
4609  return resultobj;
4610 fail:
4611  return NULL;
4612 }
4613 
4614 
4615 SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4616  PyObject *resultobj = 0;
4617  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4618  size_t arg2 ;
4619  void *argp1 = 0 ;
4620  int res1 = 0 ;
4621  size_t val2 ;
4622  int ecode2 = 0 ;
4623  PyObject * obj0 = 0 ;
4624  PyObject * obj1 = 0 ;
4625 
4626  if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_resize",&obj0,&obj1)) SWIG_fail;
4627  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4628  if (!SWIG_IsOK(res1)) {
4629  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'");
4630  }
4631  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4632  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4633  if (!SWIG_IsOK(ecode2)) {
4634  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "size_t""'");
4635  }
4636  arg2 = static_cast< size_t >(val2);
4637  (arg1)->resize(arg2);
4638  resultobj = SWIG_Py_Void();
4639  return resultobj;
4640 fail:
4641  return NULL;
4642 }
4643 
4644 
4645 SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4646  PyObject *resultobj = 0;
4647  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4648  std::vector< double > *arg2 = 0 ;
4649  void *argp1 = 0 ;
4650  int res1 = 0 ;
4651  void *argp2 = 0 ;
4652  int res2 = 0 ;
4653  PyObject * obj0 = 0 ;
4654  PyObject * obj1 = 0 ;
4655 
4656  if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_swap",&obj0,&obj1)) SWIG_fail;
4657  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4658  if (!SWIG_IsOK(res1)) {
4659  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'");
4660  }
4661  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4662  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_t, 0 );
4663  if (!SWIG_IsOK(res2)) {
4664  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
4665  }
4666  if (!argp2) {
4667  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
4668  }
4669  arg2 = reinterpret_cast< std::vector< double > * >(argp2);
4670  (arg1)->swap(*arg2);
4671  resultobj = SWIG_Py_Void();
4672  return resultobj;
4673 fail:
4674  return NULL;
4675 }
4676 
4677 
4678 SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4679  PyObject *resultobj = 0;
4680  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4681  void *argp1 = 0 ;
4682  int res1 = 0 ;
4683  PyObject * obj0 = 0 ;
4684 
4685  if (!PyArg_ParseTuple(args,(char *)"O:delete_DoubleVector",&obj0)) SWIG_fail;
4686  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_DISOWN | 0 );
4687  if (!SWIG_IsOK(res1)) {
4688  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'");
4689  }
4690  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4691  delete arg1;
4692  resultobj = SWIG_Py_Void();
4693  return resultobj;
4694 fail:
4695  return NULL;
4696 }
4697 
4698 
4699 SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4700  PyObject *obj;
4701  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
4702  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_t, SWIG_NewClientData(obj));
4703  return SWIG_Py_Void();
4704 }
4705 
4706 SWIGINTERN PyObject *_wrap_new_ByteVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4707  PyObject *resultobj = 0;
4708  std::vector< uint8_t > *result = 0 ;
4709 
4710  if (!PyArg_ParseTuple(args,(char *)":new_ByteVector")) SWIG_fail;
4711  result = (std::vector< uint8_t > *)new std::vector< uint8_t >();
4712  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_NEW | 0 );
4713  return resultobj;
4714 fail:
4715  return NULL;
4716 }
4717 
4718 
4719 SWIGINTERN PyObject *_wrap_ByteVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4720  PyObject *resultobj = 0;
4721  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4722  unsigned char arg2 ;
4723  void *argp1 = 0 ;
4724  int res1 = 0 ;
4725  unsigned char val2 ;
4726  int ecode2 = 0 ;
4727  PyObject * obj0 = 0 ;
4728  PyObject * obj1 = 0 ;
4729 
4730  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_push_back",&obj0,&obj1)) SWIG_fail;
4731  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4732  if (!SWIG_IsOK(res1)) {
4733  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_push_back" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4734  }
4735  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4736  ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
4737  if (!SWIG_IsOK(ecode2)) {
4738  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVector_push_back" "', argument " "2"" of type '" "unsigned char""'");
4739  }
4740  arg2 = static_cast< unsigned char >(val2);
4741  (arg1)->push_back(arg2);
4742  resultobj = SWIG_Py_Void();
4743  return resultobj;
4744 fail:
4745  return NULL;
4746 }
4747 
4748 
4749 SWIGINTERN PyObject *_wrap_ByteVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4750  PyObject *resultobj = 0;
4751  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4752  void *argp1 = 0 ;
4753  int res1 = 0 ;
4754  PyObject * obj0 = 0 ;
4755 
4756  if (!PyArg_ParseTuple(args,(char *)"O:ByteVector_clear",&obj0)) SWIG_fail;
4757  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4758  if (!SWIG_IsOK(res1)) {
4759  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_clear" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4760  }
4761  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4762  (arg1)->clear();
4763  resultobj = SWIG_Py_Void();
4764  return resultobj;
4765 fail:
4766  return NULL;
4767 }
4768 
4769 
4770 SWIGINTERN PyObject *_wrap_ByteVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4771  PyObject *resultobj = 0;
4772  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4773  void *argp1 = 0 ;
4774  int res1 = 0 ;
4775  PyObject * obj0 = 0 ;
4776  unsigned char *result = 0 ;
4777 
4778  if (!PyArg_ParseTuple(args,(char *)"O:ByteVector_data",&obj0)) SWIG_fail;
4779  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4780  if (!SWIG_IsOK(res1)) {
4781  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_data" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4782  }
4783  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4784  result = (unsigned char *)(arg1)->data();
4785  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
4786  return resultobj;
4787 fail:
4788  return NULL;
4789 }
4790 
4791 
4792 SWIGINTERN PyObject *_wrap_ByteVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4793  PyObject *resultobj = 0;
4794  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4795  void *argp1 = 0 ;
4796  int res1 = 0 ;
4797  PyObject * obj0 = 0 ;
4798  size_t result;
4799 
4800  if (!PyArg_ParseTuple(args,(char *)"O:ByteVector_size",&obj0)) SWIG_fail;
4801  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4802  if (!SWIG_IsOK(res1)) {
4803  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_size" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4804  }
4805  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4806  result = (size_t)(arg1)->size();
4807  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4808  return resultobj;
4809 fail:
4810  return NULL;
4811 }
4812 
4813 
4814 SWIGINTERN PyObject *_wrap_ByteVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4815  PyObject *resultobj = 0;
4816  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4817  size_t arg2 ;
4818  void *argp1 = 0 ;
4819  int res1 = 0 ;
4820  size_t val2 ;
4821  int ecode2 = 0 ;
4822  PyObject * obj0 = 0 ;
4823  PyObject * obj1 = 0 ;
4824  unsigned char result;
4825 
4826  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_at",&obj0,&obj1)) SWIG_fail;
4827  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4828  if (!SWIG_IsOK(res1)) {
4829  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_at" "', argument " "1"" of type '" "std::vector< uint8_t > const *""'");
4830  }
4831  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4832  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4833  if (!SWIG_IsOK(ecode2)) {
4834  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVector_at" "', argument " "2"" of type '" "size_t""'");
4835  }
4836  arg2 = static_cast< size_t >(val2);
4837  result = (unsigned char)((std::vector< uint8_t > const *)arg1)->at(arg2);
4838  resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
4839  return resultobj;
4840 fail:
4841  return NULL;
4842 }
4843 
4844 
4845 SWIGINTERN PyObject *_wrap_ByteVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4846  PyObject *resultobj = 0;
4847  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4848  size_t arg2 ;
4849  void *argp1 = 0 ;
4850  int res1 = 0 ;
4851  size_t val2 ;
4852  int ecode2 = 0 ;
4853  PyObject * obj0 = 0 ;
4854  PyObject * obj1 = 0 ;
4855 
4856  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_resize",&obj0,&obj1)) SWIG_fail;
4857  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4858  if (!SWIG_IsOK(res1)) {
4859  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_resize" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4860  }
4861  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4862  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4863  if (!SWIG_IsOK(ecode2)) {
4864  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVector_resize" "', argument " "2"" of type '" "size_t""'");
4865  }
4866  arg2 = static_cast< size_t >(val2);
4867  (arg1)->resize(arg2);
4868  resultobj = SWIG_Py_Void();
4869  return resultobj;
4870 fail:
4871  return NULL;
4872 }
4873 
4874 
4875 SWIGINTERN PyObject *_wrap_ByteVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4876  PyObject *resultobj = 0;
4877  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4878  std::vector< unsigned char > *arg2 = 0 ;
4879  void *argp1 = 0 ;
4880  int res1 = 0 ;
4881  void *argp2 = 0 ;
4882  int res2 = 0 ;
4883  PyObject * obj0 = 0 ;
4884  PyObject * obj1 = 0 ;
4885 
4886  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_swap",&obj0,&obj1)) SWIG_fail;
4887  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4888  if (!SWIG_IsOK(res1)) {
4889  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_swap" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4890  }
4891  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4892  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 );
4893  if (!SWIG_IsOK(res2)) {
4894  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ByteVector_swap" "', argument " "2"" of type '" "std::vector< unsigned char > &""'");
4895  }
4896  if (!argp2) {
4897  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ByteVector_swap" "', argument " "2"" of type '" "std::vector< unsigned char > &""'");
4898  }
4899  arg2 = reinterpret_cast< std::vector< unsigned char > * >(argp2);
4900  (arg1)->swap(*arg2);
4901  resultobj = SWIG_Py_Void();
4902  return resultobj;
4903 fail:
4904  return NULL;
4905 }
4906 
4907 
4908 SWIGINTERN PyObject *_wrap_delete_ByteVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4909  PyObject *resultobj = 0;
4910  std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4911  void *argp1 = 0 ;
4912  int res1 = 0 ;
4913  PyObject * obj0 = 0 ;
4914 
4915  if (!PyArg_ParseTuple(args,(char *)"O:delete_ByteVector",&obj0)) SWIG_fail;
4916  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_DISOWN | 0 );
4917  if (!SWIG_IsOK(res1)) {
4918  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ByteVector" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4919  }
4920  arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4921  delete arg1;
4922  resultobj = SWIG_Py_Void();
4923  return resultobj;
4924 fail:
4925  return NULL;
4926 }
4927 
4928 
4929 SWIGINTERN PyObject *ByteVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4930  PyObject *obj;
4931  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
4932  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_NewClientData(obj));
4933  return SWIG_Py_Void();
4934 }
4935 
4936 SWIGINTERN PyObject *_wrap_new_CharVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4937  PyObject *resultobj = 0;
4938  std::vector< char > *result = 0 ;
4939 
4940  if (!PyArg_ParseTuple(args,(char *)":new_CharVector")) SWIG_fail;
4941  result = (std::vector< char > *)new std::vector< char >();
4942  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_char_t, SWIG_POINTER_NEW | 0 );
4943  return resultobj;
4944 fail:
4945  return NULL;
4946 }
4947 
4948 
4949 SWIGINTERN PyObject *_wrap_CharVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4950  PyObject *resultobj = 0;
4951  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4952  char arg2 ;
4953  void *argp1 = 0 ;
4954  int res1 = 0 ;
4955  char val2 ;
4956  int ecode2 = 0 ;
4957  PyObject * obj0 = 0 ;
4958  PyObject * obj1 = 0 ;
4959 
4960  if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_push_back",&obj0,&obj1)) SWIG_fail;
4961  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4962  if (!SWIG_IsOK(res1)) {
4963  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_push_back" "', argument " "1"" of type '" "std::vector< char > *""'");
4964  }
4965  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
4966  ecode2 = SWIG_AsVal_char(obj1, &val2);
4967  if (!SWIG_IsOK(ecode2)) {
4968  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CharVector_push_back" "', argument " "2"" of type '" "char""'");
4969  }
4970  arg2 = static_cast< char >(val2);
4971  (arg1)->push_back(arg2);
4972  resultobj = SWIG_Py_Void();
4973  return resultobj;
4974 fail:
4975  return NULL;
4976 }
4977 
4978 
4979 SWIGINTERN PyObject *_wrap_CharVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4980  PyObject *resultobj = 0;
4981  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4982  void *argp1 = 0 ;
4983  int res1 = 0 ;
4984  PyObject * obj0 = 0 ;
4985 
4986  if (!PyArg_ParseTuple(args,(char *)"O:CharVector_clear",&obj0)) SWIG_fail;
4987  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4988  if (!SWIG_IsOK(res1)) {
4989  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_clear" "', argument " "1"" of type '" "std::vector< char > *""'");
4990  }
4991  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
4992  (arg1)->clear();
4993  resultobj = SWIG_Py_Void();
4994  return resultobj;
4995 fail:
4996  return NULL;
4997 }
4998 
4999 
5000 SWIGINTERN PyObject *_wrap_CharVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5001  PyObject *resultobj = 0;
5002  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5003  void *argp1 = 0 ;
5004  int res1 = 0 ;
5005  PyObject * obj0 = 0 ;
5006  char *result = 0 ;
5007 
5008  if (!PyArg_ParseTuple(args,(char *)"O:CharVector_data",&obj0)) SWIG_fail;
5009  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5010  if (!SWIG_IsOK(res1)) {
5011  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_data" "', argument " "1"" of type '" "std::vector< char > *""'");
5012  }
5013  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5014  result = (char *)(arg1)->data();
5015  resultobj = SWIG_FromCharPtr((const char *)result);
5016  return resultobj;
5017 fail:
5018  return NULL;
5019 }
5020 
5021 
5022 SWIGINTERN PyObject *_wrap_CharVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5023  PyObject *resultobj = 0;
5024  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5025  void *argp1 = 0 ;
5026  int res1 = 0 ;
5027  PyObject * obj0 = 0 ;
5028  size_t result;
5029 
5030  if (!PyArg_ParseTuple(args,(char *)"O:CharVector_size",&obj0)) SWIG_fail;
5031  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5032  if (!SWIG_IsOK(res1)) {
5033  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_size" "', argument " "1"" of type '" "std::vector< char > *""'");
5034  }
5035  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5036  result = (size_t)(arg1)->size();
5037  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5038  return resultobj;
5039 fail:
5040  return NULL;
5041 }
5042 
5043 
5044 SWIGINTERN PyObject *_wrap_CharVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5045  PyObject *resultobj = 0;
5046  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5047  size_t arg2 ;
5048  void *argp1 = 0 ;
5049  int res1 = 0 ;
5050  size_t val2 ;
5051  int ecode2 = 0 ;
5052  PyObject * obj0 = 0 ;
5053  PyObject * obj1 = 0 ;
5054  char result;
5055 
5056  if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_at",&obj0,&obj1)) SWIG_fail;
5057  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5058  if (!SWIG_IsOK(res1)) {
5059  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_at" "', argument " "1"" of type '" "std::vector< char > const *""'");
5060  }
5061  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5062  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5063  if (!SWIG_IsOK(ecode2)) {
5064  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CharVector_at" "', argument " "2"" of type '" "size_t""'");
5065  }
5066  arg2 = static_cast< size_t >(val2);
5067  result = (char)((std::vector< char > const *)arg1)->at(arg2);
5068  resultobj = SWIG_From_char(static_cast< char >(result));
5069  return resultobj;
5070 fail:
5071  return NULL;
5072 }
5073 
5074 
5075 SWIGINTERN PyObject *_wrap_CharVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5076  PyObject *resultobj = 0;
5077  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5078  size_t arg2 ;
5079  void *argp1 = 0 ;
5080  int res1 = 0 ;
5081  size_t val2 ;
5082  int ecode2 = 0 ;
5083  PyObject * obj0 = 0 ;
5084  PyObject * obj1 = 0 ;
5085 
5086  if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_resize",&obj0,&obj1)) SWIG_fail;
5087  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5088  if (!SWIG_IsOK(res1)) {
5089  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_resize" "', argument " "1"" of type '" "std::vector< char > *""'");
5090  }
5091  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5092  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5093  if (!SWIG_IsOK(ecode2)) {
5094  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CharVector_resize" "', argument " "2"" of type '" "size_t""'");
5095  }
5096  arg2 = static_cast< size_t >(val2);
5097  (arg1)->resize(arg2);
5098  resultobj = SWIG_Py_Void();
5099  return resultobj;
5100 fail:
5101  return NULL;
5102 }
5103 
5104 
5105 SWIGINTERN PyObject *_wrap_CharVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5106  PyObject *resultobj = 0;
5107  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5108  std::vector< char > *arg2 = 0 ;
5109  void *argp1 = 0 ;
5110  int res1 = 0 ;
5111  void *argp2 = 0 ;
5112  int res2 = 0 ;
5113  PyObject * obj0 = 0 ;
5114  PyObject * obj1 = 0 ;
5115 
5116  if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_swap",&obj0,&obj1)) SWIG_fail;
5117  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5118  if (!SWIG_IsOK(res1)) {
5119  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_swap" "', argument " "1"" of type '" "std::vector< char > *""'");
5120  }
5121  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5122  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_char_t, 0 );
5123  if (!SWIG_IsOK(res2)) {
5124  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CharVector_swap" "', argument " "2"" of type '" "std::vector< char > &""'");
5125  }
5126  if (!argp2) {
5127  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CharVector_swap" "', argument " "2"" of type '" "std::vector< char > &""'");
5128  }
5129  arg2 = reinterpret_cast< std::vector< char > * >(argp2);
5130  (arg1)->swap(*arg2);
5131  resultobj = SWIG_Py_Void();
5132  return resultobj;
5133 fail:
5134  return NULL;
5135 }
5136 
5137 
5138 SWIGINTERN PyObject *_wrap_delete_CharVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5139  PyObject *resultobj = 0;
5140  std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5141  void *argp1 = 0 ;
5142  int res1 = 0 ;
5143  PyObject * obj0 = 0 ;
5144 
5145  if (!PyArg_ParseTuple(args,(char *)"O:delete_CharVector",&obj0)) SWIG_fail;
5146  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, SWIG_POINTER_DISOWN | 0 );
5147  if (!SWIG_IsOK(res1)) {
5148  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CharVector" "', argument " "1"" of type '" "std::vector< char > *""'");
5149  }
5150  arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5151  delete arg1;
5152  resultobj = SWIG_Py_Void();
5153  return resultobj;
5154 fail:
5155  return NULL;
5156 }
5157 
5158 
5159 SWIGINTERN PyObject *CharVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5160  PyObject *obj;
5161  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5162  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_char_t, SWIG_NewClientData(obj));
5163  return SWIG_Py_Void();
5164 }
5165 
5166 SWIGINTERN PyObject *_wrap_new_Uint64Vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5167  PyObject *resultobj = 0;
5168  std::vector< unsigned long > *result = 0 ;
5169 
5170  if (!PyArg_ParseTuple(args,(char *)":new_Uint64Vector")) SWIG_fail;
5171  result = (std::vector< unsigned long > *)new std::vector< unsigned long >();
5172  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_POINTER_NEW | 0 );
5173  return resultobj;
5174 fail:
5175  return NULL;
5176 }
5177 
5178 
5179 SWIGINTERN PyObject *_wrap_Uint64Vector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5180  PyObject *resultobj = 0;
5181  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5182  unsigned long arg2 ;
5183  void *argp1 = 0 ;
5184  int res1 = 0 ;
5185  unsigned long val2 ;
5186  int ecode2 = 0 ;
5187  PyObject * obj0 = 0 ;
5188  PyObject * obj1 = 0 ;
5189 
5190  if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_push_back",&obj0,&obj1)) SWIG_fail;
5191  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5192  if (!SWIG_IsOK(res1)) {
5193  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_push_back" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5194  }
5195  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5196  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
5197  if (!SWIG_IsOK(ecode2)) {
5198  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Uint64Vector_push_back" "', argument " "2"" of type '" "unsigned long""'");
5199  }
5200  arg2 = static_cast< unsigned long >(val2);
5201  (arg1)->push_back(arg2);
5202  resultobj = SWIG_Py_Void();
5203  return resultobj;
5204 fail:
5205  return NULL;
5206 }
5207 
5208 
5209 SWIGINTERN PyObject *_wrap_Uint64Vector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5210  PyObject *resultobj = 0;
5211  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5212  void *argp1 = 0 ;
5213  int res1 = 0 ;
5214  PyObject * obj0 = 0 ;
5215 
5216  if (!PyArg_ParseTuple(args,(char *)"O:Uint64Vector_clear",&obj0)) SWIG_fail;
5217  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5218  if (!SWIG_IsOK(res1)) {
5219  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_clear" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5220  }
5221  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5222  (arg1)->clear();
5223  resultobj = SWIG_Py_Void();
5224  return resultobj;
5225 fail:
5226  return NULL;
5227 }
5228 
5229 
5230 SWIGINTERN PyObject *_wrap_Uint64Vector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5231  PyObject *resultobj = 0;
5232  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5233  void *argp1 = 0 ;
5234  int res1 = 0 ;
5235  PyObject * obj0 = 0 ;
5236  unsigned long *result = 0 ;
5237 
5238  if (!PyArg_ParseTuple(args,(char *)"O:Uint64Vector_data",&obj0)) SWIG_fail;
5239  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5240  if (!SWIG_IsOK(res1)) {
5241  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_data" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5242  }
5243  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5244  result = (unsigned long *)(arg1)->data();
5245  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
5246  return resultobj;
5247 fail:
5248  return NULL;
5249 }
5250 
5251 
5252 SWIGINTERN PyObject *_wrap_Uint64Vector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5253  PyObject *resultobj = 0;
5254  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5255  void *argp1 = 0 ;
5256  int res1 = 0 ;
5257  PyObject * obj0 = 0 ;
5258  size_t result;
5259 
5260  if (!PyArg_ParseTuple(args,(char *)"O:Uint64Vector_size",&obj0)) SWIG_fail;
5261  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5262  if (!SWIG_IsOK(res1)) {
5263  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_size" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5264  }
5265  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5266  result = (size_t)(arg1)->size();
5267  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5268  return resultobj;
5269 fail:
5270  return NULL;
5271 }
5272 
5273 
5274 SWIGINTERN PyObject *_wrap_Uint64Vector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5275  PyObject *resultobj = 0;
5276  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5277  size_t arg2 ;
5278  void *argp1 = 0 ;
5279  int res1 = 0 ;
5280  size_t val2 ;
5281  int ecode2 = 0 ;
5282  PyObject * obj0 = 0 ;
5283  PyObject * obj1 = 0 ;
5284  unsigned long result;
5285 
5286  if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_at",&obj0,&obj1)) SWIG_fail;
5287  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5288  if (!SWIG_IsOK(res1)) {
5289  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_at" "', argument " "1"" of type '" "std::vector< unsigned long > const *""'");
5290  }
5291  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5292  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5293  if (!SWIG_IsOK(ecode2)) {
5294  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Uint64Vector_at" "', argument " "2"" of type '" "size_t""'");
5295  }
5296  arg2 = static_cast< size_t >(val2);
5297  result = (unsigned long)((std::vector< unsigned long > const *)arg1)->at(arg2);
5298  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
5299  return resultobj;
5300 fail:
5301  return NULL;
5302 }
5303 
5304 
5305 SWIGINTERN PyObject *_wrap_Uint64Vector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5306  PyObject *resultobj = 0;
5307  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5308  size_t arg2 ;
5309  void *argp1 = 0 ;
5310  int res1 = 0 ;
5311  size_t val2 ;
5312  int ecode2 = 0 ;
5313  PyObject * obj0 = 0 ;
5314  PyObject * obj1 = 0 ;
5315 
5316  if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_resize",&obj0,&obj1)) SWIG_fail;
5317  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5318  if (!SWIG_IsOK(res1)) {
5319  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_resize" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5320  }
5321  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5322  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5323  if (!SWIG_IsOK(ecode2)) {
5324  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Uint64Vector_resize" "', argument " "2"" of type '" "size_t""'");
5325  }
5326  arg2 = static_cast< size_t >(val2);
5327  (arg1)->resize(arg2);
5328  resultobj = SWIG_Py_Void();
5329  return resultobj;
5330 fail:
5331  return NULL;
5332 }
5333 
5334 
5335 SWIGINTERN PyObject *_wrap_Uint64Vector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5336  PyObject *resultobj = 0;
5337  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5338  std::vector< unsigned long > *arg2 = 0 ;
5339  void *argp1 = 0 ;
5340  int res1 = 0 ;
5341  void *argp2 = 0 ;
5342  int res2 = 0 ;
5343  PyObject * obj0 = 0 ;
5344  PyObject * obj1 = 0 ;
5345 
5346  if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_swap",&obj0,&obj1)) SWIG_fail;
5347  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5348  if (!SWIG_IsOK(res1)) {
5349  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_swap" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5350  }
5351  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5352  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 );
5353  if (!SWIG_IsOK(res2)) {
5354  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Uint64Vector_swap" "', argument " "2"" of type '" "std::vector< unsigned long > &""'");
5355  }
5356  if (!argp2) {
5357  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Uint64Vector_swap" "', argument " "2"" of type '" "std::vector< unsigned long > &""'");
5358  }
5359  arg2 = reinterpret_cast< std::vector< unsigned long > * >(argp2);
5360  (arg1)->swap(*arg2);
5361  resultobj = SWIG_Py_Void();
5362  return resultobj;
5363 fail:
5364  return NULL;
5365 }
5366 
5367 
5368 SWIGINTERN PyObject *_wrap_delete_Uint64Vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5369  PyObject *resultobj = 0;
5370  std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5371  void *argp1 = 0 ;
5372  int res1 = 0 ;
5373  PyObject * obj0 = 0 ;
5374 
5375  if (!PyArg_ParseTuple(args,(char *)"O:delete_Uint64Vector",&obj0)) SWIG_fail;
5376  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_POINTER_DISOWN | 0 );
5377  if (!SWIG_IsOK(res1)) {
5378  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Uint64Vector" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5379  }
5380  arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5381  delete arg1;
5382  resultobj = SWIG_Py_Void();
5383  return resultobj;
5384 fail:
5385  return NULL;
5386 }
5387 
5388 
5389 SWIGINTERN PyObject *Uint64Vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5390  PyObject *obj;
5391  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5392  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_NewClientData(obj));
5393  return SWIG_Py_Void();
5394 }
5395 
5396 SWIGINTERN PyObject *_wrap_new_LongVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5397  PyObject *resultobj = 0;
5398  std::vector< long > *result = 0 ;
5399 
5400  if (!PyArg_ParseTuple(args,(char *)":new_LongVector")) SWIG_fail;
5401  result = (std::vector< long > *)new std::vector< long >();
5402  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_NEW | 0 );
5403  return resultobj;
5404 fail:
5405  return NULL;
5406 }
5407 
5408 
5409 SWIGINTERN PyObject *_wrap_LongVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5410  PyObject *resultobj = 0;
5411  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5412  long arg2 ;
5413  void *argp1 = 0 ;
5414  int res1 = 0 ;
5415  long val2 ;
5416  int ecode2 = 0 ;
5417  PyObject * obj0 = 0 ;
5418  PyObject * obj1 = 0 ;
5419 
5420  if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_push_back",&obj0,&obj1)) SWIG_fail;
5421  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5422  if (!SWIG_IsOK(res1)) {
5423  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_push_back" "', argument " "1"" of type '" "std::vector< long > *""'");
5424  }
5425  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5426  ecode2 = SWIG_AsVal_long(obj1, &val2);
5427  if (!SWIG_IsOK(ecode2)) {
5428  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVector_push_back" "', argument " "2"" of type '" "long""'");
5429  }
5430  arg2 = static_cast< long >(val2);
5431  (arg1)->push_back(arg2);
5432  resultobj = SWIG_Py_Void();
5433  return resultobj;
5434 fail:
5435  return NULL;
5436 }
5437 
5438 
5439 SWIGINTERN PyObject *_wrap_LongVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5440  PyObject *resultobj = 0;
5441  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5442  void *argp1 = 0 ;
5443  int res1 = 0 ;
5444  PyObject * obj0 = 0 ;
5445 
5446  if (!PyArg_ParseTuple(args,(char *)"O:LongVector_clear",&obj0)) SWIG_fail;
5447  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5448  if (!SWIG_IsOK(res1)) {
5449  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_clear" "', argument " "1"" of type '" "std::vector< long > *""'");
5450  }
5451  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5452  (arg1)->clear();
5453  resultobj = SWIG_Py_Void();
5454  return resultobj;
5455 fail:
5456  return NULL;
5457 }
5458 
5459 
5460 SWIGINTERN PyObject *_wrap_LongVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5461  PyObject *resultobj = 0;
5462  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5463  void *argp1 = 0 ;
5464  int res1 = 0 ;
5465  PyObject * obj0 = 0 ;
5466  long *result = 0 ;
5467 
5468  if (!PyArg_ParseTuple(args,(char *)"O:LongVector_data",&obj0)) SWIG_fail;
5469  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5470  if (!SWIG_IsOK(res1)) {
5471  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_data" "', argument " "1"" of type '" "std::vector< long > *""'");
5472  }
5473  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5474  result = (long *)(arg1)->data();
5475  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
5476  return resultobj;
5477 fail:
5478  return NULL;
5479 }
5480 
5481 
5482 SWIGINTERN PyObject *_wrap_LongVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5483  PyObject *resultobj = 0;
5484  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5485  void *argp1 = 0 ;
5486  int res1 = 0 ;
5487  PyObject * obj0 = 0 ;
5488  size_t result;
5489 
5490  if (!PyArg_ParseTuple(args,(char *)"O:LongVector_size",&obj0)) SWIG_fail;
5491  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5492  if (!SWIG_IsOK(res1)) {
5493  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_size" "', argument " "1"" of type '" "std::vector< long > *""'");
5494  }
5495  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5496  result = (size_t)(arg1)->size();
5497  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5498  return resultobj;
5499 fail:
5500  return NULL;
5501 }
5502 
5503 
5504 SWIGINTERN PyObject *_wrap_LongVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5505  PyObject *resultobj = 0;
5506  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5507  size_t arg2 ;
5508  void *argp1 = 0 ;
5509  int res1 = 0 ;
5510  size_t val2 ;
5511  int ecode2 = 0 ;
5512  PyObject * obj0 = 0 ;
5513  PyObject * obj1 = 0 ;
5514  long result;
5515 
5516  if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_at",&obj0,&obj1)) SWIG_fail;
5517  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5518  if (!SWIG_IsOK(res1)) {
5519  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_at" "', argument " "1"" of type '" "std::vector< long > const *""'");
5520  }
5521  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5522  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5523  if (!SWIG_IsOK(ecode2)) {
5524  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVector_at" "', argument " "2"" of type '" "size_t""'");
5525  }
5526  arg2 = static_cast< size_t >(val2);
5527  result = (long)((std::vector< long > const *)arg1)->at(arg2);
5528  resultobj = SWIG_From_long(static_cast< long >(result));
5529  return resultobj;
5530 fail:
5531  return NULL;
5532 }
5533 
5534 
5535 SWIGINTERN PyObject *_wrap_LongVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5536  PyObject *resultobj = 0;
5537  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5538  size_t arg2 ;
5539  void *argp1 = 0 ;
5540  int res1 = 0 ;
5541  size_t val2 ;
5542  int ecode2 = 0 ;
5543  PyObject * obj0 = 0 ;
5544  PyObject * obj1 = 0 ;
5545 
5546  if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_resize",&obj0,&obj1)) SWIG_fail;
5547  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5548  if (!SWIG_IsOK(res1)) {
5549  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_resize" "', argument " "1"" of type '" "std::vector< long > *""'");
5550  }
5551  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5552  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5553  if (!SWIG_IsOK(ecode2)) {
5554  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVector_resize" "', argument " "2"" of type '" "size_t""'");
5555  }
5556  arg2 = static_cast< size_t >(val2);
5557  (arg1)->resize(arg2);
5558  resultobj = SWIG_Py_Void();
5559  return resultobj;
5560 fail:
5561  return NULL;
5562 }
5563 
5564 
5565 SWIGINTERN PyObject *_wrap_LongVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5566  PyObject *resultobj = 0;
5567  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5568  std::vector< long > *arg2 = 0 ;
5569  void *argp1 = 0 ;
5570  int res1 = 0 ;
5571  void *argp2 = 0 ;
5572  int res2 = 0 ;
5573  PyObject * obj0 = 0 ;
5574  PyObject * obj1 = 0 ;
5575 
5576  if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_swap",&obj0,&obj1)) SWIG_fail;
5577  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5578  if (!SWIG_IsOK(res1)) {
5579  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_swap" "', argument " "1"" of type '" "std::vector< long > *""'");
5580  }
5581  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5582  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_long_t, 0 );
5583  if (!SWIG_IsOK(res2)) {
5584  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongVector_swap" "', argument " "2"" of type '" "std::vector< long > &""'");
5585  }
5586  if (!argp2) {
5587  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongVector_swap" "', argument " "2"" of type '" "std::vector< long > &""'");
5588  }
5589  arg2 = reinterpret_cast< std::vector< long > * >(argp2);
5590  (arg1)->swap(*arg2);
5591  resultobj = SWIG_Py_Void();
5592  return resultobj;
5593 fail:
5594  return NULL;
5595 }
5596 
5597 
5598 SWIGINTERN PyObject *_wrap_delete_LongVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5599  PyObject *resultobj = 0;
5600  std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5601  void *argp1 = 0 ;
5602  int res1 = 0 ;
5603  PyObject * obj0 = 0 ;
5604 
5605  if (!PyArg_ParseTuple(args,(char *)"O:delete_LongVector",&obj0)) SWIG_fail;
5606  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_DISOWN | 0 );
5607  if (!SWIG_IsOK(res1)) {
5608  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LongVector" "', argument " "1"" of type '" "std::vector< long > *""'");
5609  }
5610  arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5611  delete arg1;
5612  resultobj = SWIG_Py_Void();
5613  return resultobj;
5614 fail:
5615  return NULL;
5616 }
5617 
5618 
5619 SWIGINTERN PyObject *LongVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5620  PyObject *obj;
5621  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5622  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_long_t, SWIG_NewClientData(obj));
5623  return SWIG_Py_Void();
5624 }
5625 
5626 SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5627  PyObject *resultobj = 0;
5628  std::vector< int > *result = 0 ;
5629 
5630  if (!PyArg_ParseTuple(args,(char *)":new_IntVector")) SWIG_fail;
5631  result = (std::vector< int > *)new std::vector< int >();
5632  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_NEW | 0 );
5633  return resultobj;
5634 fail:
5635  return NULL;
5636 }
5637 
5638 
5639 SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5640  PyObject *resultobj = 0;
5641  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5642  int arg2 ;
5643  void *argp1 = 0 ;
5644  int res1 = 0 ;
5645  int val2 ;
5646  int ecode2 = 0 ;
5647  PyObject * obj0 = 0 ;
5648  PyObject * obj1 = 0 ;
5649 
5650  if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_push_back",&obj0,&obj1)) SWIG_fail;
5651  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5652  if (!SWIG_IsOK(res1)) {
5653  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'");
5654  }
5655  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5656  ecode2 = SWIG_AsVal_int(obj1, &val2);
5657  if (!SWIG_IsOK(ecode2)) {
5658  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push_back" "', argument " "2"" of type '" "int""'");
5659  }
5660  arg2 = static_cast< int >(val2);
5661  (arg1)->push_back(arg2);
5662  resultobj = SWIG_Py_Void();
5663  return resultobj;
5664 fail:
5665  return NULL;
5666 }
5667 
5668 
5669 SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5670  PyObject *resultobj = 0;
5671  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5672  void *argp1 = 0 ;
5673  int res1 = 0 ;
5674  PyObject * obj0 = 0 ;
5675 
5676  if (!PyArg_ParseTuple(args,(char *)"O:IntVector_clear",&obj0)) SWIG_fail;
5677  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5678  if (!SWIG_IsOK(res1)) {
5679  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'");
5680  }
5681  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5682  (arg1)->clear();
5683  resultobj = SWIG_Py_Void();
5684  return resultobj;
5685 fail:
5686  return NULL;
5687 }
5688 
5689 
5690 SWIGINTERN PyObject *_wrap_IntVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5691  PyObject *resultobj = 0;
5692  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5693  void *argp1 = 0 ;
5694  int res1 = 0 ;
5695  PyObject * obj0 = 0 ;
5696  int *result = 0 ;
5697 
5698  if (!PyArg_ParseTuple(args,(char *)"O:IntVector_data",&obj0)) SWIG_fail;
5699  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5700  if (!SWIG_IsOK(res1)) {
5701  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_data" "', argument " "1"" of type '" "std::vector< int > *""'");
5702  }
5703  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5704  result = (int *)(arg1)->data();
5705  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
5706  return resultobj;
5707 fail:
5708  return NULL;
5709 }
5710 
5711 
5712 SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5713  PyObject *resultobj = 0;
5714  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5715  void *argp1 = 0 ;
5716  int res1 = 0 ;
5717  PyObject * obj0 = 0 ;
5718  size_t result;
5719 
5720  if (!PyArg_ParseTuple(args,(char *)"O:IntVector_size",&obj0)) SWIG_fail;
5721  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5722  if (!SWIG_IsOK(res1)) {
5723  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > *""'");
5724  }
5725  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5726  result = (size_t)(arg1)->size();
5727  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5728  return resultobj;
5729 fail:
5730  return NULL;
5731 }
5732 
5733 
5734 SWIGINTERN PyObject *_wrap_IntVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5735  PyObject *resultobj = 0;
5736  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5737  size_t arg2 ;
5738  void *argp1 = 0 ;
5739  int res1 = 0 ;
5740  size_t val2 ;
5741  int ecode2 = 0 ;
5742  PyObject * obj0 = 0 ;
5743  PyObject * obj1 = 0 ;
5744  int result;
5745 
5746  if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_at",&obj0,&obj1)) SWIG_fail;
5747  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5748  if (!SWIG_IsOK(res1)) {
5749  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_at" "', argument " "1"" of type '" "std::vector< int > const *""'");
5750  }
5751  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5752  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5753  if (!SWIG_IsOK(ecode2)) {
5754  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_at" "', argument " "2"" of type '" "size_t""'");
5755  }
5756  arg2 = static_cast< size_t >(val2);
5757  result = (int)((std::vector< int > const *)arg1)->at(arg2);
5758  resultobj = SWIG_From_int(static_cast< int >(result));
5759  return resultobj;
5760 fail:
5761  return NULL;
5762 }
5763 
5764 
5765 SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5766  PyObject *resultobj = 0;
5767  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5768  size_t arg2 ;
5769  void *argp1 = 0 ;
5770  int res1 = 0 ;
5771  size_t val2 ;
5772  int ecode2 = 0 ;
5773  PyObject * obj0 = 0 ;
5774  PyObject * obj1 = 0 ;
5775 
5776  if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_resize",&obj0,&obj1)) SWIG_fail;
5777  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5778  if (!SWIG_IsOK(res1)) {
5779  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
5780  }
5781  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5782  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5783  if (!SWIG_IsOK(ecode2)) {
5784  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "size_t""'");
5785  }
5786  arg2 = static_cast< size_t >(val2);
5787  (arg1)->resize(arg2);
5788  resultobj = SWIG_Py_Void();
5789  return resultobj;
5790 fail:
5791  return NULL;
5792 }
5793 
5794 
5795 SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5796  PyObject *resultobj = 0;
5797  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5798  std::vector< int > *arg2 = 0 ;
5799  void *argp1 = 0 ;
5800  int res1 = 0 ;
5801  void *argp2 = 0 ;
5802  int res2 = 0 ;
5803  PyObject * obj0 = 0 ;
5804  PyObject * obj1 = 0 ;
5805 
5806  if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_swap",&obj0,&obj1)) SWIG_fail;
5807  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5808  if (!SWIG_IsOK(res1)) {
5809  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'");
5810  }
5811  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5812  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_t, 0 );
5813  if (!SWIG_IsOK(res2)) {
5814  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
5815  }
5816  if (!argp2) {
5817  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
5818  }
5819  arg2 = reinterpret_cast< std::vector< int > * >(argp2);
5820  (arg1)->swap(*arg2);
5821  resultobj = SWIG_Py_Void();
5822  return resultobj;
5823 fail:
5824  return NULL;
5825 }
5826 
5827 
5828 SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5829  PyObject *resultobj = 0;
5830  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5831  void *argp1 = 0 ;
5832  int res1 = 0 ;
5833  PyObject * obj0 = 0 ;
5834 
5835  if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVector",&obj0)) SWIG_fail;
5836  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_DISOWN | 0 );
5837  if (!SWIG_IsOK(res1)) {
5838  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'");
5839  }
5840  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5841  delete arg1;
5842  resultobj = SWIG_Py_Void();
5843  return resultobj;
5844 fail:
5845  return NULL;
5846 }
5847 
5848 
5849 SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5850  PyObject *obj;
5851  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5852  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_t, SWIG_NewClientData(obj));
5853  return SWIG_Py_Void();
5854 }
5855 
5856 SWIGINTERN PyObject *_wrap_new_VectorTransformVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5857  PyObject *resultobj = 0;
5858  std::vector< faiss::VectorTransform * > *result = 0 ;
5859 
5860  if (!PyArg_ParseTuple(args,(char *)":new_VectorTransformVector")) SWIG_fail;
5861  result = (std::vector< faiss::VectorTransform * > *)new std::vector< faiss::VectorTransform * >();
5862  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_POINTER_NEW | 0 );
5863  return resultobj;
5864 fail:
5865  return NULL;
5866 }
5867 
5868 
5869 SWIGINTERN PyObject *_wrap_VectorTransformVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5870  PyObject *resultobj = 0;
5871  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5873  void *argp1 = 0 ;
5874  int res1 = 0 ;
5875  void *argp2 = 0 ;
5876  int res2 = 0 ;
5877  PyObject * obj0 = 0 ;
5878  PyObject * obj1 = 0 ;
5879 
5880  if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_push_back",&obj0,&obj1)) SWIG_fail;
5881  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5882  if (!SWIG_IsOK(res1)) {
5883  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5884  }
5885  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5886  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
5887  if (!SWIG_IsOK(res2)) {
5888  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorTransformVector_push_back" "', argument " "2"" of type '" "faiss::VectorTransform *""'");
5889  }
5890  arg2 = reinterpret_cast< faiss::VectorTransform * >(argp2);
5891  (arg1)->push_back(arg2);
5892  resultobj = SWIG_Py_Void();
5893  return resultobj;
5894 fail:
5895  return NULL;
5896 }
5897 
5898 
5899 SWIGINTERN PyObject *_wrap_VectorTransformVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5900  PyObject *resultobj = 0;
5901  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5902  void *argp1 = 0 ;
5903  int res1 = 0 ;
5904  PyObject * obj0 = 0 ;
5905 
5906  if (!PyArg_ParseTuple(args,(char *)"O:VectorTransformVector_clear",&obj0)) SWIG_fail;
5907  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5908  if (!SWIG_IsOK(res1)) {
5909  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_clear" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5910  }
5911  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5912  (arg1)->clear();
5913  resultobj = SWIG_Py_Void();
5914  return resultobj;
5915 fail:
5916  return NULL;
5917 }
5918 
5919 
5920 SWIGINTERN PyObject *_wrap_VectorTransformVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5921  PyObject *resultobj = 0;
5922  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5923  void *argp1 = 0 ;
5924  int res1 = 0 ;
5925  PyObject * obj0 = 0 ;
5926  faiss::VectorTransform **result = 0 ;
5927 
5928  if (!PyArg_ParseTuple(args,(char *)"O:VectorTransformVector_data",&obj0)) SWIG_fail;
5929  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5930  if (!SWIG_IsOK(res1)) {
5931  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_data" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5932  }
5933  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5934  result = (faiss::VectorTransform **)(arg1)->data();
5935  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_faiss__VectorTransform, 0 | 0 );
5936  return resultobj;
5937 fail:
5938  return NULL;
5939 }
5940 
5941 
5942 SWIGINTERN PyObject *_wrap_VectorTransformVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5943  PyObject *resultobj = 0;
5944  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5945  void *argp1 = 0 ;
5946  int res1 = 0 ;
5947  PyObject * obj0 = 0 ;
5948  size_t result;
5949 
5950  if (!PyArg_ParseTuple(args,(char *)"O:VectorTransformVector_size",&obj0)) SWIG_fail;
5951  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5952  if (!SWIG_IsOK(res1)) {
5953  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_size" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5954  }
5955  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5956  result = (size_t)(arg1)->size();
5957  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5958  return resultobj;
5959 fail:
5960  return NULL;
5961 }
5962 
5963 
5964 SWIGINTERN PyObject *_wrap_VectorTransformVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5965  PyObject *resultobj = 0;
5966  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5967  size_t arg2 ;
5968  void *argp1 = 0 ;
5969  int res1 = 0 ;
5970  size_t val2 ;
5971  int ecode2 = 0 ;
5972  PyObject * obj0 = 0 ;
5973  PyObject * obj1 = 0 ;
5974  faiss::VectorTransform *result = 0 ;
5975 
5976  if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_at",&obj0,&obj1)) SWIG_fail;
5977  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5978  if (!SWIG_IsOK(res1)) {
5979  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_at" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > const *""'");
5980  }
5981  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5982  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5983  if (!SWIG_IsOK(ecode2)) {
5984  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransformVector_at" "', argument " "2"" of type '" "size_t""'");
5985  }
5986  arg2 = static_cast< size_t >(val2);
5987  result = (faiss::VectorTransform *)((std::vector< faiss::VectorTransform * > const *)arg1)->at(arg2);
5988  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
5989  return resultobj;
5990 fail:
5991  return NULL;
5992 }
5993 
5994 
5995 SWIGINTERN PyObject *_wrap_VectorTransformVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5996  PyObject *resultobj = 0;
5997  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5998  size_t arg2 ;
5999  void *argp1 = 0 ;
6000  int res1 = 0 ;
6001  size_t val2 ;
6002  int ecode2 = 0 ;
6003  PyObject * obj0 = 0 ;
6004  PyObject * obj1 = 0 ;
6005 
6006  if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_resize",&obj0,&obj1)) SWIG_fail;
6007  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
6008  if (!SWIG_IsOK(res1)) {
6009  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_resize" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
6010  }
6011  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
6012  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6013  if (!SWIG_IsOK(ecode2)) {
6014  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransformVector_resize" "', argument " "2"" of type '" "size_t""'");
6015  }
6016  arg2 = static_cast< size_t >(val2);
6017  (arg1)->resize(arg2);
6018  resultobj = SWIG_Py_Void();
6019  return resultobj;
6020 fail:
6021  return NULL;
6022 }
6023 
6024 
6025 SWIGINTERN PyObject *_wrap_VectorTransformVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6026  PyObject *resultobj = 0;
6027  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
6028  std::vector< faiss::VectorTransform * > *arg2 = 0 ;
6029  void *argp1 = 0 ;
6030  int res1 = 0 ;
6031  void *argp2 = 0 ;
6032  int res2 = 0 ;
6033  PyObject * obj0 = 0 ;
6034  PyObject * obj1 = 0 ;
6035 
6036  if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_swap",&obj0,&obj1)) SWIG_fail;
6037  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
6038  if (!SWIG_IsOK(res1)) {
6039  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_swap" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
6040  }
6041  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
6042  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 );
6043  if (!SWIG_IsOK(res2)) {
6044  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorTransformVector_swap" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > &""'");
6045  }
6046  if (!argp2) {
6047  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VectorTransformVector_swap" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > &""'");
6048  }
6049  arg2 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp2);
6050  (arg1)->swap(*arg2);
6051  resultobj = SWIG_Py_Void();
6052  return resultobj;
6053 fail:
6054  return NULL;
6055 }
6056 
6057 
6058 SWIGINTERN PyObject *_wrap_delete_VectorTransformVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6059  PyObject *resultobj = 0;
6060  std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
6061  void *argp1 = 0 ;
6062  int res1 = 0 ;
6063  PyObject * obj0 = 0 ;
6064 
6065  if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorTransformVector",&obj0)) SWIG_fail;
6066  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_POINTER_DISOWN | 0 );
6067  if (!SWIG_IsOK(res1)) {
6068  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorTransformVector" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
6069  }
6070  arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
6071  delete arg1;
6072  resultobj = SWIG_Py_Void();
6073  return resultobj;
6074 fail:
6075  return NULL;
6076 }
6077 
6078 
6079 SWIGINTERN PyObject *VectorTransformVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6080  PyObject *obj;
6081  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6082  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_NewClientData(obj));
6083  return SWIG_Py_Void();
6084 }
6085 
6086 SWIGINTERN PyObject *_wrap_new_OperatingPointVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6087  PyObject *resultobj = 0;
6088  std::vector< faiss::OperatingPoint > *result = 0 ;
6089 
6090  if (!PyArg_ParseTuple(args,(char *)":new_OperatingPointVector")) SWIG_fail;
6091  result = (std::vector< faiss::OperatingPoint > *)new std::vector< faiss::OperatingPoint >();
6092  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_POINTER_NEW | 0 );
6093  return resultobj;
6094 fail:
6095  return NULL;
6096 }
6097 
6098 
6099 SWIGINTERN PyObject *_wrap_OperatingPointVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6100  PyObject *resultobj = 0;
6101  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6102  faiss::OperatingPoint arg2 ;
6103  void *argp1 = 0 ;
6104  int res1 = 0 ;
6105  void *argp2 ;
6106  int res2 = 0 ;
6107  PyObject * obj0 = 0 ;
6108  PyObject * obj1 = 0 ;
6109 
6110  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_push_back",&obj0,&obj1)) SWIG_fail;
6111  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6112  if (!SWIG_IsOK(res1)) {
6113  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6114  }
6115  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6116  {
6117  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__OperatingPoint, 0 | 0);
6118  if (!SWIG_IsOK(res2)) {
6119  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPointVector_push_back" "', argument " "2"" of type '" "faiss::OperatingPoint""'");
6120  }
6121  if (!argp2) {
6122  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPointVector_push_back" "', argument " "2"" of type '" "faiss::OperatingPoint""'");
6123  } else {
6124  faiss::OperatingPoint * temp = reinterpret_cast< faiss::OperatingPoint * >(argp2);
6125  arg2 = *temp;
6126  if (SWIG_IsNewObj(res2)) delete temp;
6127  }
6128  }
6129  (arg1)->push_back(arg2);
6130  resultobj = SWIG_Py_Void();
6131  return resultobj;
6132 fail:
6133  return NULL;
6134 }
6135 
6136 
6137 SWIGINTERN PyObject *_wrap_OperatingPointVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6138  PyObject *resultobj = 0;
6139  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6140  void *argp1 = 0 ;
6141  int res1 = 0 ;
6142  PyObject * obj0 = 0 ;
6143 
6144  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPointVector_clear",&obj0)) SWIG_fail;
6145  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6146  if (!SWIG_IsOK(res1)) {
6147  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_clear" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6148  }
6149  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6150  (arg1)->clear();
6151  resultobj = SWIG_Py_Void();
6152  return resultobj;
6153 fail:
6154  return NULL;
6155 }
6156 
6157 
6158 SWIGINTERN PyObject *_wrap_OperatingPointVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6159  PyObject *resultobj = 0;
6160  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6161  void *argp1 = 0 ;
6162  int res1 = 0 ;
6163  PyObject * obj0 = 0 ;
6164  faiss::OperatingPoint *result = 0 ;
6165 
6166  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPointVector_data",&obj0)) SWIG_fail;
6167  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6168  if (!SWIG_IsOK(res1)) {
6169  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_data" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6170  }
6171  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6172  result = (faiss::OperatingPoint *)(arg1)->data();
6173  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
6174  return resultobj;
6175 fail:
6176  return NULL;
6177 }
6178 
6179 
6180 SWIGINTERN PyObject *_wrap_OperatingPointVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6181  PyObject *resultobj = 0;
6182  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6183  void *argp1 = 0 ;
6184  int res1 = 0 ;
6185  PyObject * obj0 = 0 ;
6186  size_t result;
6187 
6188  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPointVector_size",&obj0)) SWIG_fail;
6189  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6190  if (!SWIG_IsOK(res1)) {
6191  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_size" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6192  }
6193  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6194  result = (size_t)(arg1)->size();
6195  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6196  return resultobj;
6197 fail:
6198  return NULL;
6199 }
6200 
6201 
6202 SWIGINTERN PyObject *_wrap_OperatingPointVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6203  PyObject *resultobj = 0;
6204  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6205  size_t arg2 ;
6206  void *argp1 = 0 ;
6207  int res1 = 0 ;
6208  size_t val2 ;
6209  int ecode2 = 0 ;
6210  PyObject * obj0 = 0 ;
6211  PyObject * obj1 = 0 ;
6212  faiss::OperatingPoint result;
6213 
6214  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_at",&obj0,&obj1)) SWIG_fail;
6215  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6216  if (!SWIG_IsOK(res1)) {
6217  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_at" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > const *""'");
6218  }
6219  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6220  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6221  if (!SWIG_IsOK(ecode2)) {
6222  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPointVector_at" "', argument " "2"" of type '" "size_t""'");
6223  }
6224  arg2 = static_cast< size_t >(val2);
6225  result = ((std::vector< faiss::OperatingPoint > const *)arg1)->at(arg2);
6226  resultobj = SWIG_NewPointerObj((new faiss::OperatingPoint(static_cast< const faiss::OperatingPoint& >(result))), SWIGTYPE_p_faiss__OperatingPoint, SWIG_POINTER_OWN | 0 );
6227  return resultobj;
6228 fail:
6229  return NULL;
6230 }
6231 
6232 
6233 SWIGINTERN PyObject *_wrap_OperatingPointVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6234  PyObject *resultobj = 0;
6235  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6236  size_t arg2 ;
6237  void *argp1 = 0 ;
6238  int res1 = 0 ;
6239  size_t val2 ;
6240  int ecode2 = 0 ;
6241  PyObject * obj0 = 0 ;
6242  PyObject * obj1 = 0 ;
6243 
6244  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_resize",&obj0,&obj1)) SWIG_fail;
6245  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6246  if (!SWIG_IsOK(res1)) {
6247  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_resize" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6248  }
6249  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6250  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6251  if (!SWIG_IsOK(ecode2)) {
6252  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPointVector_resize" "', argument " "2"" of type '" "size_t""'");
6253  }
6254  arg2 = static_cast< size_t >(val2);
6255  (arg1)->resize(arg2);
6256  resultobj = SWIG_Py_Void();
6257  return resultobj;
6258 fail:
6259  return NULL;
6260 }
6261 
6262 
6263 SWIGINTERN PyObject *_wrap_OperatingPointVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6264  PyObject *resultobj = 0;
6265  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6266  std::vector< faiss::OperatingPoint > *arg2 = 0 ;
6267  void *argp1 = 0 ;
6268  int res1 = 0 ;
6269  void *argp2 = 0 ;
6270  int res2 = 0 ;
6271  PyObject * obj0 = 0 ;
6272  PyObject * obj1 = 0 ;
6273 
6274  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_swap",&obj0,&obj1)) SWIG_fail;
6275  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6276  if (!SWIG_IsOK(res1)) {
6277  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_swap" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6278  }
6279  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6280  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 );
6281  if (!SWIG_IsOK(res2)) {
6282  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPointVector_swap" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > &""'");
6283  }
6284  if (!argp2) {
6285  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPointVector_swap" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > &""'");
6286  }
6287  arg2 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp2);
6288  (arg1)->swap(*arg2);
6289  resultobj = SWIG_Py_Void();
6290  return resultobj;
6291 fail:
6292  return NULL;
6293 }
6294 
6295 
6296 SWIGINTERN PyObject *_wrap_delete_OperatingPointVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6297  PyObject *resultobj = 0;
6298  std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6299  void *argp1 = 0 ;
6300  int res1 = 0 ;
6301  PyObject * obj0 = 0 ;
6302 
6303  if (!PyArg_ParseTuple(args,(char *)"O:delete_OperatingPointVector",&obj0)) SWIG_fail;
6304  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_POINTER_DISOWN | 0 );
6305  if (!SWIG_IsOK(res1)) {
6306  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OperatingPointVector" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6307  }
6308  arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6309  delete arg1;
6310  resultobj = SWIG_Py_Void();
6311  return resultobj;
6312 fail:
6313  return NULL;
6314 }
6315 
6316 
6317 SWIGINTERN PyObject *OperatingPointVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6318  PyObject *obj;
6319  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6320  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_NewClientData(obj));
6321  return SWIG_Py_Void();
6322 }
6323 
6324 SWIGINTERN PyObject *_wrap_new_InvertedListsPtrVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6325  PyObject *resultobj = 0;
6326  std::vector< faiss::InvertedLists * > *result = 0 ;
6327 
6328  if (!PyArg_ParseTuple(args,(char *)":new_InvertedListsPtrVector")) SWIG_fail;
6329  result = (std::vector< faiss::InvertedLists * > *)new std::vector< faiss::InvertedLists * >();
6330  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_POINTER_NEW | 0 );
6331  return resultobj;
6332 fail:
6333  return NULL;
6334 }
6335 
6336 
6337 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6338  PyObject *resultobj = 0;
6339  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6341  void *argp1 = 0 ;
6342  int res1 = 0 ;
6343  void *argp2 = 0 ;
6344  int res2 = 0 ;
6345  PyObject * obj0 = 0 ;
6346  PyObject * obj1 = 0 ;
6347 
6348  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_push_back",&obj0,&obj1)) SWIG_fail;
6349  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6350  if (!SWIG_IsOK(res1)) {
6351  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6352  }
6353  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6354  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
6355  if (!SWIG_IsOK(res2)) {
6356  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedListsPtrVector_push_back" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
6357  }
6358  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
6359  (arg1)->push_back(arg2);
6360  resultobj = SWIG_Py_Void();
6361  return resultobj;
6362 fail:
6363  return NULL;
6364 }
6365 
6366 
6367 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6368  PyObject *resultobj = 0;
6369  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6370  void *argp1 = 0 ;
6371  int res1 = 0 ;
6372  PyObject * obj0 = 0 ;
6373 
6374  if (!PyArg_ParseTuple(args,(char *)"O:InvertedListsPtrVector_clear",&obj0)) SWIG_fail;
6375  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6376  if (!SWIG_IsOK(res1)) {
6377  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_clear" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6378  }
6379  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6380  (arg1)->clear();
6381  resultobj = SWIG_Py_Void();
6382  return resultobj;
6383 fail:
6384  return NULL;
6385 }
6386 
6387 
6388 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6389  PyObject *resultobj = 0;
6390  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6391  void *argp1 = 0 ;
6392  int res1 = 0 ;
6393  PyObject * obj0 = 0 ;
6394  faiss::InvertedLists **result = 0 ;
6395 
6396  if (!PyArg_ParseTuple(args,(char *)"O:InvertedListsPtrVector_data",&obj0)) SWIG_fail;
6397  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6398  if (!SWIG_IsOK(res1)) {
6399  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_data" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6400  }
6401  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6402  result = (faiss::InvertedLists **)(arg1)->data();
6403  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_faiss__InvertedLists, 0 | 0 );
6404  return resultobj;
6405 fail:
6406  return NULL;
6407 }
6408 
6409 
6410 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6411  PyObject *resultobj = 0;
6412  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6413  void *argp1 = 0 ;
6414  int res1 = 0 ;
6415  PyObject * obj0 = 0 ;
6416  size_t result;
6417 
6418  if (!PyArg_ParseTuple(args,(char *)"O:InvertedListsPtrVector_size",&obj0)) SWIG_fail;
6419  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6420  if (!SWIG_IsOK(res1)) {
6421  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_size" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6422  }
6423  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6424  result = (size_t)(arg1)->size();
6425  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6426  return resultobj;
6427 fail:
6428  return NULL;
6429 }
6430 
6431 
6432 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6433  PyObject *resultobj = 0;
6434  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6435  size_t arg2 ;
6436  void *argp1 = 0 ;
6437  int res1 = 0 ;
6438  size_t val2 ;
6439  int ecode2 = 0 ;
6440  PyObject * obj0 = 0 ;
6441  PyObject * obj1 = 0 ;
6442  faiss::InvertedLists *result = 0 ;
6443 
6444  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_at",&obj0,&obj1)) SWIG_fail;
6445  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6446  if (!SWIG_IsOK(res1)) {
6447  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_at" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > const *""'");
6448  }
6449  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6450  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6451  if (!SWIG_IsOK(ecode2)) {
6452  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedListsPtrVector_at" "', argument " "2"" of type '" "size_t""'");
6453  }
6454  arg2 = static_cast< size_t >(val2);
6455  result = (faiss::InvertedLists *)((std::vector< faiss::InvertedLists * > const *)arg1)->at(arg2);
6456  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
6457  return resultobj;
6458 fail:
6459  return NULL;
6460 }
6461 
6462 
6463 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6464  PyObject *resultobj = 0;
6465  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6466  size_t arg2 ;
6467  void *argp1 = 0 ;
6468  int res1 = 0 ;
6469  size_t val2 ;
6470  int ecode2 = 0 ;
6471  PyObject * obj0 = 0 ;
6472  PyObject * obj1 = 0 ;
6473 
6474  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_resize",&obj0,&obj1)) SWIG_fail;
6475  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6476  if (!SWIG_IsOK(res1)) {
6477  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_resize" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6478  }
6479  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6480  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6481  if (!SWIG_IsOK(ecode2)) {
6482  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedListsPtrVector_resize" "', argument " "2"" of type '" "size_t""'");
6483  }
6484  arg2 = static_cast< size_t >(val2);
6485  (arg1)->resize(arg2);
6486  resultobj = SWIG_Py_Void();
6487  return resultobj;
6488 fail:
6489  return NULL;
6490 }
6491 
6492 
6493 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6494  PyObject *resultobj = 0;
6495  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6496  std::vector< faiss::InvertedLists * > *arg2 = 0 ;
6497  void *argp1 = 0 ;
6498  int res1 = 0 ;
6499  void *argp2 = 0 ;
6500  int res2 = 0 ;
6501  PyObject * obj0 = 0 ;
6502  PyObject * obj1 = 0 ;
6503 
6504  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_swap",&obj0,&obj1)) SWIG_fail;
6505  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6506  if (!SWIG_IsOK(res1)) {
6507  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_swap" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6508  }
6509  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6510  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 );
6511  if (!SWIG_IsOK(res2)) {
6512  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedListsPtrVector_swap" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists * > &""'");
6513  }
6514  if (!argp2) {
6515  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InvertedListsPtrVector_swap" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists * > &""'");
6516  }
6517  arg2 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp2);
6518  (arg1)->swap(*arg2);
6519  resultobj = SWIG_Py_Void();
6520  return resultobj;
6521 fail:
6522  return NULL;
6523 }
6524 
6525 
6526 SWIGINTERN PyObject *_wrap_delete_InvertedListsPtrVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6527  PyObject *resultobj = 0;
6528  std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6529  void *argp1 = 0 ;
6530  int res1 = 0 ;
6531  PyObject * obj0 = 0 ;
6532 
6533  if (!PyArg_ParseTuple(args,(char *)"O:delete_InvertedListsPtrVector",&obj0)) SWIG_fail;
6534  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_POINTER_DISOWN | 0 );
6535  if (!SWIG_IsOK(res1)) {
6536  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvertedListsPtrVector" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6537  }
6538  arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6539  delete arg1;
6540  resultobj = SWIG_Py_Void();
6541  return resultobj;
6542 fail:
6543  return NULL;
6544 }
6545 
6546 
6547 SWIGINTERN PyObject *InvertedListsPtrVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6548  PyObject *obj;
6549  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6550  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_NewClientData(obj));
6551  return SWIG_Py_Void();
6552 }
6553 
6554 SWIGINTERN PyObject *_wrap_new_FloatVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6555  PyObject *resultobj = 0;
6556  std::vector< std::vector< float > > *result = 0 ;
6557 
6558  if (!PyArg_ParseTuple(args,(char *)":new_FloatVectorVector")) SWIG_fail;
6559  result = (std::vector< std::vector< float > > *)new std::vector< std::vector< float > >();
6560  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_POINTER_NEW | 0 );
6561  return resultobj;
6562 fail:
6563  return NULL;
6564 }
6565 
6566 
6567 SWIGINTERN PyObject *_wrap_FloatVectorVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6568  PyObject *resultobj = 0;
6569  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6570  std::vector< float > arg2 ;
6571  void *argp1 = 0 ;
6572  int res1 = 0 ;
6573  void *argp2 ;
6574  int res2 = 0 ;
6575  PyObject * obj0 = 0 ;
6576  PyObject * obj1 = 0 ;
6577 
6578  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
6579  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6580  if (!SWIG_IsOK(res1)) {
6581  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6582  }
6583  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6584  {
6585  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_float_t, 0 | 0);
6586  if (!SWIG_IsOK(res2)) {
6587  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatVectorVector_push_back" "', argument " "2"" of type '" "std::vector< float >""'");
6588  }
6589  if (!argp2) {
6590  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVectorVector_push_back" "', argument " "2"" of type '" "std::vector< float >""'");
6591  } else {
6592  std::vector< float > * temp = reinterpret_cast< std::vector< float > * >(argp2);
6593  arg2 = *temp;
6594  if (SWIG_IsNewObj(res2)) delete temp;
6595  }
6596  }
6597  (arg1)->push_back(arg2);
6598  resultobj = SWIG_Py_Void();
6599  return resultobj;
6600 fail:
6601  return NULL;
6602 }
6603 
6604 
6605 SWIGINTERN PyObject *_wrap_FloatVectorVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6606  PyObject *resultobj = 0;
6607  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6608  void *argp1 = 0 ;
6609  int res1 = 0 ;
6610  PyObject * obj0 = 0 ;
6611 
6612  if (!PyArg_ParseTuple(args,(char *)"O:FloatVectorVector_clear",&obj0)) SWIG_fail;
6613  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6614  if (!SWIG_IsOK(res1)) {
6615  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6616  }
6617  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6618  (arg1)->clear();
6619  resultobj = SWIG_Py_Void();
6620  return resultobj;
6621 fail:
6622  return NULL;
6623 }
6624 
6625 
6626 SWIGINTERN PyObject *_wrap_FloatVectorVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6627  PyObject *resultobj = 0;
6628  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6629  void *argp1 = 0 ;
6630  int res1 = 0 ;
6631  PyObject * obj0 = 0 ;
6632  std::vector< float > *result = 0 ;
6633 
6634  if (!PyArg_ParseTuple(args,(char *)"O:FloatVectorVector_data",&obj0)) SWIG_fail;
6635  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6636  if (!SWIG_IsOK(res1)) {
6637  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6638  }
6639  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6640  result = (std::vector< float > *)(arg1)->data();
6641  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
6642  return resultobj;
6643 fail:
6644  return NULL;
6645 }
6646 
6647 
6648 SWIGINTERN PyObject *_wrap_FloatVectorVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6649  PyObject *resultobj = 0;
6650  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6651  void *argp1 = 0 ;
6652  int res1 = 0 ;
6653  PyObject * obj0 = 0 ;
6654  size_t result;
6655 
6656  if (!PyArg_ParseTuple(args,(char *)"O:FloatVectorVector_size",&obj0)) SWIG_fail;
6657  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6658  if (!SWIG_IsOK(res1)) {
6659  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6660  }
6661  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6662  result = (size_t)(arg1)->size();
6663  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6664  return resultobj;
6665 fail:
6666  return NULL;
6667 }
6668 
6669 
6670 SWIGINTERN PyObject *_wrap_FloatVectorVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6671  PyObject *resultobj = 0;
6672  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6673  size_t arg2 ;
6674  void *argp1 = 0 ;
6675  int res1 = 0 ;
6676  size_t val2 ;
6677  int ecode2 = 0 ;
6678  PyObject * obj0 = 0 ;
6679  PyObject * obj1 = 0 ;
6680  std::vector< float > result;
6681 
6682  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_at",&obj0,&obj1)) SWIG_fail;
6683  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6684  if (!SWIG_IsOK(res1)) {
6685  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< float > > const *""'");
6686  }
6687  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6688  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6689  if (!SWIG_IsOK(ecode2)) {
6690  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVectorVector_at" "', argument " "2"" of type '" "size_t""'");
6691  }
6692  arg2 = static_cast< size_t >(val2);
6693  result = ((std::vector< std::vector< float > > const *)arg1)->at(arg2);
6694  resultobj = SWIG_NewPointerObj((new std::vector< float >(static_cast< const std::vector< float >& >(result))), SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_OWN | 0 );
6695  return resultobj;
6696 fail:
6697  return NULL;
6698 }
6699 
6700 
6701 SWIGINTERN PyObject *_wrap_FloatVectorVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6702  PyObject *resultobj = 0;
6703  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6704  size_t arg2 ;
6705  void *argp1 = 0 ;
6706  int res1 = 0 ;
6707  size_t val2 ;
6708  int ecode2 = 0 ;
6709  PyObject * obj0 = 0 ;
6710  PyObject * obj1 = 0 ;
6711 
6712  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_resize",&obj0,&obj1)) SWIG_fail;
6713  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6714  if (!SWIG_IsOK(res1)) {
6715  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6716  }
6717  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6718  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6719  if (!SWIG_IsOK(ecode2)) {
6720  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
6721  }
6722  arg2 = static_cast< size_t >(val2);
6723  (arg1)->resize(arg2);
6724  resultobj = SWIG_Py_Void();
6725  return resultobj;
6726 fail:
6727  return NULL;
6728 }
6729 
6730 
6731 SWIGINTERN PyObject *_wrap_FloatVectorVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6732  PyObject *resultobj = 0;
6733  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6734  std::vector< std::vector< float > > *arg2 = 0 ;
6735  void *argp1 = 0 ;
6736  int res1 = 0 ;
6737  void *argp2 = 0 ;
6738  int res2 = 0 ;
6739  PyObject * obj0 = 0 ;
6740  PyObject * obj1 = 0 ;
6741 
6742  if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_swap",&obj0,&obj1)) SWIG_fail;
6743  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6744  if (!SWIG_IsOK(res1)) {
6745  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6746  }
6747  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6748  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 );
6749  if (!SWIG_IsOK(res2)) {
6750  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< float > > &""'");
6751  }
6752  if (!argp2) {
6753  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< float > > &""'");
6754  }
6755  arg2 = reinterpret_cast< std::vector< std::vector< float > > * >(argp2);
6756  (arg1)->swap(*arg2);
6757  resultobj = SWIG_Py_Void();
6758  return resultobj;
6759 fail:
6760  return NULL;
6761 }
6762 
6763 
6764 SWIGINTERN PyObject *_wrap_delete_FloatVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6765  PyObject *resultobj = 0;
6766  std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6767  void *argp1 = 0 ;
6768  int res1 = 0 ;
6769  PyObject * obj0 = 0 ;
6770 
6771  if (!PyArg_ParseTuple(args,(char *)"O:delete_FloatVectorVector",&obj0)) SWIG_fail;
6772  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_POINTER_DISOWN | 0 );
6773  if (!SWIG_IsOK(res1)) {
6774  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6775  }
6776  arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6777  delete arg1;
6778  resultobj = SWIG_Py_Void();
6779  return resultobj;
6780 fail:
6781  return NULL;
6782 }
6783 
6784 
6785 SWIGINTERN PyObject *FloatVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6786  PyObject *obj;
6787  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6788  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_NewClientData(obj));
6789  return SWIG_Py_Void();
6790 }
6791 
6792 SWIGINTERN PyObject *_wrap_new_ByteVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6793  PyObject *resultobj = 0;
6794  std::vector< std::vector< unsigned char > > *result = 0 ;
6795 
6796  if (!PyArg_ParseTuple(args,(char *)":new_ByteVectorVector")) SWIG_fail;
6797  result = (std::vector< std::vector< unsigned char > > *)new std::vector< std::vector< unsigned char > >();
6798  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_POINTER_NEW | 0 );
6799  return resultobj;
6800 fail:
6801  return NULL;
6802 }
6803 
6804 
6805 SWIGINTERN PyObject *_wrap_ByteVectorVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6806  PyObject *resultobj = 0;
6807  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6808  std::vector< unsigned char > arg2 ;
6809  void *argp1 = 0 ;
6810  int res1 = 0 ;
6811  void *argp2 ;
6812  int res2 = 0 ;
6813  PyObject * obj0 = 0 ;
6814  PyObject * obj1 = 0 ;
6815 
6816  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
6817  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6818  if (!SWIG_IsOK(res1)) {
6819  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6820  }
6821  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6822  {
6823  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0);
6824  if (!SWIG_IsOK(res2)) {
6825  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ByteVectorVector_push_back" "', argument " "2"" of type '" "std::vector< unsigned char >""'");
6826  }
6827  if (!argp2) {
6828  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ByteVectorVector_push_back" "', argument " "2"" of type '" "std::vector< unsigned char >""'");
6829  } else {
6830  std::vector< unsigned char > * temp = reinterpret_cast< std::vector< unsigned char > * >(argp2);
6831  arg2 = *temp;
6832  if (SWIG_IsNewObj(res2)) delete temp;
6833  }
6834  }
6835  (arg1)->push_back(arg2);
6836  resultobj = SWIG_Py_Void();
6837  return resultobj;
6838 fail:
6839  return NULL;
6840 }
6841 
6842 
6843 SWIGINTERN PyObject *_wrap_ByteVectorVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6844  PyObject *resultobj = 0;
6845  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6846  void *argp1 = 0 ;
6847  int res1 = 0 ;
6848  PyObject * obj0 = 0 ;
6849 
6850  if (!PyArg_ParseTuple(args,(char *)"O:ByteVectorVector_clear",&obj0)) SWIG_fail;
6851  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6852  if (!SWIG_IsOK(res1)) {
6853  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6854  }
6855  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6856  (arg1)->clear();
6857  resultobj = SWIG_Py_Void();
6858  return resultobj;
6859 fail:
6860  return NULL;
6861 }
6862 
6863 
6864 SWIGINTERN PyObject *_wrap_ByteVectorVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6865  PyObject *resultobj = 0;
6866  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6867  void *argp1 = 0 ;
6868  int res1 = 0 ;
6869  PyObject * obj0 = 0 ;
6870  std::vector< unsigned char > *result = 0 ;
6871 
6872  if (!PyArg_ParseTuple(args,(char *)"O:ByteVectorVector_data",&obj0)) SWIG_fail;
6873  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6874  if (!SWIG_IsOK(res1)) {
6875  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6876  }
6877  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6878  result = (std::vector< unsigned char > *)(arg1)->data();
6879  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
6880  return resultobj;
6881 fail:
6882  return NULL;
6883 }
6884 
6885 
6886 SWIGINTERN PyObject *_wrap_ByteVectorVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6887  PyObject *resultobj = 0;
6888  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6889  void *argp1 = 0 ;
6890  int res1 = 0 ;
6891  PyObject * obj0 = 0 ;
6892  size_t result;
6893 
6894  if (!PyArg_ParseTuple(args,(char *)"O:ByteVectorVector_size",&obj0)) SWIG_fail;
6895  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6896  if (!SWIG_IsOK(res1)) {
6897  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6898  }
6899  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6900  result = (size_t)(arg1)->size();
6901  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6902  return resultobj;
6903 fail:
6904  return NULL;
6905 }
6906 
6907 
6908 SWIGINTERN PyObject *_wrap_ByteVectorVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6909  PyObject *resultobj = 0;
6910  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6911  size_t arg2 ;
6912  void *argp1 = 0 ;
6913  int res1 = 0 ;
6914  size_t val2 ;
6915  int ecode2 = 0 ;
6916  PyObject * obj0 = 0 ;
6917  PyObject * obj1 = 0 ;
6918  std::vector< unsigned char > result;
6919 
6920  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_at",&obj0,&obj1)) SWIG_fail;
6921  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6922  if (!SWIG_IsOK(res1)) {
6923  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > const *""'");
6924  }
6925  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6926  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6927  if (!SWIG_IsOK(ecode2)) {
6928  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVectorVector_at" "', argument " "2"" of type '" "size_t""'");
6929  }
6930  arg2 = static_cast< size_t >(val2);
6931  result = ((std::vector< std::vector< unsigned char > > const *)arg1)->at(arg2);
6932  resultobj = SWIG_NewPointerObj((new std::vector< unsigned char >(static_cast< const std::vector< unsigned char >& >(result))), SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_OWN | 0 );
6933  return resultobj;
6934 fail:
6935  return NULL;
6936 }
6937 
6938 
6939 SWIGINTERN PyObject *_wrap_ByteVectorVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6940  PyObject *resultobj = 0;
6941  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6942  size_t arg2 ;
6943  void *argp1 = 0 ;
6944  int res1 = 0 ;
6945  size_t val2 ;
6946  int ecode2 = 0 ;
6947  PyObject * obj0 = 0 ;
6948  PyObject * obj1 = 0 ;
6949 
6950  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_resize",&obj0,&obj1)) SWIG_fail;
6951  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6952  if (!SWIG_IsOK(res1)) {
6953  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6954  }
6955  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6956  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6957  if (!SWIG_IsOK(ecode2)) {
6958  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
6959  }
6960  arg2 = static_cast< size_t >(val2);
6961  (arg1)->resize(arg2);
6962  resultobj = SWIG_Py_Void();
6963  return resultobj;
6964 fail:
6965  return NULL;
6966 }
6967 
6968 
6969 SWIGINTERN PyObject *_wrap_ByteVectorVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6970  PyObject *resultobj = 0;
6971  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6972  std::vector< std::vector< unsigned char > > *arg2 = 0 ;
6973  void *argp1 = 0 ;
6974  int res1 = 0 ;
6975  void *argp2 = 0 ;
6976  int res2 = 0 ;
6977  PyObject * obj0 = 0 ;
6978  PyObject * obj1 = 0 ;
6979 
6980  if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_swap",&obj0,&obj1)) SWIG_fail;
6981  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6982  if (!SWIG_IsOK(res1)) {
6983  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6984  }
6985  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6986  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 );
6987  if (!SWIG_IsOK(res2)) {
6988  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ByteVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< unsigned char > > &""'");
6989  }
6990  if (!argp2) {
6991  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ByteVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< unsigned char > > &""'");
6992  }
6993  arg2 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp2);
6994  (arg1)->swap(*arg2);
6995  resultobj = SWIG_Py_Void();
6996  return resultobj;
6997 fail:
6998  return NULL;
6999 }
7000 
7001 
7002 SWIGINTERN PyObject *_wrap_delete_ByteVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7003  PyObject *resultobj = 0;
7004  std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
7005  void *argp1 = 0 ;
7006  int res1 = 0 ;
7007  PyObject * obj0 = 0 ;
7008 
7009  if (!PyArg_ParseTuple(args,(char *)"O:delete_ByteVectorVector",&obj0)) SWIG_fail;
7010  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_POINTER_DISOWN | 0 );
7011  if (!SWIG_IsOK(res1)) {
7012  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ByteVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
7013  }
7014  arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
7015  delete arg1;
7016  resultobj = SWIG_Py_Void();
7017  return resultobj;
7018 fail:
7019  return NULL;
7020 }
7021 
7022 
7023 SWIGINTERN PyObject *ByteVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7024  PyObject *obj;
7025  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
7026  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_NewClientData(obj));
7027  return SWIG_Py_Void();
7028 }
7029 
7030 SWIGINTERN PyObject *_wrap_new_LongVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7031  PyObject *resultobj = 0;
7032  std::vector< std::vector< long > > *result = 0 ;
7033 
7034  if (!PyArg_ParseTuple(args,(char *)":new_LongVectorVector")) SWIG_fail;
7035  result = (std::vector< std::vector< long > > *)new std::vector< std::vector< long > >();
7036  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_POINTER_NEW | 0 );
7037  return resultobj;
7038 fail:
7039  return NULL;
7040 }
7041 
7042 
7043 SWIGINTERN PyObject *_wrap_LongVectorVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7044  PyObject *resultobj = 0;
7045  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7046  std::vector< long > arg2 ;
7047  void *argp1 = 0 ;
7048  int res1 = 0 ;
7049  void *argp2 ;
7050  int res2 = 0 ;
7051  PyObject * obj0 = 0 ;
7052  PyObject * obj1 = 0 ;
7053 
7054  if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
7055  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7056  if (!SWIG_IsOK(res1)) {
7057  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7058  }
7059  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7060  {
7061  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_long_t, 0 | 0);
7062  if (!SWIG_IsOK(res2)) {
7063  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongVectorVector_push_back" "', argument " "2"" of type '" "std::vector< long >""'");
7064  }
7065  if (!argp2) {
7066  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongVectorVector_push_back" "', argument " "2"" of type '" "std::vector< long >""'");
7067  } else {
7068  std::vector< long > * temp = reinterpret_cast< std::vector< long > * >(argp2);
7069  arg2 = *temp;
7070  if (SWIG_IsNewObj(res2)) delete temp;
7071  }
7072  }
7073  (arg1)->push_back(arg2);
7074  resultobj = SWIG_Py_Void();
7075  return resultobj;
7076 fail:
7077  return NULL;
7078 }
7079 
7080 
7081 SWIGINTERN PyObject *_wrap_LongVectorVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7082  PyObject *resultobj = 0;
7083  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7084  void *argp1 = 0 ;
7085  int res1 = 0 ;
7086  PyObject * obj0 = 0 ;
7087 
7088  if (!PyArg_ParseTuple(args,(char *)"O:LongVectorVector_clear",&obj0)) SWIG_fail;
7089  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7090  if (!SWIG_IsOK(res1)) {
7091  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7092  }
7093  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7094  (arg1)->clear();
7095  resultobj = SWIG_Py_Void();
7096  return resultobj;
7097 fail:
7098  return NULL;
7099 }
7100 
7101 
7102 SWIGINTERN PyObject *_wrap_LongVectorVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7103  PyObject *resultobj = 0;
7104  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7105  void *argp1 = 0 ;
7106  int res1 = 0 ;
7107  PyObject * obj0 = 0 ;
7108  std::vector< long > *result = 0 ;
7109 
7110  if (!PyArg_ParseTuple(args,(char *)"O:LongVectorVector_data",&obj0)) SWIG_fail;
7111  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7112  if (!SWIG_IsOK(res1)) {
7113  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7114  }
7115  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7116  result = (std::vector< long > *)(arg1)->data();
7117  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
7118  return resultobj;
7119 fail:
7120  return NULL;
7121 }
7122 
7123 
7124 SWIGINTERN PyObject *_wrap_LongVectorVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7125  PyObject *resultobj = 0;
7126  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7127  void *argp1 = 0 ;
7128  int res1 = 0 ;
7129  PyObject * obj0 = 0 ;
7130  size_t result;
7131 
7132  if (!PyArg_ParseTuple(args,(char *)"O:LongVectorVector_size",&obj0)) SWIG_fail;
7133  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7134  if (!SWIG_IsOK(res1)) {
7135  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7136  }
7137  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7138  result = (size_t)(arg1)->size();
7139  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
7140  return resultobj;
7141 fail:
7142  return NULL;
7143 }
7144 
7145 
7146 SWIGINTERN PyObject *_wrap_LongVectorVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7147  PyObject *resultobj = 0;
7148  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7149  size_t arg2 ;
7150  void *argp1 = 0 ;
7151  int res1 = 0 ;
7152  size_t val2 ;
7153  int ecode2 = 0 ;
7154  PyObject * obj0 = 0 ;
7155  PyObject * obj1 = 0 ;
7156  std::vector< long > result;
7157 
7158  if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_at",&obj0,&obj1)) SWIG_fail;
7159  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7160  if (!SWIG_IsOK(res1)) {
7161  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< long > > const *""'");
7162  }
7163  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7164  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7165  if (!SWIG_IsOK(ecode2)) {
7166  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVectorVector_at" "', argument " "2"" of type '" "size_t""'");
7167  }
7168  arg2 = static_cast< size_t >(val2);
7169  result = ((std::vector< std::vector< long > > const *)arg1)->at(arg2);
7170  resultobj = SWIG_NewPointerObj((new std::vector< long >(static_cast< const std::vector< long >& >(result))), SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_OWN | 0 );
7171  return resultobj;
7172 fail:
7173  return NULL;
7174 }
7175 
7176 
7177 SWIGINTERN PyObject *_wrap_LongVectorVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7178  PyObject *resultobj = 0;
7179  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7180  size_t arg2 ;
7181  void *argp1 = 0 ;
7182  int res1 = 0 ;
7183  size_t val2 ;
7184  int ecode2 = 0 ;
7185  PyObject * obj0 = 0 ;
7186  PyObject * obj1 = 0 ;
7187 
7188  if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_resize",&obj0,&obj1)) SWIG_fail;
7189  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7190  if (!SWIG_IsOK(res1)) {
7191  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7192  }
7193  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7194  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7195  if (!SWIG_IsOK(ecode2)) {
7196  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
7197  }
7198  arg2 = static_cast< size_t >(val2);
7199  (arg1)->resize(arg2);
7200  resultobj = SWIG_Py_Void();
7201  return resultobj;
7202 fail:
7203  return NULL;
7204 }
7205 
7206 
7207 SWIGINTERN PyObject *_wrap_LongVectorVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7208  PyObject *resultobj = 0;
7209  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7210  std::vector< std::vector< long > > *arg2 = 0 ;
7211  void *argp1 = 0 ;
7212  int res1 = 0 ;
7213  void *argp2 = 0 ;
7214  int res2 = 0 ;
7215  PyObject * obj0 = 0 ;
7216  PyObject * obj1 = 0 ;
7217 
7218  if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_swap",&obj0,&obj1)) SWIG_fail;
7219  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7220  if (!SWIG_IsOK(res1)) {
7221  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7222  }
7223  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7224  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 );
7225  if (!SWIG_IsOK(res2)) {
7226  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< long > > &""'");
7227  }
7228  if (!argp2) {
7229  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< long > > &""'");
7230  }
7231  arg2 = reinterpret_cast< std::vector< std::vector< long > > * >(argp2);
7232  (arg1)->swap(*arg2);
7233  resultobj = SWIG_Py_Void();
7234  return resultobj;
7235 fail:
7236  return NULL;
7237 }
7238 
7239 
7240 SWIGINTERN PyObject *_wrap_delete_LongVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7241  PyObject *resultobj = 0;
7242  std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7243  void *argp1 = 0 ;
7244  int res1 = 0 ;
7245  PyObject * obj0 = 0 ;
7246 
7247  if (!PyArg_ParseTuple(args,(char *)"O:delete_LongVectorVector",&obj0)) SWIG_fail;
7248  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_POINTER_DISOWN | 0 );
7249  if (!SWIG_IsOK(res1)) {
7250  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LongVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7251  }
7252  arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7253  delete arg1;
7254  resultobj = SWIG_Py_Void();
7255  return resultobj;
7256 fail:
7257  return NULL;
7258 }
7259 
7260 
7261 SWIGINTERN PyObject *LongVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7262  PyObject *obj;
7263  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
7264  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_NewClientData(obj));
7265  return SWIG_Py_Void();
7266 }
7267 
7268 SWIGINTERN PyObject *_wrap_new_GpuResourcesVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7269  PyObject *resultobj = 0;
7270  std::vector< faiss::gpu::GpuResources * > *result = 0 ;
7271 
7272  if (!PyArg_ParseTuple(args,(char *)":new_GpuResourcesVector")) SWIG_fail;
7273  result = (std::vector< faiss::gpu::GpuResources * > *)new std::vector< faiss::gpu::GpuResources * >();
7274  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, SWIG_POINTER_NEW | 0 );
7275  return resultobj;
7276 fail:
7277  return NULL;
7278 }
7279 
7280 
7281 SWIGINTERN PyObject *_wrap_GpuResourcesVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7282  PyObject *resultobj = 0;
7283  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7285  void *argp1 = 0 ;
7286  int res1 = 0 ;
7287  void *argp2 = 0 ;
7288  int res2 = 0 ;
7289  PyObject * obj0 = 0 ;
7290  PyObject * obj1 = 0 ;
7291 
7292  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResourcesVector_push_back",&obj0,&obj1)) SWIG_fail;
7293  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 | 0 );
7294  if (!SWIG_IsOK(res1)) {
7295  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResourcesVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > *""'");
7296  }
7297  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7298  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
7299  if (!SWIG_IsOK(res2)) {
7300  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuResourcesVector_push_back" "', argument " "2"" of type '" "faiss::gpu::GpuResources *""'");
7301  }
7302  arg2 = reinterpret_cast< faiss::gpu::GpuResources * >(argp2);
7303  (arg1)->push_back(arg2);
7304  resultobj = SWIG_Py_Void();
7305  return resultobj;
7306 fail:
7307  return NULL;
7308 }
7309 
7310 
7311 SWIGINTERN PyObject *_wrap_GpuResourcesVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7312  PyObject *resultobj = 0;
7313  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7314  void *argp1 = 0 ;
7315  int res1 = 0 ;
7316  PyObject * obj0 = 0 ;
7317 
7318  if (!PyArg_ParseTuple(args,(char *)"O:GpuResourcesVector_clear",&obj0)) SWIG_fail;
7319  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 | 0 );
7320  if (!SWIG_IsOK(res1)) {
7321  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResourcesVector_clear" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > *""'");
7322  }
7323  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7324  (arg1)->clear();
7325  resultobj = SWIG_Py_Void();
7326  return resultobj;
7327 fail:
7328  return NULL;
7329 }
7330 
7331 
7332 SWIGINTERN PyObject *_wrap_GpuResourcesVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7333  PyObject *resultobj = 0;
7334  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7335  void *argp1 = 0 ;
7336  int res1 = 0 ;
7337  PyObject * obj0 = 0 ;
7338  faiss::gpu::GpuResources **result = 0 ;
7339 
7340  if (!PyArg_ParseTuple(args,(char *)"O:GpuResourcesVector_data",&obj0)) SWIG_fail;
7341  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 | 0 );
7342  if (!SWIG_IsOK(res1)) {
7343  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResourcesVector_data" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > *""'");
7344  }
7345  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7346  result = (faiss::gpu::GpuResources **)(arg1)->data();
7347  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_faiss__gpu__GpuResources, 0 | 0 );
7348  return resultobj;
7349 fail:
7350  return NULL;
7351 }
7352 
7353 
7354 SWIGINTERN PyObject *_wrap_GpuResourcesVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7355  PyObject *resultobj = 0;
7356  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7357  void *argp1 = 0 ;
7358  int res1 = 0 ;
7359  PyObject * obj0 = 0 ;
7360  size_t result;
7361 
7362  if (!PyArg_ParseTuple(args,(char *)"O:GpuResourcesVector_size",&obj0)) SWIG_fail;
7363  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 | 0 );
7364  if (!SWIG_IsOK(res1)) {
7365  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResourcesVector_size" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > *""'");
7366  }
7367  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7368  result = (size_t)(arg1)->size();
7369  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
7370  return resultobj;
7371 fail:
7372  return NULL;
7373 }
7374 
7375 
7376 SWIGINTERN PyObject *_wrap_GpuResourcesVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7377  PyObject *resultobj = 0;
7378  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7379  size_t arg2 ;
7380  void *argp1 = 0 ;
7381  int res1 = 0 ;
7382  size_t val2 ;
7383  int ecode2 = 0 ;
7384  PyObject * obj0 = 0 ;
7385  PyObject * obj1 = 0 ;
7386  faiss::gpu::GpuResources *result = 0 ;
7387 
7388  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResourcesVector_at",&obj0,&obj1)) SWIG_fail;
7389  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 | 0 );
7390  if (!SWIG_IsOK(res1)) {
7391  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResourcesVector_at" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > const *""'");
7392  }
7393  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7394  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7395  if (!SWIG_IsOK(ecode2)) {
7396  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResourcesVector_at" "', argument " "2"" of type '" "size_t""'");
7397  }
7398  arg2 = static_cast< size_t >(val2);
7399  result = (faiss::gpu::GpuResources *)((std::vector< faiss::gpu::GpuResources * > const *)arg1)->at(arg2);
7400  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
7401  return resultobj;
7402 fail:
7403  return NULL;
7404 }
7405 
7406 
7407 SWIGINTERN PyObject *_wrap_GpuResourcesVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7408  PyObject *resultobj = 0;
7409  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7410  size_t arg2 ;
7411  void *argp1 = 0 ;
7412  int res1 = 0 ;
7413  size_t val2 ;
7414  int ecode2 = 0 ;
7415  PyObject * obj0 = 0 ;
7416  PyObject * obj1 = 0 ;
7417 
7418  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResourcesVector_resize",&obj0,&obj1)) SWIG_fail;
7419  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 | 0 );
7420  if (!SWIG_IsOK(res1)) {
7421  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResourcesVector_resize" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > *""'");
7422  }
7423  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7424  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7425  if (!SWIG_IsOK(ecode2)) {
7426  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResourcesVector_resize" "', argument " "2"" of type '" "size_t""'");
7427  }
7428  arg2 = static_cast< size_t >(val2);
7429  (arg1)->resize(arg2);
7430  resultobj = SWIG_Py_Void();
7431  return resultobj;
7432 fail:
7433  return NULL;
7434 }
7435 
7436 
7437 SWIGINTERN PyObject *_wrap_GpuResourcesVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7438  PyObject *resultobj = 0;
7439  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7440  std::vector< faiss::gpu::GpuResources * > *arg2 = 0 ;
7441  void *argp1 = 0 ;
7442  int res1 = 0 ;
7443  void *argp2 = 0 ;
7444  int res2 = 0 ;
7445  PyObject * obj0 = 0 ;
7446  PyObject * obj1 = 0 ;
7447 
7448  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResourcesVector_swap",&obj0,&obj1)) SWIG_fail;
7449  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 | 0 );
7450  if (!SWIG_IsOK(res1)) {
7451  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResourcesVector_swap" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > *""'");
7452  }
7453  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7454  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 );
7455  if (!SWIG_IsOK(res2)) {
7456  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuResourcesVector_swap" "', argument " "2"" of type '" "std::vector< faiss::gpu::GpuResources * > &""'");
7457  }
7458  if (!argp2) {
7459  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GpuResourcesVector_swap" "', argument " "2"" of type '" "std::vector< faiss::gpu::GpuResources * > &""'");
7460  }
7461  arg2 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp2);
7462  (arg1)->swap(*arg2);
7463  resultobj = SWIG_Py_Void();
7464  return resultobj;
7465 fail:
7466  return NULL;
7467 }
7468 
7469 
7470 SWIGINTERN PyObject *_wrap_delete_GpuResourcesVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7471  PyObject *resultobj = 0;
7472  std::vector< faiss::gpu::GpuResources * > *arg1 = (std::vector< faiss::gpu::GpuResources * > *) 0 ;
7473  void *argp1 = 0 ;
7474  int res1 = 0 ;
7475  PyObject * obj0 = 0 ;
7476 
7477  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuResourcesVector",&obj0)) SWIG_fail;
7478  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, SWIG_POINTER_DISOWN | 0 );
7479  if (!SWIG_IsOK(res1)) {
7480  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuResourcesVector" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > *""'");
7481  }
7482  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
7483  delete arg1;
7484  resultobj = SWIG_Py_Void();
7485  return resultobj;
7486 fail:
7487  return NULL;
7488 }
7489 
7490 
7491 SWIGINTERN PyObject *GpuResourcesVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7492  PyObject *obj;
7493  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
7494  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, SWIG_NewClientData(obj));
7495  return SWIG_Py_Void();
7496 }
7497 
7498 SWIGINTERN int Swig_var_hamming_batch_size_set(PyObject *_val) {
7499  {
7500  size_t val;
7501  int res = SWIG_AsVal_size_t(_val, &val);
7502  if (!SWIG_IsOK(res)) {
7503  SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::hamming_batch_size""' of type '""size_t""'");
7504  }
7505  faiss::hamming_batch_size = static_cast< size_t >(val);
7506  }
7507  return 0;
7508 fail:
7509  return 1;
7510 }
7511 
7512 
7513 SWIGINTERN PyObject *Swig_var_hamming_batch_size_get(void) {
7514  PyObject *pyobj = 0;
7515 
7516  pyobj = SWIG_From_size_t(static_cast< size_t >(faiss::hamming_batch_size));
7517  return pyobj;
7518 }
7519 
7520 
7521 SWIGINTERN PyObject *_wrap_popcount64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7522  PyObject *resultobj = 0;
7523  uint64_t arg1 ;
7524  unsigned long val1 ;
7525  int ecode1 = 0 ;
7526  PyObject * obj0 = 0 ;
7527  int result;
7528 
7529  if (!PyArg_ParseTuple(args,(char *)"O:popcount64",&obj0)) SWIG_fail;
7530  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
7531  if (!SWIG_IsOK(ecode1)) {
7532  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "popcount64" "', argument " "1"" of type '" "uint64_t""'");
7533  }
7534  arg1 = static_cast< uint64_t >(val1);
7535  {
7536  Py_BEGIN_ALLOW_THREADS
7537  try {
7538  result = (int)faiss::popcount64(arg1);
7539  } catch(faiss::FaissException & e) {
7540  PyEval_RestoreThread(_save);
7541  PyErr_SetString(PyExc_RuntimeError, e.what());
7542  SWIG_fail;
7543  }
7544  Py_END_ALLOW_THREADS
7545  }
7546  resultobj = SWIG_From_int(static_cast< int >(result));
7547  return resultobj;
7548 fail:
7549  return NULL;
7550 }
7551 
7552 
7553 SWIGINTERN PyObject *_wrap_hammings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7554  PyObject *resultobj = 0;
7555  uint8_t *arg1 = (uint8_t *) 0 ;
7556  uint8_t *arg2 = (uint8_t *) 0 ;
7557  size_t arg3 ;
7558  size_t arg4 ;
7559  size_t arg5 ;
7560  hamdis_t *arg6 = (hamdis_t *) 0 ;
7561  void *argp1 = 0 ;
7562  int res1 = 0 ;
7563  void *argp2 = 0 ;
7564  int res2 = 0 ;
7565  size_t val3 ;
7566  int ecode3 = 0 ;
7567  size_t val4 ;
7568  int ecode4 = 0 ;
7569  size_t val5 ;
7570  int ecode5 = 0 ;
7571  void *argp6 = 0 ;
7572  int res6 = 0 ;
7573  PyObject * obj0 = 0 ;
7574  PyObject * obj1 = 0 ;
7575  PyObject * obj2 = 0 ;
7576  PyObject * obj3 = 0 ;
7577  PyObject * obj4 = 0 ;
7578  PyObject * obj5 = 0 ;
7579 
7580  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:hammings",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7581  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7582  if (!SWIG_IsOK(res1)) {
7583  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings" "', argument " "1"" of type '" "uint8_t const *""'");
7584  }
7585  arg1 = reinterpret_cast< uint8_t * >(argp1);
7586  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7587  if (!SWIG_IsOK(res2)) {
7588  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings" "', argument " "2"" of type '" "uint8_t const *""'");
7589  }
7590  arg2 = reinterpret_cast< uint8_t * >(argp2);
7591  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7592  if (!SWIG_IsOK(ecode3)) {
7593  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hammings" "', argument " "3"" of type '" "size_t""'");
7594  }
7595  arg3 = static_cast< size_t >(val3);
7596  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7597  if (!SWIG_IsOK(ecode4)) {
7598  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings" "', argument " "4"" of type '" "size_t""'");
7599  }
7600  arg4 = static_cast< size_t >(val4);
7601  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7602  if (!SWIG_IsOK(ecode5)) {
7603  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings" "', argument " "5"" of type '" "size_t""'");
7604  }
7605  arg5 = static_cast< size_t >(val5);
7606  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 );
7607  if (!SWIG_IsOK(res6)) {
7608  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "hammings" "', argument " "6"" of type '" "hamdis_t *""'");
7609  }
7610  arg6 = reinterpret_cast< hamdis_t * >(argp6);
7611  {
7612  Py_BEGIN_ALLOW_THREADS
7613  try {
7614  faiss::hammings((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6);
7615  } catch(faiss::FaissException & e) {
7616  PyEval_RestoreThread(_save);
7617  PyErr_SetString(PyExc_RuntimeError, e.what());
7618  SWIG_fail;
7619  }
7620  Py_END_ALLOW_THREADS
7621  }
7622  resultobj = SWIG_Py_Void();
7623  return resultobj;
7624 fail:
7625  return NULL;
7626 }
7627 
7628 
7629 SWIGINTERN PyObject *_wrap_bitvec_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7630  PyObject *resultobj = 0;
7631  uint8_t *arg1 = (uint8_t *) 0 ;
7632  size_t arg2 ;
7633  void *argp1 = 0 ;
7634  int res1 = 0 ;
7635  size_t val2 ;
7636  int ecode2 = 0 ;
7637  PyObject * obj0 = 0 ;
7638  PyObject * obj1 = 0 ;
7639 
7640  if (!PyArg_ParseTuple(args,(char *)"OO:bitvec_print",&obj0,&obj1)) SWIG_fail;
7641  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7642  if (!SWIG_IsOK(res1)) {
7643  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bitvec_print" "', argument " "1"" of type '" "uint8_t const *""'");
7644  }
7645  arg1 = reinterpret_cast< uint8_t * >(argp1);
7646  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7647  if (!SWIG_IsOK(ecode2)) {
7648  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bitvec_print" "', argument " "2"" of type '" "size_t""'");
7649  }
7650  arg2 = static_cast< size_t >(val2);
7651  {
7652  Py_BEGIN_ALLOW_THREADS
7653  try {
7654  faiss::bitvec_print((unsigned char const *)arg1,arg2);
7655  } catch(faiss::FaissException & e) {
7656  PyEval_RestoreThread(_save);
7657  PyErr_SetString(PyExc_RuntimeError, e.what());
7658  SWIG_fail;
7659  }
7660  Py_END_ALLOW_THREADS
7661  }
7662  resultobj = SWIG_Py_Void();
7663  return resultobj;
7664 fail:
7665  return NULL;
7666 }
7667 
7668 
7669 SWIGINTERN PyObject *_wrap_fvecs2bitvecs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7670  PyObject *resultobj = 0;
7671  float *arg1 = (float *) 0 ;
7672  uint8_t *arg2 = (uint8_t *) 0 ;
7673  size_t arg3 ;
7674  size_t arg4 ;
7675  void *argp1 = 0 ;
7676  int res1 = 0 ;
7677  void *argp2 = 0 ;
7678  int res2 = 0 ;
7679  size_t val3 ;
7680  int ecode3 = 0 ;
7681  size_t val4 ;
7682  int ecode4 = 0 ;
7683  PyObject * obj0 = 0 ;
7684  PyObject * obj1 = 0 ;
7685  PyObject * obj2 = 0 ;
7686  PyObject * obj3 = 0 ;
7687 
7688  if (!PyArg_ParseTuple(args,(char *)"OOOO:fvecs2bitvecs",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7689  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
7690  if (!SWIG_IsOK(res1)) {
7691  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvecs2bitvecs" "', argument " "1"" of type '" "float const *""'");
7692  }
7693  arg1 = reinterpret_cast< float * >(argp1);
7694  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7695  if (!SWIG_IsOK(res2)) {
7696  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs2bitvecs" "', argument " "2"" of type '" "uint8_t *""'");
7697  }
7698  arg2 = reinterpret_cast< uint8_t * >(argp2);
7699  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7700  if (!SWIG_IsOK(ecode3)) {
7701  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs2bitvecs" "', argument " "3"" of type '" "size_t""'");
7702  }
7703  arg3 = static_cast< size_t >(val3);
7704  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7705  if (!SWIG_IsOK(ecode4)) {
7706  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvecs2bitvecs" "', argument " "4"" of type '" "size_t""'");
7707  }
7708  arg4 = static_cast< size_t >(val4);
7709  {
7710  Py_BEGIN_ALLOW_THREADS
7711  try {
7712  faiss::fvecs2bitvecs((float const *)arg1,arg2,arg3,arg4);
7713  } catch(faiss::FaissException & e) {
7714  PyEval_RestoreThread(_save);
7715  PyErr_SetString(PyExc_RuntimeError, e.what());
7716  SWIG_fail;
7717  }
7718  Py_END_ALLOW_THREADS
7719  }
7720  resultobj = SWIG_Py_Void();
7721  return resultobj;
7722 fail:
7723  return NULL;
7724 }
7725 
7726 
7727 SWIGINTERN PyObject *_wrap_fvec2bitvec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7728  PyObject *resultobj = 0;
7729  float *arg1 = (float *) 0 ;
7730  uint8_t *arg2 = (uint8_t *) 0 ;
7731  size_t arg3 ;
7732  void *argp1 = 0 ;
7733  int res1 = 0 ;
7734  void *argp2 = 0 ;
7735  int res2 = 0 ;
7736  size_t val3 ;
7737  int ecode3 = 0 ;
7738  PyObject * obj0 = 0 ;
7739  PyObject * obj1 = 0 ;
7740  PyObject * obj2 = 0 ;
7741 
7742  if (!PyArg_ParseTuple(args,(char *)"OOO:fvec2bitvec",&obj0,&obj1,&obj2)) SWIG_fail;
7743  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
7744  if (!SWIG_IsOK(res1)) {
7745  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec2bitvec" "', argument " "1"" of type '" "float const *""'");
7746  }
7747  arg1 = reinterpret_cast< float * >(argp1);
7748  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7749  if (!SWIG_IsOK(res2)) {
7750  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec2bitvec" "', argument " "2"" of type '" "uint8_t *""'");
7751  }
7752  arg2 = reinterpret_cast< uint8_t * >(argp2);
7753  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7754  if (!SWIG_IsOK(ecode3)) {
7755  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec2bitvec" "', argument " "3"" of type '" "size_t""'");
7756  }
7757  arg3 = static_cast< size_t >(val3);
7758  {
7759  Py_BEGIN_ALLOW_THREADS
7760  try {
7761  faiss::fvec2bitvec((float const *)arg1,arg2,arg3);
7762  } catch(faiss::FaissException & e) {
7763  PyEval_RestoreThread(_save);
7764  PyErr_SetString(PyExc_RuntimeError, e.what());
7765  SWIG_fail;
7766  }
7767  Py_END_ALLOW_THREADS
7768  }
7769  resultobj = SWIG_Py_Void();
7770  return resultobj;
7771 fail:
7772  return NULL;
7773 }
7774 
7775 
7776 SWIGINTERN PyObject *_wrap_hammings_knn_hc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7777  PyObject *resultobj = 0;
7779  uint8_t *arg2 = (uint8_t *) 0 ;
7780  uint8_t *arg3 = (uint8_t *) 0 ;
7781  size_t arg4 ;
7782  size_t arg5 ;
7783  int arg6 ;
7784  void *argp1 = 0 ;
7785  int res1 = 0 ;
7786  void *argp2 = 0 ;
7787  int res2 = 0 ;
7788  void *argp3 = 0 ;
7789  int res3 = 0 ;
7790  size_t val4 ;
7791  int ecode4 = 0 ;
7792  size_t val5 ;
7793  int ecode5 = 0 ;
7794  int val6 ;
7795  int ecode6 = 0 ;
7796  PyObject * obj0 = 0 ;
7797  PyObject * obj1 = 0 ;
7798  PyObject * obj2 = 0 ;
7799  PyObject * obj3 = 0 ;
7800  PyObject * obj4 = 0 ;
7801  PyObject * obj5 = 0 ;
7802 
7803  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7804  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
7805  if (!SWIG_IsOK(res1)) {
7806  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
7807  }
7808  arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
7809  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7810  if (!SWIG_IsOK(res2)) {
7811  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
7812  }
7813  arg2 = reinterpret_cast< uint8_t * >(argp2);
7814  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
7815  if (!SWIG_IsOK(res3)) {
7816  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
7817  }
7818  arg3 = reinterpret_cast< uint8_t * >(argp3);
7819  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7820  if (!SWIG_IsOK(ecode4)) {
7821  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
7822  }
7823  arg4 = static_cast< size_t >(val4);
7824  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7825  if (!SWIG_IsOK(ecode5)) {
7826  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
7827  }
7828  arg5 = static_cast< size_t >(val5);
7829  ecode6 = SWIG_AsVal_int(obj5, &val6);
7830  if (!SWIG_IsOK(ecode6)) {
7831  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hammings_knn_hc" "', argument " "6"" of type '" "int""'");
7832  }
7833  arg6 = static_cast< int >(val6);
7834  {
7835  Py_BEGIN_ALLOW_THREADS
7836  try {
7837  faiss::hammings_knn_hc(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5,arg6);
7838  } catch(faiss::FaissException & e) {
7839  PyEval_RestoreThread(_save);
7840  PyErr_SetString(PyExc_RuntimeError, e.what());
7841  SWIG_fail;
7842  }
7843  Py_END_ALLOW_THREADS
7844  }
7845  resultobj = SWIG_Py_Void();
7846  return resultobj;
7847 fail:
7848  return NULL;
7849 }
7850 
7851 
7852 SWIGINTERN PyObject *_wrap_hammings_knn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7853  PyObject *resultobj = 0;
7855  uint8_t *arg2 = (uint8_t *) 0 ;
7856  uint8_t *arg3 = (uint8_t *) 0 ;
7857  size_t arg4 ;
7858  size_t arg5 ;
7859  int arg6 ;
7860  void *argp1 = 0 ;
7861  int res1 = 0 ;
7862  void *argp2 = 0 ;
7863  int res2 = 0 ;
7864  void *argp3 = 0 ;
7865  int res3 = 0 ;
7866  size_t val4 ;
7867  int ecode4 = 0 ;
7868  size_t val5 ;
7869  int ecode5 = 0 ;
7870  int val6 ;
7871  int ecode6 = 0 ;
7872  PyObject * obj0 = 0 ;
7873  PyObject * obj1 = 0 ;
7874  PyObject * obj2 = 0 ;
7875  PyObject * obj3 = 0 ;
7876  PyObject * obj4 = 0 ;
7877  PyObject * obj5 = 0 ;
7878 
7879  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:hammings_knn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7880  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
7881  if (!SWIG_IsOK(res1)) {
7882  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings_knn" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
7883  }
7884  arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
7885  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7886  if (!SWIG_IsOK(res2)) {
7887  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings_knn" "', argument " "2"" of type '" "uint8_t const *""'");
7888  }
7889  arg2 = reinterpret_cast< uint8_t * >(argp2);
7890  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
7891  if (!SWIG_IsOK(res3)) {
7892  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hammings_knn" "', argument " "3"" of type '" "uint8_t const *""'");
7893  }
7894  arg3 = reinterpret_cast< uint8_t * >(argp3);
7895  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7896  if (!SWIG_IsOK(ecode4)) {
7897  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings_knn" "', argument " "4"" of type '" "size_t""'");
7898  }
7899  arg4 = static_cast< size_t >(val4);
7900  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7901  if (!SWIG_IsOK(ecode5)) {
7902  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings_knn" "', argument " "5"" of type '" "size_t""'");
7903  }
7904  arg5 = static_cast< size_t >(val5);
7905  ecode6 = SWIG_AsVal_int(obj5, &val6);
7906  if (!SWIG_IsOK(ecode6)) {
7907  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hammings_knn" "', argument " "6"" of type '" "int""'");
7908  }
7909  arg6 = static_cast< int >(val6);
7910  {
7911  Py_BEGIN_ALLOW_THREADS
7912  try {
7913  faiss::hammings_knn(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5,arg6);
7914  } catch(faiss::FaissException & e) {
7915  PyEval_RestoreThread(_save);
7916  PyErr_SetString(PyExc_RuntimeError, e.what());
7917  SWIG_fail;
7918  }
7919  Py_END_ALLOW_THREADS
7920  }
7921  resultobj = SWIG_Py_Void();
7922  return resultobj;
7923 fail:
7924  return NULL;
7925 }
7926 
7927 
7928 SWIGINTERN PyObject *_wrap_hammings_knn_mc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7929  PyObject *resultobj = 0;
7930  uint8_t *arg1 = (uint8_t *) 0 ;
7931  uint8_t *arg2 = (uint8_t *) 0 ;
7932  size_t arg3 ;
7933  size_t arg4 ;
7934  size_t arg5 ;
7935  size_t arg6 ;
7936  int32_t *arg7 = (int32_t *) 0 ;
7937  long *arg8 = (long *) 0 ;
7938  void *argp1 = 0 ;
7939  int res1 = 0 ;
7940  void *argp2 = 0 ;
7941  int res2 = 0 ;
7942  size_t val3 ;
7943  int ecode3 = 0 ;
7944  size_t val4 ;
7945  int ecode4 = 0 ;
7946  size_t val5 ;
7947  int ecode5 = 0 ;
7948  size_t val6 ;
7949  int ecode6 = 0 ;
7950  void *argp7 = 0 ;
7951  int res7 = 0 ;
7952  void *argp8 = 0 ;
7953  int res8 = 0 ;
7954  PyObject * obj0 = 0 ;
7955  PyObject * obj1 = 0 ;
7956  PyObject * obj2 = 0 ;
7957  PyObject * obj3 = 0 ;
7958  PyObject * obj4 = 0 ;
7959  PyObject * obj5 = 0 ;
7960  PyObject * obj6 = 0 ;
7961  PyObject * obj7 = 0 ;
7962 
7963  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:hammings_knn_mc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7964  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7965  if (!SWIG_IsOK(res1)) {
7966  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings_knn_mc" "', argument " "1"" of type '" "uint8_t const *""'");
7967  }
7968  arg1 = reinterpret_cast< uint8_t * >(argp1);
7969  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7970  if (!SWIG_IsOK(res2)) {
7971  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings_knn_mc" "', argument " "2"" of type '" "uint8_t const *""'");
7972  }
7973  arg2 = reinterpret_cast< uint8_t * >(argp2);
7974  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7975  if (!SWIG_IsOK(ecode3)) {
7976  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hammings_knn_mc" "', argument " "3"" of type '" "size_t""'");
7977  }
7978  arg3 = static_cast< size_t >(val3);
7979  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7980  if (!SWIG_IsOK(ecode4)) {
7981  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings_knn_mc" "', argument " "4"" of type '" "size_t""'");
7982  }
7983  arg4 = static_cast< size_t >(val4);
7984  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7985  if (!SWIG_IsOK(ecode5)) {
7986  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings_knn_mc" "', argument " "5"" of type '" "size_t""'");
7987  }
7988  arg5 = static_cast< size_t >(val5);
7989  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
7990  if (!SWIG_IsOK(ecode6)) {
7991  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hammings_knn_mc" "', argument " "6"" of type '" "size_t""'");
7992  }
7993  arg6 = static_cast< size_t >(val6);
7994  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 );
7995  if (!SWIG_IsOK(res7)) {
7996  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "hammings_knn_mc" "', argument " "7"" of type '" "int32_t *""'");
7997  }
7998  arg7 = reinterpret_cast< int32_t * >(argp7);
7999  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
8000  if (!SWIG_IsOK(res8)) {
8001  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "hammings_knn_mc" "', argument " "8"" of type '" "long *""'");
8002  }
8003  arg8 = reinterpret_cast< long * >(argp8);
8004  {
8005  Py_BEGIN_ALLOW_THREADS
8006  try {
8007  faiss::hammings_knn_mc((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
8008  } catch(faiss::FaissException & e) {
8009  PyEval_RestoreThread(_save);
8010  PyErr_SetString(PyExc_RuntimeError, e.what());
8011  SWIG_fail;
8012  }
8013  Py_END_ALLOW_THREADS
8014  }
8015  resultobj = SWIG_Py_Void();
8016  return resultobj;
8017 fail:
8018  return NULL;
8019 }
8020 
8021 
8022 SWIGINTERN PyObject *_wrap_hamming_count_thres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8023  PyObject *resultobj = 0;
8024  uint8_t *arg1 = (uint8_t *) 0 ;
8025  uint8_t *arg2 = (uint8_t *) 0 ;
8026  size_t arg3 ;
8027  size_t arg4 ;
8028  hamdis_t arg5 ;
8029  size_t arg6 ;
8030  size_t *arg7 = (size_t *) 0 ;
8031  void *argp1 = 0 ;
8032  int res1 = 0 ;
8033  void *argp2 = 0 ;
8034  int res2 = 0 ;
8035  size_t val3 ;
8036  int ecode3 = 0 ;
8037  size_t val4 ;
8038  int ecode4 = 0 ;
8039  int val5 ;
8040  int ecode5 = 0 ;
8041  size_t val6 ;
8042  int ecode6 = 0 ;
8043  void *argp7 = 0 ;
8044  int res7 = 0 ;
8045  PyObject * obj0 = 0 ;
8046  PyObject * obj1 = 0 ;
8047  PyObject * obj2 = 0 ;
8048  PyObject * obj3 = 0 ;
8049  PyObject * obj4 = 0 ;
8050  PyObject * obj5 = 0 ;
8051  PyObject * obj6 = 0 ;
8052 
8053  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:hamming_count_thres",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
8054  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8055  if (!SWIG_IsOK(res1)) {
8056  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hamming_count_thres" "', argument " "1"" of type '" "uint8_t const *""'");
8057  }
8058  arg1 = reinterpret_cast< uint8_t * >(argp1);
8059  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8060  if (!SWIG_IsOK(res2)) {
8061  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hamming_count_thres" "', argument " "2"" of type '" "uint8_t const *""'");
8062  }
8063  arg2 = reinterpret_cast< uint8_t * >(argp2);
8064  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
8065  if (!SWIG_IsOK(ecode3)) {
8066  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hamming_count_thres" "', argument " "3"" of type '" "size_t""'");
8067  }
8068  arg3 = static_cast< size_t >(val3);
8069  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
8070  if (!SWIG_IsOK(ecode4)) {
8071  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hamming_count_thres" "', argument " "4"" of type '" "size_t""'");
8072  }
8073  arg4 = static_cast< size_t >(val4);
8074  ecode5 = SWIG_AsVal_int(obj4, &val5);
8075  if (!SWIG_IsOK(ecode5)) {
8076  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hamming_count_thres" "', argument " "5"" of type '" "hamdis_t""'");
8077  }
8078  arg5 = static_cast< hamdis_t >(val5);
8079  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
8080  if (!SWIG_IsOK(ecode6)) {
8081  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hamming_count_thres" "', argument " "6"" of type '" "size_t""'");
8082  }
8083  arg6 = static_cast< size_t >(val6);
8084  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_unsigned_long, 0 | 0 );
8085  if (!SWIG_IsOK(res7)) {
8086  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "hamming_count_thres" "', argument " "7"" of type '" "size_t *""'");
8087  }
8088  arg7 = reinterpret_cast< size_t * >(argp7);
8089  {
8090  Py_BEGIN_ALLOW_THREADS
8091  try {
8092  faiss::hamming_count_thres((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7);
8093  } catch(faiss::FaissException & e) {
8094  PyEval_RestoreThread(_save);
8095  PyErr_SetString(PyExc_RuntimeError, e.what());
8096  SWIG_fail;
8097  }
8098  Py_END_ALLOW_THREADS
8099  }
8100  resultobj = SWIG_Py_Void();
8101  return resultobj;
8102 fail:
8103  return NULL;
8104 }
8105 
8106 
8107 SWIGINTERN PyObject *_wrap_match_hamming_thres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8108  PyObject *resultobj = 0;
8109  uint8_t *arg1 = (uint8_t *) 0 ;
8110  uint8_t *arg2 = (uint8_t *) 0 ;
8111  size_t arg3 ;
8112  size_t arg4 ;
8113  hamdis_t arg5 ;
8114  size_t arg6 ;
8115  long *arg7 = (long *) 0 ;
8116  hamdis_t *arg8 = (hamdis_t *) 0 ;
8117  void *argp1 = 0 ;
8118  int res1 = 0 ;
8119  void *argp2 = 0 ;
8120  int res2 = 0 ;
8121  size_t val3 ;
8122  int ecode3 = 0 ;
8123  size_t val4 ;
8124  int ecode4 = 0 ;
8125  int val5 ;
8126  int ecode5 = 0 ;
8127  size_t val6 ;
8128  int ecode6 = 0 ;
8129  void *argp7 = 0 ;
8130  int res7 = 0 ;
8131  void *argp8 = 0 ;
8132  int res8 = 0 ;
8133  PyObject * obj0 = 0 ;
8134  PyObject * obj1 = 0 ;
8135  PyObject * obj2 = 0 ;
8136  PyObject * obj3 = 0 ;
8137  PyObject * obj4 = 0 ;
8138  PyObject * obj5 = 0 ;
8139  PyObject * obj6 = 0 ;
8140  PyObject * obj7 = 0 ;
8141  size_t result;
8142 
8143  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:match_hamming_thres",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
8144  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8145  if (!SWIG_IsOK(res1)) {
8146  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "match_hamming_thres" "', argument " "1"" of type '" "uint8_t const *""'");
8147  }
8148  arg1 = reinterpret_cast< uint8_t * >(argp1);
8149  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8150  if (!SWIG_IsOK(res2)) {
8151  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "match_hamming_thres" "', argument " "2"" of type '" "uint8_t const *""'");
8152  }
8153  arg2 = reinterpret_cast< uint8_t * >(argp2);
8154  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
8155  if (!SWIG_IsOK(ecode3)) {
8156  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "match_hamming_thres" "', argument " "3"" of type '" "size_t""'");
8157  }
8158  arg3 = static_cast< size_t >(val3);
8159  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
8160  if (!SWIG_IsOK(ecode4)) {
8161  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "match_hamming_thres" "', argument " "4"" of type '" "size_t""'");
8162  }
8163  arg4 = static_cast< size_t >(val4);
8164  ecode5 = SWIG_AsVal_int(obj4, &val5);
8165  if (!SWIG_IsOK(ecode5)) {
8166  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "match_hamming_thres" "', argument " "5"" of type '" "hamdis_t""'");
8167  }
8168  arg5 = static_cast< hamdis_t >(val5);
8169  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
8170  if (!SWIG_IsOK(ecode6)) {
8171  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "match_hamming_thres" "', argument " "6"" of type '" "size_t""'");
8172  }
8173  arg6 = static_cast< size_t >(val6);
8174  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_long, 0 | 0 );
8175  if (!SWIG_IsOK(res7)) {
8176  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "match_hamming_thres" "', argument " "7"" of type '" "long *""'");
8177  }
8178  arg7 = reinterpret_cast< long * >(argp7);
8179  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 | 0 );
8180  if (!SWIG_IsOK(res8)) {
8181  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "match_hamming_thres" "', argument " "8"" of type '" "hamdis_t *""'");
8182  }
8183  arg8 = reinterpret_cast< hamdis_t * >(argp8);
8184  {
8185  Py_BEGIN_ALLOW_THREADS
8186  try {
8187  result = (size_t)faiss::match_hamming_thres((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
8188  } catch(faiss::FaissException & e) {
8189  PyEval_RestoreThread(_save);
8190  PyErr_SetString(PyExc_RuntimeError, e.what());
8191  SWIG_fail;
8192  }
8193  Py_END_ALLOW_THREADS
8194  }
8195  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
8196  return resultobj;
8197 fail:
8198  return NULL;
8199 }
8200 
8201 
8202 SWIGINTERN PyObject *_wrap_crosshamming_count_thres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8203  PyObject *resultobj = 0;
8204  uint8_t *arg1 = (uint8_t *) 0 ;
8205  size_t arg2 ;
8206  hamdis_t arg3 ;
8207  size_t arg4 ;
8208  size_t *arg5 = (size_t *) 0 ;
8209  void *argp1 = 0 ;
8210  int res1 = 0 ;
8211  size_t val2 ;
8212  int ecode2 = 0 ;
8213  int val3 ;
8214  int ecode3 = 0 ;
8215  size_t val4 ;
8216  int ecode4 = 0 ;
8217  void *argp5 = 0 ;
8218  int res5 = 0 ;
8219  PyObject * obj0 = 0 ;
8220  PyObject * obj1 = 0 ;
8221  PyObject * obj2 = 0 ;
8222  PyObject * obj3 = 0 ;
8223  PyObject * obj4 = 0 ;
8224 
8225  if (!PyArg_ParseTuple(args,(char *)"OOOOO:crosshamming_count_thres",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8226  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8227  if (!SWIG_IsOK(res1)) {
8228  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "crosshamming_count_thres" "', argument " "1"" of type '" "uint8_t const *""'");
8229  }
8230  arg1 = reinterpret_cast< uint8_t * >(argp1);
8231  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
8232  if (!SWIG_IsOK(ecode2)) {
8233  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "crosshamming_count_thres" "', argument " "2"" of type '" "size_t""'");
8234  }
8235  arg2 = static_cast< size_t >(val2);
8236  ecode3 = SWIG_AsVal_int(obj2, &val3);
8237  if (!SWIG_IsOK(ecode3)) {
8238  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "crosshamming_count_thres" "', argument " "3"" of type '" "hamdis_t""'");
8239  }
8240  arg3 = static_cast< hamdis_t >(val3);
8241  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
8242  if (!SWIG_IsOK(ecode4)) {
8243  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "crosshamming_count_thres" "', argument " "4"" of type '" "size_t""'");
8244  }
8245  arg4 = static_cast< size_t >(val4);
8246  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_long, 0 | 0 );
8247  if (!SWIG_IsOK(res5)) {
8248  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "crosshamming_count_thres" "', argument " "5"" of type '" "size_t *""'");
8249  }
8250  arg5 = reinterpret_cast< size_t * >(argp5);
8251  {
8252  Py_BEGIN_ALLOW_THREADS
8253  try {
8254  faiss::crosshamming_count_thres((unsigned char const *)arg1,arg2,arg3,arg4,arg5);
8255  } catch(faiss::FaissException & e) {
8256  PyEval_RestoreThread(_save);
8257  PyErr_SetString(PyExc_RuntimeError, e.what());
8258  SWIG_fail;
8259  }
8260  Py_END_ALLOW_THREADS
8261  }
8262  resultobj = SWIG_Py_Void();
8263  return resultobj;
8264 fail:
8265  return NULL;
8266 }
8267 
8268 
8269 SWIGINTERN PyObject *_wrap_HammingComputer4_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8270  PyObject *resultobj = 0;
8272  uint32_t arg2 ;
8273  void *argp1 = 0 ;
8274  int res1 = 0 ;
8275  void *argp2 ;
8276  int res2 = 0 ;
8277  PyObject * obj0 = 0 ;
8278  PyObject * obj1 = 0 ;
8279 
8280  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer4_a0_set",&obj0,&obj1)) SWIG_fail;
8281  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8282  if (!SWIG_IsOK(res1)) {
8283  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8284  }
8285  arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8286  {
8287  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_uint32_t, 0 | 0);
8288  if (!SWIG_IsOK(res2)) {
8289  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer4_a0_set" "', argument " "2"" of type '" "uint32_t""'");
8290  }
8291  if (!argp2) {
8292  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HammingComputer4_a0_set" "', argument " "2"" of type '" "uint32_t""'");
8293  } else {
8294  uint32_t * temp = reinterpret_cast< uint32_t * >(argp2);
8295  arg2 = *temp;
8296  if (SWIG_IsNewObj(res2)) delete temp;
8297  }
8298  }
8299  if (arg1) (arg1)->a0 = arg2;
8300  resultobj = SWIG_Py_Void();
8301  return resultobj;
8302 fail:
8303  return NULL;
8304 }
8305 
8306 
8307 SWIGINTERN PyObject *_wrap_HammingComputer4_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8308  PyObject *resultobj = 0;
8310  void *argp1 = 0 ;
8311  int res1 = 0 ;
8312  PyObject * obj0 = 0 ;
8313  uint32_t result;
8314 
8315  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer4_a0_get",&obj0)) SWIG_fail;
8316  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8317  if (!SWIG_IsOK(res1)) {
8318  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8319  }
8320  arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8321  result = ((arg1)->a0);
8322  resultobj = SWIG_NewPointerObj((new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 );
8323  return resultobj;
8324 fail:
8325  return NULL;
8326 }
8327 
8328 
8329 SWIGINTERN PyObject *_wrap_new_HammingComputer4__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8330  PyObject *resultobj = 0;
8331  faiss::HammingComputer4 *result = 0 ;
8332 
8333  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer4")) SWIG_fail;
8334  {
8335  Py_BEGIN_ALLOW_THREADS
8336  try {
8338  } catch(faiss::FaissException & e) {
8339  PyEval_RestoreThread(_save);
8340  PyErr_SetString(PyExc_RuntimeError, e.what());
8341  SWIG_fail;
8342  }
8343  Py_END_ALLOW_THREADS
8344  }
8345  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_NEW | 0 );
8346  return resultobj;
8347 fail:
8348  return NULL;
8349 }
8350 
8351 
8352 SWIGINTERN PyObject *_wrap_new_HammingComputer4__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8353  PyObject *resultobj = 0;
8354  uint8_t *arg1 = (uint8_t *) 0 ;
8355  int arg2 ;
8356  void *argp1 = 0 ;
8357  int res1 = 0 ;
8358  int val2 ;
8359  int ecode2 = 0 ;
8360  PyObject * obj0 = 0 ;
8361  PyObject * obj1 = 0 ;
8362  faiss::HammingComputer4 *result = 0 ;
8363 
8364  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer4",&obj0,&obj1)) SWIG_fail;
8365  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8366  if (!SWIG_IsOK(res1)) {
8367  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer4" "', argument " "1"" of type '" "uint8_t const *""'");
8368  }
8369  arg1 = reinterpret_cast< uint8_t * >(argp1);
8370  ecode2 = SWIG_AsVal_int(obj1, &val2);
8371  if (!SWIG_IsOK(ecode2)) {
8372  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer4" "', argument " "2"" of type '" "int""'");
8373  }
8374  arg2 = static_cast< int >(val2);
8375  {
8376  Py_BEGIN_ALLOW_THREADS
8377  try {
8378  result = (faiss::HammingComputer4 *)new faiss::HammingComputer4((uint8_t const *)arg1,arg2);
8379  } catch(faiss::FaissException & e) {
8380  PyEval_RestoreThread(_save);
8381  PyErr_SetString(PyExc_RuntimeError, e.what());
8382  SWIG_fail;
8383  }
8384  Py_END_ALLOW_THREADS
8385  }
8386  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_NEW | 0 );
8387  return resultobj;
8388 fail:
8389  return NULL;
8390 }
8391 
8392 
8393 SWIGINTERN PyObject *_wrap_new_HammingComputer4(PyObject *self, PyObject *args) {
8394  Py_ssize_t argc;
8395  PyObject *argv[3] = {
8396  0
8397  };
8398  Py_ssize_t ii;
8399 
8400  if (!PyTuple_Check(args)) SWIG_fail;
8401  argc = args ? PyObject_Length(args) : 0;
8402  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8403  argv[ii] = PyTuple_GET_ITEM(args,ii);
8404  }
8405  if (argc == 0) {
8406  return _wrap_new_HammingComputer4__SWIG_0(self, args);
8407  }
8408  if (argc == 2) {
8409  int _v;
8410  void *vptr = 0;
8411  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8412  _v = SWIG_CheckState(res);
8413  if (_v) {
8414  {
8415  int res = SWIG_AsVal_int(argv[1], NULL);
8416  _v = SWIG_CheckState(res);
8417  }
8418  if (_v) {
8419  return _wrap_new_HammingComputer4__SWIG_1(self, args);
8420  }
8421  }
8422  }
8423 
8424 fail:
8425  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer4'.\n"
8426  " Possible C/C++ prototypes are:\n"
8427  " faiss::HammingComputer4::HammingComputer4()\n"
8428  " faiss::HammingComputer4::HammingComputer4(uint8_t const *,int)\n");
8429  return 0;
8430 }
8431 
8432 
8433 SWIGINTERN PyObject *_wrap_HammingComputer4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8434  PyObject *resultobj = 0;
8436  uint8_t *arg2 = (uint8_t *) 0 ;
8437  int arg3 ;
8438  void *argp1 = 0 ;
8439  int res1 = 0 ;
8440  void *argp2 = 0 ;
8441  int res2 = 0 ;
8442  int val3 ;
8443  int ecode3 = 0 ;
8444  PyObject * obj0 = 0 ;
8445  PyObject * obj1 = 0 ;
8446  PyObject * obj2 = 0 ;
8447 
8448  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer4_set",&obj0,&obj1,&obj2)) SWIG_fail;
8449  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8450  if (!SWIG_IsOK(res1)) {
8451  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_set" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8452  }
8453  arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8454  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8455  if (!SWIG_IsOK(res2)) {
8456  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer4_set" "', argument " "2"" of type '" "uint8_t const *""'");
8457  }
8458  arg2 = reinterpret_cast< uint8_t * >(argp2);
8459  ecode3 = SWIG_AsVal_int(obj2, &val3);
8460  if (!SWIG_IsOK(ecode3)) {
8461  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer4_set" "', argument " "3"" of type '" "int""'");
8462  }
8463  arg3 = static_cast< int >(val3);
8464  {
8465  Py_BEGIN_ALLOW_THREADS
8466  try {
8467  (arg1)->set((uint8_t const *)arg2,arg3);
8468  } catch(faiss::FaissException & e) {
8469  PyEval_RestoreThread(_save);
8470  PyErr_SetString(PyExc_RuntimeError, e.what());
8471  SWIG_fail;
8472  }
8473  Py_END_ALLOW_THREADS
8474  }
8475  resultobj = SWIG_Py_Void();
8476  return resultobj;
8477 fail:
8478  return NULL;
8479 }
8480 
8481 
8482 SWIGINTERN PyObject *_wrap_HammingComputer4_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8483  PyObject *resultobj = 0;
8485  uint8_t *arg2 = (uint8_t *) 0 ;
8486  void *argp1 = 0 ;
8487  int res1 = 0 ;
8488  void *argp2 = 0 ;
8489  int res2 = 0 ;
8490  PyObject * obj0 = 0 ;
8491  PyObject * obj1 = 0 ;
8492  int result;
8493 
8494  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer4_hamming",&obj0,&obj1)) SWIG_fail;
8495  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8496  if (!SWIG_IsOK(res1)) {
8497  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_hamming" "', argument " "1"" of type '" "faiss::HammingComputer4 const *""'");
8498  }
8499  arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8500  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8501  if (!SWIG_IsOK(res2)) {
8502  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer4_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8503  }
8504  arg2 = reinterpret_cast< uint8_t * >(argp2);
8505  {
8506  Py_BEGIN_ALLOW_THREADS
8507  try {
8508  result = (int)((faiss::HammingComputer4 const *)arg1)->hamming((uint8_t const *)arg2);
8509  } catch(faiss::FaissException & e) {
8510  PyEval_RestoreThread(_save);
8511  PyErr_SetString(PyExc_RuntimeError, e.what());
8512  SWIG_fail;
8513  }
8514  Py_END_ALLOW_THREADS
8515  }
8516  resultobj = SWIG_From_int(static_cast< int >(result));
8517  return resultobj;
8518 fail:
8519  return NULL;
8520 }
8521 
8522 
8523 SWIGINTERN PyObject *_wrap_delete_HammingComputer4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8524  PyObject *resultobj = 0;
8526  void *argp1 = 0 ;
8527  int res1 = 0 ;
8528  PyObject * obj0 = 0 ;
8529 
8530  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer4",&obj0)) SWIG_fail;
8531  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_DISOWN | 0 );
8532  if (!SWIG_IsOK(res1)) {
8533  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer4" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8534  }
8535  arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8536  delete arg1;
8537  resultobj = SWIG_Py_Void();
8538  return resultobj;
8539 fail:
8540  return NULL;
8541 }
8542 
8543 
8544 SWIGINTERN PyObject *HammingComputer4_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8545  PyObject *obj;
8546  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
8547  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer4, SWIG_NewClientData(obj));
8548  return SWIG_Py_Void();
8549 }
8550 
8551 SWIGINTERN PyObject *_wrap_HammingComputer8_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8552  PyObject *resultobj = 0;
8554  uint64_t arg2 ;
8555  void *argp1 = 0 ;
8556  int res1 = 0 ;
8557  unsigned long val2 ;
8558  int ecode2 = 0 ;
8559  PyObject * obj0 = 0 ;
8560  PyObject * obj1 = 0 ;
8561 
8562  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer8_a0_set",&obj0,&obj1)) SWIG_fail;
8563  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8564  if (!SWIG_IsOK(res1)) {
8565  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8566  }
8567  arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8568  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8569  if (!SWIG_IsOK(ecode2)) {
8570  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer8_a0_set" "', argument " "2"" of type '" "uint64_t""'");
8571  }
8572  arg2 = static_cast< uint64_t >(val2);
8573  if (arg1) (arg1)->a0 = arg2;
8574  resultobj = SWIG_Py_Void();
8575  return resultobj;
8576 fail:
8577  return NULL;
8578 }
8579 
8580 
8581 SWIGINTERN PyObject *_wrap_HammingComputer8_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8582  PyObject *resultobj = 0;
8584  void *argp1 = 0 ;
8585  int res1 = 0 ;
8586  PyObject * obj0 = 0 ;
8587  uint64_t result;
8588 
8589  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer8_a0_get",&obj0)) SWIG_fail;
8590  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8591  if (!SWIG_IsOK(res1)) {
8592  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8593  }
8594  arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8595  result = (uint64_t) ((arg1)->a0);
8596  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8597  return resultobj;
8598 fail:
8599  return NULL;
8600 }
8601 
8602 
8603 SWIGINTERN PyObject *_wrap_new_HammingComputer8__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8604  PyObject *resultobj = 0;
8605  faiss::HammingComputer8 *result = 0 ;
8606 
8607  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer8")) SWIG_fail;
8608  {
8609  Py_BEGIN_ALLOW_THREADS
8610  try {
8612  } catch(faiss::FaissException & e) {
8613  PyEval_RestoreThread(_save);
8614  PyErr_SetString(PyExc_RuntimeError, e.what());
8615  SWIG_fail;
8616  }
8617  Py_END_ALLOW_THREADS
8618  }
8619  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_NEW | 0 );
8620  return resultobj;
8621 fail:
8622  return NULL;
8623 }
8624 
8625 
8626 SWIGINTERN PyObject *_wrap_new_HammingComputer8__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8627  PyObject *resultobj = 0;
8628  uint8_t *arg1 = (uint8_t *) 0 ;
8629  int arg2 ;
8630  void *argp1 = 0 ;
8631  int res1 = 0 ;
8632  int val2 ;
8633  int ecode2 = 0 ;
8634  PyObject * obj0 = 0 ;
8635  PyObject * obj1 = 0 ;
8636  faiss::HammingComputer8 *result = 0 ;
8637 
8638  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer8",&obj0,&obj1)) SWIG_fail;
8639  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8640  if (!SWIG_IsOK(res1)) {
8641  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer8" "', argument " "1"" of type '" "uint8_t const *""'");
8642  }
8643  arg1 = reinterpret_cast< uint8_t * >(argp1);
8644  ecode2 = SWIG_AsVal_int(obj1, &val2);
8645  if (!SWIG_IsOK(ecode2)) {
8646  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer8" "', argument " "2"" of type '" "int""'");
8647  }
8648  arg2 = static_cast< int >(val2);
8649  {
8650  Py_BEGIN_ALLOW_THREADS
8651  try {
8652  result = (faiss::HammingComputer8 *)new faiss::HammingComputer8((uint8_t const *)arg1,arg2);
8653  } catch(faiss::FaissException & e) {
8654  PyEval_RestoreThread(_save);
8655  PyErr_SetString(PyExc_RuntimeError, e.what());
8656  SWIG_fail;
8657  }
8658  Py_END_ALLOW_THREADS
8659  }
8660  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_NEW | 0 );
8661  return resultobj;
8662 fail:
8663  return NULL;
8664 }
8665 
8666 
8667 SWIGINTERN PyObject *_wrap_new_HammingComputer8(PyObject *self, PyObject *args) {
8668  Py_ssize_t argc;
8669  PyObject *argv[3] = {
8670  0
8671  };
8672  Py_ssize_t ii;
8673 
8674  if (!PyTuple_Check(args)) SWIG_fail;
8675  argc = args ? PyObject_Length(args) : 0;
8676  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8677  argv[ii] = PyTuple_GET_ITEM(args,ii);
8678  }
8679  if (argc == 0) {
8680  return _wrap_new_HammingComputer8__SWIG_0(self, args);
8681  }
8682  if (argc == 2) {
8683  int _v;
8684  void *vptr = 0;
8685  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8686  _v = SWIG_CheckState(res);
8687  if (_v) {
8688  {
8689  int res = SWIG_AsVal_int(argv[1], NULL);
8690  _v = SWIG_CheckState(res);
8691  }
8692  if (_v) {
8693  return _wrap_new_HammingComputer8__SWIG_1(self, args);
8694  }
8695  }
8696  }
8697 
8698 fail:
8699  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer8'.\n"
8700  " Possible C/C++ prototypes are:\n"
8701  " faiss::HammingComputer8::HammingComputer8()\n"
8702  " faiss::HammingComputer8::HammingComputer8(uint8_t const *,int)\n");
8703  return 0;
8704 }
8705 
8706 
8707 SWIGINTERN PyObject *_wrap_HammingComputer8_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8708  PyObject *resultobj = 0;
8710  uint8_t *arg2 = (uint8_t *) 0 ;
8711  int arg3 ;
8712  void *argp1 = 0 ;
8713  int res1 = 0 ;
8714  void *argp2 = 0 ;
8715  int res2 = 0 ;
8716  int val3 ;
8717  int ecode3 = 0 ;
8718  PyObject * obj0 = 0 ;
8719  PyObject * obj1 = 0 ;
8720  PyObject * obj2 = 0 ;
8721 
8722  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer8_set",&obj0,&obj1,&obj2)) SWIG_fail;
8723  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8724  if (!SWIG_IsOK(res1)) {
8725  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_set" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8726  }
8727  arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8728  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8729  if (!SWIG_IsOK(res2)) {
8730  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer8_set" "', argument " "2"" of type '" "uint8_t const *""'");
8731  }
8732  arg2 = reinterpret_cast< uint8_t * >(argp2);
8733  ecode3 = SWIG_AsVal_int(obj2, &val3);
8734  if (!SWIG_IsOK(ecode3)) {
8735  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer8_set" "', argument " "3"" of type '" "int""'");
8736  }
8737  arg3 = static_cast< int >(val3);
8738  {
8739  Py_BEGIN_ALLOW_THREADS
8740  try {
8741  (arg1)->set((uint8_t const *)arg2,arg3);
8742  } catch(faiss::FaissException & e) {
8743  PyEval_RestoreThread(_save);
8744  PyErr_SetString(PyExc_RuntimeError, e.what());
8745  SWIG_fail;
8746  }
8747  Py_END_ALLOW_THREADS
8748  }
8749  resultobj = SWIG_Py_Void();
8750  return resultobj;
8751 fail:
8752  return NULL;
8753 }
8754 
8755 
8756 SWIGINTERN PyObject *_wrap_HammingComputer8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8757  PyObject *resultobj = 0;
8759  uint8_t *arg2 = (uint8_t *) 0 ;
8760  void *argp1 = 0 ;
8761  int res1 = 0 ;
8762  void *argp2 = 0 ;
8763  int res2 = 0 ;
8764  PyObject * obj0 = 0 ;
8765  PyObject * obj1 = 0 ;
8766  int result;
8767 
8768  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer8_hamming",&obj0,&obj1)) SWIG_fail;
8769  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8770  if (!SWIG_IsOK(res1)) {
8771  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_hamming" "', argument " "1"" of type '" "faiss::HammingComputer8 const *""'");
8772  }
8773  arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8774  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8775  if (!SWIG_IsOK(res2)) {
8776  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8777  }
8778  arg2 = reinterpret_cast< uint8_t * >(argp2);
8779  {
8780  Py_BEGIN_ALLOW_THREADS
8781  try {
8782  result = (int)((faiss::HammingComputer8 const *)arg1)->hamming((uint8_t const *)arg2);
8783  } catch(faiss::FaissException & e) {
8784  PyEval_RestoreThread(_save);
8785  PyErr_SetString(PyExc_RuntimeError, e.what());
8786  SWIG_fail;
8787  }
8788  Py_END_ALLOW_THREADS
8789  }
8790  resultobj = SWIG_From_int(static_cast< int >(result));
8791  return resultobj;
8792 fail:
8793  return NULL;
8794 }
8795 
8796 
8797 SWIGINTERN PyObject *_wrap_delete_HammingComputer8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8798  PyObject *resultobj = 0;
8800  void *argp1 = 0 ;
8801  int res1 = 0 ;
8802  PyObject * obj0 = 0 ;
8803 
8804  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer8",&obj0)) SWIG_fail;
8805  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_DISOWN | 0 );
8806  if (!SWIG_IsOK(res1)) {
8807  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer8" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8808  }
8809  arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8810  delete arg1;
8811  resultobj = SWIG_Py_Void();
8812  return resultobj;
8813 fail:
8814  return NULL;
8815 }
8816 
8817 
8818 SWIGINTERN PyObject *HammingComputer8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8819  PyObject *obj;
8820  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
8821  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer8, SWIG_NewClientData(obj));
8822  return SWIG_Py_Void();
8823 }
8824 
8825 SWIGINTERN PyObject *_wrap_HammingComputer16_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8826  PyObject *resultobj = 0;
8828  uint64_t arg2 ;
8829  void *argp1 = 0 ;
8830  int res1 = 0 ;
8831  unsigned long val2 ;
8832  int ecode2 = 0 ;
8833  PyObject * obj0 = 0 ;
8834  PyObject * obj1 = 0 ;
8835 
8836  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer16_a0_set",&obj0,&obj1)) SWIG_fail;
8837  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8838  if (!SWIG_IsOK(res1)) {
8839  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8840  }
8841  arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8842  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8843  if (!SWIG_IsOK(ecode2)) {
8844  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer16_a0_set" "', argument " "2"" of type '" "uint64_t""'");
8845  }
8846  arg2 = static_cast< uint64_t >(val2);
8847  if (arg1) (arg1)->a0 = arg2;
8848  resultobj = SWIG_Py_Void();
8849  return resultobj;
8850 fail:
8851  return NULL;
8852 }
8853 
8854 
8855 SWIGINTERN PyObject *_wrap_HammingComputer16_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8856  PyObject *resultobj = 0;
8858  void *argp1 = 0 ;
8859  int res1 = 0 ;
8860  PyObject * obj0 = 0 ;
8861  uint64_t result;
8862 
8863  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer16_a0_get",&obj0)) SWIG_fail;
8864  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8865  if (!SWIG_IsOK(res1)) {
8866  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8867  }
8868  arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8869  result = (uint64_t) ((arg1)->a0);
8870  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8871  return resultobj;
8872 fail:
8873  return NULL;
8874 }
8875 
8876 
8877 SWIGINTERN PyObject *_wrap_HammingComputer16_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8878  PyObject *resultobj = 0;
8880  uint64_t arg2 ;
8881  void *argp1 = 0 ;
8882  int res1 = 0 ;
8883  unsigned long val2 ;
8884  int ecode2 = 0 ;
8885  PyObject * obj0 = 0 ;
8886  PyObject * obj1 = 0 ;
8887 
8888  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer16_a1_set",&obj0,&obj1)) SWIG_fail;
8889  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8890  if (!SWIG_IsOK(res1)) {
8891  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8892  }
8893  arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8894  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8895  if (!SWIG_IsOK(ecode2)) {
8896  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer16_a1_set" "', argument " "2"" of type '" "uint64_t""'");
8897  }
8898  arg2 = static_cast< uint64_t >(val2);
8899  if (arg1) (arg1)->a1 = arg2;
8900  resultobj = SWIG_Py_Void();
8901  return resultobj;
8902 fail:
8903  return NULL;
8904 }
8905 
8906 
8907 SWIGINTERN PyObject *_wrap_HammingComputer16_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8908  PyObject *resultobj = 0;
8910  void *argp1 = 0 ;
8911  int res1 = 0 ;
8912  PyObject * obj0 = 0 ;
8913  uint64_t result;
8914 
8915  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer16_a1_get",&obj0)) SWIG_fail;
8916  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8917  if (!SWIG_IsOK(res1)) {
8918  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8919  }
8920  arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8921  result = (uint64_t) ((arg1)->a1);
8922  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8923  return resultobj;
8924 fail:
8925  return NULL;
8926 }
8927 
8928 
8929 SWIGINTERN PyObject *_wrap_new_HammingComputer16__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8930  PyObject *resultobj = 0;
8931  faiss::HammingComputer16 *result = 0 ;
8932 
8933  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer16")) SWIG_fail;
8934  {
8935  Py_BEGIN_ALLOW_THREADS
8936  try {
8938  } catch(faiss::FaissException & e) {
8939  PyEval_RestoreThread(_save);
8940  PyErr_SetString(PyExc_RuntimeError, e.what());
8941  SWIG_fail;
8942  }
8943  Py_END_ALLOW_THREADS
8944  }
8945  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_NEW | 0 );
8946  return resultobj;
8947 fail:
8948  return NULL;
8949 }
8950 
8951 
8952 SWIGINTERN PyObject *_wrap_new_HammingComputer16__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8953  PyObject *resultobj = 0;
8954  uint8_t *arg1 = (uint8_t *) 0 ;
8955  int arg2 ;
8956  void *argp1 = 0 ;
8957  int res1 = 0 ;
8958  int val2 ;
8959  int ecode2 = 0 ;
8960  PyObject * obj0 = 0 ;
8961  PyObject * obj1 = 0 ;
8962  faiss::HammingComputer16 *result = 0 ;
8963 
8964  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer16",&obj0,&obj1)) SWIG_fail;
8965  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8966  if (!SWIG_IsOK(res1)) {
8967  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer16" "', argument " "1"" of type '" "uint8_t const *""'");
8968  }
8969  arg1 = reinterpret_cast< uint8_t * >(argp1);
8970  ecode2 = SWIG_AsVal_int(obj1, &val2);
8971  if (!SWIG_IsOK(ecode2)) {
8972  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer16" "', argument " "2"" of type '" "int""'");
8973  }
8974  arg2 = static_cast< int >(val2);
8975  {
8976  Py_BEGIN_ALLOW_THREADS
8977  try {
8978  result = (faiss::HammingComputer16 *)new faiss::HammingComputer16((uint8_t const *)arg1,arg2);
8979  } catch(faiss::FaissException & e) {
8980  PyEval_RestoreThread(_save);
8981  PyErr_SetString(PyExc_RuntimeError, e.what());
8982  SWIG_fail;
8983  }
8984  Py_END_ALLOW_THREADS
8985  }
8986  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_NEW | 0 );
8987  return resultobj;
8988 fail:
8989  return NULL;
8990 }
8991 
8992 
8993 SWIGINTERN PyObject *_wrap_new_HammingComputer16(PyObject *self, PyObject *args) {
8994  Py_ssize_t argc;
8995  PyObject *argv[3] = {
8996  0
8997  };
8998  Py_ssize_t ii;
8999 
9000  if (!PyTuple_Check(args)) SWIG_fail;
9001  argc = args ? PyObject_Length(args) : 0;
9002  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
9003  argv[ii] = PyTuple_GET_ITEM(args,ii);
9004  }
9005  if (argc == 0) {
9006  return _wrap_new_HammingComputer16__SWIG_0(self, args);
9007  }
9008  if (argc == 2) {
9009  int _v;
9010  void *vptr = 0;
9011  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
9012  _v = SWIG_CheckState(res);
9013  if (_v) {
9014  {
9015  int res = SWIG_AsVal_int(argv[1], NULL);
9016  _v = SWIG_CheckState(res);
9017  }
9018  if (_v) {
9019  return _wrap_new_HammingComputer16__SWIG_1(self, args);
9020  }
9021  }
9022  }
9023 
9024 fail:
9025  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer16'.\n"
9026  " Possible C/C++ prototypes are:\n"
9027  " faiss::HammingComputer16::HammingComputer16()\n"
9028  " faiss::HammingComputer16::HammingComputer16(uint8_t const *,int)\n");
9029  return 0;
9030 }
9031 
9032 
9033 SWIGINTERN PyObject *_wrap_HammingComputer16_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9034  PyObject *resultobj = 0;
9036  uint8_t *arg2 = (uint8_t *) 0 ;
9037  int arg3 ;
9038  void *argp1 = 0 ;
9039  int res1 = 0 ;
9040  void *argp2 = 0 ;
9041  int res2 = 0 ;
9042  int val3 ;
9043  int ecode3 = 0 ;
9044  PyObject * obj0 = 0 ;
9045  PyObject * obj1 = 0 ;
9046  PyObject * obj2 = 0 ;
9047 
9048  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer16_set",&obj0,&obj1,&obj2)) SWIG_fail;
9049  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
9050  if (!SWIG_IsOK(res1)) {
9051  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
9052  }
9053  arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
9054  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9055  if (!SWIG_IsOK(res2)) {
9056  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer16_set" "', argument " "2"" of type '" "uint8_t const *""'");
9057  }
9058  arg2 = reinterpret_cast< uint8_t * >(argp2);
9059  ecode3 = SWIG_AsVal_int(obj2, &val3);
9060  if (!SWIG_IsOK(ecode3)) {
9061  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer16_set" "', argument " "3"" of type '" "int""'");
9062  }
9063  arg3 = static_cast< int >(val3);
9064  {
9065  Py_BEGIN_ALLOW_THREADS
9066  try {
9067  (arg1)->set((uint8_t const *)arg2,arg3);
9068  } catch(faiss::FaissException & e) {
9069  PyEval_RestoreThread(_save);
9070  PyErr_SetString(PyExc_RuntimeError, e.what());
9071  SWIG_fail;
9072  }
9073  Py_END_ALLOW_THREADS
9074  }
9075  resultobj = SWIG_Py_Void();
9076  return resultobj;
9077 fail:
9078  return NULL;
9079 }
9080 
9081 
9082 SWIGINTERN PyObject *_wrap_HammingComputer16_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9083  PyObject *resultobj = 0;
9085  uint8_t *arg2 = (uint8_t *) 0 ;
9086  void *argp1 = 0 ;
9087  int res1 = 0 ;
9088  void *argp2 = 0 ;
9089  int res2 = 0 ;
9090  PyObject * obj0 = 0 ;
9091  PyObject * obj1 = 0 ;
9092  int result;
9093 
9094  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer16_hamming",&obj0,&obj1)) SWIG_fail;
9095  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
9096  if (!SWIG_IsOK(res1)) {
9097  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_hamming" "', argument " "1"" of type '" "faiss::HammingComputer16 const *""'");
9098  }
9099  arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
9100  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9101  if (!SWIG_IsOK(res2)) {
9102  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer16_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
9103  }
9104  arg2 = reinterpret_cast< uint8_t * >(argp2);
9105  {
9106  Py_BEGIN_ALLOW_THREADS
9107  try {
9108  result = (int)((faiss::HammingComputer16 const *)arg1)->hamming((uint8_t const *)arg2);
9109  } catch(faiss::FaissException & e) {
9110  PyEval_RestoreThread(_save);
9111  PyErr_SetString(PyExc_RuntimeError, e.what());
9112  SWIG_fail;
9113  }
9114  Py_END_ALLOW_THREADS
9115  }
9116  resultobj = SWIG_From_int(static_cast< int >(result));
9117  return resultobj;
9118 fail:
9119  return NULL;
9120 }
9121 
9122 
9123 SWIGINTERN PyObject *_wrap_delete_HammingComputer16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9124  PyObject *resultobj = 0;
9126  void *argp1 = 0 ;
9127  int res1 = 0 ;
9128  PyObject * obj0 = 0 ;
9129 
9130  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer16",&obj0)) SWIG_fail;
9131  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_DISOWN | 0 );
9132  if (!SWIG_IsOK(res1)) {
9133  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer16" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
9134  }
9135  arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
9136  delete arg1;
9137  resultobj = SWIG_Py_Void();
9138  return resultobj;
9139 fail:
9140  return NULL;
9141 }
9142 
9143 
9144 SWIGINTERN PyObject *HammingComputer16_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9145  PyObject *obj;
9146  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
9147  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer16, SWIG_NewClientData(obj));
9148  return SWIG_Py_Void();
9149 }
9150 
9151 SWIGINTERN PyObject *_wrap_HammingComputer20_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9152  PyObject *resultobj = 0;
9154  uint64_t arg2 ;
9155  void *argp1 = 0 ;
9156  int res1 = 0 ;
9157  unsigned long val2 ;
9158  int ecode2 = 0 ;
9159  PyObject * obj0 = 0 ;
9160  PyObject * obj1 = 0 ;
9161 
9162  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_a0_set",&obj0,&obj1)) SWIG_fail;
9163  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9164  if (!SWIG_IsOK(res1)) {
9165  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9166  }
9167  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9168  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9169  if (!SWIG_IsOK(ecode2)) {
9170  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer20_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9171  }
9172  arg2 = static_cast< uint64_t >(val2);
9173  if (arg1) (arg1)->a0 = arg2;
9174  resultobj = SWIG_Py_Void();
9175  return resultobj;
9176 fail:
9177  return NULL;
9178 }
9179 
9180 
9181 SWIGINTERN PyObject *_wrap_HammingComputer20_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9182  PyObject *resultobj = 0;
9184  void *argp1 = 0 ;
9185  int res1 = 0 ;
9186  PyObject * obj0 = 0 ;
9187  uint64_t result;
9188 
9189  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer20_a0_get",&obj0)) SWIG_fail;
9190  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9191  if (!SWIG_IsOK(res1)) {
9192  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9193  }
9194  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9195  result = (uint64_t) ((arg1)->a0);
9196  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9197  return resultobj;
9198 fail:
9199  return NULL;
9200 }
9201 
9202 
9203 SWIGINTERN PyObject *_wrap_HammingComputer20_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9204  PyObject *resultobj = 0;
9206  uint64_t arg2 ;
9207  void *argp1 = 0 ;
9208  int res1 = 0 ;
9209  unsigned long val2 ;
9210  int ecode2 = 0 ;
9211  PyObject * obj0 = 0 ;
9212  PyObject * obj1 = 0 ;
9213 
9214  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_a1_set",&obj0,&obj1)) SWIG_fail;
9215  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9216  if (!SWIG_IsOK(res1)) {
9217  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9218  }
9219  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9220  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9221  if (!SWIG_IsOK(ecode2)) {
9222  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer20_a1_set" "', argument " "2"" of type '" "uint64_t""'");
9223  }
9224  arg2 = static_cast< uint64_t >(val2);
9225  if (arg1) (arg1)->a1 = arg2;
9226  resultobj = SWIG_Py_Void();
9227  return resultobj;
9228 fail:
9229  return NULL;
9230 }
9231 
9232 
9233 SWIGINTERN PyObject *_wrap_HammingComputer20_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9234  PyObject *resultobj = 0;
9236  void *argp1 = 0 ;
9237  int res1 = 0 ;
9238  PyObject * obj0 = 0 ;
9239  uint64_t result;
9240 
9241  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer20_a1_get",&obj0)) SWIG_fail;
9242  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9243  if (!SWIG_IsOK(res1)) {
9244  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9245  }
9246  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9247  result = (uint64_t) ((arg1)->a1);
9248  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9249  return resultobj;
9250 fail:
9251  return NULL;
9252 }
9253 
9254 
9255 SWIGINTERN PyObject *_wrap_HammingComputer20_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9256  PyObject *resultobj = 0;
9258  uint32_t arg2 ;
9259  void *argp1 = 0 ;
9260  int res1 = 0 ;
9261  void *argp2 ;
9262  int res2 = 0 ;
9263  PyObject * obj0 = 0 ;
9264  PyObject * obj1 = 0 ;
9265 
9266  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_a2_set",&obj0,&obj1)) SWIG_fail;
9267  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9268  if (!SWIG_IsOK(res1)) {
9269  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9270  }
9271  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9272  {
9273  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_uint32_t, 0 | 0);
9274  if (!SWIG_IsOK(res2)) {
9275  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer20_a2_set" "', argument " "2"" of type '" "uint32_t""'");
9276  }
9277  if (!argp2) {
9278  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HammingComputer20_a2_set" "', argument " "2"" of type '" "uint32_t""'");
9279  } else {
9280  uint32_t * temp = reinterpret_cast< uint32_t * >(argp2);
9281  arg2 = *temp;
9282  if (SWIG_IsNewObj(res2)) delete temp;
9283  }
9284  }
9285  if (arg1) (arg1)->a2 = arg2;
9286  resultobj = SWIG_Py_Void();
9287  return resultobj;
9288 fail:
9289  return NULL;
9290 }
9291 
9292 
9293 SWIGINTERN PyObject *_wrap_HammingComputer20_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9294  PyObject *resultobj = 0;
9296  void *argp1 = 0 ;
9297  int res1 = 0 ;
9298  PyObject * obj0 = 0 ;
9299  uint32_t result;
9300 
9301  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer20_a2_get",&obj0)) SWIG_fail;
9302  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9303  if (!SWIG_IsOK(res1)) {
9304  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9305  }
9306  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9307  result = ((arg1)->a2);
9308  resultobj = SWIG_NewPointerObj((new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 );
9309  return resultobj;
9310 fail:
9311  return NULL;
9312 }
9313 
9314 
9315 SWIGINTERN PyObject *_wrap_new_HammingComputer20__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9316  PyObject *resultobj = 0;
9317  faiss::HammingComputer20 *result = 0 ;
9318 
9319  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer20")) SWIG_fail;
9320  {
9321  Py_BEGIN_ALLOW_THREADS
9322  try {
9324  } catch(faiss::FaissException & e) {
9325  PyEval_RestoreThread(_save);
9326  PyErr_SetString(PyExc_RuntimeError, e.what());
9327  SWIG_fail;
9328  }
9329  Py_END_ALLOW_THREADS
9330  }
9331  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_NEW | 0 );
9332  return resultobj;
9333 fail:
9334  return NULL;
9335 }
9336 
9337 
9338 SWIGINTERN PyObject *_wrap_new_HammingComputer20__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9339  PyObject *resultobj = 0;
9340  uint8_t *arg1 = (uint8_t *) 0 ;
9341  int arg2 ;
9342  void *argp1 = 0 ;
9343  int res1 = 0 ;
9344  int val2 ;
9345  int ecode2 = 0 ;
9346  PyObject * obj0 = 0 ;
9347  PyObject * obj1 = 0 ;
9348  faiss::HammingComputer20 *result = 0 ;
9349 
9350  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer20",&obj0,&obj1)) SWIG_fail;
9351  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
9352  if (!SWIG_IsOK(res1)) {
9353  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer20" "', argument " "1"" of type '" "uint8_t const *""'");
9354  }
9355  arg1 = reinterpret_cast< uint8_t * >(argp1);
9356  ecode2 = SWIG_AsVal_int(obj1, &val2);
9357  if (!SWIG_IsOK(ecode2)) {
9358  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer20" "', argument " "2"" of type '" "int""'");
9359  }
9360  arg2 = static_cast< int >(val2);
9361  {
9362  Py_BEGIN_ALLOW_THREADS
9363  try {
9364  result = (faiss::HammingComputer20 *)new faiss::HammingComputer20((uint8_t const *)arg1,arg2);
9365  } catch(faiss::FaissException & e) {
9366  PyEval_RestoreThread(_save);
9367  PyErr_SetString(PyExc_RuntimeError, e.what());
9368  SWIG_fail;
9369  }
9370  Py_END_ALLOW_THREADS
9371  }
9372  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_NEW | 0 );
9373  return resultobj;
9374 fail:
9375  return NULL;
9376 }
9377 
9378 
9379 SWIGINTERN PyObject *_wrap_new_HammingComputer20(PyObject *self, PyObject *args) {
9380  Py_ssize_t argc;
9381  PyObject *argv[3] = {
9382  0
9383  };
9384  Py_ssize_t ii;
9385 
9386  if (!PyTuple_Check(args)) SWIG_fail;
9387  argc = args ? PyObject_Length(args) : 0;
9388  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
9389  argv[ii] = PyTuple_GET_ITEM(args,ii);
9390  }
9391  if (argc == 0) {
9392  return _wrap_new_HammingComputer20__SWIG_0(self, args);
9393  }
9394  if (argc == 2) {
9395  int _v;
9396  void *vptr = 0;
9397  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
9398  _v = SWIG_CheckState(res);
9399  if (_v) {
9400  {
9401  int res = SWIG_AsVal_int(argv[1], NULL);
9402  _v = SWIG_CheckState(res);
9403  }
9404  if (_v) {
9405  return _wrap_new_HammingComputer20__SWIG_1(self, args);
9406  }
9407  }
9408  }
9409 
9410 fail:
9411  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer20'.\n"
9412  " Possible C/C++ prototypes are:\n"
9413  " faiss::HammingComputer20::HammingComputer20()\n"
9414  " faiss::HammingComputer20::HammingComputer20(uint8_t const *,int)\n");
9415  return 0;
9416 }
9417 
9418 
9419 SWIGINTERN PyObject *_wrap_HammingComputer20_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9420  PyObject *resultobj = 0;
9422  uint8_t *arg2 = (uint8_t *) 0 ;
9423  int arg3 ;
9424  void *argp1 = 0 ;
9425  int res1 = 0 ;
9426  void *argp2 = 0 ;
9427  int res2 = 0 ;
9428  int val3 ;
9429  int ecode3 = 0 ;
9430  PyObject * obj0 = 0 ;
9431  PyObject * obj1 = 0 ;
9432  PyObject * obj2 = 0 ;
9433 
9434  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer20_set",&obj0,&obj1,&obj2)) SWIG_fail;
9435  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9436  if (!SWIG_IsOK(res1)) {
9437  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9438  }
9439  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9440  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9441  if (!SWIG_IsOK(res2)) {
9442  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer20_set" "', argument " "2"" of type '" "uint8_t const *""'");
9443  }
9444  arg2 = reinterpret_cast< uint8_t * >(argp2);
9445  ecode3 = SWIG_AsVal_int(obj2, &val3);
9446  if (!SWIG_IsOK(ecode3)) {
9447  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer20_set" "', argument " "3"" of type '" "int""'");
9448  }
9449  arg3 = static_cast< int >(val3);
9450  {
9451  Py_BEGIN_ALLOW_THREADS
9452  try {
9453  (arg1)->set((uint8_t const *)arg2,arg3);
9454  } catch(faiss::FaissException & e) {
9455  PyEval_RestoreThread(_save);
9456  PyErr_SetString(PyExc_RuntimeError, e.what());
9457  SWIG_fail;
9458  }
9459  Py_END_ALLOW_THREADS
9460  }
9461  resultobj = SWIG_Py_Void();
9462  return resultobj;
9463 fail:
9464  return NULL;
9465 }
9466 
9467 
9468 SWIGINTERN PyObject *_wrap_HammingComputer20_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9469  PyObject *resultobj = 0;
9471  uint8_t *arg2 = (uint8_t *) 0 ;
9472  void *argp1 = 0 ;
9473  int res1 = 0 ;
9474  void *argp2 = 0 ;
9475  int res2 = 0 ;
9476  PyObject * obj0 = 0 ;
9477  PyObject * obj1 = 0 ;
9478  int result;
9479 
9480  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_hamming",&obj0,&obj1)) SWIG_fail;
9481  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9482  if (!SWIG_IsOK(res1)) {
9483  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_hamming" "', argument " "1"" of type '" "faiss::HammingComputer20 const *""'");
9484  }
9485  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9486  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9487  if (!SWIG_IsOK(res2)) {
9488  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer20_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
9489  }
9490  arg2 = reinterpret_cast< uint8_t * >(argp2);
9491  {
9492  Py_BEGIN_ALLOW_THREADS
9493  try {
9494  result = (int)((faiss::HammingComputer20 const *)arg1)->hamming((uint8_t const *)arg2);
9495  } catch(faiss::FaissException & e) {
9496  PyEval_RestoreThread(_save);
9497  PyErr_SetString(PyExc_RuntimeError, e.what());
9498  SWIG_fail;
9499  }
9500  Py_END_ALLOW_THREADS
9501  }
9502  resultobj = SWIG_From_int(static_cast< int >(result));
9503  return resultobj;
9504 fail:
9505  return NULL;
9506 }
9507 
9508 
9509 SWIGINTERN PyObject *_wrap_delete_HammingComputer20(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9510  PyObject *resultobj = 0;
9512  void *argp1 = 0 ;
9513  int res1 = 0 ;
9514  PyObject * obj0 = 0 ;
9515 
9516  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer20",&obj0)) SWIG_fail;
9517  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_DISOWN | 0 );
9518  if (!SWIG_IsOK(res1)) {
9519  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer20" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9520  }
9521  arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9522  delete arg1;
9523  resultobj = SWIG_Py_Void();
9524  return resultobj;
9525 fail:
9526  return NULL;
9527 }
9528 
9529 
9530 SWIGINTERN PyObject *HammingComputer20_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9531  PyObject *obj;
9532  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
9533  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer20, SWIG_NewClientData(obj));
9534  return SWIG_Py_Void();
9535 }
9536 
9537 SWIGINTERN PyObject *_wrap_HammingComputer32_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9538  PyObject *resultobj = 0;
9540  uint64_t arg2 ;
9541  void *argp1 = 0 ;
9542  int res1 = 0 ;
9543  unsigned long val2 ;
9544  int ecode2 = 0 ;
9545  PyObject * obj0 = 0 ;
9546  PyObject * obj1 = 0 ;
9547 
9548  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a0_set",&obj0,&obj1)) SWIG_fail;
9549  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9550  if (!SWIG_IsOK(res1)) {
9551  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9552  }
9553  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9554  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9555  if (!SWIG_IsOK(ecode2)) {
9556  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9557  }
9558  arg2 = static_cast< uint64_t >(val2);
9559  if (arg1) (arg1)->a0 = arg2;
9560  resultobj = SWIG_Py_Void();
9561  return resultobj;
9562 fail:
9563  return NULL;
9564 }
9565 
9566 
9567 SWIGINTERN PyObject *_wrap_HammingComputer32_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9568  PyObject *resultobj = 0;
9570  void *argp1 = 0 ;
9571  int res1 = 0 ;
9572  PyObject * obj0 = 0 ;
9573  uint64_t result;
9574 
9575  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a0_get",&obj0)) SWIG_fail;
9576  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9577  if (!SWIG_IsOK(res1)) {
9578  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9579  }
9580  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9581  result = (uint64_t) ((arg1)->a0);
9582  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9583  return resultobj;
9584 fail:
9585  return NULL;
9586 }
9587 
9588 
9589 SWIGINTERN PyObject *_wrap_HammingComputer32_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9590  PyObject *resultobj = 0;
9592  uint64_t arg2 ;
9593  void *argp1 = 0 ;
9594  int res1 = 0 ;
9595  unsigned long val2 ;
9596  int ecode2 = 0 ;
9597  PyObject * obj0 = 0 ;
9598  PyObject * obj1 = 0 ;
9599 
9600  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a1_set",&obj0,&obj1)) SWIG_fail;
9601  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9602  if (!SWIG_IsOK(res1)) {
9603  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9604  }
9605  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9606  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9607  if (!SWIG_IsOK(ecode2)) {
9608  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a1_set" "', argument " "2"" of type '" "uint64_t""'");
9609  }
9610  arg2 = static_cast< uint64_t >(val2);
9611  if (arg1) (arg1)->a1 = arg2;
9612  resultobj = SWIG_Py_Void();
9613  return resultobj;
9614 fail:
9615  return NULL;
9616 }
9617 
9618 
9619 SWIGINTERN PyObject *_wrap_HammingComputer32_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9620  PyObject *resultobj = 0;
9622  void *argp1 = 0 ;
9623  int res1 = 0 ;
9624  PyObject * obj0 = 0 ;
9625  uint64_t result;
9626 
9627  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a1_get",&obj0)) SWIG_fail;
9628  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9629  if (!SWIG_IsOK(res1)) {
9630  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9631  }
9632  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9633  result = (uint64_t) ((arg1)->a1);
9634  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9635  return resultobj;
9636 fail:
9637  return NULL;
9638 }
9639 
9640 
9641 SWIGINTERN PyObject *_wrap_HammingComputer32_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9642  PyObject *resultobj = 0;
9644  uint64_t arg2 ;
9645  void *argp1 = 0 ;
9646  int res1 = 0 ;
9647  unsigned long val2 ;
9648  int ecode2 = 0 ;
9649  PyObject * obj0 = 0 ;
9650  PyObject * obj1 = 0 ;
9651 
9652  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a2_set",&obj0,&obj1)) SWIG_fail;
9653  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9654  if (!SWIG_IsOK(res1)) {
9655  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9656  }
9657  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9658  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9659  if (!SWIG_IsOK(ecode2)) {
9660  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a2_set" "', argument " "2"" of type '" "uint64_t""'");
9661  }
9662  arg2 = static_cast< uint64_t >(val2);
9663  if (arg1) (arg1)->a2 = arg2;
9664  resultobj = SWIG_Py_Void();
9665  return resultobj;
9666 fail:
9667  return NULL;
9668 }
9669 
9670 
9671 SWIGINTERN PyObject *_wrap_HammingComputer32_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9672  PyObject *resultobj = 0;
9674  void *argp1 = 0 ;
9675  int res1 = 0 ;
9676  PyObject * obj0 = 0 ;
9677  uint64_t result;
9678 
9679  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a2_get",&obj0)) SWIG_fail;
9680  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9681  if (!SWIG_IsOK(res1)) {
9682  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9683  }
9684  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9685  result = (uint64_t) ((arg1)->a2);
9686  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9687  return resultobj;
9688 fail:
9689  return NULL;
9690 }
9691 
9692 
9693 SWIGINTERN PyObject *_wrap_HammingComputer32_a3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9694  PyObject *resultobj = 0;
9696  uint64_t arg2 ;
9697  void *argp1 = 0 ;
9698  int res1 = 0 ;
9699  unsigned long val2 ;
9700  int ecode2 = 0 ;
9701  PyObject * obj0 = 0 ;
9702  PyObject * obj1 = 0 ;
9703 
9704  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a3_set",&obj0,&obj1)) SWIG_fail;
9705  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9706  if (!SWIG_IsOK(res1)) {
9707  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a3_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9708  }
9709  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9710  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9711  if (!SWIG_IsOK(ecode2)) {
9712  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a3_set" "', argument " "2"" of type '" "uint64_t""'");
9713  }
9714  arg2 = static_cast< uint64_t >(val2);
9715  if (arg1) (arg1)->a3 = arg2;
9716  resultobj = SWIG_Py_Void();
9717  return resultobj;
9718 fail:
9719  return NULL;
9720 }
9721 
9722 
9723 SWIGINTERN PyObject *_wrap_HammingComputer32_a3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9724  PyObject *resultobj = 0;
9726  void *argp1 = 0 ;
9727  int res1 = 0 ;
9728  PyObject * obj0 = 0 ;
9729  uint64_t result;
9730 
9731  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a3_get",&obj0)) SWIG_fail;
9732  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9733  if (!SWIG_IsOK(res1)) {
9734  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a3_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9735  }
9736  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9737  result = (uint64_t) ((arg1)->a3);
9738  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9739  return resultobj;
9740 fail:
9741  return NULL;
9742 }
9743 
9744 
9745 SWIGINTERN PyObject *_wrap_new_HammingComputer32__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9746  PyObject *resultobj = 0;
9747  faiss::HammingComputer32 *result = 0 ;
9748 
9749  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer32")) SWIG_fail;
9750  {
9751  Py_BEGIN_ALLOW_THREADS
9752  try {
9754  } catch(faiss::FaissException & e) {
9755  PyEval_RestoreThread(_save);
9756  PyErr_SetString(PyExc_RuntimeError, e.what());
9757  SWIG_fail;
9758  }
9759  Py_END_ALLOW_THREADS
9760  }
9761  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_NEW | 0 );
9762  return resultobj;
9763 fail:
9764  return NULL;
9765 }
9766 
9767 
9768 SWIGINTERN PyObject *_wrap_new_HammingComputer32__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9769  PyObject *resultobj = 0;
9770  uint8_t *arg1 = (uint8_t *) 0 ;
9771  int arg2 ;
9772  void *argp1 = 0 ;
9773  int res1 = 0 ;
9774  int val2 ;
9775  int ecode2 = 0 ;
9776  PyObject * obj0 = 0 ;
9777  PyObject * obj1 = 0 ;
9778  faiss::HammingComputer32 *result = 0 ;
9779 
9780  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer32",&obj0,&obj1)) SWIG_fail;
9781  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
9782  if (!SWIG_IsOK(res1)) {
9783  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer32" "', argument " "1"" of type '" "uint8_t const *""'");
9784  }
9785  arg1 = reinterpret_cast< uint8_t * >(argp1);
9786  ecode2 = SWIG_AsVal_int(obj1, &val2);
9787  if (!SWIG_IsOK(ecode2)) {
9788  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer32" "', argument " "2"" of type '" "int""'");
9789  }
9790  arg2 = static_cast< int >(val2);
9791  {
9792  Py_BEGIN_ALLOW_THREADS
9793  try {
9794  result = (faiss::HammingComputer32 *)new faiss::HammingComputer32((uint8_t const *)arg1,arg2);
9795  } catch(faiss::FaissException & e) {
9796  PyEval_RestoreThread(_save);
9797  PyErr_SetString(PyExc_RuntimeError, e.what());
9798  SWIG_fail;
9799  }
9800  Py_END_ALLOW_THREADS
9801  }
9802  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_NEW | 0 );
9803  return resultobj;
9804 fail:
9805  return NULL;
9806 }
9807 
9808 
9809 SWIGINTERN PyObject *_wrap_new_HammingComputer32(PyObject *self, PyObject *args) {
9810  Py_ssize_t argc;
9811  PyObject *argv[3] = {
9812  0
9813  };
9814  Py_ssize_t ii;
9815 
9816  if (!PyTuple_Check(args)) SWIG_fail;
9817  argc = args ? PyObject_Length(args) : 0;
9818  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
9819  argv[ii] = PyTuple_GET_ITEM(args,ii);
9820  }
9821  if (argc == 0) {
9822  return _wrap_new_HammingComputer32__SWIG_0(self, args);
9823  }
9824  if (argc == 2) {
9825  int _v;
9826  void *vptr = 0;
9827  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
9828  _v = SWIG_CheckState(res);
9829  if (_v) {
9830  {
9831  int res = SWIG_AsVal_int(argv[1], NULL);
9832  _v = SWIG_CheckState(res);
9833  }
9834  if (_v) {
9835  return _wrap_new_HammingComputer32__SWIG_1(self, args);
9836  }
9837  }
9838  }
9839 
9840 fail:
9841  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer32'.\n"
9842  " Possible C/C++ prototypes are:\n"
9843  " faiss::HammingComputer32::HammingComputer32()\n"
9844  " faiss::HammingComputer32::HammingComputer32(uint8_t const *,int)\n");
9845  return 0;
9846 }
9847 
9848 
9849 SWIGINTERN PyObject *_wrap_HammingComputer32_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9850  PyObject *resultobj = 0;
9852  uint8_t *arg2 = (uint8_t *) 0 ;
9853  int arg3 ;
9854  void *argp1 = 0 ;
9855  int res1 = 0 ;
9856  void *argp2 = 0 ;
9857  int res2 = 0 ;
9858  int val3 ;
9859  int ecode3 = 0 ;
9860  PyObject * obj0 = 0 ;
9861  PyObject * obj1 = 0 ;
9862  PyObject * obj2 = 0 ;
9863 
9864  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer32_set",&obj0,&obj1,&obj2)) SWIG_fail;
9865  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9866  if (!SWIG_IsOK(res1)) {
9867  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9868  }
9869  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9870  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9871  if (!SWIG_IsOK(res2)) {
9872  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer32_set" "', argument " "2"" of type '" "uint8_t const *""'");
9873  }
9874  arg2 = reinterpret_cast< uint8_t * >(argp2);
9875  ecode3 = SWIG_AsVal_int(obj2, &val3);
9876  if (!SWIG_IsOK(ecode3)) {
9877  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer32_set" "', argument " "3"" of type '" "int""'");
9878  }
9879  arg3 = static_cast< int >(val3);
9880  {
9881  Py_BEGIN_ALLOW_THREADS
9882  try {
9883  (arg1)->set((uint8_t const *)arg2,arg3);
9884  } catch(faiss::FaissException & e) {
9885  PyEval_RestoreThread(_save);
9886  PyErr_SetString(PyExc_RuntimeError, e.what());
9887  SWIG_fail;
9888  }
9889  Py_END_ALLOW_THREADS
9890  }
9891  resultobj = SWIG_Py_Void();
9892  return resultobj;
9893 fail:
9894  return NULL;
9895 }
9896 
9897 
9898 SWIGINTERN PyObject *_wrap_HammingComputer32_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9899  PyObject *resultobj = 0;
9901  uint8_t *arg2 = (uint8_t *) 0 ;
9902  void *argp1 = 0 ;
9903  int res1 = 0 ;
9904  void *argp2 = 0 ;
9905  int res2 = 0 ;
9906  PyObject * obj0 = 0 ;
9907  PyObject * obj1 = 0 ;
9908  int result;
9909 
9910  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_hamming",&obj0,&obj1)) SWIG_fail;
9911  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9912  if (!SWIG_IsOK(res1)) {
9913  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_hamming" "', argument " "1"" of type '" "faiss::HammingComputer32 const *""'");
9914  }
9915  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9916  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9917  if (!SWIG_IsOK(res2)) {
9918  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer32_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
9919  }
9920  arg2 = reinterpret_cast< uint8_t * >(argp2);
9921  {
9922  Py_BEGIN_ALLOW_THREADS
9923  try {
9924  result = (int)((faiss::HammingComputer32 const *)arg1)->hamming((uint8_t const *)arg2);
9925  } catch(faiss::FaissException & e) {
9926  PyEval_RestoreThread(_save);
9927  PyErr_SetString(PyExc_RuntimeError, e.what());
9928  SWIG_fail;
9929  }
9930  Py_END_ALLOW_THREADS
9931  }
9932  resultobj = SWIG_From_int(static_cast< int >(result));
9933  return resultobj;
9934 fail:
9935  return NULL;
9936 }
9937 
9938 
9939 SWIGINTERN PyObject *_wrap_delete_HammingComputer32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9940  PyObject *resultobj = 0;
9942  void *argp1 = 0 ;
9943  int res1 = 0 ;
9944  PyObject * obj0 = 0 ;
9945 
9946  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer32",&obj0)) SWIG_fail;
9947  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_DISOWN | 0 );
9948  if (!SWIG_IsOK(res1)) {
9949  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer32" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9950  }
9951  arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9952  delete arg1;
9953  resultobj = SWIG_Py_Void();
9954  return resultobj;
9955 fail:
9956  return NULL;
9957 }
9958 
9959 
9960 SWIGINTERN PyObject *HammingComputer32_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9961  PyObject *obj;
9962  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
9963  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer32, SWIG_NewClientData(obj));
9964  return SWIG_Py_Void();
9965 }
9966 
9967 SWIGINTERN PyObject *_wrap_HammingComputer64_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9968  PyObject *resultobj = 0;
9970  uint64_t arg2 ;
9971  void *argp1 = 0 ;
9972  int res1 = 0 ;
9973  unsigned long val2 ;
9974  int ecode2 = 0 ;
9975  PyObject * obj0 = 0 ;
9976  PyObject * obj1 = 0 ;
9977 
9978  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a0_set",&obj0,&obj1)) SWIG_fail;
9979  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9980  if (!SWIG_IsOK(res1)) {
9981  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9982  }
9983  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9984  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9985  if (!SWIG_IsOK(ecode2)) {
9986  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9987  }
9988  arg2 = static_cast< uint64_t >(val2);
9989  if (arg1) (arg1)->a0 = arg2;
9990  resultobj = SWIG_Py_Void();
9991  return resultobj;
9992 fail:
9993  return NULL;
9994 }
9995 
9996 
9997 SWIGINTERN PyObject *_wrap_HammingComputer64_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9998  PyObject *resultobj = 0;
10000  void *argp1 = 0 ;
10001  int res1 = 0 ;
10002  PyObject * obj0 = 0 ;
10003  uint64_t result;
10004 
10005  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a0_get",&obj0)) SWIG_fail;
10006  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10007  if (!SWIG_IsOK(res1)) {
10008  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10009  }
10010  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10011  result = (uint64_t) ((arg1)->a0);
10012  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10013  return resultobj;
10014 fail:
10015  return NULL;
10016 }
10017 
10018 
10019 SWIGINTERN PyObject *_wrap_HammingComputer64_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10020  PyObject *resultobj = 0;
10022  uint64_t arg2 ;
10023  void *argp1 = 0 ;
10024  int res1 = 0 ;
10025  unsigned long val2 ;
10026  int ecode2 = 0 ;
10027  PyObject * obj0 = 0 ;
10028  PyObject * obj1 = 0 ;
10029 
10030  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a1_set",&obj0,&obj1)) SWIG_fail;
10031  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10032  if (!SWIG_IsOK(res1)) {
10033  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10034  }
10035  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10036  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10037  if (!SWIG_IsOK(ecode2)) {
10038  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a1_set" "', argument " "2"" of type '" "uint64_t""'");
10039  }
10040  arg2 = static_cast< uint64_t >(val2);
10041  if (arg1) (arg1)->a1 = arg2;
10042  resultobj = SWIG_Py_Void();
10043  return resultobj;
10044 fail:
10045  return NULL;
10046 }
10047 
10048 
10049 SWIGINTERN PyObject *_wrap_HammingComputer64_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10050  PyObject *resultobj = 0;
10052  void *argp1 = 0 ;
10053  int res1 = 0 ;
10054  PyObject * obj0 = 0 ;
10055  uint64_t result;
10056 
10057  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a1_get",&obj0)) SWIG_fail;
10058  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10059  if (!SWIG_IsOK(res1)) {
10060  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10061  }
10062  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10063  result = (uint64_t) ((arg1)->a1);
10064  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10065  return resultobj;
10066 fail:
10067  return NULL;
10068 }
10069 
10070 
10071 SWIGINTERN PyObject *_wrap_HammingComputer64_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10072  PyObject *resultobj = 0;
10074  uint64_t arg2 ;
10075  void *argp1 = 0 ;
10076  int res1 = 0 ;
10077  unsigned long val2 ;
10078  int ecode2 = 0 ;
10079  PyObject * obj0 = 0 ;
10080  PyObject * obj1 = 0 ;
10081 
10082  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a2_set",&obj0,&obj1)) SWIG_fail;
10083  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10084  if (!SWIG_IsOK(res1)) {
10085  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10086  }
10087  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10088  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10089  if (!SWIG_IsOK(ecode2)) {
10090  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a2_set" "', argument " "2"" of type '" "uint64_t""'");
10091  }
10092  arg2 = static_cast< uint64_t >(val2);
10093  if (arg1) (arg1)->a2 = arg2;
10094  resultobj = SWIG_Py_Void();
10095  return resultobj;
10096 fail:
10097  return NULL;
10098 }
10099 
10100 
10101 SWIGINTERN PyObject *_wrap_HammingComputer64_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10102  PyObject *resultobj = 0;
10104  void *argp1 = 0 ;
10105  int res1 = 0 ;
10106  PyObject * obj0 = 0 ;
10107  uint64_t result;
10108 
10109  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a2_get",&obj0)) SWIG_fail;
10110  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10111  if (!SWIG_IsOK(res1)) {
10112  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10113  }
10114  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10115  result = (uint64_t) ((arg1)->a2);
10116  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10117  return resultobj;
10118 fail:
10119  return NULL;
10120 }
10121 
10122 
10123 SWIGINTERN PyObject *_wrap_HammingComputer64_a3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10124  PyObject *resultobj = 0;
10126  uint64_t arg2 ;
10127  void *argp1 = 0 ;
10128  int res1 = 0 ;
10129  unsigned long val2 ;
10130  int ecode2 = 0 ;
10131  PyObject * obj0 = 0 ;
10132  PyObject * obj1 = 0 ;
10133 
10134  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a3_set",&obj0,&obj1)) SWIG_fail;
10135  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10136  if (!SWIG_IsOK(res1)) {
10137  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a3_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10138  }
10139  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10140  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10141  if (!SWIG_IsOK(ecode2)) {
10142  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a3_set" "', argument " "2"" of type '" "uint64_t""'");
10143  }
10144  arg2 = static_cast< uint64_t >(val2);
10145  if (arg1) (arg1)->a3 = arg2;
10146  resultobj = SWIG_Py_Void();
10147  return resultobj;
10148 fail:
10149  return NULL;
10150 }
10151 
10152 
10153 SWIGINTERN PyObject *_wrap_HammingComputer64_a3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10154  PyObject *resultobj = 0;
10156  void *argp1 = 0 ;
10157  int res1 = 0 ;
10158  PyObject * obj0 = 0 ;
10159  uint64_t result;
10160 
10161  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a3_get",&obj0)) SWIG_fail;
10162  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10163  if (!SWIG_IsOK(res1)) {
10164  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a3_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10165  }
10166  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10167  result = (uint64_t) ((arg1)->a3);
10168  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10169  return resultobj;
10170 fail:
10171  return NULL;
10172 }
10173 
10174 
10175 SWIGINTERN PyObject *_wrap_HammingComputer64_a4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10176  PyObject *resultobj = 0;
10178  uint64_t arg2 ;
10179  void *argp1 = 0 ;
10180  int res1 = 0 ;
10181  unsigned long val2 ;
10182  int ecode2 = 0 ;
10183  PyObject * obj0 = 0 ;
10184  PyObject * obj1 = 0 ;
10185 
10186  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a4_set",&obj0,&obj1)) SWIG_fail;
10187  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10188  if (!SWIG_IsOK(res1)) {
10189  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a4_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10190  }
10191  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10192  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10193  if (!SWIG_IsOK(ecode2)) {
10194  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a4_set" "', argument " "2"" of type '" "uint64_t""'");
10195  }
10196  arg2 = static_cast< uint64_t >(val2);
10197  if (arg1) (arg1)->a4 = arg2;
10198  resultobj = SWIG_Py_Void();
10199  return resultobj;
10200 fail:
10201  return NULL;
10202 }
10203 
10204 
10205 SWIGINTERN PyObject *_wrap_HammingComputer64_a4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10206  PyObject *resultobj = 0;
10208  void *argp1 = 0 ;
10209  int res1 = 0 ;
10210  PyObject * obj0 = 0 ;
10211  uint64_t result;
10212 
10213  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a4_get",&obj0)) SWIG_fail;
10214  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10215  if (!SWIG_IsOK(res1)) {
10216  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a4_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10217  }
10218  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10219  result = (uint64_t) ((arg1)->a4);
10220  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10221  return resultobj;
10222 fail:
10223  return NULL;
10224 }
10225 
10226 
10227 SWIGINTERN PyObject *_wrap_HammingComputer64_a5_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10228  PyObject *resultobj = 0;
10230  uint64_t arg2 ;
10231  void *argp1 = 0 ;
10232  int res1 = 0 ;
10233  unsigned long val2 ;
10234  int ecode2 = 0 ;
10235  PyObject * obj0 = 0 ;
10236  PyObject * obj1 = 0 ;
10237 
10238  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a5_set",&obj0,&obj1)) SWIG_fail;
10239  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10240  if (!SWIG_IsOK(res1)) {
10241  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a5_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10242  }
10243  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10244  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10245  if (!SWIG_IsOK(ecode2)) {
10246  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a5_set" "', argument " "2"" of type '" "uint64_t""'");
10247  }
10248  arg2 = static_cast< uint64_t >(val2);
10249  if (arg1) (arg1)->a5 = arg2;
10250  resultobj = SWIG_Py_Void();
10251  return resultobj;
10252 fail:
10253  return NULL;
10254 }
10255 
10256 
10257 SWIGINTERN PyObject *_wrap_HammingComputer64_a5_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10258  PyObject *resultobj = 0;
10260  void *argp1 = 0 ;
10261  int res1 = 0 ;
10262  PyObject * obj0 = 0 ;
10263  uint64_t result;
10264 
10265  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a5_get",&obj0)) SWIG_fail;
10266  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10267  if (!SWIG_IsOK(res1)) {
10268  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a5_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10269  }
10270  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10271  result = (uint64_t) ((arg1)->a5);
10272  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10273  return resultobj;
10274 fail:
10275  return NULL;
10276 }
10277 
10278 
10279 SWIGINTERN PyObject *_wrap_HammingComputer64_a6_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10280  PyObject *resultobj = 0;
10282  uint64_t arg2 ;
10283  void *argp1 = 0 ;
10284  int res1 = 0 ;
10285  unsigned long val2 ;
10286  int ecode2 = 0 ;
10287  PyObject * obj0 = 0 ;
10288  PyObject * obj1 = 0 ;
10289 
10290  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a6_set",&obj0,&obj1)) SWIG_fail;
10291  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10292  if (!SWIG_IsOK(res1)) {
10293  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a6_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10294  }
10295  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10296  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10297  if (!SWIG_IsOK(ecode2)) {
10298  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a6_set" "', argument " "2"" of type '" "uint64_t""'");
10299  }
10300  arg2 = static_cast< uint64_t >(val2);
10301  if (arg1) (arg1)->a6 = arg2;
10302  resultobj = SWIG_Py_Void();
10303  return resultobj;
10304 fail:
10305  return NULL;
10306 }
10307 
10308 
10309 SWIGINTERN PyObject *_wrap_HammingComputer64_a6_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10310  PyObject *resultobj = 0;
10312  void *argp1 = 0 ;
10313  int res1 = 0 ;
10314  PyObject * obj0 = 0 ;
10315  uint64_t result;
10316 
10317  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a6_get",&obj0)) SWIG_fail;
10318  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10319  if (!SWIG_IsOK(res1)) {
10320  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a6_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10321  }
10322  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10323  result = (uint64_t) ((arg1)->a6);
10324  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10325  return resultobj;
10326 fail:
10327  return NULL;
10328 }
10329 
10330 
10331 SWIGINTERN PyObject *_wrap_HammingComputer64_a7_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10332  PyObject *resultobj = 0;
10334  uint64_t arg2 ;
10335  void *argp1 = 0 ;
10336  int res1 = 0 ;
10337  unsigned long val2 ;
10338  int ecode2 = 0 ;
10339  PyObject * obj0 = 0 ;
10340  PyObject * obj1 = 0 ;
10341 
10342  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a7_set",&obj0,&obj1)) SWIG_fail;
10343  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10344  if (!SWIG_IsOK(res1)) {
10345  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a7_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10346  }
10347  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10348  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10349  if (!SWIG_IsOK(ecode2)) {
10350  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a7_set" "', argument " "2"" of type '" "uint64_t""'");
10351  }
10352  arg2 = static_cast< uint64_t >(val2);
10353  if (arg1) (arg1)->a7 = arg2;
10354  resultobj = SWIG_Py_Void();
10355  return resultobj;
10356 fail:
10357  return NULL;
10358 }
10359 
10360 
10361 SWIGINTERN PyObject *_wrap_HammingComputer64_a7_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10362  PyObject *resultobj = 0;
10364  void *argp1 = 0 ;
10365  int res1 = 0 ;
10366  PyObject * obj0 = 0 ;
10367  uint64_t result;
10368 
10369  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a7_get",&obj0)) SWIG_fail;
10370  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10371  if (!SWIG_IsOK(res1)) {
10372  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a7_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10373  }
10374  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10375  result = (uint64_t) ((arg1)->a7);
10376  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10377  return resultobj;
10378 fail:
10379  return NULL;
10380 }
10381 
10382 
10383 SWIGINTERN PyObject *_wrap_new_HammingComputer64__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10384  PyObject *resultobj = 0;
10385  faiss::HammingComputer64 *result = 0 ;
10386 
10387  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer64")) SWIG_fail;
10388  {
10389  Py_BEGIN_ALLOW_THREADS
10390  try {
10392  } catch(faiss::FaissException & e) {
10393  PyEval_RestoreThread(_save);
10394  PyErr_SetString(PyExc_RuntimeError, e.what());
10395  SWIG_fail;
10396  }
10397  Py_END_ALLOW_THREADS
10398  }
10399  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_NEW | 0 );
10400  return resultobj;
10401 fail:
10402  return NULL;
10403 }
10404 
10405 
10406 SWIGINTERN PyObject *_wrap_new_HammingComputer64__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10407  PyObject *resultobj = 0;
10408  uint8_t *arg1 = (uint8_t *) 0 ;
10409  int arg2 ;
10410  void *argp1 = 0 ;
10411  int res1 = 0 ;
10412  int val2 ;
10413  int ecode2 = 0 ;
10414  PyObject * obj0 = 0 ;
10415  PyObject * obj1 = 0 ;
10416  faiss::HammingComputer64 *result = 0 ;
10417 
10418  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer64",&obj0,&obj1)) SWIG_fail;
10419  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
10420  if (!SWIG_IsOK(res1)) {
10421  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer64" "', argument " "1"" of type '" "uint8_t const *""'");
10422  }
10423  arg1 = reinterpret_cast< uint8_t * >(argp1);
10424  ecode2 = SWIG_AsVal_int(obj1, &val2);
10425  if (!SWIG_IsOK(ecode2)) {
10426  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer64" "', argument " "2"" of type '" "int""'");
10427  }
10428  arg2 = static_cast< int >(val2);
10429  {
10430  Py_BEGIN_ALLOW_THREADS
10431  try {
10432  result = (faiss::HammingComputer64 *)new faiss::HammingComputer64((uint8_t const *)arg1,arg2);
10433  } catch(faiss::FaissException & e) {
10434  PyEval_RestoreThread(_save);
10435  PyErr_SetString(PyExc_RuntimeError, e.what());
10436  SWIG_fail;
10437  }
10438  Py_END_ALLOW_THREADS
10439  }
10440  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_NEW | 0 );
10441  return resultobj;
10442 fail:
10443  return NULL;
10444 }
10445 
10446 
10447 SWIGINTERN PyObject *_wrap_new_HammingComputer64(PyObject *self, PyObject *args) {
10448  Py_ssize_t argc;
10449  PyObject *argv[3] = {
10450  0
10451  };
10452  Py_ssize_t ii;
10453 
10454  if (!PyTuple_Check(args)) SWIG_fail;
10455  argc = args ? PyObject_Length(args) : 0;
10456  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
10457  argv[ii] = PyTuple_GET_ITEM(args,ii);
10458  }
10459  if (argc == 0) {
10460  return _wrap_new_HammingComputer64__SWIG_0(self, args);
10461  }
10462  if (argc == 2) {
10463  int _v;
10464  void *vptr = 0;
10465  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
10466  _v = SWIG_CheckState(res);
10467  if (_v) {
10468  {
10469  int res = SWIG_AsVal_int(argv[1], NULL);
10470  _v = SWIG_CheckState(res);
10471  }
10472  if (_v) {
10473  return _wrap_new_HammingComputer64__SWIG_1(self, args);
10474  }
10475  }
10476  }
10477 
10478 fail:
10479  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer64'.\n"
10480  " Possible C/C++ prototypes are:\n"
10481  " faiss::HammingComputer64::HammingComputer64()\n"
10482  " faiss::HammingComputer64::HammingComputer64(uint8_t const *,int)\n");
10483  return 0;
10484 }
10485 
10486 
10487 SWIGINTERN PyObject *_wrap_HammingComputer64_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10488  PyObject *resultobj = 0;
10490  uint8_t *arg2 = (uint8_t *) 0 ;
10491  int arg3 ;
10492  void *argp1 = 0 ;
10493  int res1 = 0 ;
10494  void *argp2 = 0 ;
10495  int res2 = 0 ;
10496  int val3 ;
10497  int ecode3 = 0 ;
10498  PyObject * obj0 = 0 ;
10499  PyObject * obj1 = 0 ;
10500  PyObject * obj2 = 0 ;
10501 
10502  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer64_set",&obj0,&obj1,&obj2)) SWIG_fail;
10503  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10504  if (!SWIG_IsOK(res1)) {
10505  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10506  }
10507  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10508  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10509  if (!SWIG_IsOK(res2)) {
10510  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer64_set" "', argument " "2"" of type '" "uint8_t const *""'");
10511  }
10512  arg2 = reinterpret_cast< uint8_t * >(argp2);
10513  ecode3 = SWIG_AsVal_int(obj2, &val3);
10514  if (!SWIG_IsOK(ecode3)) {
10515  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer64_set" "', argument " "3"" of type '" "int""'");
10516  }
10517  arg3 = static_cast< int >(val3);
10518  {
10519  Py_BEGIN_ALLOW_THREADS
10520  try {
10521  (arg1)->set((uint8_t const *)arg2,arg3);
10522  } catch(faiss::FaissException & e) {
10523  PyEval_RestoreThread(_save);
10524  PyErr_SetString(PyExc_RuntimeError, e.what());
10525  SWIG_fail;
10526  }
10527  Py_END_ALLOW_THREADS
10528  }
10529  resultobj = SWIG_Py_Void();
10530  return resultobj;
10531 fail:
10532  return NULL;
10533 }
10534 
10535 
10536 SWIGINTERN PyObject *_wrap_HammingComputer64_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10537  PyObject *resultobj = 0;
10539  uint8_t *arg2 = (uint8_t *) 0 ;
10540  void *argp1 = 0 ;
10541  int res1 = 0 ;
10542  void *argp2 = 0 ;
10543  int res2 = 0 ;
10544  PyObject * obj0 = 0 ;
10545  PyObject * obj1 = 0 ;
10546  int result;
10547 
10548  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_hamming",&obj0,&obj1)) SWIG_fail;
10549  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10550  if (!SWIG_IsOK(res1)) {
10551  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_hamming" "', argument " "1"" of type '" "faiss::HammingComputer64 const *""'");
10552  }
10553  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10554  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10555  if (!SWIG_IsOK(res2)) {
10556  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer64_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
10557  }
10558  arg2 = reinterpret_cast< uint8_t * >(argp2);
10559  {
10560  Py_BEGIN_ALLOW_THREADS
10561  try {
10562  result = (int)((faiss::HammingComputer64 const *)arg1)->hamming((uint8_t const *)arg2);
10563  } catch(faiss::FaissException & e) {
10564  PyEval_RestoreThread(_save);
10565  PyErr_SetString(PyExc_RuntimeError, e.what());
10566  SWIG_fail;
10567  }
10568  Py_END_ALLOW_THREADS
10569  }
10570  resultobj = SWIG_From_int(static_cast< int >(result));
10571  return resultobj;
10572 fail:
10573  return NULL;
10574 }
10575 
10576 
10577 SWIGINTERN PyObject *_wrap_delete_HammingComputer64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10578  PyObject *resultobj = 0;
10580  void *argp1 = 0 ;
10581  int res1 = 0 ;
10582  PyObject * obj0 = 0 ;
10583 
10584  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer64",&obj0)) SWIG_fail;
10585  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_DISOWN | 0 );
10586  if (!SWIG_IsOK(res1)) {
10587  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer64" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10588  }
10589  arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10590  delete arg1;
10591  resultobj = SWIG_Py_Void();
10592  return resultobj;
10593 fail:
10594  return NULL;
10595 }
10596 
10597 
10598 SWIGINTERN PyObject *HammingComputer64_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10599  PyObject *obj;
10600  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
10601  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer64, SWIG_NewClientData(obj));
10602  return SWIG_Py_Void();
10603 }
10604 
10605 SWIGINTERN PyObject *_wrap_HammingComputerDefault_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10606  PyObject *resultobj = 0;
10608  uint8_t *arg2 = (uint8_t *) 0 ;
10609  void *argp1 = 0 ;
10610  int res1 = 0 ;
10611  void *argp2 = 0 ;
10612  int res2 = 0 ;
10613  PyObject * obj0 = 0 ;
10614  PyObject * obj1 = 0 ;
10615 
10616  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerDefault_a_set",&obj0,&obj1)) SWIG_fail;
10617  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10618  if (!SWIG_IsOK(res1)) {
10619  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_a_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10620  }
10621  arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10622  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, SWIG_POINTER_DISOWN | 0 );
10623  if (!SWIG_IsOK(res2)) {
10624  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerDefault_a_set" "', argument " "2"" of type '" "uint8_t const *""'");
10625  }
10626  arg2 = reinterpret_cast< uint8_t * >(argp2);
10627  if (arg1) (arg1)->a = (uint8_t const *)arg2;
10628  resultobj = SWIG_Py_Void();
10629  return resultobj;
10630 fail:
10631  return NULL;
10632 }
10633 
10634 
10635 SWIGINTERN PyObject *_wrap_HammingComputerDefault_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10636  PyObject *resultobj = 0;
10638  void *argp1 = 0 ;
10639  int res1 = 0 ;
10640  PyObject * obj0 = 0 ;
10641  uint8_t *result = 0 ;
10642 
10643  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerDefault_a_get",&obj0)) SWIG_fail;
10644  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10645  if (!SWIG_IsOK(res1)) {
10646  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_a_get" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10647  }
10648  arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10649  result = (uint8_t *) ((arg1)->a);
10650  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
10651  return resultobj;
10652 fail:
10653  return NULL;
10654 }
10655 
10656 
10657 SWIGINTERN PyObject *_wrap_HammingComputerDefault_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10658  PyObject *resultobj = 0;
10660  int arg2 ;
10661  void *argp1 = 0 ;
10662  int res1 = 0 ;
10663  int val2 ;
10664  int ecode2 = 0 ;
10665  PyObject * obj0 = 0 ;
10666  PyObject * obj1 = 0 ;
10667 
10668  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerDefault_n_set",&obj0,&obj1)) SWIG_fail;
10669  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10670  if (!SWIG_IsOK(res1)) {
10671  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_n_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10672  }
10673  arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10674  ecode2 = SWIG_AsVal_int(obj1, &val2);
10675  if (!SWIG_IsOK(ecode2)) {
10676  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputerDefault_n_set" "', argument " "2"" of type '" "int""'");
10677  }
10678  arg2 = static_cast< int >(val2);
10679  if (arg1) (arg1)->n = arg2;
10680  resultobj = SWIG_Py_Void();
10681  return resultobj;
10682 fail:
10683  return NULL;
10684 }
10685 
10686 
10687 SWIGINTERN PyObject *_wrap_HammingComputerDefault_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10688  PyObject *resultobj = 0;
10690  void *argp1 = 0 ;
10691  int res1 = 0 ;
10692  PyObject * obj0 = 0 ;
10693  int result;
10694 
10695  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerDefault_n_get",&obj0)) SWIG_fail;
10696  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10697  if (!SWIG_IsOK(res1)) {
10698  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_n_get" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10699  }
10700  arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10701  result = (int) ((arg1)->n);
10702  resultobj = SWIG_From_int(static_cast< int >(result));
10703  return resultobj;
10704 fail:
10705  return NULL;
10706 }
10707 
10708 
10709 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10710  PyObject *resultobj = 0;
10711  faiss::HammingComputerDefault *result = 0 ;
10712 
10713  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputerDefault")) SWIG_fail;
10714  {
10715  Py_BEGIN_ALLOW_THREADS
10716  try {
10718  } catch(faiss::FaissException & e) {
10719  PyEval_RestoreThread(_save);
10720  PyErr_SetString(PyExc_RuntimeError, e.what());
10721  SWIG_fail;
10722  }
10723  Py_END_ALLOW_THREADS
10724  }
10725  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_NEW | 0 );
10726  return resultobj;
10727 fail:
10728  return NULL;
10729 }
10730 
10731 
10732 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10733  PyObject *resultobj = 0;
10734  uint8_t *arg1 = (uint8_t *) 0 ;
10735  int arg2 ;
10736  void *argp1 = 0 ;
10737  int res1 = 0 ;
10738  int val2 ;
10739  int ecode2 = 0 ;
10740  PyObject * obj0 = 0 ;
10741  PyObject * obj1 = 0 ;
10742  faiss::HammingComputerDefault *result = 0 ;
10743 
10744  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputerDefault",&obj0,&obj1)) SWIG_fail;
10745  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
10746  if (!SWIG_IsOK(res1)) {
10747  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputerDefault" "', argument " "1"" of type '" "uint8_t const *""'");
10748  }
10749  arg1 = reinterpret_cast< uint8_t * >(argp1);
10750  ecode2 = SWIG_AsVal_int(obj1, &val2);
10751  if (!SWIG_IsOK(ecode2)) {
10752  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputerDefault" "', argument " "2"" of type '" "int""'");
10753  }
10754  arg2 = static_cast< int >(val2);
10755  {
10756  Py_BEGIN_ALLOW_THREADS
10757  try {
10758  result = (faiss::HammingComputerDefault *)new faiss::HammingComputerDefault((uint8_t const *)arg1,arg2);
10759  } catch(faiss::FaissException & e) {
10760  PyEval_RestoreThread(_save);
10761  PyErr_SetString(PyExc_RuntimeError, e.what());
10762  SWIG_fail;
10763  }
10764  Py_END_ALLOW_THREADS
10765  }
10766  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_NEW | 0 );
10767  return resultobj;
10768 fail:
10769  return NULL;
10770 }
10771 
10772 
10773 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault(PyObject *self, PyObject *args) {
10774  Py_ssize_t argc;
10775  PyObject *argv[3] = {
10776  0
10777  };
10778  Py_ssize_t ii;
10779 
10780  if (!PyTuple_Check(args)) SWIG_fail;
10781  argc = args ? PyObject_Length(args) : 0;
10782  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
10783  argv[ii] = PyTuple_GET_ITEM(args,ii);
10784  }
10785  if (argc == 0) {
10786  return _wrap_new_HammingComputerDefault__SWIG_0(self, args);
10787  }
10788  if (argc == 2) {
10789  int _v;
10790  void *vptr = 0;
10791  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
10792  _v = SWIG_CheckState(res);
10793  if (_v) {
10794  {
10795  int res = SWIG_AsVal_int(argv[1], NULL);
10796  _v = SWIG_CheckState(res);
10797  }
10798  if (_v) {
10799  return _wrap_new_HammingComputerDefault__SWIG_1(self, args);
10800  }
10801  }
10802  }
10803 
10804 fail:
10805  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputerDefault'.\n"
10806  " Possible C/C++ prototypes are:\n"
10807  " faiss::HammingComputerDefault::HammingComputerDefault()\n"
10808  " faiss::HammingComputerDefault::HammingComputerDefault(uint8_t const *,int)\n");
10809  return 0;
10810 }
10811 
10812 
10813 SWIGINTERN PyObject *_wrap_HammingComputerDefault_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10814  PyObject *resultobj = 0;
10816  uint8_t *arg2 = (uint8_t *) 0 ;
10817  int arg3 ;
10818  void *argp1 = 0 ;
10819  int res1 = 0 ;
10820  void *argp2 = 0 ;
10821  int res2 = 0 ;
10822  int val3 ;
10823  int ecode3 = 0 ;
10824  PyObject * obj0 = 0 ;
10825  PyObject * obj1 = 0 ;
10826  PyObject * obj2 = 0 ;
10827 
10828  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputerDefault_set",&obj0,&obj1,&obj2)) SWIG_fail;
10829  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10830  if (!SWIG_IsOK(res1)) {
10831  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10832  }
10833  arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10834  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10835  if (!SWIG_IsOK(res2)) {
10836  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerDefault_set" "', argument " "2"" of type '" "uint8_t const *""'");
10837  }
10838  arg2 = reinterpret_cast< uint8_t * >(argp2);
10839  ecode3 = SWIG_AsVal_int(obj2, &val3);
10840  if (!SWIG_IsOK(ecode3)) {
10841  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputerDefault_set" "', argument " "3"" of type '" "int""'");
10842  }
10843  arg3 = static_cast< int >(val3);
10844  {
10845  Py_BEGIN_ALLOW_THREADS
10846  try {
10847  (arg1)->set((uint8_t const *)arg2,arg3);
10848  } catch(faiss::FaissException & e) {
10849  PyEval_RestoreThread(_save);
10850  PyErr_SetString(PyExc_RuntimeError, e.what());
10851  SWIG_fail;
10852  }
10853  Py_END_ALLOW_THREADS
10854  }
10855  resultobj = SWIG_Py_Void();
10856  return resultobj;
10857 fail:
10858  return NULL;
10859 }
10860 
10861 
10862 SWIGINTERN PyObject *_wrap_HammingComputerDefault_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10863  PyObject *resultobj = 0;
10865  uint8_t *arg2 = (uint8_t *) 0 ;
10866  void *argp1 = 0 ;
10867  int res1 = 0 ;
10868  void *argp2 = 0 ;
10869  int res2 = 0 ;
10870  PyObject * obj0 = 0 ;
10871  PyObject * obj1 = 0 ;
10872  int result;
10873 
10874  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerDefault_hamming",&obj0,&obj1)) SWIG_fail;
10875  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10876  if (!SWIG_IsOK(res1)) {
10877  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_hamming" "', argument " "1"" of type '" "faiss::HammingComputerDefault const *""'");
10878  }
10879  arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10880  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10881  if (!SWIG_IsOK(res2)) {
10882  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerDefault_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
10883  }
10884  arg2 = reinterpret_cast< uint8_t * >(argp2);
10885  {
10886  Py_BEGIN_ALLOW_THREADS
10887  try {
10888  result = (int)((faiss::HammingComputerDefault const *)arg1)->hamming((uint8_t const *)arg2);
10889  } catch(faiss::FaissException & e) {
10890  PyEval_RestoreThread(_save);
10891  PyErr_SetString(PyExc_RuntimeError, e.what());
10892  SWIG_fail;
10893  }
10894  Py_END_ALLOW_THREADS
10895  }
10896  resultobj = SWIG_From_int(static_cast< int >(result));
10897  return resultobj;
10898 fail:
10899  return NULL;
10900 }
10901 
10902 
10903 SWIGINTERN PyObject *_wrap_delete_HammingComputerDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10904  PyObject *resultobj = 0;
10906  void *argp1 = 0 ;
10907  int res1 = 0 ;
10908  PyObject * obj0 = 0 ;
10909 
10910  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputerDefault",&obj0)) SWIG_fail;
10911  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_DISOWN | 0 );
10912  if (!SWIG_IsOK(res1)) {
10913  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputerDefault" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10914  }
10915  arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10916  delete arg1;
10917  resultobj = SWIG_Py_Void();
10918  return resultobj;
10919 fail:
10920  return NULL;
10921 }
10922 
10923 
10924 SWIGINTERN PyObject *HammingComputerDefault_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10925  PyObject *obj;
10926  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
10927  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_NewClientData(obj));
10928  return SWIG_Py_Void();
10929 }
10930 
10931 SWIGINTERN PyObject *_wrap_HammingComputerM8_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10932  PyObject *resultobj = 0;
10934  uint64_t *arg2 = (uint64_t *) 0 ;
10935  void *argp1 = 0 ;
10936  int res1 = 0 ;
10937  void *argp2 = 0 ;
10938  int res2 = 0 ;
10939  PyObject * obj0 = 0 ;
10940  PyObject * obj1 = 0 ;
10941 
10942  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM8_a_set",&obj0,&obj1)) SWIG_fail;
10943  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10944  if (!SWIG_IsOK(res1)) {
10945  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_a_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10946  }
10947  arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10948  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
10949  if (!SWIG_IsOK(res2)) {
10950  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM8_a_set" "', argument " "2"" of type '" "uint64_t const *""'");
10951  }
10952  arg2 = reinterpret_cast< uint64_t * >(argp2);
10953  if (arg1) (arg1)->a = (uint64_t const *)arg2;
10954  resultobj = SWIG_Py_Void();
10955  return resultobj;
10956 fail:
10957  return NULL;
10958 }
10959 
10960 
10961 SWIGINTERN PyObject *_wrap_HammingComputerM8_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10962  PyObject *resultobj = 0;
10964  void *argp1 = 0 ;
10965  int res1 = 0 ;
10966  PyObject * obj0 = 0 ;
10967  uint64_t *result = 0 ;
10968 
10969  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM8_a_get",&obj0)) SWIG_fail;
10970  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10971  if (!SWIG_IsOK(res1)) {
10972  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_a_get" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10973  }
10974  arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10975  result = (uint64_t *) ((arg1)->a);
10976  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
10977  return resultobj;
10978 fail:
10979  return NULL;
10980 }
10981 
10982 
10983 SWIGINTERN PyObject *_wrap_HammingComputerM8_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10984  PyObject *resultobj = 0;
10986  int arg2 ;
10987  void *argp1 = 0 ;
10988  int res1 = 0 ;
10989  int val2 ;
10990  int ecode2 = 0 ;
10991  PyObject * obj0 = 0 ;
10992  PyObject * obj1 = 0 ;
10993 
10994  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM8_n_set",&obj0,&obj1)) SWIG_fail;
10995  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10996  if (!SWIG_IsOK(res1)) {
10997  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_n_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10998  }
10999  arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
11000  ecode2 = SWIG_AsVal_int(obj1, &val2);
11001  if (!SWIG_IsOK(ecode2)) {
11002  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputerM8_n_set" "', argument " "2"" of type '" "int""'");
11003  }
11004  arg2 = static_cast< int >(val2);
11005  if (arg1) (arg1)->n = arg2;
11006  resultobj = SWIG_Py_Void();
11007  return resultobj;
11008 fail:
11009  return NULL;
11010 }
11011 
11012 
11013 SWIGINTERN PyObject *_wrap_HammingComputerM8_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11014  PyObject *resultobj = 0;
11016  void *argp1 = 0 ;
11017  int res1 = 0 ;
11018  PyObject * obj0 = 0 ;
11019  int result;
11020 
11021  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM8_n_get",&obj0)) SWIG_fail;
11022  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
11023  if (!SWIG_IsOK(res1)) {
11024  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_n_get" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
11025  }
11026  arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
11027  result = (int) ((arg1)->n);
11028  resultobj = SWIG_From_int(static_cast< int >(result));
11029  return resultobj;
11030 fail:
11031  return NULL;
11032 }
11033 
11034 
11035 SWIGINTERN PyObject *_wrap_new_HammingComputerM8__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11036  PyObject *resultobj = 0;
11037  faiss::HammingComputerM8 *result = 0 ;
11038 
11039  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputerM8")) SWIG_fail;
11040  {
11041  Py_BEGIN_ALLOW_THREADS
11042  try {
11044  } catch(faiss::FaissException & e) {
11045  PyEval_RestoreThread(_save);
11046  PyErr_SetString(PyExc_RuntimeError, e.what());
11047  SWIG_fail;
11048  }
11049  Py_END_ALLOW_THREADS
11050  }
11051  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_NEW | 0 );
11052  return resultobj;
11053 fail:
11054  return NULL;
11055 }
11056 
11057 
11058 SWIGINTERN PyObject *_wrap_new_HammingComputerM8__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11059  PyObject *resultobj = 0;
11060  uint8_t *arg1 = (uint8_t *) 0 ;
11061  int arg2 ;
11062  void *argp1 = 0 ;
11063  int res1 = 0 ;
11064  int val2 ;
11065  int ecode2 = 0 ;
11066  PyObject * obj0 = 0 ;
11067  PyObject * obj1 = 0 ;
11068  faiss::HammingComputerM8 *result = 0 ;
11069 
11070  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputerM8",&obj0,&obj1)) SWIG_fail;
11071  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11072  if (!SWIG_IsOK(res1)) {
11073  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputerM8" "', argument " "1"" of type '" "uint8_t const *""'");
11074  }
11075  arg1 = reinterpret_cast< uint8_t * >(argp1);
11076  ecode2 = SWIG_AsVal_int(obj1, &val2);
11077  if (!SWIG_IsOK(ecode2)) {
11078  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputerM8" "', argument " "2"" of type '" "int""'");
11079  }
11080  arg2 = static_cast< int >(val2);
11081  {
11082  Py_BEGIN_ALLOW_THREADS
11083  try {
11084  result = (faiss::HammingComputerM8 *)new faiss::HammingComputerM8((uint8_t const *)arg1,arg2);
11085  } catch(faiss::FaissException & e) {
11086  PyEval_RestoreThread(_save);
11087  PyErr_SetString(PyExc_RuntimeError, e.what());
11088  SWIG_fail;
11089  }
11090  Py_END_ALLOW_THREADS
11091  }
11092  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_NEW | 0 );
11093  return resultobj;
11094 fail:
11095  return NULL;
11096 }
11097 
11098 
11099 SWIGINTERN PyObject *_wrap_new_HammingComputerM8(PyObject *self, PyObject *args) {
11100  Py_ssize_t argc;
11101  PyObject *argv[3] = {
11102  0
11103  };
11104  Py_ssize_t ii;
11105 
11106  if (!PyTuple_Check(args)) SWIG_fail;
11107  argc = args ? PyObject_Length(args) : 0;
11108  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
11109  argv[ii] = PyTuple_GET_ITEM(args,ii);
11110  }
11111  if (argc == 0) {
11112  return _wrap_new_HammingComputerM8__SWIG_0(self, args);
11113  }
11114  if (argc == 2) {
11115  int _v;
11116  void *vptr = 0;
11117  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
11118  _v = SWIG_CheckState(res);
11119  if (_v) {
11120  {
11121  int res = SWIG_AsVal_int(argv[1], NULL);
11122  _v = SWIG_CheckState(res);
11123  }
11124  if (_v) {
11125  return _wrap_new_HammingComputerM8__SWIG_1(self, args);
11126  }
11127  }
11128  }
11129 
11130 fail:
11131  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputerM8'.\n"
11132  " Possible C/C++ prototypes are:\n"
11133  " faiss::HammingComputerM8::HammingComputerM8()\n"
11134  " faiss::HammingComputerM8::HammingComputerM8(uint8_t const *,int)\n");
11135  return 0;
11136 }
11137 
11138 
11139 SWIGINTERN PyObject *_wrap_HammingComputerM8_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11140  PyObject *resultobj = 0;
11142  uint8_t *arg2 = (uint8_t *) 0 ;
11143  int arg3 ;
11144  void *argp1 = 0 ;
11145  int res1 = 0 ;
11146  void *argp2 = 0 ;
11147  int res2 = 0 ;
11148  int val3 ;
11149  int ecode3 = 0 ;
11150  PyObject * obj0 = 0 ;
11151  PyObject * obj1 = 0 ;
11152  PyObject * obj2 = 0 ;
11153 
11154  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputerM8_set",&obj0,&obj1,&obj2)) SWIG_fail;
11155  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
11156  if (!SWIG_IsOK(res1)) {
11157  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
11158  }
11159  arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
11160  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11161  if (!SWIG_IsOK(res2)) {
11162  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM8_set" "', argument " "2"" of type '" "uint8_t const *""'");
11163  }
11164  arg2 = reinterpret_cast< uint8_t * >(argp2);
11165  ecode3 = SWIG_AsVal_int(obj2, &val3);
11166  if (!SWIG_IsOK(ecode3)) {
11167  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputerM8_set" "', argument " "3"" of type '" "int""'");
11168  }
11169  arg3 = static_cast< int >(val3);
11170  {
11171  Py_BEGIN_ALLOW_THREADS
11172  try {
11173  (arg1)->set((uint8_t const *)arg2,arg3);
11174  } catch(faiss::FaissException & e) {
11175  PyEval_RestoreThread(_save);
11176  PyErr_SetString(PyExc_RuntimeError, e.what());
11177  SWIG_fail;
11178  }
11179  Py_END_ALLOW_THREADS
11180  }
11181  resultobj = SWIG_Py_Void();
11182  return resultobj;
11183 fail:
11184  return NULL;
11185 }
11186 
11187 
11188 SWIGINTERN PyObject *_wrap_HammingComputerM8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11189  PyObject *resultobj = 0;
11191  uint8_t *arg2 = (uint8_t *) 0 ;
11192  void *argp1 = 0 ;
11193  int res1 = 0 ;
11194  void *argp2 = 0 ;
11195  int res2 = 0 ;
11196  PyObject * obj0 = 0 ;
11197  PyObject * obj1 = 0 ;
11198  int result;
11199 
11200  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM8_hamming",&obj0,&obj1)) SWIG_fail;
11201  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
11202  if (!SWIG_IsOK(res1)) {
11203  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_hamming" "', argument " "1"" of type '" "faiss::HammingComputerM8 const *""'");
11204  }
11205  arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
11206  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11207  if (!SWIG_IsOK(res2)) {
11208  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11209  }
11210  arg2 = reinterpret_cast< uint8_t * >(argp2);
11211  {
11212  Py_BEGIN_ALLOW_THREADS
11213  try {
11214  result = (int)((faiss::HammingComputerM8 const *)arg1)->hamming((uint8_t const *)arg2);
11215  } catch(faiss::FaissException & e) {
11216  PyEval_RestoreThread(_save);
11217  PyErr_SetString(PyExc_RuntimeError, e.what());
11218  SWIG_fail;
11219  }
11220  Py_END_ALLOW_THREADS
11221  }
11222  resultobj = SWIG_From_int(static_cast< int >(result));
11223  return resultobj;
11224 fail:
11225  return NULL;
11226 }
11227 
11228 
11229 SWIGINTERN PyObject *_wrap_delete_HammingComputerM8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11230  PyObject *resultobj = 0;
11232  void *argp1 = 0 ;
11233  int res1 = 0 ;
11234  PyObject * obj0 = 0 ;
11235 
11236  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputerM8",&obj0)) SWIG_fail;
11237  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_DISOWN | 0 );
11238  if (!SWIG_IsOK(res1)) {
11239  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputerM8" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
11240  }
11241  arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
11242  delete arg1;
11243  resultobj = SWIG_Py_Void();
11244  return resultobj;
11245 fail:
11246  return NULL;
11247 }
11248 
11249 
11250 SWIGINTERN PyObject *HammingComputerM8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11251  PyObject *obj;
11252  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
11253  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerM8, SWIG_NewClientData(obj));
11254  return SWIG_Py_Void();
11255 }
11256 
11257 SWIGINTERN PyObject *_wrap_HammingComputerM4_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11258  PyObject *resultobj = 0;
11260  uint32_t *arg2 = (uint32_t *) 0 ;
11261  void *argp1 = 0 ;
11262  int res1 = 0 ;
11263  void *argp2 = 0 ;
11264  int res2 = 0 ;
11265  PyObject * obj0 = 0 ;
11266  PyObject * obj1 = 0 ;
11267 
11268  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM4_a_set",&obj0,&obj1)) SWIG_fail;
11269  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11270  if (!SWIG_IsOK(res1)) {
11271  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_a_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11272  }
11273  arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11274  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_uint32_t, SWIG_POINTER_DISOWN | 0 );
11275  if (!SWIG_IsOK(res2)) {
11276  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM4_a_set" "', argument " "2"" of type '" "uint32_t const *""'");
11277  }
11278  arg2 = reinterpret_cast< uint32_t * >(argp2);
11279  if (arg1) (arg1)->a = (uint32_t const *)arg2;
11280  resultobj = SWIG_Py_Void();
11281  return resultobj;
11282 fail:
11283  return NULL;
11284 }
11285 
11286 
11287 SWIGINTERN PyObject *_wrap_HammingComputerM4_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11288  PyObject *resultobj = 0;
11290  void *argp1 = 0 ;
11291  int res1 = 0 ;
11292  PyObject * obj0 = 0 ;
11293  uint32_t *result = 0 ;
11294 
11295  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM4_a_get",&obj0)) SWIG_fail;
11296  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11297  if (!SWIG_IsOK(res1)) {
11298  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_a_get" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11299  }
11300  arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11301  result = (uint32_t *) ((arg1)->a);
11302  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint32_t, 0 | 0 );
11303  return resultobj;
11304 fail:
11305  return NULL;
11306 }
11307 
11308 
11309 SWIGINTERN PyObject *_wrap_HammingComputerM4_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11310  PyObject *resultobj = 0;
11312  int arg2 ;
11313  void *argp1 = 0 ;
11314  int res1 = 0 ;
11315  int val2 ;
11316  int ecode2 = 0 ;
11317  PyObject * obj0 = 0 ;
11318  PyObject * obj1 = 0 ;
11319 
11320  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM4_n_set",&obj0,&obj1)) SWIG_fail;
11321  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11322  if (!SWIG_IsOK(res1)) {
11323  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_n_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11324  }
11325  arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11326  ecode2 = SWIG_AsVal_int(obj1, &val2);
11327  if (!SWIG_IsOK(ecode2)) {
11328  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputerM4_n_set" "', argument " "2"" of type '" "int""'");
11329  }
11330  arg2 = static_cast< int >(val2);
11331  if (arg1) (arg1)->n = arg2;
11332  resultobj = SWIG_Py_Void();
11333  return resultobj;
11334 fail:
11335  return NULL;
11336 }
11337 
11338 
11339 SWIGINTERN PyObject *_wrap_HammingComputerM4_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11340  PyObject *resultobj = 0;
11342  void *argp1 = 0 ;
11343  int res1 = 0 ;
11344  PyObject * obj0 = 0 ;
11345  int result;
11346 
11347  if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM4_n_get",&obj0)) SWIG_fail;
11348  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11349  if (!SWIG_IsOK(res1)) {
11350  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_n_get" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11351  }
11352  arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11353  result = (int) ((arg1)->n);
11354  resultobj = SWIG_From_int(static_cast< int >(result));
11355  return resultobj;
11356 fail:
11357  return NULL;
11358 }
11359 
11360 
11361 SWIGINTERN PyObject *_wrap_new_HammingComputerM4__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11362  PyObject *resultobj = 0;
11363  faiss::HammingComputerM4 *result = 0 ;
11364 
11365  if (!PyArg_ParseTuple(args,(char *)":new_HammingComputerM4")) SWIG_fail;
11366  {
11367  Py_BEGIN_ALLOW_THREADS
11368  try {
11370  } catch(faiss::FaissException & e) {
11371  PyEval_RestoreThread(_save);
11372  PyErr_SetString(PyExc_RuntimeError, e.what());
11373  SWIG_fail;
11374  }
11375  Py_END_ALLOW_THREADS
11376  }
11377  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_NEW | 0 );
11378  return resultobj;
11379 fail:
11380  return NULL;
11381 }
11382 
11383 
11384 SWIGINTERN PyObject *_wrap_new_HammingComputerM4__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11385  PyObject *resultobj = 0;
11386  uint8_t *arg1 = (uint8_t *) 0 ;
11387  int arg2 ;
11388  void *argp1 = 0 ;
11389  int res1 = 0 ;
11390  int val2 ;
11391  int ecode2 = 0 ;
11392  PyObject * obj0 = 0 ;
11393  PyObject * obj1 = 0 ;
11394  faiss::HammingComputerM4 *result = 0 ;
11395 
11396  if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputerM4",&obj0,&obj1)) SWIG_fail;
11397  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11398  if (!SWIG_IsOK(res1)) {
11399  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputerM4" "', argument " "1"" of type '" "uint8_t const *""'");
11400  }
11401  arg1 = reinterpret_cast< uint8_t * >(argp1);
11402  ecode2 = SWIG_AsVal_int(obj1, &val2);
11403  if (!SWIG_IsOK(ecode2)) {
11404  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputerM4" "', argument " "2"" of type '" "int""'");
11405  }
11406  arg2 = static_cast< int >(val2);
11407  {
11408  Py_BEGIN_ALLOW_THREADS
11409  try {
11410  result = (faiss::HammingComputerM4 *)new faiss::HammingComputerM4((uint8_t const *)arg1,arg2);
11411  } catch(faiss::FaissException & e) {
11412  PyEval_RestoreThread(_save);
11413  PyErr_SetString(PyExc_RuntimeError, e.what());
11414  SWIG_fail;
11415  }
11416  Py_END_ALLOW_THREADS
11417  }
11418  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_NEW | 0 );
11419  return resultobj;
11420 fail:
11421  return NULL;
11422 }
11423 
11424 
11425 SWIGINTERN PyObject *_wrap_new_HammingComputerM4(PyObject *self, PyObject *args) {
11426  Py_ssize_t argc;
11427  PyObject *argv[3] = {
11428  0
11429  };
11430  Py_ssize_t ii;
11431 
11432  if (!PyTuple_Check(args)) SWIG_fail;
11433  argc = args ? PyObject_Length(args) : 0;
11434  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
11435  argv[ii] = PyTuple_GET_ITEM(args,ii);
11436  }
11437  if (argc == 0) {
11438  return _wrap_new_HammingComputerM4__SWIG_0(self, args);
11439  }
11440  if (argc == 2) {
11441  int _v;
11442  void *vptr = 0;
11443  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
11444  _v = SWIG_CheckState(res);
11445  if (_v) {
11446  {
11447  int res = SWIG_AsVal_int(argv[1], NULL);
11448  _v = SWIG_CheckState(res);
11449  }
11450  if (_v) {
11451  return _wrap_new_HammingComputerM4__SWIG_1(self, args);
11452  }
11453  }
11454  }
11455 
11456 fail:
11457  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputerM4'.\n"
11458  " Possible C/C++ prototypes are:\n"
11459  " faiss::HammingComputerM4::HammingComputerM4()\n"
11460  " faiss::HammingComputerM4::HammingComputerM4(uint8_t const *,int)\n");
11461  return 0;
11462 }
11463 
11464 
11465 SWIGINTERN PyObject *_wrap_HammingComputerM4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11466  PyObject *resultobj = 0;
11468  uint8_t *arg2 = (uint8_t *) 0 ;
11469  int arg3 ;
11470  void *argp1 = 0 ;
11471  int res1 = 0 ;
11472  void *argp2 = 0 ;
11473  int res2 = 0 ;
11474  int val3 ;
11475  int ecode3 = 0 ;
11476  PyObject * obj0 = 0 ;
11477  PyObject * obj1 = 0 ;
11478  PyObject * obj2 = 0 ;
11479 
11480  if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputerM4_set",&obj0,&obj1,&obj2)) SWIG_fail;
11481  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11482  if (!SWIG_IsOK(res1)) {
11483  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11484  }
11485  arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11486  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11487  if (!SWIG_IsOK(res2)) {
11488  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM4_set" "', argument " "2"" of type '" "uint8_t const *""'");
11489  }
11490  arg2 = reinterpret_cast< uint8_t * >(argp2);
11491  ecode3 = SWIG_AsVal_int(obj2, &val3);
11492  if (!SWIG_IsOK(ecode3)) {
11493  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputerM4_set" "', argument " "3"" of type '" "int""'");
11494  }
11495  arg3 = static_cast< int >(val3);
11496  {
11497  Py_BEGIN_ALLOW_THREADS
11498  try {
11499  (arg1)->set((uint8_t const *)arg2,arg3);
11500  } catch(faiss::FaissException & e) {
11501  PyEval_RestoreThread(_save);
11502  PyErr_SetString(PyExc_RuntimeError, e.what());
11503  SWIG_fail;
11504  }
11505  Py_END_ALLOW_THREADS
11506  }
11507  resultobj = SWIG_Py_Void();
11508  return resultobj;
11509 fail:
11510  return NULL;
11511 }
11512 
11513 
11514 SWIGINTERN PyObject *_wrap_HammingComputerM4_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11515  PyObject *resultobj = 0;
11517  uint8_t *arg2 = (uint8_t *) 0 ;
11518  void *argp1 = 0 ;
11519  int res1 = 0 ;
11520  void *argp2 = 0 ;
11521  int res2 = 0 ;
11522  PyObject * obj0 = 0 ;
11523  PyObject * obj1 = 0 ;
11524  int result;
11525 
11526  if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM4_hamming",&obj0,&obj1)) SWIG_fail;
11527  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11528  if (!SWIG_IsOK(res1)) {
11529  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_hamming" "', argument " "1"" of type '" "faiss::HammingComputerM4 const *""'");
11530  }
11531  arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11532  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11533  if (!SWIG_IsOK(res2)) {
11534  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM4_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11535  }
11536  arg2 = reinterpret_cast< uint8_t * >(argp2);
11537  {
11538  Py_BEGIN_ALLOW_THREADS
11539  try {
11540  result = (int)((faiss::HammingComputerM4 const *)arg1)->hamming((uint8_t const *)arg2);
11541  } catch(faiss::FaissException & e) {
11542  PyEval_RestoreThread(_save);
11543  PyErr_SetString(PyExc_RuntimeError, e.what());
11544  SWIG_fail;
11545  }
11546  Py_END_ALLOW_THREADS
11547  }
11548  resultobj = SWIG_From_int(static_cast< int >(result));
11549  return resultobj;
11550 fail:
11551  return NULL;
11552 }
11553 
11554 
11555 SWIGINTERN PyObject *_wrap_delete_HammingComputerM4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11556  PyObject *resultobj = 0;
11558  void *argp1 = 0 ;
11559  int res1 = 0 ;
11560  PyObject * obj0 = 0 ;
11561 
11562  if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputerM4",&obj0)) SWIG_fail;
11563  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_DISOWN | 0 );
11564  if (!SWIG_IsOK(res1)) {
11565  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputerM4" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11566  }
11567  arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11568  delete arg1;
11569  resultobj = SWIG_Py_Void();
11570  return resultobj;
11571 fail:
11572  return NULL;
11573 }
11574 
11575 
11576 SWIGINTERN PyObject *HammingComputerM4_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11577  PyObject *obj;
11578  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
11579  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerM4, SWIG_NewClientData(obj));
11580  return SWIG_Py_Void();
11581 }
11582 
11583 SWIGINTERN PyObject *_wrap_generalized_hamming_64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11584  PyObject *resultobj = 0;
11585  uint64_t arg1 ;
11586  unsigned long val1 ;
11587  int ecode1 = 0 ;
11588  PyObject * obj0 = 0 ;
11589  int result;
11590 
11591  if (!PyArg_ParseTuple(args,(char *)"O:generalized_hamming_64",&obj0)) SWIG_fail;
11592  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
11593  if (!SWIG_IsOK(ecode1)) {
11594  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "generalized_hamming_64" "', argument " "1"" of type '" "uint64_t""'");
11595  }
11596  arg1 = static_cast< uint64_t >(val1);
11597  {
11598  Py_BEGIN_ALLOW_THREADS
11599  try {
11600  result = (int)faiss::generalized_hamming_64(arg1);
11601  } catch(faiss::FaissException & e) {
11602  PyEval_RestoreThread(_save);
11603  PyErr_SetString(PyExc_RuntimeError, e.what());
11604  SWIG_fail;
11605  }
11606  Py_END_ALLOW_THREADS
11607  }
11608  resultobj = SWIG_From_int(static_cast< int >(result));
11609  return resultobj;
11610 fail:
11611  return NULL;
11612 }
11613 
11614 
11615 SWIGINTERN PyObject *_wrap_GenHammingComputer8_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11616  PyObject *resultobj = 0;
11618  uint64_t arg2 ;
11619  void *argp1 = 0 ;
11620  int res1 = 0 ;
11621  unsigned long val2 ;
11622  int ecode2 = 0 ;
11623  PyObject * obj0 = 0 ;
11624  PyObject * obj1 = 0 ;
11625 
11626  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer8_a0_set",&obj0,&obj1)) SWIG_fail;
11627  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11628  if (!SWIG_IsOK(res1)) {
11629  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer8_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11630  }
11631  arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11632  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11633  if (!SWIG_IsOK(ecode2)) {
11634  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer8_a0_set" "', argument " "2"" of type '" "uint64_t""'");
11635  }
11636  arg2 = static_cast< uint64_t >(val2);
11637  if (arg1) (arg1)->a0 = arg2;
11638  resultobj = SWIG_Py_Void();
11639  return resultobj;
11640 fail:
11641  return NULL;
11642 }
11643 
11644 
11645 SWIGINTERN PyObject *_wrap_GenHammingComputer8_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11646  PyObject *resultobj = 0;
11648  void *argp1 = 0 ;
11649  int res1 = 0 ;
11650  PyObject * obj0 = 0 ;
11651  uint64_t result;
11652 
11653  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer8_a0_get",&obj0)) SWIG_fail;
11654  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11655  if (!SWIG_IsOK(res1)) {
11656  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer8_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11657  }
11658  arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11659  result = (uint64_t) ((arg1)->a0);
11660  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11661  return resultobj;
11662 fail:
11663  return NULL;
11664 }
11665 
11666 
11667 SWIGINTERN PyObject *_wrap_new_GenHammingComputer8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11668  PyObject *resultobj = 0;
11669  uint8_t *arg1 = (uint8_t *) 0 ;
11670  int arg2 ;
11671  void *argp1 = 0 ;
11672  int res1 = 0 ;
11673  int val2 ;
11674  int ecode2 = 0 ;
11675  PyObject * obj0 = 0 ;
11676  PyObject * obj1 = 0 ;
11677  faiss::GenHammingComputer8 *result = 0 ;
11678 
11679  if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputer8",&obj0,&obj1)) SWIG_fail;
11680  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11681  if (!SWIG_IsOK(res1)) {
11682  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputer8" "', argument " "1"" of type '" "uint8_t const *""'");
11683  }
11684  arg1 = reinterpret_cast< uint8_t * >(argp1);
11685  ecode2 = SWIG_AsVal_int(obj1, &val2);
11686  if (!SWIG_IsOK(ecode2)) {
11687  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputer8" "', argument " "2"" of type '" "int""'");
11688  }
11689  arg2 = static_cast< int >(val2);
11690  {
11691  Py_BEGIN_ALLOW_THREADS
11692  try {
11693  result = (faiss::GenHammingComputer8 *)new faiss::GenHammingComputer8((uint8_t const *)arg1,arg2);
11694  } catch(faiss::FaissException & e) {
11695  PyEval_RestoreThread(_save);
11696  PyErr_SetString(PyExc_RuntimeError, e.what());
11697  SWIG_fail;
11698  }
11699  Py_END_ALLOW_THREADS
11700  }
11701  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_POINTER_NEW | 0 );
11702  return resultobj;
11703 fail:
11704  return NULL;
11705 }
11706 
11707 
11708 SWIGINTERN PyObject *_wrap_GenHammingComputer8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11709  PyObject *resultobj = 0;
11711  uint8_t *arg2 = (uint8_t *) 0 ;
11712  void *argp1 = 0 ;
11713  int res1 = 0 ;
11714  void *argp2 = 0 ;
11715  int res2 = 0 ;
11716  PyObject * obj0 = 0 ;
11717  PyObject * obj1 = 0 ;
11718  int result;
11719 
11720  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer8_hamming",&obj0,&obj1)) SWIG_fail;
11721  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11722  if (!SWIG_IsOK(res1)) {
11723  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer8_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer8 const *""'");
11724  }
11725  arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11726  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11727  if (!SWIG_IsOK(res2)) {
11728  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputer8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11729  }
11730  arg2 = reinterpret_cast< uint8_t * >(argp2);
11731  {
11732  Py_BEGIN_ALLOW_THREADS
11733  try {
11734  result = (int)((faiss::GenHammingComputer8 const *)arg1)->hamming((uint8_t const *)arg2);
11735  } catch(faiss::FaissException & e) {
11736  PyEval_RestoreThread(_save);
11737  PyErr_SetString(PyExc_RuntimeError, e.what());
11738  SWIG_fail;
11739  }
11740  Py_END_ALLOW_THREADS
11741  }
11742  resultobj = SWIG_From_int(static_cast< int >(result));
11743  return resultobj;
11744 fail:
11745  return NULL;
11746 }
11747 
11748 
11749 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11750  PyObject *resultobj = 0;
11752  void *argp1 = 0 ;
11753  int res1 = 0 ;
11754  PyObject * obj0 = 0 ;
11755 
11756  if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputer8",&obj0)) SWIG_fail;
11757  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_POINTER_DISOWN | 0 );
11758  if (!SWIG_IsOK(res1)) {
11759  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputer8" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11760  }
11761  arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11762  delete arg1;
11763  resultobj = SWIG_Py_Void();
11764  return resultobj;
11765 fail:
11766  return NULL;
11767 }
11768 
11769 
11770 SWIGINTERN PyObject *GenHammingComputer8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11771  PyObject *obj;
11772  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
11773  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_NewClientData(obj));
11774  return SWIG_Py_Void();
11775 }
11776 
11777 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11778  PyObject *resultobj = 0;
11780  uint64_t arg2 ;
11781  void *argp1 = 0 ;
11782  int res1 = 0 ;
11783  unsigned long val2 ;
11784  int ecode2 = 0 ;
11785  PyObject * obj0 = 0 ;
11786  PyObject * obj1 = 0 ;
11787 
11788  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer16_a0_set",&obj0,&obj1)) SWIG_fail;
11789  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11790  if (!SWIG_IsOK(res1)) {
11791  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11792  }
11793  arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11794  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11795  if (!SWIG_IsOK(ecode2)) {
11796  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer16_a0_set" "', argument " "2"" of type '" "uint64_t""'");
11797  }
11798  arg2 = static_cast< uint64_t >(val2);
11799  if (arg1) (arg1)->a0 = arg2;
11800  resultobj = SWIG_Py_Void();
11801  return resultobj;
11802 fail:
11803  return NULL;
11804 }
11805 
11806 
11807 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11808  PyObject *resultobj = 0;
11810  void *argp1 = 0 ;
11811  int res1 = 0 ;
11812  PyObject * obj0 = 0 ;
11813  uint64_t result;
11814 
11815  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer16_a0_get",&obj0)) SWIG_fail;
11816  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11817  if (!SWIG_IsOK(res1)) {
11818  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11819  }
11820  arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11821  result = (uint64_t) ((arg1)->a0);
11822  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11823  return resultobj;
11824 fail:
11825  return NULL;
11826 }
11827 
11828 
11829 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11830  PyObject *resultobj = 0;
11832  uint64_t arg2 ;
11833  void *argp1 = 0 ;
11834  int res1 = 0 ;
11835  unsigned long val2 ;
11836  int ecode2 = 0 ;
11837  PyObject * obj0 = 0 ;
11838  PyObject * obj1 = 0 ;
11839 
11840  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer16_a1_set",&obj0,&obj1)) SWIG_fail;
11841  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11842  if (!SWIG_IsOK(res1)) {
11843  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a1_set" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11844  }
11845  arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11846  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11847  if (!SWIG_IsOK(ecode2)) {
11848  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer16_a1_set" "', argument " "2"" of type '" "uint64_t""'");
11849  }
11850  arg2 = static_cast< uint64_t >(val2);
11851  if (arg1) (arg1)->a1 = arg2;
11852  resultobj = SWIG_Py_Void();
11853  return resultobj;
11854 fail:
11855  return NULL;
11856 }
11857 
11858 
11859 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11860  PyObject *resultobj = 0;
11862  void *argp1 = 0 ;
11863  int res1 = 0 ;
11864  PyObject * obj0 = 0 ;
11865  uint64_t result;
11866 
11867  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer16_a1_get",&obj0)) SWIG_fail;
11868  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11869  if (!SWIG_IsOK(res1)) {
11870  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a1_get" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11871  }
11872  arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11873  result = (uint64_t) ((arg1)->a1);
11874  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11875  return resultobj;
11876 fail:
11877  return NULL;
11878 }
11879 
11880 
11881 SWIGINTERN PyObject *_wrap_new_GenHammingComputer16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11882  PyObject *resultobj = 0;
11883  uint8_t *arg1 = (uint8_t *) 0 ;
11884  int arg2 ;
11885  void *argp1 = 0 ;
11886  int res1 = 0 ;
11887  int val2 ;
11888  int ecode2 = 0 ;
11889  PyObject * obj0 = 0 ;
11890  PyObject * obj1 = 0 ;
11891  faiss::GenHammingComputer16 *result = 0 ;
11892 
11893  if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputer16",&obj0,&obj1)) SWIG_fail;
11894  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11895  if (!SWIG_IsOK(res1)) {
11896  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputer16" "', argument " "1"" of type '" "uint8_t const *""'");
11897  }
11898  arg1 = reinterpret_cast< uint8_t * >(argp1);
11899  ecode2 = SWIG_AsVal_int(obj1, &val2);
11900  if (!SWIG_IsOK(ecode2)) {
11901  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputer16" "', argument " "2"" of type '" "int""'");
11902  }
11903  arg2 = static_cast< int >(val2);
11904  {
11905  Py_BEGIN_ALLOW_THREADS
11906  try {
11907  result = (faiss::GenHammingComputer16 *)new faiss::GenHammingComputer16((uint8_t const *)arg1,arg2);
11908  } catch(faiss::FaissException & e) {
11909  PyEval_RestoreThread(_save);
11910  PyErr_SetString(PyExc_RuntimeError, e.what());
11911  SWIG_fail;
11912  }
11913  Py_END_ALLOW_THREADS
11914  }
11915  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_POINTER_NEW | 0 );
11916  return resultobj;
11917 fail:
11918  return NULL;
11919 }
11920 
11921 
11922 SWIGINTERN PyObject *_wrap_GenHammingComputer16_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11923  PyObject *resultobj = 0;
11925  uint8_t *arg2 = (uint8_t *) 0 ;
11926  void *argp1 = 0 ;
11927  int res1 = 0 ;
11928  void *argp2 = 0 ;
11929  int res2 = 0 ;
11930  PyObject * obj0 = 0 ;
11931  PyObject * obj1 = 0 ;
11932  int result;
11933 
11934  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer16_hamming",&obj0,&obj1)) SWIG_fail;
11935  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11936  if (!SWIG_IsOK(res1)) {
11937  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer16 const *""'");
11938  }
11939  arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11940  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11941  if (!SWIG_IsOK(res2)) {
11942  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputer16_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11943  }
11944  arg2 = reinterpret_cast< uint8_t * >(argp2);
11945  {
11946  Py_BEGIN_ALLOW_THREADS
11947  try {
11948  result = (int)((faiss::GenHammingComputer16 const *)arg1)->hamming((uint8_t const *)arg2);
11949  } catch(faiss::FaissException & e) {
11950  PyEval_RestoreThread(_save);
11951  PyErr_SetString(PyExc_RuntimeError, e.what());
11952  SWIG_fail;
11953  }
11954  Py_END_ALLOW_THREADS
11955  }
11956  resultobj = SWIG_From_int(static_cast< int >(result));
11957  return resultobj;
11958 fail:
11959  return NULL;
11960 }
11961 
11962 
11963 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11964  PyObject *resultobj = 0;
11966  void *argp1 = 0 ;
11967  int res1 = 0 ;
11968  PyObject * obj0 = 0 ;
11969 
11970  if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputer16",&obj0)) SWIG_fail;
11971  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_POINTER_DISOWN | 0 );
11972  if (!SWIG_IsOK(res1)) {
11973  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputer16" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11974  }
11975  arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11976  delete arg1;
11977  resultobj = SWIG_Py_Void();
11978  return resultobj;
11979 fail:
11980  return NULL;
11981 }
11982 
11983 
11984 SWIGINTERN PyObject *GenHammingComputer16_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11985  PyObject *obj;
11986  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
11987  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_NewClientData(obj));
11988  return SWIG_Py_Void();
11989 }
11990 
11991 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11992  PyObject *resultobj = 0;
11994  uint64_t arg2 ;
11995  void *argp1 = 0 ;
11996  int res1 = 0 ;
11997  unsigned long val2 ;
11998  int ecode2 = 0 ;
11999  PyObject * obj0 = 0 ;
12000  PyObject * obj1 = 0 ;
12001 
12002  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a0_set",&obj0,&obj1)) SWIG_fail;
12003  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12004  if (!SWIG_IsOK(res1)) {
12005  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12006  }
12007  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12008  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12009  if (!SWIG_IsOK(ecode2)) {
12010  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a0_set" "', argument " "2"" of type '" "uint64_t""'");
12011  }
12012  arg2 = static_cast< uint64_t >(val2);
12013  if (arg1) (arg1)->a0 = arg2;
12014  resultobj = SWIG_Py_Void();
12015  return resultobj;
12016 fail:
12017  return NULL;
12018 }
12019 
12020 
12021 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12022  PyObject *resultobj = 0;
12024  void *argp1 = 0 ;
12025  int res1 = 0 ;
12026  PyObject * obj0 = 0 ;
12027  uint64_t result;
12028 
12029  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a0_get",&obj0)) SWIG_fail;
12030  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12031  if (!SWIG_IsOK(res1)) {
12032  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12033  }
12034  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12035  result = (uint64_t) ((arg1)->a0);
12036  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12037  return resultobj;
12038 fail:
12039  return NULL;
12040 }
12041 
12042 
12043 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12044  PyObject *resultobj = 0;
12046  uint64_t arg2 ;
12047  void *argp1 = 0 ;
12048  int res1 = 0 ;
12049  unsigned long val2 ;
12050  int ecode2 = 0 ;
12051  PyObject * obj0 = 0 ;
12052  PyObject * obj1 = 0 ;
12053 
12054  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a1_set",&obj0,&obj1)) SWIG_fail;
12055  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12056  if (!SWIG_IsOK(res1)) {
12057  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a1_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12058  }
12059  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12060  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12061  if (!SWIG_IsOK(ecode2)) {
12062  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a1_set" "', argument " "2"" of type '" "uint64_t""'");
12063  }
12064  arg2 = static_cast< uint64_t >(val2);
12065  if (arg1) (arg1)->a1 = arg2;
12066  resultobj = SWIG_Py_Void();
12067  return resultobj;
12068 fail:
12069  return NULL;
12070 }
12071 
12072 
12073 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12074  PyObject *resultobj = 0;
12076  void *argp1 = 0 ;
12077  int res1 = 0 ;
12078  PyObject * obj0 = 0 ;
12079  uint64_t result;
12080 
12081  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a1_get",&obj0)) SWIG_fail;
12082  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12083  if (!SWIG_IsOK(res1)) {
12084  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a1_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12085  }
12086  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12087  result = (uint64_t) ((arg1)->a1);
12088  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12089  return resultobj;
12090 fail:
12091  return NULL;
12092 }
12093 
12094 
12095 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12096  PyObject *resultobj = 0;
12098  uint64_t arg2 ;
12099  void *argp1 = 0 ;
12100  int res1 = 0 ;
12101  unsigned long val2 ;
12102  int ecode2 = 0 ;
12103  PyObject * obj0 = 0 ;
12104  PyObject * obj1 = 0 ;
12105 
12106  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a2_set",&obj0,&obj1)) SWIG_fail;
12107  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12108  if (!SWIG_IsOK(res1)) {
12109  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a2_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12110  }
12111  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12112  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12113  if (!SWIG_IsOK(ecode2)) {
12114  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a2_set" "', argument " "2"" of type '" "uint64_t""'");
12115  }
12116  arg2 = static_cast< uint64_t >(val2);
12117  if (arg1) (arg1)->a2 = arg2;
12118  resultobj = SWIG_Py_Void();
12119  return resultobj;
12120 fail:
12121  return NULL;
12122 }
12123 
12124 
12125 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12126  PyObject *resultobj = 0;
12128  void *argp1 = 0 ;
12129  int res1 = 0 ;
12130  PyObject * obj0 = 0 ;
12131  uint64_t result;
12132 
12133  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a2_get",&obj0)) SWIG_fail;
12134  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12135  if (!SWIG_IsOK(res1)) {
12136  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a2_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12137  }
12138  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12139  result = (uint64_t) ((arg1)->a2);
12140  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12141  return resultobj;
12142 fail:
12143  return NULL;
12144 }
12145 
12146 
12147 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12148  PyObject *resultobj = 0;
12150  uint64_t arg2 ;
12151  void *argp1 = 0 ;
12152  int res1 = 0 ;
12153  unsigned long val2 ;
12154  int ecode2 = 0 ;
12155  PyObject * obj0 = 0 ;
12156  PyObject * obj1 = 0 ;
12157 
12158  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a3_set",&obj0,&obj1)) SWIG_fail;
12159  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12160  if (!SWIG_IsOK(res1)) {
12161  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a3_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12162  }
12163  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12164  ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
12165  if (!SWIG_IsOK(ecode2)) {
12166  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a3_set" "', argument " "2"" of type '" "uint64_t""'");
12167  }
12168  arg2 = static_cast< uint64_t >(val2);
12169  if (arg1) (arg1)->a3 = arg2;
12170  resultobj = SWIG_Py_Void();
12171  return resultobj;
12172 fail:
12173  return NULL;
12174 }
12175 
12176 
12177 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12178  PyObject *resultobj = 0;
12180  void *argp1 = 0 ;
12181  int res1 = 0 ;
12182  PyObject * obj0 = 0 ;
12183  uint64_t result;
12184 
12185  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a3_get",&obj0)) SWIG_fail;
12186  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12187  if (!SWIG_IsOK(res1)) {
12188  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a3_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12189  }
12190  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12191  result = (uint64_t) ((arg1)->a3);
12192  resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
12193  return resultobj;
12194 fail:
12195  return NULL;
12196 }
12197 
12198 
12199 SWIGINTERN PyObject *_wrap_new_GenHammingComputer32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12200  PyObject *resultobj = 0;
12201  uint8_t *arg1 = (uint8_t *) 0 ;
12202  int arg2 ;
12203  void *argp1 = 0 ;
12204  int res1 = 0 ;
12205  int val2 ;
12206  int ecode2 = 0 ;
12207  PyObject * obj0 = 0 ;
12208  PyObject * obj1 = 0 ;
12209  faiss::GenHammingComputer32 *result = 0 ;
12210 
12211  if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputer32",&obj0,&obj1)) SWIG_fail;
12212  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
12213  if (!SWIG_IsOK(res1)) {
12214  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputer32" "', argument " "1"" of type '" "uint8_t const *""'");
12215  }
12216  arg1 = reinterpret_cast< uint8_t * >(argp1);
12217  ecode2 = SWIG_AsVal_int(obj1, &val2);
12218  if (!SWIG_IsOK(ecode2)) {
12219  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputer32" "', argument " "2"" of type '" "int""'");
12220  }
12221  arg2 = static_cast< int >(val2);
12222  {
12223  Py_BEGIN_ALLOW_THREADS
12224  try {
12225  result = (faiss::GenHammingComputer32 *)new faiss::GenHammingComputer32((uint8_t const *)arg1,arg2);
12226  } catch(faiss::FaissException & e) {
12227  PyEval_RestoreThread(_save);
12228  PyErr_SetString(PyExc_RuntimeError, e.what());
12229  SWIG_fail;
12230  }
12231  Py_END_ALLOW_THREADS
12232  }
12233  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_POINTER_NEW | 0 );
12234  return resultobj;
12235 fail:
12236  return NULL;
12237 }
12238 
12239 
12240 SWIGINTERN PyObject *_wrap_GenHammingComputer32_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12241  PyObject *resultobj = 0;
12243  uint8_t *arg2 = (uint8_t *) 0 ;
12244  void *argp1 = 0 ;
12245  int res1 = 0 ;
12246  void *argp2 = 0 ;
12247  int res2 = 0 ;
12248  PyObject * obj0 = 0 ;
12249  PyObject * obj1 = 0 ;
12250  int result;
12251 
12252  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_hamming",&obj0,&obj1)) SWIG_fail;
12253  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
12254  if (!SWIG_IsOK(res1)) {
12255  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer32 const *""'");
12256  }
12257  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12258  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12259  if (!SWIG_IsOK(res2)) {
12260  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputer32_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
12261  }
12262  arg2 = reinterpret_cast< uint8_t * >(argp2);
12263  {
12264  Py_BEGIN_ALLOW_THREADS
12265  try {
12266  result = (int)((faiss::GenHammingComputer32 const *)arg1)->hamming((uint8_t const *)arg2);
12267  } catch(faiss::FaissException & e) {
12268  PyEval_RestoreThread(_save);
12269  PyErr_SetString(PyExc_RuntimeError, e.what());
12270  SWIG_fail;
12271  }
12272  Py_END_ALLOW_THREADS
12273  }
12274  resultobj = SWIG_From_int(static_cast< int >(result));
12275  return resultobj;
12276 fail:
12277  return NULL;
12278 }
12279 
12280 
12281 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12282  PyObject *resultobj = 0;
12284  void *argp1 = 0 ;
12285  int res1 = 0 ;
12286  PyObject * obj0 = 0 ;
12287 
12288  if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputer32",&obj0)) SWIG_fail;
12289  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_POINTER_DISOWN | 0 );
12290  if (!SWIG_IsOK(res1)) {
12291  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputer32" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12292  }
12293  arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12294  delete arg1;
12295  resultobj = SWIG_Py_Void();
12296  return resultobj;
12297 fail:
12298  return NULL;
12299 }
12300 
12301 
12302 SWIGINTERN PyObject *GenHammingComputer32_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12303  PyObject *obj;
12304  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
12305  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_NewClientData(obj));
12306  return SWIG_Py_Void();
12307 }
12308 
12309 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12310  PyObject *resultobj = 0;
12312  uint64_t *arg2 = (uint64_t *) 0 ;
12313  void *argp1 = 0 ;
12314  int res1 = 0 ;
12315  void *argp2 = 0 ;
12316  int res2 = 0 ;
12317  PyObject * obj0 = 0 ;
12318  PyObject * obj1 = 0 ;
12319 
12320  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputerM8_a_set",&obj0,&obj1)) SWIG_fail;
12321  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12322  if (!SWIG_IsOK(res1)) {
12323  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_a_set" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12324  }
12325  arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12326  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
12327  if (!SWIG_IsOK(res2)) {
12328  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputerM8_a_set" "', argument " "2"" of type '" "uint64_t const *""'");
12329  }
12330  arg2 = reinterpret_cast< uint64_t * >(argp2);
12331  if (arg1) (arg1)->a = (uint64_t const *)arg2;
12332  resultobj = SWIG_Py_Void();
12333  return resultobj;
12334 fail:
12335  return NULL;
12336 }
12337 
12338 
12339 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12340  PyObject *resultobj = 0;
12342  void *argp1 = 0 ;
12343  int res1 = 0 ;
12344  PyObject * obj0 = 0 ;
12345  uint64_t *result = 0 ;
12346 
12347  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputerM8_a_get",&obj0)) SWIG_fail;
12348  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12349  if (!SWIG_IsOK(res1)) {
12350  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_a_get" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12351  }
12352  arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12353  result = (uint64_t *) ((arg1)->a);
12354  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
12355  return resultobj;
12356 fail:
12357  return NULL;
12358 }
12359 
12360 
12361 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12362  PyObject *resultobj = 0;
12364  int arg2 ;
12365  void *argp1 = 0 ;
12366  int res1 = 0 ;
12367  int val2 ;
12368  int ecode2 = 0 ;
12369  PyObject * obj0 = 0 ;
12370  PyObject * obj1 = 0 ;
12371 
12372  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputerM8_n_set",&obj0,&obj1)) SWIG_fail;
12373  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12374  if (!SWIG_IsOK(res1)) {
12375  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_n_set" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12376  }
12377  arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12378  ecode2 = SWIG_AsVal_int(obj1, &val2);
12379  if (!SWIG_IsOK(ecode2)) {
12380  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputerM8_n_set" "', argument " "2"" of type '" "int""'");
12381  }
12382  arg2 = static_cast< int >(val2);
12383  if (arg1) (arg1)->n = arg2;
12384  resultobj = SWIG_Py_Void();
12385  return resultobj;
12386 fail:
12387  return NULL;
12388 }
12389 
12390 
12391 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12392  PyObject *resultobj = 0;
12394  void *argp1 = 0 ;
12395  int res1 = 0 ;
12396  PyObject * obj0 = 0 ;
12397  int result;
12398 
12399  if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputerM8_n_get",&obj0)) SWIG_fail;
12400  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12401  if (!SWIG_IsOK(res1)) {
12402  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_n_get" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12403  }
12404  arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12405  result = (int) ((arg1)->n);
12406  resultobj = SWIG_From_int(static_cast< int >(result));
12407  return resultobj;
12408 fail:
12409  return NULL;
12410 }
12411 
12412 
12413 SWIGINTERN PyObject *_wrap_new_GenHammingComputerM8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12414  PyObject *resultobj = 0;
12415  uint8_t *arg1 = (uint8_t *) 0 ;
12416  int arg2 ;
12417  void *argp1 = 0 ;
12418  int res1 = 0 ;
12419  int val2 ;
12420  int ecode2 = 0 ;
12421  PyObject * obj0 = 0 ;
12422  PyObject * obj1 = 0 ;
12423  faiss::GenHammingComputerM8 *result = 0 ;
12424 
12425  if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputerM8",&obj0,&obj1)) SWIG_fail;
12426  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
12427  if (!SWIG_IsOK(res1)) {
12428  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputerM8" "', argument " "1"" of type '" "uint8_t const *""'");
12429  }
12430  arg1 = reinterpret_cast< uint8_t * >(argp1);
12431  ecode2 = SWIG_AsVal_int(obj1, &val2);
12432  if (!SWIG_IsOK(ecode2)) {
12433  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputerM8" "', argument " "2"" of type '" "int""'");
12434  }
12435  arg2 = static_cast< int >(val2);
12436  {
12437  Py_BEGIN_ALLOW_THREADS
12438  try {
12439  result = (faiss::GenHammingComputerM8 *)new faiss::GenHammingComputerM8((uint8_t const *)arg1,arg2);
12440  } catch(faiss::FaissException & e) {
12441  PyEval_RestoreThread(_save);
12442  PyErr_SetString(PyExc_RuntimeError, e.what());
12443  SWIG_fail;
12444  }
12445  Py_END_ALLOW_THREADS
12446  }
12447  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_POINTER_NEW | 0 );
12448  return resultobj;
12449 fail:
12450  return NULL;
12451 }
12452 
12453 
12454 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12455  PyObject *resultobj = 0;
12457  uint8_t *arg2 = (uint8_t *) 0 ;
12458  void *argp1 = 0 ;
12459  int res1 = 0 ;
12460  void *argp2 = 0 ;
12461  int res2 = 0 ;
12462  PyObject * obj0 = 0 ;
12463  PyObject * obj1 = 0 ;
12464  int result;
12465 
12466  if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputerM8_hamming",&obj0,&obj1)) SWIG_fail;
12467  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12468  if (!SWIG_IsOK(res1)) {
12469  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 const *""'");
12470  }
12471  arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12472  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12473  if (!SWIG_IsOK(res2)) {
12474  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputerM8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
12475  }
12476  arg2 = reinterpret_cast< uint8_t * >(argp2);
12477  {
12478  Py_BEGIN_ALLOW_THREADS
12479  try {
12480  result = (int)((faiss::GenHammingComputerM8 const *)arg1)->hamming((uint8_t const *)arg2);
12481  } catch(faiss::FaissException & e) {
12482  PyEval_RestoreThread(_save);
12483  PyErr_SetString(PyExc_RuntimeError, e.what());
12484  SWIG_fail;
12485  }
12486  Py_END_ALLOW_THREADS
12487  }
12488  resultobj = SWIG_From_int(static_cast< int >(result));
12489  return resultobj;
12490 fail:
12491  return NULL;
12492 }
12493 
12494 
12495 SWIGINTERN PyObject *_wrap_delete_GenHammingComputerM8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12496  PyObject *resultobj = 0;
12498  void *argp1 = 0 ;
12499  int res1 = 0 ;
12500  PyObject * obj0 = 0 ;
12501 
12502  if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputerM8",&obj0)) SWIG_fail;
12503  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_POINTER_DISOWN | 0 );
12504  if (!SWIG_IsOK(res1)) {
12505  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputerM8" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12506  }
12507  arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12508  delete arg1;
12509  resultobj = SWIG_Py_Void();
12510  return resultobj;
12511 fail:
12512  return NULL;
12513 }
12514 
12515 
12516 SWIGINTERN PyObject *GenHammingComputerM8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12517  PyObject *obj;
12518  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
12519  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_NewClientData(obj));
12520  return SWIG_Py_Void();
12521 }
12522 
12523 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12524  PyObject *resultobj = 0;
12526  uint8_t *arg2 = (uint8_t *) 0 ;
12527  uint8_t *arg3 = (uint8_t *) 0 ;
12528  size_t arg4 ;
12529  size_t arg5 ;
12530  int arg6 ;
12531  void *argp1 = 0 ;
12532  int res1 = 0 ;
12533  void *argp2 = 0 ;
12534  int res2 = 0 ;
12535  void *argp3 = 0 ;
12536  int res3 = 0 ;
12537  size_t val4 ;
12538  int ecode4 = 0 ;
12539  size_t val5 ;
12540  int ecode5 = 0 ;
12541  int val6 ;
12542  int ecode6 = 0 ;
12543  PyObject * obj0 = 0 ;
12544  PyObject * obj1 = 0 ;
12545  PyObject * obj2 = 0 ;
12546  PyObject * obj3 = 0 ;
12547  PyObject * obj4 = 0 ;
12548  PyObject * obj5 = 0 ;
12549 
12550  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:generalized_hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
12551  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
12552  if (!SWIG_IsOK(res1)) {
12553  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generalized_hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
12554  }
12555  arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
12556  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12557  if (!SWIG_IsOK(res2)) {
12558  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "generalized_hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
12559  }
12560  arg2 = reinterpret_cast< uint8_t * >(argp2);
12561  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
12562  if (!SWIG_IsOK(res3)) {
12563  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "generalized_hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
12564  }
12565  arg3 = reinterpret_cast< uint8_t * >(argp3);
12566  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
12567  if (!SWIG_IsOK(ecode4)) {
12568  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "generalized_hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
12569  }
12570  arg4 = static_cast< size_t >(val4);
12571  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
12572  if (!SWIG_IsOK(ecode5)) {
12573  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "generalized_hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
12574  }
12575  arg5 = static_cast< size_t >(val5);
12576  ecode6 = SWIG_AsVal_int(obj5, &val6);
12577  if (!SWIG_IsOK(ecode6)) {
12578  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "generalized_hammings_knn_hc" "', argument " "6"" of type '" "int""'");
12579  }
12580  arg6 = static_cast< int >(val6);
12581  {
12582  Py_BEGIN_ALLOW_THREADS
12583  try {
12584  faiss::generalized_hammings_knn_hc(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5,arg6);
12585  } catch(faiss::FaissException & e) {
12586  PyEval_RestoreThread(_save);
12587  PyErr_SetString(PyExc_RuntimeError, e.what());
12588  SWIG_fail;
12589  }
12590  Py_END_ALLOW_THREADS
12591  }
12592  resultobj = SWIG_Py_Void();
12593  return resultobj;
12594 fail:
12595  return NULL;
12596 }
12597 
12598 
12599 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12600  PyObject *resultobj = 0;
12602  uint8_t *arg2 = (uint8_t *) 0 ;
12603  uint8_t *arg3 = (uint8_t *) 0 ;
12604  size_t arg4 ;
12605  size_t arg5 ;
12606  void *argp1 = 0 ;
12607  int res1 = 0 ;
12608  void *argp2 = 0 ;
12609  int res2 = 0 ;
12610  void *argp3 = 0 ;
12611  int res3 = 0 ;
12612  size_t val4 ;
12613  int ecode4 = 0 ;
12614  size_t val5 ;
12615  int ecode5 = 0 ;
12616  PyObject * obj0 = 0 ;
12617  PyObject * obj1 = 0 ;
12618  PyObject * obj2 = 0 ;
12619  PyObject * obj3 = 0 ;
12620  PyObject * obj4 = 0 ;
12621 
12622  if (!PyArg_ParseTuple(args,(char *)"OOOOO:generalized_hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
12623  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
12624  if (!SWIG_IsOK(res1)) {
12625  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generalized_hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
12626  }
12627  arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
12628  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12629  if (!SWIG_IsOK(res2)) {
12630  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "generalized_hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
12631  }
12632  arg2 = reinterpret_cast< uint8_t * >(argp2);
12633  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
12634  if (!SWIG_IsOK(res3)) {
12635  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "generalized_hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
12636  }
12637  arg3 = reinterpret_cast< uint8_t * >(argp3);
12638  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
12639  if (!SWIG_IsOK(ecode4)) {
12640  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "generalized_hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
12641  }
12642  arg4 = static_cast< size_t >(val4);
12643  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
12644  if (!SWIG_IsOK(ecode5)) {
12645  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "generalized_hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
12646  }
12647  arg5 = static_cast< size_t >(val5);
12648  {
12649  Py_BEGIN_ALLOW_THREADS
12650  try {
12651  faiss::generalized_hammings_knn_hc(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5);
12652  } catch(faiss::FaissException & e) {
12653  PyEval_RestoreThread(_save);
12654  PyErr_SetString(PyExc_RuntimeError, e.what());
12655  SWIG_fail;
12656  }
12657  Py_END_ALLOW_THREADS
12658  }
12659  resultobj = SWIG_Py_Void();
12660  return resultobj;
12661 fail:
12662  return NULL;
12663 }
12664 
12665 
12666 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc(PyObject *self, PyObject *args) {
12667  Py_ssize_t argc;
12668  PyObject *argv[7] = {
12669  0
12670  };
12671  Py_ssize_t ii;
12672 
12673  if (!PyTuple_Check(args)) SWIG_fail;
12674  argc = args ? PyObject_Length(args) : 0;
12675  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
12676  argv[ii] = PyTuple_GET_ITEM(args,ii);
12677  }
12678  if (argc == 5) {
12679  int _v;
12680  void *vptr = 0;
12681  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
12682  _v = SWIG_CheckState(res);
12683  if (_v) {
12684  void *vptr = 0;
12685  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
12686  _v = SWIG_CheckState(res);
12687  if (_v) {
12688  void *vptr = 0;
12689  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
12690  _v = SWIG_CheckState(res);
12691  if (_v) {
12692  {
12693  int res = SWIG_AsVal_size_t(argv[3], NULL);
12694  _v = SWIG_CheckState(res);
12695  }
12696  if (_v) {
12697  {
12698  int res = SWIG_AsVal_size_t(argv[4], NULL);
12699  _v = SWIG_CheckState(res);
12700  }
12701  if (_v) {
12702  return _wrap_generalized_hammings_knn_hc__SWIG_1(self, args);
12703  }
12704  }
12705  }
12706  }
12707  }
12708  }
12709  if (argc == 6) {
12710  int _v;
12711  void *vptr = 0;
12712  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
12713  _v = SWIG_CheckState(res);
12714  if (_v) {
12715  void *vptr = 0;
12716  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
12717  _v = SWIG_CheckState(res);
12718  if (_v) {
12719  void *vptr = 0;
12720  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
12721  _v = SWIG_CheckState(res);
12722  if (_v) {
12723  {
12724  int res = SWIG_AsVal_size_t(argv[3], NULL);
12725  _v = SWIG_CheckState(res);
12726  }
12727  if (_v) {
12728  {
12729  int res = SWIG_AsVal_size_t(argv[4], NULL);
12730  _v = SWIG_CheckState(res);
12731  }
12732  if (_v) {
12733  {
12734  int res = SWIG_AsVal_int(argv[5], NULL);
12735  _v = SWIG_CheckState(res);
12736  }
12737  if (_v) {
12738  return _wrap_generalized_hammings_knn_hc__SWIG_0(self, args);
12739  }
12740  }
12741  }
12742  }
12743  }
12744  }
12745  }
12746 
12747 fail:
12748  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'generalized_hammings_knn_hc'.\n"
12749  " Possible C/C++ prototypes are:\n"
12750  " faiss::generalized_hammings_knn_hc(faiss::int_maxheap_array_t *,uint8_t const *,uint8_t const *,size_t,size_t,int)\n"
12751  " faiss::generalized_hammings_knn_hc(faiss::int_maxheap_array_t *,uint8_t const *,uint8_t const *,size_t,size_t)\n");
12752  return 0;
12753 }
12754 
12755 
12756 SWIGINTERN PyObject *_wrap_get_num_gpus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12757  PyObject *resultobj = 0;
12758  int result;
12759 
12760  if (!PyArg_ParseTuple(args,(char *)":get_num_gpus")) SWIG_fail;
12761  {
12762  Py_BEGIN_ALLOW_THREADS
12763  try {
12764  result = (int)get_num_gpus();
12765  } catch(faiss::FaissException & e) {
12766  PyEval_RestoreThread(_save);
12767  PyErr_SetString(PyExc_RuntimeError, e.what());
12768  SWIG_fail;
12769  }
12770  Py_END_ALLOW_THREADS
12771  }
12772  resultobj = SWIG_From_int(static_cast< int >(result));
12773  return resultobj;
12774 fail:
12775  return NULL;
12776 }
12777 
12778 
12779 SWIGINTERN PyObject *_wrap_delete_GpuResources(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12780  PyObject *resultobj = 0;
12782  void *argp1 = 0 ;
12783  int res1 = 0 ;
12784  PyObject * obj0 = 0 ;
12785 
12786  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuResources",&obj0)) SWIG_fail;
12787  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, SWIG_POINTER_DISOWN | 0 );
12788  if (!SWIG_IsOK(res1)) {
12789  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuResources" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
12790  }
12791  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
12792  {
12793  Py_BEGIN_ALLOW_THREADS
12794  try {
12795  delete arg1;
12796  } catch(faiss::FaissException & e) {
12797  PyEval_RestoreThread(_save);
12798  PyErr_SetString(PyExc_RuntimeError, e.what());
12799  SWIG_fail;
12800  }
12801  Py_END_ALLOW_THREADS
12802  }
12803  resultobj = SWIG_Py_Void();
12804  return resultobj;
12805 fail:
12806  return NULL;
12807 }
12808 
12809 
12810 SWIGINTERN PyObject *_wrap_GpuResources_initializeForDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12811  PyObject *resultobj = 0;
12813  int arg2 ;
12814  void *argp1 = 0 ;
12815  int res1 = 0 ;
12816  int val2 ;
12817  int ecode2 = 0 ;
12818  PyObject * obj0 = 0 ;
12819  PyObject * obj1 = 0 ;
12820 
12821  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResources_initializeForDevice",&obj0,&obj1)) SWIG_fail;
12822  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
12823  if (!SWIG_IsOK(res1)) {
12824  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_initializeForDevice" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
12825  }
12826  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
12827  ecode2 = SWIG_AsVal_int(obj1, &val2);
12828  if (!SWIG_IsOK(ecode2)) {
12829  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResources_initializeForDevice" "', argument " "2"" of type '" "int""'");
12830  }
12831  arg2 = static_cast< int >(val2);
12832  {
12833  Py_BEGIN_ALLOW_THREADS
12834  try {
12835  (arg1)->initializeForDevice(arg2);
12836  } catch(faiss::FaissException & e) {
12837  PyEval_RestoreThread(_save);
12838  PyErr_SetString(PyExc_RuntimeError, e.what());
12839  SWIG_fail;
12840  }
12841  Py_END_ALLOW_THREADS
12842  }
12843  resultobj = SWIG_Py_Void();
12844  return resultobj;
12845 fail:
12846  return NULL;
12847 }
12848 
12849 
12850 SWIGINTERN PyObject *_wrap_GpuResources_getBlasHandle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12851  PyObject *resultobj = 0;
12853  int arg2 ;
12854  void *argp1 = 0 ;
12855  int res1 = 0 ;
12856  int val2 ;
12857  int ecode2 = 0 ;
12858  PyObject * obj0 = 0 ;
12859  PyObject * obj1 = 0 ;
12860  cublasHandle_t result;
12861 
12862  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResources_getBlasHandle",&obj0,&obj1)) SWIG_fail;
12863  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
12864  if (!SWIG_IsOK(res1)) {
12865  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getBlasHandle" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
12866  }
12867  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
12868  ecode2 = SWIG_AsVal_int(obj1, &val2);
12869  if (!SWIG_IsOK(ecode2)) {
12870  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResources_getBlasHandle" "', argument " "2"" of type '" "int""'");
12871  }
12872  arg2 = static_cast< int >(val2);
12873  {
12874  Py_BEGIN_ALLOW_THREADS
12875  try {
12876  result = (arg1)->getBlasHandle(arg2);
12877  } catch(faiss::FaissException & e) {
12878  PyEval_RestoreThread(_save);
12879  PyErr_SetString(PyExc_RuntimeError, e.what());
12880  SWIG_fail;
12881  }
12882  Py_END_ALLOW_THREADS
12883  }
12884  resultobj = SWIG_NewPointerObj((new cublasHandle_t(static_cast< const cublasHandle_t& >(result))), SWIGTYPE_p_cublasHandle_t, SWIG_POINTER_OWN | 0 );
12885  return resultobj;
12886 fail:
12887  return NULL;
12888 }
12889 
12890 
12891 SWIGINTERN PyObject *_wrap_GpuResources_getDefaultStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12892  PyObject *resultobj = 0;
12894  int arg2 ;
12895  void *argp1 = 0 ;
12896  int res1 = 0 ;
12897  int val2 ;
12898  int ecode2 = 0 ;
12899  PyObject * obj0 = 0 ;
12900  PyObject * obj1 = 0 ;
12901  cudaStream_t result;
12902 
12903  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResources_getDefaultStream",&obj0,&obj1)) SWIG_fail;
12904  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
12905  if (!SWIG_IsOK(res1)) {
12906  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getDefaultStream" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
12907  }
12908  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
12909  ecode2 = SWIG_AsVal_int(obj1, &val2);
12910  if (!SWIG_IsOK(ecode2)) {
12911  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResources_getDefaultStream" "', argument " "2"" of type '" "int""'");
12912  }
12913  arg2 = static_cast< int >(val2);
12914  {
12915  Py_BEGIN_ALLOW_THREADS
12916  try {
12917  result = (arg1)->getDefaultStream(arg2);
12918  } catch(faiss::FaissException & e) {
12919  PyEval_RestoreThread(_save);
12920  PyErr_SetString(PyExc_RuntimeError, e.what());
12921  SWIG_fail;
12922  }
12923  Py_END_ALLOW_THREADS
12924  }
12925  resultobj = SWIG_NewPointerObj((new cudaStream_t(static_cast< const cudaStream_t& >(result))), SWIGTYPE_p_cudaStream_t, SWIG_POINTER_OWN | 0 );
12926  return resultobj;
12927 fail:
12928  return NULL;
12929 }
12930 
12931 
12932 SWIGINTERN PyObject *_wrap_GpuResources_getAlternateStreams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12933  PyObject *resultobj = 0;
12935  int arg2 ;
12936  void *argp1 = 0 ;
12937  int res1 = 0 ;
12938  int val2 ;
12939  int ecode2 = 0 ;
12940  PyObject * obj0 = 0 ;
12941  PyObject * obj1 = 0 ;
12942  SwigValueWrapper< std::vector< cudaStream_t > > result;
12943 
12944  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResources_getAlternateStreams",&obj0,&obj1)) SWIG_fail;
12945  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
12946  if (!SWIG_IsOK(res1)) {
12947  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getAlternateStreams" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
12948  }
12949  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
12950  ecode2 = SWIG_AsVal_int(obj1, &val2);
12951  if (!SWIG_IsOK(ecode2)) {
12952  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResources_getAlternateStreams" "', argument " "2"" of type '" "int""'");
12953  }
12954  arg2 = static_cast< int >(val2);
12955  {
12956  Py_BEGIN_ALLOW_THREADS
12957  try {
12958  result = (arg1)->getAlternateStreams(arg2);
12959  } catch(faiss::FaissException & e) {
12960  PyEval_RestoreThread(_save);
12961  PyErr_SetString(PyExc_RuntimeError, e.what());
12962  SWIG_fail;
12963  }
12964  Py_END_ALLOW_THREADS
12965  }
12966  resultobj = SWIG_NewPointerObj((new std::vector< cudaStream_t >(static_cast< const std::vector< cudaStream_t >& >(result))), SWIGTYPE_p_std__vectorT_cudaStream_t_t, SWIG_POINTER_OWN | 0 );
12967  return resultobj;
12968 fail:
12969  return NULL;
12970 }
12971 
12972 
12973 SWIGINTERN PyObject *_wrap_GpuResources_getPinnedMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12974  PyObject *resultobj = 0;
12976  void *argp1 = 0 ;
12977  int res1 = 0 ;
12978  PyObject * obj0 = 0 ;
12979  std::pair< void *,size_t > result;
12980 
12981  if (!PyArg_ParseTuple(args,(char *)"O:GpuResources_getPinnedMemory",&obj0)) SWIG_fail;
12982  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
12983  if (!SWIG_IsOK(res1)) {
12984  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getPinnedMemory" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
12985  }
12986  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
12987  {
12988  Py_BEGIN_ALLOW_THREADS
12989  try {
12990  result = (arg1)->getPinnedMemory();
12991  } catch(faiss::FaissException & e) {
12992  PyEval_RestoreThread(_save);
12993  PyErr_SetString(PyExc_RuntimeError, e.what());
12994  SWIG_fail;
12995  }
12996  Py_END_ALLOW_THREADS
12997  }
12998  resultobj = SWIG_NewPointerObj((new std::pair< void *,size_t >(static_cast< const std::pair< void *,size_t >& >(result))), SWIGTYPE_p_std__pairT_void_p_unsigned_long_t, SWIG_POINTER_OWN | 0 );
12999  return resultobj;
13000 fail:
13001  return NULL;
13002 }
13003 
13004 
13005 SWIGINTERN PyObject *_wrap_GpuResources_getAsyncCopyStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13006  PyObject *resultobj = 0;
13008  int arg2 ;
13009  void *argp1 = 0 ;
13010  int res1 = 0 ;
13011  int val2 ;
13012  int ecode2 = 0 ;
13013  PyObject * obj0 = 0 ;
13014  PyObject * obj1 = 0 ;
13015  cudaStream_t result;
13016 
13017  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResources_getAsyncCopyStream",&obj0,&obj1)) SWIG_fail;
13018  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
13019  if (!SWIG_IsOK(res1)) {
13020  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getAsyncCopyStream" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
13021  }
13022  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
13023  ecode2 = SWIG_AsVal_int(obj1, &val2);
13024  if (!SWIG_IsOK(ecode2)) {
13025  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResources_getAsyncCopyStream" "', argument " "2"" of type '" "int""'");
13026  }
13027  arg2 = static_cast< int >(val2);
13028  {
13029  Py_BEGIN_ALLOW_THREADS
13030  try {
13031  result = (arg1)->getAsyncCopyStream(arg2);
13032  } catch(faiss::FaissException & e) {
13033  PyEval_RestoreThread(_save);
13034  PyErr_SetString(PyExc_RuntimeError, e.what());
13035  SWIG_fail;
13036  }
13037  Py_END_ALLOW_THREADS
13038  }
13039  resultobj = SWIG_NewPointerObj((new cudaStream_t(static_cast< const cudaStream_t& >(result))), SWIGTYPE_p_cudaStream_t, SWIG_POINTER_OWN | 0 );
13040  return resultobj;
13041 fail:
13042  return NULL;
13043 }
13044 
13045 
13046 SWIGINTERN PyObject *_wrap_GpuResources_getBlasHandleCurrentDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13047  PyObject *resultobj = 0;
13049  void *argp1 = 0 ;
13050  int res1 = 0 ;
13051  PyObject * obj0 = 0 ;
13052  cublasHandle_t result;
13053 
13054  if (!PyArg_ParseTuple(args,(char *)"O:GpuResources_getBlasHandleCurrentDevice",&obj0)) SWIG_fail;
13055  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
13056  if (!SWIG_IsOK(res1)) {
13057  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getBlasHandleCurrentDevice" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
13058  }
13059  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
13060  {
13061  Py_BEGIN_ALLOW_THREADS
13062  try {
13063  result = (arg1)->getBlasHandleCurrentDevice();
13064  } catch(faiss::FaissException & e) {
13065  PyEval_RestoreThread(_save);
13066  PyErr_SetString(PyExc_RuntimeError, e.what());
13067  SWIG_fail;
13068  }
13069  Py_END_ALLOW_THREADS
13070  }
13071  resultobj = SWIG_NewPointerObj((new cublasHandle_t(static_cast< const cublasHandle_t& >(result))), SWIGTYPE_p_cublasHandle_t, SWIG_POINTER_OWN | 0 );
13072  return resultobj;
13073 fail:
13074  return NULL;
13075 }
13076 
13077 
13078 SWIGINTERN PyObject *_wrap_GpuResources_getDefaultStreamCurrentDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13079  PyObject *resultobj = 0;
13081  void *argp1 = 0 ;
13082  int res1 = 0 ;
13083  PyObject * obj0 = 0 ;
13084  cudaStream_t result;
13085 
13086  if (!PyArg_ParseTuple(args,(char *)"O:GpuResources_getDefaultStreamCurrentDevice",&obj0)) SWIG_fail;
13087  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
13088  if (!SWIG_IsOK(res1)) {
13089  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getDefaultStreamCurrentDevice" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
13090  }
13091  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
13092  {
13093  Py_BEGIN_ALLOW_THREADS
13094  try {
13095  result = (arg1)->getDefaultStreamCurrentDevice();
13096  } catch(faiss::FaissException & e) {
13097  PyEval_RestoreThread(_save);
13098  PyErr_SetString(PyExc_RuntimeError, e.what());
13099  SWIG_fail;
13100  }
13101  Py_END_ALLOW_THREADS
13102  }
13103  resultobj = SWIG_NewPointerObj((new cudaStream_t(static_cast< const cudaStream_t& >(result))), SWIGTYPE_p_cudaStream_t, SWIG_POINTER_OWN | 0 );
13104  return resultobj;
13105 fail:
13106  return NULL;
13107 }
13108 
13109 
13110 SWIGINTERN PyObject *_wrap_GpuResources_syncDefaultStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13111  PyObject *resultobj = 0;
13113  int arg2 ;
13114  void *argp1 = 0 ;
13115  int res1 = 0 ;
13116  int val2 ;
13117  int ecode2 = 0 ;
13118  PyObject * obj0 = 0 ;
13119  PyObject * obj1 = 0 ;
13120 
13121  if (!PyArg_ParseTuple(args,(char *)"OO:GpuResources_syncDefaultStream",&obj0,&obj1)) SWIG_fail;
13122  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
13123  if (!SWIG_IsOK(res1)) {
13124  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_syncDefaultStream" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
13125  }
13126  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
13127  ecode2 = SWIG_AsVal_int(obj1, &val2);
13128  if (!SWIG_IsOK(ecode2)) {
13129  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuResources_syncDefaultStream" "', argument " "2"" of type '" "int""'");
13130  }
13131  arg2 = static_cast< int >(val2);
13132  {
13133  Py_BEGIN_ALLOW_THREADS
13134  try {
13135  (arg1)->syncDefaultStream(arg2);
13136  } catch(faiss::FaissException & e) {
13137  PyEval_RestoreThread(_save);
13138  PyErr_SetString(PyExc_RuntimeError, e.what());
13139  SWIG_fail;
13140  }
13141  Py_END_ALLOW_THREADS
13142  }
13143  resultobj = SWIG_Py_Void();
13144  return resultobj;
13145 fail:
13146  return NULL;
13147 }
13148 
13149 
13150 SWIGINTERN PyObject *_wrap_GpuResources_syncDefaultStreamCurrentDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13151  PyObject *resultobj = 0;
13153  void *argp1 = 0 ;
13154  int res1 = 0 ;
13155  PyObject * obj0 = 0 ;
13156 
13157  if (!PyArg_ParseTuple(args,(char *)"O:GpuResources_syncDefaultStreamCurrentDevice",&obj0)) SWIG_fail;
13158  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
13159  if (!SWIG_IsOK(res1)) {
13160  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_syncDefaultStreamCurrentDevice" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
13161  }
13162  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
13163  {
13164  Py_BEGIN_ALLOW_THREADS
13165  try {
13166  (arg1)->syncDefaultStreamCurrentDevice();
13167  } catch(faiss::FaissException & e) {
13168  PyEval_RestoreThread(_save);
13169  PyErr_SetString(PyExc_RuntimeError, e.what());
13170  SWIG_fail;
13171  }
13172  Py_END_ALLOW_THREADS
13173  }
13174  resultobj = SWIG_Py_Void();
13175  return resultobj;
13176 fail:
13177  return NULL;
13178 }
13179 
13180 
13181 SWIGINTERN PyObject *_wrap_GpuResources_getAlternateStreamsCurrentDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13182  PyObject *resultobj = 0;
13184  void *argp1 = 0 ;
13185  int res1 = 0 ;
13186  PyObject * obj0 = 0 ;
13187  SwigValueWrapper< std::vector< cudaStream_t > > result;
13188 
13189  if (!PyArg_ParseTuple(args,(char *)"O:GpuResources_getAlternateStreamsCurrentDevice",&obj0)) SWIG_fail;
13190  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
13191  if (!SWIG_IsOK(res1)) {
13192  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getAlternateStreamsCurrentDevice" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
13193  }
13194  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
13195  {
13196  Py_BEGIN_ALLOW_THREADS
13197  try {
13198  result = (arg1)->getAlternateStreamsCurrentDevice();
13199  } catch(faiss::FaissException & e) {
13200  PyEval_RestoreThread(_save);
13201  PyErr_SetString(PyExc_RuntimeError, e.what());
13202  SWIG_fail;
13203  }
13204  Py_END_ALLOW_THREADS
13205  }
13206  resultobj = SWIG_NewPointerObj((new std::vector< cudaStream_t >(static_cast< const std::vector< cudaStream_t >& >(result))), SWIGTYPE_p_std__vectorT_cudaStream_t_t, SWIG_POINTER_OWN | 0 );
13207  return resultobj;
13208 fail:
13209  return NULL;
13210 }
13211 
13212 
13213 SWIGINTERN PyObject *_wrap_GpuResources_getAsyncCopyStreamCurrentDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13214  PyObject *resultobj = 0;
13216  void *argp1 = 0 ;
13217  int res1 = 0 ;
13218  PyObject * obj0 = 0 ;
13219  cudaStream_t result;
13220 
13221  if (!PyArg_ParseTuple(args,(char *)"O:GpuResources_getAsyncCopyStreamCurrentDevice",&obj0)) SWIG_fail;
13222  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
13223  if (!SWIG_IsOK(res1)) {
13224  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuResources_getAsyncCopyStreamCurrentDevice" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
13225  }
13226  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
13227  {
13228  Py_BEGIN_ALLOW_THREADS
13229  try {
13230  result = (arg1)->getAsyncCopyStreamCurrentDevice();
13231  } catch(faiss::FaissException & e) {
13232  PyEval_RestoreThread(_save);
13233  PyErr_SetString(PyExc_RuntimeError, e.what());
13234  SWIG_fail;
13235  }
13236  Py_END_ALLOW_THREADS
13237  }
13238  resultobj = SWIG_NewPointerObj((new cudaStream_t(static_cast< const cudaStream_t& >(result))), SWIGTYPE_p_cudaStream_t, SWIG_POINTER_OWN | 0 );
13239  return resultobj;
13240 fail:
13241  return NULL;
13242 }
13243 
13244 
13245 SWIGINTERN PyObject *GpuResources_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13246  PyObject *obj;
13247  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
13248  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuResources, SWIG_NewClientData(obj));
13249  return SWIG_Py_Void();
13250 }
13251 
13252 SWIGINTERN PyObject *_wrap_new_StandardGpuResources(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13253  PyObject *resultobj = 0;
13254  faiss::gpu::StandardGpuResources *result = 0 ;
13255 
13256  if (!PyArg_ParseTuple(args,(char *)":new_StandardGpuResources")) SWIG_fail;
13257  {
13258  Py_BEGIN_ALLOW_THREADS
13259  try {
13261  } catch(faiss::FaissException & e) {
13262  PyEval_RestoreThread(_save);
13263  PyErr_SetString(PyExc_RuntimeError, e.what());
13264  SWIG_fail;
13265  }
13266  Py_END_ALLOW_THREADS
13267  }
13268  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__StandardGpuResources, SWIG_POINTER_NEW | 0 );
13269  return resultobj;
13270 fail:
13271  return NULL;
13272 }
13273 
13274 
13275 SWIGINTERN PyObject *_wrap_delete_StandardGpuResources(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13276  PyObject *resultobj = 0;
13278  void *argp1 = 0 ;
13279  int res1 = 0 ;
13280  PyObject * obj0 = 0 ;
13281 
13282  if (!PyArg_ParseTuple(args,(char *)"O:delete_StandardGpuResources",&obj0)) SWIG_fail;
13283  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, SWIG_POINTER_DISOWN | 0 );
13284  if (!SWIG_IsOK(res1)) {
13285  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StandardGpuResources" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13286  }
13287  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13288  {
13289  Py_BEGIN_ALLOW_THREADS
13290  try {
13291  delete arg1;
13292  } catch(faiss::FaissException & e) {
13293  PyEval_RestoreThread(_save);
13294  PyErr_SetString(PyExc_RuntimeError, e.what());
13295  SWIG_fail;
13296  }
13297  Py_END_ALLOW_THREADS
13298  }
13299  resultobj = SWIG_Py_Void();
13300  return resultobj;
13301 fail:
13302  return NULL;
13303 }
13304 
13305 
13306 SWIGINTERN PyObject *_wrap_StandardGpuResources_noTempMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13307  PyObject *resultobj = 0;
13309  void *argp1 = 0 ;
13310  int res1 = 0 ;
13311  PyObject * obj0 = 0 ;
13312 
13313  if (!PyArg_ParseTuple(args,(char *)"O:StandardGpuResources_noTempMemory",&obj0)) SWIG_fail;
13314  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13315  if (!SWIG_IsOK(res1)) {
13316  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_noTempMemory" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13317  }
13318  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13319  {
13320  Py_BEGIN_ALLOW_THREADS
13321  try {
13322  (arg1)->noTempMemory();
13323  } catch(faiss::FaissException & e) {
13324  PyEval_RestoreThread(_save);
13325  PyErr_SetString(PyExc_RuntimeError, e.what());
13326  SWIG_fail;
13327  }
13328  Py_END_ALLOW_THREADS
13329  }
13330  resultobj = SWIG_Py_Void();
13331  return resultobj;
13332 fail:
13333  return NULL;
13334 }
13335 
13336 
13337 SWIGINTERN PyObject *_wrap_StandardGpuResources_setTempMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13338  PyObject *resultobj = 0;
13340  size_t arg2 ;
13341  void *argp1 = 0 ;
13342  int res1 = 0 ;
13343  size_t val2 ;
13344  int ecode2 = 0 ;
13345  PyObject * obj0 = 0 ;
13346  PyObject * obj1 = 0 ;
13347 
13348  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_setTempMemory",&obj0,&obj1)) SWIG_fail;
13349  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13350  if (!SWIG_IsOK(res1)) {
13351  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_setTempMemory" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13352  }
13353  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13354  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13355  if (!SWIG_IsOK(ecode2)) {
13356  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_setTempMemory" "', argument " "2"" of type '" "size_t""'");
13357  }
13358  arg2 = static_cast< size_t >(val2);
13359  {
13360  Py_BEGIN_ALLOW_THREADS
13361  try {
13362  (arg1)->setTempMemory(arg2);
13363  } catch(faiss::FaissException & e) {
13364  PyEval_RestoreThread(_save);
13365  PyErr_SetString(PyExc_RuntimeError, e.what());
13366  SWIG_fail;
13367  }
13368  Py_END_ALLOW_THREADS
13369  }
13370  resultobj = SWIG_Py_Void();
13371  return resultobj;
13372 fail:
13373  return NULL;
13374 }
13375 
13376 
13377 SWIGINTERN PyObject *_wrap_StandardGpuResources_setTempMemoryFraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13378  PyObject *resultobj = 0;
13380  float arg2 ;
13381  void *argp1 = 0 ;
13382  int res1 = 0 ;
13383  float val2 ;
13384  int ecode2 = 0 ;
13385  PyObject * obj0 = 0 ;
13386  PyObject * obj1 = 0 ;
13387 
13388  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_setTempMemoryFraction",&obj0,&obj1)) SWIG_fail;
13389  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13390  if (!SWIG_IsOK(res1)) {
13391  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_setTempMemoryFraction" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13392  }
13393  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13394  ecode2 = SWIG_AsVal_float(obj1, &val2);
13395  if (!SWIG_IsOK(ecode2)) {
13396  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_setTempMemoryFraction" "', argument " "2"" of type '" "float""'");
13397  }
13398  arg2 = static_cast< float >(val2);
13399  {
13400  Py_BEGIN_ALLOW_THREADS
13401  try {
13402  (arg1)->setTempMemoryFraction(arg2);
13403  } catch(faiss::FaissException & e) {
13404  PyEval_RestoreThread(_save);
13405  PyErr_SetString(PyExc_RuntimeError, e.what());
13406  SWIG_fail;
13407  }
13408  Py_END_ALLOW_THREADS
13409  }
13410  resultobj = SWIG_Py_Void();
13411  return resultobj;
13412 fail:
13413  return NULL;
13414 }
13415 
13416 
13417 SWIGINTERN PyObject *_wrap_StandardGpuResources_setPinnedMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13418  PyObject *resultobj = 0;
13420  size_t arg2 ;
13421  void *argp1 = 0 ;
13422  int res1 = 0 ;
13423  size_t val2 ;
13424  int ecode2 = 0 ;
13425  PyObject * obj0 = 0 ;
13426  PyObject * obj1 = 0 ;
13427 
13428  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_setPinnedMemory",&obj0,&obj1)) SWIG_fail;
13429  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13430  if (!SWIG_IsOK(res1)) {
13431  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_setPinnedMemory" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13432  }
13433  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13434  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13435  if (!SWIG_IsOK(ecode2)) {
13436  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_setPinnedMemory" "', argument " "2"" of type '" "size_t""'");
13437  }
13438  arg2 = static_cast< size_t >(val2);
13439  {
13440  Py_BEGIN_ALLOW_THREADS
13441  try {
13442  (arg1)->setPinnedMemory(arg2);
13443  } catch(faiss::FaissException & e) {
13444  PyEval_RestoreThread(_save);
13445  PyErr_SetString(PyExc_RuntimeError, e.what());
13446  SWIG_fail;
13447  }
13448  Py_END_ALLOW_THREADS
13449  }
13450  resultobj = SWIG_Py_Void();
13451  return resultobj;
13452 fail:
13453  return NULL;
13454 }
13455 
13456 
13457 SWIGINTERN PyObject *_wrap_StandardGpuResources_setDefaultStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13458  PyObject *resultobj = 0;
13460  int arg2 ;
13461  cudaStream_t arg3 ;
13462  void *argp1 = 0 ;
13463  int res1 = 0 ;
13464  int val2 ;
13465  int ecode2 = 0 ;
13466  void *argp3 ;
13467  int res3 = 0 ;
13468  PyObject * obj0 = 0 ;
13469  PyObject * obj1 = 0 ;
13470  PyObject * obj2 = 0 ;
13471 
13472  if (!PyArg_ParseTuple(args,(char *)"OOO:StandardGpuResources_setDefaultStream",&obj0,&obj1,&obj2)) SWIG_fail;
13473  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13474  if (!SWIG_IsOK(res1)) {
13475  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_setDefaultStream" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13476  }
13477  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13478  ecode2 = SWIG_AsVal_int(obj1, &val2);
13479  if (!SWIG_IsOK(ecode2)) {
13480  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_setDefaultStream" "', argument " "2"" of type '" "int""'");
13481  }
13482  arg2 = static_cast< int >(val2);
13483  {
13484  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_cudaStream_t, 0 | 0);
13485  if (!SWIG_IsOK(res3)) {
13486  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StandardGpuResources_setDefaultStream" "', argument " "3"" of type '" "cudaStream_t""'");
13487  }
13488  if (!argp3) {
13489  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StandardGpuResources_setDefaultStream" "', argument " "3"" of type '" "cudaStream_t""'");
13490  } else {
13491  cudaStream_t * temp = reinterpret_cast< cudaStream_t * >(argp3);
13492  arg3 = *temp;
13493  if (SWIG_IsNewObj(res3)) delete temp;
13494  }
13495  }
13496  {
13497  Py_BEGIN_ALLOW_THREADS
13498  try {
13499  (arg1)->setDefaultStream(arg2,arg3);
13500  } catch(faiss::FaissException & e) {
13501  PyEval_RestoreThread(_save);
13502  PyErr_SetString(PyExc_RuntimeError, e.what());
13503  SWIG_fail;
13504  }
13505  Py_END_ALLOW_THREADS
13506  }
13507  resultobj = SWIG_Py_Void();
13508  return resultobj;
13509 fail:
13510  return NULL;
13511 }
13512 
13513 
13514 SWIGINTERN PyObject *_wrap_StandardGpuResources_setDefaultNullStreamAllDevices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13515  PyObject *resultobj = 0;
13517  void *argp1 = 0 ;
13518  int res1 = 0 ;
13519  PyObject * obj0 = 0 ;
13520 
13521  if (!PyArg_ParseTuple(args,(char *)"O:StandardGpuResources_setDefaultNullStreamAllDevices",&obj0)) SWIG_fail;
13522  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13523  if (!SWIG_IsOK(res1)) {
13524  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_setDefaultNullStreamAllDevices" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13525  }
13526  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13527  {
13528  Py_BEGIN_ALLOW_THREADS
13529  try {
13530  (arg1)->setDefaultNullStreamAllDevices();
13531  } catch(faiss::FaissException & e) {
13532  PyEval_RestoreThread(_save);
13533  PyErr_SetString(PyExc_RuntimeError, e.what());
13534  SWIG_fail;
13535  }
13536  Py_END_ALLOW_THREADS
13537  }
13538  resultobj = SWIG_Py_Void();
13539  return resultobj;
13540 fail:
13541  return NULL;
13542 }
13543 
13544 
13545 SWIGINTERN PyObject *_wrap_StandardGpuResources_setCudaMallocWarning(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13546  PyObject *resultobj = 0;
13548  bool arg2 ;
13549  void *argp1 = 0 ;
13550  int res1 = 0 ;
13551  bool val2 ;
13552  int ecode2 = 0 ;
13553  PyObject * obj0 = 0 ;
13554  PyObject * obj1 = 0 ;
13555 
13556  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_setCudaMallocWarning",&obj0,&obj1)) SWIG_fail;
13557  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13558  if (!SWIG_IsOK(res1)) {
13559  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_setCudaMallocWarning" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13560  }
13561  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13562  ecode2 = SWIG_AsVal_bool(obj1, &val2);
13563  if (!SWIG_IsOK(ecode2)) {
13564  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_setCudaMallocWarning" "', argument " "2"" of type '" "bool""'");
13565  }
13566  arg2 = static_cast< bool >(val2);
13567  {
13568  Py_BEGIN_ALLOW_THREADS
13569  try {
13570  (arg1)->setCudaMallocWarning(arg2);
13571  } catch(faiss::FaissException & e) {
13572  PyEval_RestoreThread(_save);
13573  PyErr_SetString(PyExc_RuntimeError, e.what());
13574  SWIG_fail;
13575  }
13576  Py_END_ALLOW_THREADS
13577  }
13578  resultobj = SWIG_Py_Void();
13579  return resultobj;
13580 fail:
13581  return NULL;
13582 }
13583 
13584 
13585 SWIGINTERN PyObject *_wrap_StandardGpuResources_initializeForDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13586  PyObject *resultobj = 0;
13588  int arg2 ;
13589  void *argp1 = 0 ;
13590  int res1 = 0 ;
13591  int val2 ;
13592  int ecode2 = 0 ;
13593  PyObject * obj0 = 0 ;
13594  PyObject * obj1 = 0 ;
13595 
13596  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_initializeForDevice",&obj0,&obj1)) SWIG_fail;
13597  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13598  if (!SWIG_IsOK(res1)) {
13599  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_initializeForDevice" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13600  }
13601  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13602  ecode2 = SWIG_AsVal_int(obj1, &val2);
13603  if (!SWIG_IsOK(ecode2)) {
13604  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_initializeForDevice" "', argument " "2"" of type '" "int""'");
13605  }
13606  arg2 = static_cast< int >(val2);
13607  {
13608  Py_BEGIN_ALLOW_THREADS
13609  try {
13610  (arg1)->initializeForDevice(arg2);
13611  } catch(faiss::FaissException & e) {
13612  PyEval_RestoreThread(_save);
13613  PyErr_SetString(PyExc_RuntimeError, e.what());
13614  SWIG_fail;
13615  }
13616  Py_END_ALLOW_THREADS
13617  }
13618  resultobj = SWIG_Py_Void();
13619  return resultobj;
13620 fail:
13621  return NULL;
13622 }
13623 
13624 
13625 SWIGINTERN PyObject *_wrap_StandardGpuResources_getBlasHandle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13626  PyObject *resultobj = 0;
13628  int arg2 ;
13629  void *argp1 = 0 ;
13630  int res1 = 0 ;
13631  int val2 ;
13632  int ecode2 = 0 ;
13633  PyObject * obj0 = 0 ;
13634  PyObject * obj1 = 0 ;
13635  cublasHandle_t result;
13636 
13637  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_getBlasHandle",&obj0,&obj1)) SWIG_fail;
13638  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13639  if (!SWIG_IsOK(res1)) {
13640  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_getBlasHandle" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13641  }
13642  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13643  ecode2 = SWIG_AsVal_int(obj1, &val2);
13644  if (!SWIG_IsOK(ecode2)) {
13645  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_getBlasHandle" "', argument " "2"" of type '" "int""'");
13646  }
13647  arg2 = static_cast< int >(val2);
13648  {
13649  Py_BEGIN_ALLOW_THREADS
13650  try {
13651  result = (arg1)->getBlasHandle(arg2);
13652  } catch(faiss::FaissException & e) {
13653  PyEval_RestoreThread(_save);
13654  PyErr_SetString(PyExc_RuntimeError, e.what());
13655  SWIG_fail;
13656  }
13657  Py_END_ALLOW_THREADS
13658  }
13659  resultobj = SWIG_NewPointerObj((new cublasHandle_t(static_cast< const cublasHandle_t& >(result))), SWIGTYPE_p_cublasHandle_t, SWIG_POINTER_OWN | 0 );
13660  return resultobj;
13661 fail:
13662  return NULL;
13663 }
13664 
13665 
13666 SWIGINTERN PyObject *_wrap_StandardGpuResources_getDefaultStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13667  PyObject *resultobj = 0;
13669  int arg2 ;
13670  void *argp1 = 0 ;
13671  int res1 = 0 ;
13672  int val2 ;
13673  int ecode2 = 0 ;
13674  PyObject * obj0 = 0 ;
13675  PyObject * obj1 = 0 ;
13676  cudaStream_t result;
13677 
13678  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_getDefaultStream",&obj0,&obj1)) SWIG_fail;
13679  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13680  if (!SWIG_IsOK(res1)) {
13681  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_getDefaultStream" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13682  }
13683  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13684  ecode2 = SWIG_AsVal_int(obj1, &val2);
13685  if (!SWIG_IsOK(ecode2)) {
13686  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_getDefaultStream" "', argument " "2"" of type '" "int""'");
13687  }
13688  arg2 = static_cast< int >(val2);
13689  {
13690  Py_BEGIN_ALLOW_THREADS
13691  try {
13692  result = (arg1)->getDefaultStream(arg2);
13693  } catch(faiss::FaissException & e) {
13694  PyEval_RestoreThread(_save);
13695  PyErr_SetString(PyExc_RuntimeError, e.what());
13696  SWIG_fail;
13697  }
13698  Py_END_ALLOW_THREADS
13699  }
13700  resultobj = SWIG_NewPointerObj((new cudaStream_t(static_cast< const cudaStream_t& >(result))), SWIGTYPE_p_cudaStream_t, SWIG_POINTER_OWN | 0 );
13701  return resultobj;
13702 fail:
13703  return NULL;
13704 }
13705 
13706 
13707 SWIGINTERN PyObject *_wrap_StandardGpuResources_getAlternateStreams(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13708  PyObject *resultobj = 0;
13710  int arg2 ;
13711  void *argp1 = 0 ;
13712  int res1 = 0 ;
13713  int val2 ;
13714  int ecode2 = 0 ;
13715  PyObject * obj0 = 0 ;
13716  PyObject * obj1 = 0 ;
13717  SwigValueWrapper< std::vector< cudaStream_t > > result;
13718 
13719  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_getAlternateStreams",&obj0,&obj1)) SWIG_fail;
13720  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13721  if (!SWIG_IsOK(res1)) {
13722  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_getAlternateStreams" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13723  }
13724  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13725  ecode2 = SWIG_AsVal_int(obj1, &val2);
13726  if (!SWIG_IsOK(ecode2)) {
13727  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_getAlternateStreams" "', argument " "2"" of type '" "int""'");
13728  }
13729  arg2 = static_cast< int >(val2);
13730  {
13731  Py_BEGIN_ALLOW_THREADS
13732  try {
13733  result = (arg1)->getAlternateStreams(arg2);
13734  } catch(faiss::FaissException & e) {
13735  PyEval_RestoreThread(_save);
13736  PyErr_SetString(PyExc_RuntimeError, e.what());
13737  SWIG_fail;
13738  }
13739  Py_END_ALLOW_THREADS
13740  }
13741  resultobj = SWIG_NewPointerObj((new std::vector< cudaStream_t >(static_cast< const std::vector< cudaStream_t >& >(result))), SWIGTYPE_p_std__vectorT_cudaStream_t_t, SWIG_POINTER_OWN | 0 );
13742  return resultobj;
13743 fail:
13744  return NULL;
13745 }
13746 
13747 
13748 SWIGINTERN PyObject *_wrap_StandardGpuResources_getPinnedMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13749  PyObject *resultobj = 0;
13751  void *argp1 = 0 ;
13752  int res1 = 0 ;
13753  PyObject * obj0 = 0 ;
13754  std::pair< void *,size_t > result;
13755 
13756  if (!PyArg_ParseTuple(args,(char *)"O:StandardGpuResources_getPinnedMemory",&obj0)) SWIG_fail;
13757  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13758  if (!SWIG_IsOK(res1)) {
13759  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_getPinnedMemory" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13760  }
13761  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13762  {
13763  Py_BEGIN_ALLOW_THREADS
13764  try {
13765  result = (arg1)->getPinnedMemory();
13766  } catch(faiss::FaissException & e) {
13767  PyEval_RestoreThread(_save);
13768  PyErr_SetString(PyExc_RuntimeError, e.what());
13769  SWIG_fail;
13770  }
13771  Py_END_ALLOW_THREADS
13772  }
13773  resultobj = SWIG_NewPointerObj((new std::pair< void *,size_t >(static_cast< const std::pair< void *,size_t >& >(result))), SWIGTYPE_p_std__pairT_void_p_unsigned_long_t, SWIG_POINTER_OWN | 0 );
13774  return resultobj;
13775 fail:
13776  return NULL;
13777 }
13778 
13779 
13780 SWIGINTERN PyObject *_wrap_StandardGpuResources_getAsyncCopyStream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13781  PyObject *resultobj = 0;
13783  int arg2 ;
13784  void *argp1 = 0 ;
13785  int res1 = 0 ;
13786  int val2 ;
13787  int ecode2 = 0 ;
13788  PyObject * obj0 = 0 ;
13789  PyObject * obj1 = 0 ;
13790  cudaStream_t result;
13791 
13792  if (!PyArg_ParseTuple(args,(char *)"OO:StandardGpuResources_getAsyncCopyStream",&obj0,&obj1)) SWIG_fail;
13793  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__StandardGpuResources, 0 | 0 );
13794  if (!SWIG_IsOK(res1)) {
13795  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardGpuResources_getAsyncCopyStream" "', argument " "1"" of type '" "faiss::gpu::StandardGpuResources *""'");
13796  }
13797  arg1 = reinterpret_cast< faiss::gpu::StandardGpuResources * >(argp1);
13798  ecode2 = SWIG_AsVal_int(obj1, &val2);
13799  if (!SWIG_IsOK(ecode2)) {
13800  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "StandardGpuResources_getAsyncCopyStream" "', argument " "2"" of type '" "int""'");
13801  }
13802  arg2 = static_cast< int >(val2);
13803  {
13804  Py_BEGIN_ALLOW_THREADS
13805  try {
13806  result = (arg1)->getAsyncCopyStream(arg2);
13807  } catch(faiss::FaissException & e) {
13808  PyEval_RestoreThread(_save);
13809  PyErr_SetString(PyExc_RuntimeError, e.what());
13810  SWIG_fail;
13811  }
13812  Py_END_ALLOW_THREADS
13813  }
13814  resultobj = SWIG_NewPointerObj((new cudaStream_t(static_cast< const cudaStream_t& >(result))), SWIGTYPE_p_cudaStream_t, SWIG_POINTER_OWN | 0 );
13815  return resultobj;
13816 fail:
13817  return NULL;
13818 }
13819 
13820 
13821 SWIGINTERN PyObject *StandardGpuResources_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13822  PyObject *obj;
13823  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
13824  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__StandardGpuResources, SWIG_NewClientData(obj));
13825  return SWIG_Py_Void();
13826 }
13827 
13828 SWIGINTERN PyObject *_wrap_getmillisecs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13829  PyObject *resultobj = 0;
13830  double result;
13831 
13832  if (!PyArg_ParseTuple(args,(char *)":getmillisecs")) SWIG_fail;
13833  {
13834  Py_BEGIN_ALLOW_THREADS
13835  try {
13836  result = (double)faiss::getmillisecs();
13837  } catch(faiss::FaissException & e) {
13838  PyEval_RestoreThread(_save);
13839  PyErr_SetString(PyExc_RuntimeError, e.what());
13840  SWIG_fail;
13841  }
13842  Py_END_ALLOW_THREADS
13843  }
13844  resultobj = SWIG_From_double(static_cast< double >(result));
13845  return resultobj;
13846 fail:
13847  return NULL;
13848 }
13849 
13850 
13851 SWIGINTERN PyObject *_wrap_get_mem_usage_kb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13852  PyObject *resultobj = 0;
13853  size_t result;
13854 
13855  if (!PyArg_ParseTuple(args,(char *)":get_mem_usage_kb")) SWIG_fail;
13856  {
13857  Py_BEGIN_ALLOW_THREADS
13858  try {
13859  result = (size_t)faiss::get_mem_usage_kb();
13860  } catch(faiss::FaissException & e) {
13861  PyEval_RestoreThread(_save);
13862  PyErr_SetString(PyExc_RuntimeError, e.what());
13863  SWIG_fail;
13864  }
13865  Py_END_ALLOW_THREADS
13866  }
13867  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
13868  return resultobj;
13869 fail:
13870  return NULL;
13871 }
13872 
13873 
13874 SWIGINTERN PyObject *_wrap_RandomGenerator_mt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13875  PyObject *resultobj = 0;
13877  std::mt19937 arg2 ;
13878  void *argp1 = 0 ;
13879  int res1 = 0 ;
13880  void *argp2 ;
13881  int res2 = 0 ;
13882  PyObject * obj0 = 0 ;
13883  PyObject * obj1 = 0 ;
13884 
13885  if (!PyArg_ParseTuple(args,(char *)"OO:RandomGenerator_mt_set",&obj0,&obj1)) SWIG_fail;
13886  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
13887  if (!SWIG_IsOK(res1)) {
13888  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_mt_set" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13889  }
13890  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
13891  {
13892  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__mt19937, 0 | 0);
13893  if (!SWIG_IsOK(res2)) {
13894  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RandomGenerator_mt_set" "', argument " "2"" of type '" "std::mt19937""'");
13895  }
13896  if (!argp2) {
13897  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RandomGenerator_mt_set" "', argument " "2"" of type '" "std::mt19937""'");
13898  } else {
13899  std::mt19937 * temp = reinterpret_cast< std::mt19937 * >(argp2);
13900  arg2 = *temp;
13901  if (SWIG_IsNewObj(res2)) delete temp;
13902  }
13903  }
13904  if (arg1) (arg1)->mt = arg2;
13905  resultobj = SWIG_Py_Void();
13906  return resultobj;
13907 fail:
13908  return NULL;
13909 }
13910 
13911 
13912 SWIGINTERN PyObject *_wrap_RandomGenerator_mt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13913  PyObject *resultobj = 0;
13915  void *argp1 = 0 ;
13916  int res1 = 0 ;
13917  PyObject * obj0 = 0 ;
13918  std::mt19937 result;
13919 
13920  if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_mt_get",&obj0)) SWIG_fail;
13921  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
13922  if (!SWIG_IsOK(res1)) {
13923  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_mt_get" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13924  }
13925  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
13926  result = ((arg1)->mt);
13927  resultobj = SWIG_NewPointerObj((new std::mt19937(static_cast< const std::mt19937& >(result))), SWIGTYPE_p_std__mt19937, SWIG_POINTER_OWN | 0 );
13928  return resultobj;
13929 fail:
13930  return NULL;
13931 }
13932 
13933 
13934 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13935  PyObject *resultobj = 0;
13937  void *argp1 = 0 ;
13938  int res1 = 0 ;
13939  PyObject * obj0 = 0 ;
13940  int result;
13941 
13942  if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_int",&obj0)) SWIG_fail;
13943  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
13944  if (!SWIG_IsOK(res1)) {
13945  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_int" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13946  }
13947  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
13948  {
13949  Py_BEGIN_ALLOW_THREADS
13950  try {
13951  result = (int)(arg1)->rand_int();
13952  } catch(faiss::FaissException & e) {
13953  PyEval_RestoreThread(_save);
13954  PyErr_SetString(PyExc_RuntimeError, e.what());
13955  SWIG_fail;
13956  }
13957  Py_END_ALLOW_THREADS
13958  }
13959  resultobj = SWIG_From_int(static_cast< int >(result));
13960  return resultobj;
13961 fail:
13962  return NULL;
13963 }
13964 
13965 
13966 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_long(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13967  PyObject *resultobj = 0;
13969  void *argp1 = 0 ;
13970  int res1 = 0 ;
13971  PyObject * obj0 = 0 ;
13972  long result;
13973 
13974  if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_long",&obj0)) SWIG_fail;
13975  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
13976  if (!SWIG_IsOK(res1)) {
13977  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_long" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
13978  }
13979  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
13980  {
13981  Py_BEGIN_ALLOW_THREADS
13982  try {
13983  result = (long)(arg1)->rand_long();
13984  } catch(faiss::FaissException & e) {
13985  PyEval_RestoreThread(_save);
13986  PyErr_SetString(PyExc_RuntimeError, e.what());
13987  SWIG_fail;
13988  }
13989  Py_END_ALLOW_THREADS
13990  }
13991  resultobj = SWIG_From_long(static_cast< long >(result));
13992  return resultobj;
13993 fail:
13994  return NULL;
13995 }
13996 
13997 
13998 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13999  PyObject *resultobj = 0;
14001  int arg2 ;
14002  void *argp1 = 0 ;
14003  int res1 = 0 ;
14004  int val2 ;
14005  int ecode2 = 0 ;
14006  PyObject * obj0 = 0 ;
14007  PyObject * obj1 = 0 ;
14008  int result;
14009 
14010  if (!PyArg_ParseTuple(args,(char *)"OO:RandomGenerator_rand_int",&obj0,&obj1)) SWIG_fail;
14011  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
14012  if (!SWIG_IsOK(res1)) {
14013  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_int" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
14014  }
14015  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
14016  ecode2 = SWIG_AsVal_int(obj1, &val2);
14017  if (!SWIG_IsOK(ecode2)) {
14018  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RandomGenerator_rand_int" "', argument " "2"" of type '" "int""'");
14019  }
14020  arg2 = static_cast< int >(val2);
14021  {
14022  Py_BEGIN_ALLOW_THREADS
14023  try {
14024  result = (int)(arg1)->rand_int(arg2);
14025  } catch(faiss::FaissException & e) {
14026  PyEval_RestoreThread(_save);
14027  PyErr_SetString(PyExc_RuntimeError, e.what());
14028  SWIG_fail;
14029  }
14030  Py_END_ALLOW_THREADS
14031  }
14032  resultobj = SWIG_From_int(static_cast< int >(result));
14033  return resultobj;
14034 fail:
14035  return NULL;
14036 }
14037 
14038 
14039 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int(PyObject *self, PyObject *args) {
14040  Py_ssize_t argc;
14041  PyObject *argv[3] = {
14042  0
14043  };
14044  Py_ssize_t ii;
14045 
14046  if (!PyTuple_Check(args)) SWIG_fail;
14047  argc = args ? PyObject_Length(args) : 0;
14048  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
14049  argv[ii] = PyTuple_GET_ITEM(args,ii);
14050  }
14051  if (argc == 1) {
14052  int _v;
14053  void *vptr = 0;
14054  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RandomGenerator, 0);
14055  _v = SWIG_CheckState(res);
14056  if (_v) {
14057  return _wrap_RandomGenerator_rand_int__SWIG_0(self, args);
14058  }
14059  }
14060  if (argc == 2) {
14061  int _v;
14062  void *vptr = 0;
14063  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RandomGenerator, 0);
14064  _v = SWIG_CheckState(res);
14065  if (_v) {
14066  {
14067  int res = SWIG_AsVal_int(argv[1], NULL);
14068  _v = SWIG_CheckState(res);
14069  }
14070  if (_v) {
14071  return _wrap_RandomGenerator_rand_int__SWIG_1(self, args);
14072  }
14073  }
14074  }
14075 
14076 fail:
14077  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RandomGenerator_rand_int'.\n"
14078  " Possible C/C++ prototypes are:\n"
14079  " faiss::RandomGenerator::rand_int()\n"
14080  " faiss::RandomGenerator::rand_int(int)\n");
14081  return 0;
14082 }
14083 
14084 
14085 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14086  PyObject *resultobj = 0;
14088  void *argp1 = 0 ;
14089  int res1 = 0 ;
14090  PyObject * obj0 = 0 ;
14091  float result;
14092 
14093  if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_float",&obj0)) SWIG_fail;
14094  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
14095  if (!SWIG_IsOK(res1)) {
14096  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_float" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
14097  }
14098  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
14099  {
14100  Py_BEGIN_ALLOW_THREADS
14101  try {
14102  result = (float)(arg1)->rand_float();
14103  } catch(faiss::FaissException & e) {
14104  PyEval_RestoreThread(_save);
14105  PyErr_SetString(PyExc_RuntimeError, e.what());
14106  SWIG_fail;
14107  }
14108  Py_END_ALLOW_THREADS
14109  }
14110  resultobj = SWIG_From_float(static_cast< float >(result));
14111  return resultobj;
14112 fail:
14113  return NULL;
14114 }
14115 
14116 
14117 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14118  PyObject *resultobj = 0;
14120  void *argp1 = 0 ;
14121  int res1 = 0 ;
14122  PyObject * obj0 = 0 ;
14123  double result;
14124 
14125  if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_double",&obj0)) SWIG_fail;
14126  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
14127  if (!SWIG_IsOK(res1)) {
14128  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_double" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
14129  }
14130  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
14131  {
14132  Py_BEGIN_ALLOW_THREADS
14133  try {
14134  result = (double)(arg1)->rand_double();
14135  } catch(faiss::FaissException & e) {
14136  PyEval_RestoreThread(_save);
14137  PyErr_SetString(PyExc_RuntimeError, e.what());
14138  SWIG_fail;
14139  }
14140  Py_END_ALLOW_THREADS
14141  }
14142  resultobj = SWIG_From_double(static_cast< double >(result));
14143  return resultobj;
14144 fail:
14145  return NULL;
14146 }
14147 
14148 
14149 SWIGINTERN PyObject *_wrap_new_RandomGenerator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14150  PyObject *resultobj = 0;
14151  long arg1 ;
14152  long val1 ;
14153  int ecode1 = 0 ;
14154  PyObject * obj0 = 0 ;
14155  faiss::RandomGenerator *result = 0 ;
14156 
14157  if (!PyArg_ParseTuple(args,(char *)"O:new_RandomGenerator",&obj0)) SWIG_fail;
14158  ecode1 = SWIG_AsVal_long(obj0, &val1);
14159  if (!SWIG_IsOK(ecode1)) {
14160  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RandomGenerator" "', argument " "1"" of type '" "long""'");
14161  }
14162  arg1 = static_cast< long >(val1);
14163  {
14164  Py_BEGIN_ALLOW_THREADS
14165  try {
14166  result = (faiss::RandomGenerator *)new faiss::RandomGenerator(arg1);
14167  } catch(faiss::FaissException & e) {
14168  PyEval_RestoreThread(_save);
14169  PyErr_SetString(PyExc_RuntimeError, e.what());
14170  SWIG_fail;
14171  }
14172  Py_END_ALLOW_THREADS
14173  }
14174  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_NEW | 0 );
14175  return resultobj;
14176 fail:
14177  return NULL;
14178 }
14179 
14180 
14181 SWIGINTERN PyObject *_wrap_new_RandomGenerator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14182  PyObject *resultobj = 0;
14183  faiss::RandomGenerator *result = 0 ;
14184 
14185  if (!PyArg_ParseTuple(args,(char *)":new_RandomGenerator")) SWIG_fail;
14186  {
14187  Py_BEGIN_ALLOW_THREADS
14188  try {
14190  } catch(faiss::FaissException & e) {
14191  PyEval_RestoreThread(_save);
14192  PyErr_SetString(PyExc_RuntimeError, e.what());
14193  SWIG_fail;
14194  }
14195  Py_END_ALLOW_THREADS
14196  }
14197  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_NEW | 0 );
14198  return resultobj;
14199 fail:
14200  return NULL;
14201 }
14202 
14203 
14204 SWIGINTERN PyObject *_wrap_new_RandomGenerator(PyObject *self, PyObject *args) {
14205  Py_ssize_t argc;
14206  PyObject *argv[2] = {
14207  0
14208  };
14209  Py_ssize_t ii;
14210 
14211  if (!PyTuple_Check(args)) SWIG_fail;
14212  argc = args ? PyObject_Length(args) : 0;
14213  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
14214  argv[ii] = PyTuple_GET_ITEM(args,ii);
14215  }
14216  if (argc == 0) {
14217  return _wrap_new_RandomGenerator__SWIG_1(self, args);
14218  }
14219  if (argc == 1) {
14220  int _v;
14221  {
14222  int res = SWIG_AsVal_long(argv[0], NULL);
14223  _v = SWIG_CheckState(res);
14224  }
14225  if (_v) {
14226  return _wrap_new_RandomGenerator__SWIG_0(self, args);
14227  }
14228  }
14229 
14230 fail:
14231  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RandomGenerator'.\n"
14232  " Possible C/C++ prototypes are:\n"
14233  " faiss::RandomGenerator::RandomGenerator(long)\n"
14234  " faiss::RandomGenerator::RandomGenerator()\n");
14235  return 0;
14236 }
14237 
14238 
14239 SWIGINTERN PyObject *_wrap_delete_RandomGenerator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14240  PyObject *resultobj = 0;
14242  void *argp1 = 0 ;
14243  int res1 = 0 ;
14244  PyObject * obj0 = 0 ;
14245 
14246  if (!PyArg_ParseTuple(args,(char *)"O:delete_RandomGenerator",&obj0)) SWIG_fail;
14247  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_DISOWN | 0 );
14248  if (!SWIG_IsOK(res1)) {
14249  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RandomGenerator" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
14250  }
14251  arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
14252  delete arg1;
14253  resultobj = SWIG_Py_Void();
14254  return resultobj;
14255 fail:
14256  return NULL;
14257 }
14258 
14259 
14260 SWIGINTERN PyObject *RandomGenerator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14261  PyObject *obj;
14262  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
14263  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RandomGenerator, SWIG_NewClientData(obj));
14264  return SWIG_Py_Void();
14265 }
14266 
14267 SWIGINTERN PyObject *_wrap_float_rand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14268  PyObject *resultobj = 0;
14269  float *arg1 = (float *) 0 ;
14270  size_t arg2 ;
14271  long arg3 ;
14272  void *argp1 = 0 ;
14273  int res1 = 0 ;
14274  size_t val2 ;
14275  int ecode2 = 0 ;
14276  long val3 ;
14277  int ecode3 = 0 ;
14278  PyObject * obj0 = 0 ;
14279  PyObject * obj1 = 0 ;
14280  PyObject * obj2 = 0 ;
14281 
14282  if (!PyArg_ParseTuple(args,(char *)"OOO:float_rand",&obj0,&obj1,&obj2)) SWIG_fail;
14283  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14284  if (!SWIG_IsOK(res1)) {
14285  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_rand" "', argument " "1"" of type '" "float *""'");
14286  }
14287  arg1 = reinterpret_cast< float * >(argp1);
14288  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14289  if (!SWIG_IsOK(ecode2)) {
14290  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_rand" "', argument " "2"" of type '" "size_t""'");
14291  }
14292  arg2 = static_cast< size_t >(val2);
14293  ecode3 = SWIG_AsVal_long(obj2, &val3);
14294  if (!SWIG_IsOK(ecode3)) {
14295  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "float_rand" "', argument " "3"" of type '" "long""'");
14296  }
14297  arg3 = static_cast< long >(val3);
14298  {
14299  Py_BEGIN_ALLOW_THREADS
14300  try {
14301  faiss::float_rand(arg1,arg2,arg3);
14302  } catch(faiss::FaissException & e) {
14303  PyEval_RestoreThread(_save);
14304  PyErr_SetString(PyExc_RuntimeError, e.what());
14305  SWIG_fail;
14306  }
14307  Py_END_ALLOW_THREADS
14308  }
14309  resultobj = SWIG_Py_Void();
14310  return resultobj;
14311 fail:
14312  return NULL;
14313 }
14314 
14315 
14316 SWIGINTERN PyObject *_wrap_float_randn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14317  PyObject *resultobj = 0;
14318  float *arg1 = (float *) 0 ;
14319  size_t arg2 ;
14320  long arg3 ;
14321  void *argp1 = 0 ;
14322  int res1 = 0 ;
14323  size_t val2 ;
14324  int ecode2 = 0 ;
14325  long val3 ;
14326  int ecode3 = 0 ;
14327  PyObject * obj0 = 0 ;
14328  PyObject * obj1 = 0 ;
14329  PyObject * obj2 = 0 ;
14330 
14331  if (!PyArg_ParseTuple(args,(char *)"OOO:float_randn",&obj0,&obj1,&obj2)) SWIG_fail;
14332  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14333  if (!SWIG_IsOK(res1)) {
14334  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_randn" "', argument " "1"" of type '" "float *""'");
14335  }
14336  arg1 = reinterpret_cast< float * >(argp1);
14337  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14338  if (!SWIG_IsOK(ecode2)) {
14339  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_randn" "', argument " "2"" of type '" "size_t""'");
14340  }
14341  arg2 = static_cast< size_t >(val2);
14342  ecode3 = SWIG_AsVal_long(obj2, &val3);
14343  if (!SWIG_IsOK(ecode3)) {
14344  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "float_randn" "', argument " "3"" of type '" "long""'");
14345  }
14346  arg3 = static_cast< long >(val3);
14347  {
14348  Py_BEGIN_ALLOW_THREADS
14349  try {
14350  faiss::float_randn(arg1,arg2,arg3);
14351  } catch(faiss::FaissException & e) {
14352  PyEval_RestoreThread(_save);
14353  PyErr_SetString(PyExc_RuntimeError, e.what());
14354  SWIG_fail;
14355  }
14356  Py_END_ALLOW_THREADS
14357  }
14358  resultobj = SWIG_Py_Void();
14359  return resultobj;
14360 fail:
14361  return NULL;
14362 }
14363 
14364 
14365 SWIGINTERN PyObject *_wrap_long_rand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14366  PyObject *resultobj = 0;
14367  long *arg1 = (long *) 0 ;
14368  size_t arg2 ;
14369  long arg3 ;
14370  void *argp1 = 0 ;
14371  int res1 = 0 ;
14372  size_t val2 ;
14373  int ecode2 = 0 ;
14374  long val3 ;
14375  int ecode3 = 0 ;
14376  PyObject * obj0 = 0 ;
14377  PyObject * obj1 = 0 ;
14378  PyObject * obj2 = 0 ;
14379 
14380  if (!PyArg_ParseTuple(args,(char *)"OOO:long_rand",&obj0,&obj1,&obj2)) SWIG_fail;
14381  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_long, 0 | 0 );
14382  if (!SWIG_IsOK(res1)) {
14383  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "long_rand" "', argument " "1"" of type '" "long *""'");
14384  }
14385  arg1 = reinterpret_cast< long * >(argp1);
14386  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14387  if (!SWIG_IsOK(ecode2)) {
14388  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "long_rand" "', argument " "2"" of type '" "size_t""'");
14389  }
14390  arg2 = static_cast< size_t >(val2);
14391  ecode3 = SWIG_AsVal_long(obj2, &val3);
14392  if (!SWIG_IsOK(ecode3)) {
14393  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "long_rand" "', argument " "3"" of type '" "long""'");
14394  }
14395  arg3 = static_cast< long >(val3);
14396  {
14397  Py_BEGIN_ALLOW_THREADS
14398  try {
14399  faiss::long_rand(arg1,arg2,arg3);
14400  } catch(faiss::FaissException & e) {
14401  PyEval_RestoreThread(_save);
14402  PyErr_SetString(PyExc_RuntimeError, e.what());
14403  SWIG_fail;
14404  }
14405  Py_END_ALLOW_THREADS
14406  }
14407  resultobj = SWIG_Py_Void();
14408  return resultobj;
14409 fail:
14410  return NULL;
14411 }
14412 
14413 
14414 SWIGINTERN PyObject *_wrap_byte_rand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14415  PyObject *resultobj = 0;
14416  uint8_t *arg1 = (uint8_t *) 0 ;
14417  size_t arg2 ;
14418  long arg3 ;
14419  void *argp1 = 0 ;
14420  int res1 = 0 ;
14421  size_t val2 ;
14422  int ecode2 = 0 ;
14423  long val3 ;
14424  int ecode3 = 0 ;
14425  PyObject * obj0 = 0 ;
14426  PyObject * obj1 = 0 ;
14427  PyObject * obj2 = 0 ;
14428 
14429  if (!PyArg_ParseTuple(args,(char *)"OOO:byte_rand",&obj0,&obj1,&obj2)) SWIG_fail;
14430  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
14431  if (!SWIG_IsOK(res1)) {
14432  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "byte_rand" "', argument " "1"" of type '" "uint8_t *""'");
14433  }
14434  arg1 = reinterpret_cast< uint8_t * >(argp1);
14435  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14436  if (!SWIG_IsOK(ecode2)) {
14437  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "byte_rand" "', argument " "2"" of type '" "size_t""'");
14438  }
14439  arg2 = static_cast< size_t >(val2);
14440  ecode3 = SWIG_AsVal_long(obj2, &val3);
14441  if (!SWIG_IsOK(ecode3)) {
14442  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "byte_rand" "', argument " "3"" of type '" "long""'");
14443  }
14444  arg3 = static_cast< long >(val3);
14445  {
14446  Py_BEGIN_ALLOW_THREADS
14447  try {
14448  faiss::byte_rand(arg1,arg2,arg3);
14449  } catch(faiss::FaissException & e) {
14450  PyEval_RestoreThread(_save);
14451  PyErr_SetString(PyExc_RuntimeError, e.what());
14452  SWIG_fail;
14453  }
14454  Py_END_ALLOW_THREADS
14455  }
14456  resultobj = SWIG_Py_Void();
14457  return resultobj;
14458 fail:
14459  return NULL;
14460 }
14461 
14462 
14463 SWIGINTERN PyObject *_wrap_rand_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14464  PyObject *resultobj = 0;
14465  int *arg1 = (int *) 0 ;
14466  size_t arg2 ;
14467  long arg3 ;
14468  void *argp1 = 0 ;
14469  int res1 = 0 ;
14470  size_t val2 ;
14471  int ecode2 = 0 ;
14472  long val3 ;
14473  int ecode3 = 0 ;
14474  PyObject * obj0 = 0 ;
14475  PyObject * obj1 = 0 ;
14476  PyObject * obj2 = 0 ;
14477 
14478  if (!PyArg_ParseTuple(args,(char *)"OOO:rand_perm",&obj0,&obj1,&obj2)) SWIG_fail;
14479  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 );
14480  if (!SWIG_IsOK(res1)) {
14481  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_perm" "', argument " "1"" of type '" "int *""'");
14482  }
14483  arg1 = reinterpret_cast< int * >(argp1);
14484  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14485  if (!SWIG_IsOK(ecode2)) {
14486  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_perm" "', argument " "2"" of type '" "size_t""'");
14487  }
14488  arg2 = static_cast< size_t >(val2);
14489  ecode3 = SWIG_AsVal_long(obj2, &val3);
14490  if (!SWIG_IsOK(ecode3)) {
14491  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rand_perm" "', argument " "3"" of type '" "long""'");
14492  }
14493  arg3 = static_cast< long >(val3);
14494  {
14495  Py_BEGIN_ALLOW_THREADS
14496  try {
14497  faiss::rand_perm(arg1,arg2,arg3);
14498  } catch(faiss::FaissException & e) {
14499  PyEval_RestoreThread(_save);
14500  PyErr_SetString(PyExc_RuntimeError, e.what());
14501  SWIG_fail;
14502  }
14503  Py_END_ALLOW_THREADS
14504  }
14505  resultobj = SWIG_Py_Void();
14506  return resultobj;
14507 fail:
14508  return NULL;
14509 }
14510 
14511 
14512 SWIGINTERN PyObject *_wrap_fvec_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14513  PyObject *resultobj = 0;
14514  float *arg1 = (float *) 0 ;
14515  float *arg2 = (float *) 0 ;
14516  size_t arg3 ;
14517  void *argp1 = 0 ;
14518  int res1 = 0 ;
14519  void *argp2 = 0 ;
14520  int res2 = 0 ;
14521  size_t val3 ;
14522  int ecode3 = 0 ;
14523  PyObject * obj0 = 0 ;
14524  PyObject * obj1 = 0 ;
14525  PyObject * obj2 = 0 ;
14526  float result;
14527 
14528  if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_L2sqr",&obj0,&obj1,&obj2)) SWIG_fail;
14529  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14530  if (!SWIG_IsOK(res1)) {
14531  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_L2sqr" "', argument " "1"" of type '" "float const *""'");
14532  }
14533  arg1 = reinterpret_cast< float * >(argp1);
14534  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14535  if (!SWIG_IsOK(res2)) {
14536  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_L2sqr" "', argument " "2"" of type '" "float const *""'");
14537  }
14538  arg2 = reinterpret_cast< float * >(argp2);
14539  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14540  if (!SWIG_IsOK(ecode3)) {
14541  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_L2sqr" "', argument " "3"" of type '" "size_t""'");
14542  }
14543  arg3 = static_cast< size_t >(val3);
14544  {
14545  Py_BEGIN_ALLOW_THREADS
14546  try {
14547  result = (float)faiss::fvec_L2sqr((float const *)arg1,(float const *)arg2,arg3);
14548  } catch(faiss::FaissException & e) {
14549  PyEval_RestoreThread(_save);
14550  PyErr_SetString(PyExc_RuntimeError, e.what());
14551  SWIG_fail;
14552  }
14553  Py_END_ALLOW_THREADS
14554  }
14555  resultobj = SWIG_From_float(static_cast< float >(result));
14556  return resultobj;
14557 fail:
14558  return NULL;
14559 }
14560 
14561 
14562 SWIGINTERN PyObject *_wrap_fvec_inner_product(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14563  PyObject *resultobj = 0;
14564  float *arg1 = (float *) 0 ;
14565  float *arg2 = (float *) 0 ;
14566  size_t arg3 ;
14567  void *argp1 = 0 ;
14568  int res1 = 0 ;
14569  void *argp2 = 0 ;
14570  int res2 = 0 ;
14571  size_t val3 ;
14572  int ecode3 = 0 ;
14573  PyObject * obj0 = 0 ;
14574  PyObject * obj1 = 0 ;
14575  PyObject * obj2 = 0 ;
14576  float result;
14577 
14578  if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_inner_product",&obj0,&obj1,&obj2)) SWIG_fail;
14579  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14580  if (!SWIG_IsOK(res1)) {
14581  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_inner_product" "', argument " "1"" of type '" "float const *""'");
14582  }
14583  arg1 = reinterpret_cast< float * >(argp1);
14584  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14585  if (!SWIG_IsOK(res2)) {
14586  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_inner_product" "', argument " "2"" of type '" "float const *""'");
14587  }
14588  arg2 = reinterpret_cast< float * >(argp2);
14589  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14590  if (!SWIG_IsOK(ecode3)) {
14591  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_inner_product" "', argument " "3"" of type '" "size_t""'");
14592  }
14593  arg3 = static_cast< size_t >(val3);
14594  {
14595  Py_BEGIN_ALLOW_THREADS
14596  try {
14597  result = (float)faiss::fvec_inner_product((float const *)arg1,(float const *)arg2,arg3);
14598  } catch(faiss::FaissException & e) {
14599  PyEval_RestoreThread(_save);
14600  PyErr_SetString(PyExc_RuntimeError, e.what());
14601  SWIG_fail;
14602  }
14603  Py_END_ALLOW_THREADS
14604  }
14605  resultobj = SWIG_From_float(static_cast< float >(result));
14606  return resultobj;
14607 fail:
14608  return NULL;
14609 }
14610 
14611 
14612 SWIGINTERN PyObject *_wrap_imbalance_factor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14613  PyObject *resultobj = 0;
14614  int arg1 ;
14615  int arg2 ;
14616  long *arg3 = (long *) 0 ;
14617  int val1 ;
14618  int ecode1 = 0 ;
14619  int val2 ;
14620  int ecode2 = 0 ;
14621  void *argp3 = 0 ;
14622  int res3 = 0 ;
14623  PyObject * obj0 = 0 ;
14624  PyObject * obj1 = 0 ;
14625  PyObject * obj2 = 0 ;
14626  double result;
14627 
14628  if (!PyArg_ParseTuple(args,(char *)"OOO:imbalance_factor",&obj0,&obj1,&obj2)) SWIG_fail;
14629  ecode1 = SWIG_AsVal_int(obj0, &val1);
14630  if (!SWIG_IsOK(ecode1)) {
14631  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "imbalance_factor" "', argument " "1"" of type '" "int""'");
14632  }
14633  arg1 = static_cast< int >(val1);
14634  ecode2 = SWIG_AsVal_int(obj1, &val2);
14635  if (!SWIG_IsOK(ecode2)) {
14636  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "imbalance_factor" "', argument " "2"" of type '" "int""'");
14637  }
14638  arg2 = static_cast< int >(val2);
14639  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
14640  if (!SWIG_IsOK(res3)) {
14641  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "imbalance_factor" "', argument " "3"" of type '" "long const *""'");
14642  }
14643  arg3 = reinterpret_cast< long * >(argp3);
14644  {
14645  Py_BEGIN_ALLOW_THREADS
14646  try {
14647  result = (double)faiss::imbalance_factor(arg1,arg2,(long const *)arg3);
14648  } catch(faiss::FaissException & e) {
14649  PyEval_RestoreThread(_save);
14650  PyErr_SetString(PyExc_RuntimeError, e.what());
14651  SWIG_fail;
14652  }
14653  Py_END_ALLOW_THREADS
14654  }
14655  resultobj = SWIG_From_double(static_cast< double >(result));
14656  return resultobj;
14657 fail:
14658  return NULL;
14659 }
14660 
14661 
14662 SWIGINTERN PyObject *_wrap_imbalance_factor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14663  PyObject *resultobj = 0;
14664  int arg1 ;
14665  int *arg2 = (int *) 0 ;
14666  int val1 ;
14667  int ecode1 = 0 ;
14668  void *argp2 = 0 ;
14669  int res2 = 0 ;
14670  PyObject * obj0 = 0 ;
14671  PyObject * obj1 = 0 ;
14672  double result;
14673 
14674  if (!PyArg_ParseTuple(args,(char *)"OO:imbalance_factor",&obj0,&obj1)) SWIG_fail;
14675  ecode1 = SWIG_AsVal_int(obj0, &val1);
14676  if (!SWIG_IsOK(ecode1)) {
14677  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "imbalance_factor" "', argument " "1"" of type '" "int""'");
14678  }
14679  arg1 = static_cast< int >(val1);
14680  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
14681  if (!SWIG_IsOK(res2)) {
14682  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "imbalance_factor" "', argument " "2"" of type '" "int const *""'");
14683  }
14684  arg2 = reinterpret_cast< int * >(argp2);
14685  {
14686  Py_BEGIN_ALLOW_THREADS
14687  try {
14688  result = (double)faiss::imbalance_factor(arg1,(int const *)arg2);
14689  } catch(faiss::FaissException & e) {
14690  PyEval_RestoreThread(_save);
14691  PyErr_SetString(PyExc_RuntimeError, e.what());
14692  SWIG_fail;
14693  }
14694  Py_END_ALLOW_THREADS
14695  }
14696  resultobj = SWIG_From_double(static_cast< double >(result));
14697  return resultobj;
14698 fail:
14699  return NULL;
14700 }
14701 
14702 
14703 SWIGINTERN PyObject *_wrap_imbalance_factor(PyObject *self, PyObject *args) {
14704  Py_ssize_t argc;
14705  PyObject *argv[4] = {
14706  0
14707  };
14708  Py_ssize_t ii;
14709 
14710  if (!PyTuple_Check(args)) SWIG_fail;
14711  argc = args ? PyObject_Length(args) : 0;
14712  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
14713  argv[ii] = PyTuple_GET_ITEM(args,ii);
14714  }
14715  if (argc == 2) {
14716  int _v;
14717  {
14718  int res = SWIG_AsVal_int(argv[0], NULL);
14719  _v = SWIG_CheckState(res);
14720  }
14721  if (_v) {
14722  void *vptr = 0;
14723  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_int, 0);
14724  _v = SWIG_CheckState(res);
14725  if (_v) {
14726  return _wrap_imbalance_factor__SWIG_1(self, args);
14727  }
14728  }
14729  }
14730  if (argc == 3) {
14731  int _v;
14732  {
14733  int res = SWIG_AsVal_int(argv[0], NULL);
14734  _v = SWIG_CheckState(res);
14735  }
14736  if (_v) {
14737  {
14738  int res = SWIG_AsVal_int(argv[1], NULL);
14739  _v = SWIG_CheckState(res);
14740  }
14741  if (_v) {
14742  void *vptr = 0;
14743  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
14744  _v = SWIG_CheckState(res);
14745  if (_v) {
14746  return _wrap_imbalance_factor__SWIG_0(self, args);
14747  }
14748  }
14749  }
14750  }
14751 
14752 fail:
14753  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'imbalance_factor'.\n"
14754  " Possible C/C++ prototypes are:\n"
14755  " faiss::imbalance_factor(int,int,long const *)\n"
14756  " faiss::imbalance_factor(int,int const *)\n");
14757  return 0;
14758 }
14759 
14760 
14761 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14762  PyObject *resultobj = 0;
14763  long arg1 ;
14764  long arg2 ;
14765  float *arg3 = (float *) 0 ;
14766  long arg4 ;
14767  float *arg5 = (float *) 0 ;
14768  float *arg6 = (float *) 0 ;
14769  long arg7 ;
14770  long arg8 ;
14771  long arg9 ;
14772  long val1 ;
14773  int ecode1 = 0 ;
14774  long val2 ;
14775  int ecode2 = 0 ;
14776  void *argp3 = 0 ;
14777  int res3 = 0 ;
14778  long val4 ;
14779  int ecode4 = 0 ;
14780  void *argp5 = 0 ;
14781  int res5 = 0 ;
14782  void *argp6 = 0 ;
14783  int res6 = 0 ;
14784  long val7 ;
14785  int ecode7 = 0 ;
14786  long val8 ;
14787  int ecode8 = 0 ;
14788  long val9 ;
14789  int ecode9 = 0 ;
14790  PyObject * obj0 = 0 ;
14791  PyObject * obj1 = 0 ;
14792  PyObject * obj2 = 0 ;
14793  PyObject * obj3 = 0 ;
14794  PyObject * obj4 = 0 ;
14795  PyObject * obj5 = 0 ;
14796  PyObject * obj6 = 0 ;
14797  PyObject * obj7 = 0 ;
14798  PyObject * obj8 = 0 ;
14799 
14800  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
14801  ecode1 = SWIG_AsVal_long(obj0, &val1);
14802  if (!SWIG_IsOK(ecode1)) {
14803  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
14804  }
14805  arg1 = static_cast< long >(val1);
14806  ecode2 = SWIG_AsVal_long(obj1, &val2);
14807  if (!SWIG_IsOK(ecode2)) {
14808  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
14809  }
14810  arg2 = static_cast< long >(val2);
14811  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14812  if (!SWIG_IsOK(res3)) {
14813  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
14814  }
14815  arg3 = reinterpret_cast< float * >(argp3);
14816  ecode4 = SWIG_AsVal_long(obj3, &val4);
14817  if (!SWIG_IsOK(ecode4)) {
14818  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
14819  }
14820  arg4 = static_cast< long >(val4);
14821  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
14822  if (!SWIG_IsOK(res5)) {
14823  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
14824  }
14825  arg5 = reinterpret_cast< float * >(argp5);
14826  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
14827  if (!SWIG_IsOK(res6)) {
14828  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
14829  }
14830  arg6 = reinterpret_cast< float * >(argp6);
14831  ecode7 = SWIG_AsVal_long(obj6, &val7);
14832  if (!SWIG_IsOK(ecode7)) {
14833  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
14834  }
14835  arg7 = static_cast< long >(val7);
14836  ecode8 = SWIG_AsVal_long(obj7, &val8);
14837  if (!SWIG_IsOK(ecode8)) {
14838  SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "pairwise_L2sqr" "', argument " "8"" of type '" "long""'");
14839  }
14840  arg8 = static_cast< long >(val8);
14841  ecode9 = SWIG_AsVal_long(obj8, &val9);
14842  if (!SWIG_IsOK(ecode9)) {
14843  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "pairwise_L2sqr" "', argument " "9"" of type '" "long""'");
14844  }
14845  arg9 = static_cast< long >(val9);
14846  {
14847  Py_BEGIN_ALLOW_THREADS
14848  try {
14849  faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6,arg7,arg8,arg9);
14850  } catch(faiss::FaissException & e) {
14851  PyEval_RestoreThread(_save);
14852  PyErr_SetString(PyExc_RuntimeError, e.what());
14853  SWIG_fail;
14854  }
14855  Py_END_ALLOW_THREADS
14856  }
14857  resultobj = SWIG_Py_Void();
14858  return resultobj;
14859 fail:
14860  return NULL;
14861 }
14862 
14863 
14864 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14865  PyObject *resultobj = 0;
14866  long arg1 ;
14867  long arg2 ;
14868  float *arg3 = (float *) 0 ;
14869  long arg4 ;
14870  float *arg5 = (float *) 0 ;
14871  float *arg6 = (float *) 0 ;
14872  long arg7 ;
14873  long arg8 ;
14874  long val1 ;
14875  int ecode1 = 0 ;
14876  long val2 ;
14877  int ecode2 = 0 ;
14878  void *argp3 = 0 ;
14879  int res3 = 0 ;
14880  long val4 ;
14881  int ecode4 = 0 ;
14882  void *argp5 = 0 ;
14883  int res5 = 0 ;
14884  void *argp6 = 0 ;
14885  int res6 = 0 ;
14886  long val7 ;
14887  int ecode7 = 0 ;
14888  long val8 ;
14889  int ecode8 = 0 ;
14890  PyObject * obj0 = 0 ;
14891  PyObject * obj1 = 0 ;
14892  PyObject * obj2 = 0 ;
14893  PyObject * obj3 = 0 ;
14894  PyObject * obj4 = 0 ;
14895  PyObject * obj5 = 0 ;
14896  PyObject * obj6 = 0 ;
14897  PyObject * obj7 = 0 ;
14898 
14899  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
14900  ecode1 = SWIG_AsVal_long(obj0, &val1);
14901  if (!SWIG_IsOK(ecode1)) {
14902  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
14903  }
14904  arg1 = static_cast< long >(val1);
14905  ecode2 = SWIG_AsVal_long(obj1, &val2);
14906  if (!SWIG_IsOK(ecode2)) {
14907  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
14908  }
14909  arg2 = static_cast< long >(val2);
14910  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14911  if (!SWIG_IsOK(res3)) {
14912  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
14913  }
14914  arg3 = reinterpret_cast< float * >(argp3);
14915  ecode4 = SWIG_AsVal_long(obj3, &val4);
14916  if (!SWIG_IsOK(ecode4)) {
14917  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
14918  }
14919  arg4 = static_cast< long >(val4);
14920  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
14921  if (!SWIG_IsOK(res5)) {
14922  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
14923  }
14924  arg5 = reinterpret_cast< float * >(argp5);
14925  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
14926  if (!SWIG_IsOK(res6)) {
14927  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
14928  }
14929  arg6 = reinterpret_cast< float * >(argp6);
14930  ecode7 = SWIG_AsVal_long(obj6, &val7);
14931  if (!SWIG_IsOK(ecode7)) {
14932  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
14933  }
14934  arg7 = static_cast< long >(val7);
14935  ecode8 = SWIG_AsVal_long(obj7, &val8);
14936  if (!SWIG_IsOK(ecode8)) {
14937  SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "pairwise_L2sqr" "', argument " "8"" of type '" "long""'");
14938  }
14939  arg8 = static_cast< long >(val8);
14940  {
14941  Py_BEGIN_ALLOW_THREADS
14942  try {
14943  faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6,arg7,arg8);
14944  } catch(faiss::FaissException & e) {
14945  PyEval_RestoreThread(_save);
14946  PyErr_SetString(PyExc_RuntimeError, e.what());
14947  SWIG_fail;
14948  }
14949  Py_END_ALLOW_THREADS
14950  }
14951  resultobj = SWIG_Py_Void();
14952  return resultobj;
14953 fail:
14954  return NULL;
14955 }
14956 
14957 
14958 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14959  PyObject *resultobj = 0;
14960  long arg1 ;
14961  long arg2 ;
14962  float *arg3 = (float *) 0 ;
14963  long arg4 ;
14964  float *arg5 = (float *) 0 ;
14965  float *arg6 = (float *) 0 ;
14966  long arg7 ;
14967  long val1 ;
14968  int ecode1 = 0 ;
14969  long val2 ;
14970  int ecode2 = 0 ;
14971  void *argp3 = 0 ;
14972  int res3 = 0 ;
14973  long val4 ;
14974  int ecode4 = 0 ;
14975  void *argp5 = 0 ;
14976  int res5 = 0 ;
14977  void *argp6 = 0 ;
14978  int res6 = 0 ;
14979  long val7 ;
14980  int ecode7 = 0 ;
14981  PyObject * obj0 = 0 ;
14982  PyObject * obj1 = 0 ;
14983  PyObject * obj2 = 0 ;
14984  PyObject * obj3 = 0 ;
14985  PyObject * obj4 = 0 ;
14986  PyObject * obj5 = 0 ;
14987  PyObject * obj6 = 0 ;
14988 
14989  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14990  ecode1 = SWIG_AsVal_long(obj0, &val1);
14991  if (!SWIG_IsOK(ecode1)) {
14992  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
14993  }
14994  arg1 = static_cast< long >(val1);
14995  ecode2 = SWIG_AsVal_long(obj1, &val2);
14996  if (!SWIG_IsOK(ecode2)) {
14997  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
14998  }
14999  arg2 = static_cast< long >(val2);
15000  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15001  if (!SWIG_IsOK(res3)) {
15002  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
15003  }
15004  arg3 = reinterpret_cast< float * >(argp3);
15005  ecode4 = SWIG_AsVal_long(obj3, &val4);
15006  if (!SWIG_IsOK(ecode4)) {
15007  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
15008  }
15009  arg4 = static_cast< long >(val4);
15010  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
15011  if (!SWIG_IsOK(res5)) {
15012  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
15013  }
15014  arg5 = reinterpret_cast< float * >(argp5);
15015  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
15016  if (!SWIG_IsOK(res6)) {
15017  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
15018  }
15019  arg6 = reinterpret_cast< float * >(argp6);
15020  ecode7 = SWIG_AsVal_long(obj6, &val7);
15021  if (!SWIG_IsOK(ecode7)) {
15022  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
15023  }
15024  arg7 = static_cast< long >(val7);
15025  {
15026  Py_BEGIN_ALLOW_THREADS
15027  try {
15028  faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6,arg7);
15029  } catch(faiss::FaissException & e) {
15030  PyEval_RestoreThread(_save);
15031  PyErr_SetString(PyExc_RuntimeError, e.what());
15032  SWIG_fail;
15033  }
15034  Py_END_ALLOW_THREADS
15035  }
15036  resultobj = SWIG_Py_Void();
15037  return resultobj;
15038 fail:
15039  return NULL;
15040 }
15041 
15042 
15043 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15044  PyObject *resultobj = 0;
15045  long arg1 ;
15046  long arg2 ;
15047  float *arg3 = (float *) 0 ;
15048  long arg4 ;
15049  float *arg5 = (float *) 0 ;
15050  float *arg6 = (float *) 0 ;
15051  long val1 ;
15052  int ecode1 = 0 ;
15053  long val2 ;
15054  int ecode2 = 0 ;
15055  void *argp3 = 0 ;
15056  int res3 = 0 ;
15057  long val4 ;
15058  int ecode4 = 0 ;
15059  void *argp5 = 0 ;
15060  int res5 = 0 ;
15061  void *argp6 = 0 ;
15062  int res6 = 0 ;
15063  PyObject * obj0 = 0 ;
15064  PyObject * obj1 = 0 ;
15065  PyObject * obj2 = 0 ;
15066  PyObject * obj3 = 0 ;
15067  PyObject * obj4 = 0 ;
15068  PyObject * obj5 = 0 ;
15069 
15070  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
15071  ecode1 = SWIG_AsVal_long(obj0, &val1);
15072  if (!SWIG_IsOK(ecode1)) {
15073  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
15074  }
15075  arg1 = static_cast< long >(val1);
15076  ecode2 = SWIG_AsVal_long(obj1, &val2);
15077  if (!SWIG_IsOK(ecode2)) {
15078  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
15079  }
15080  arg2 = static_cast< long >(val2);
15081  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15082  if (!SWIG_IsOK(res3)) {
15083  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
15084  }
15085  arg3 = reinterpret_cast< float * >(argp3);
15086  ecode4 = SWIG_AsVal_long(obj3, &val4);
15087  if (!SWIG_IsOK(ecode4)) {
15088  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
15089  }
15090  arg4 = static_cast< long >(val4);
15091  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
15092  if (!SWIG_IsOK(res5)) {
15093  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
15094  }
15095  arg5 = reinterpret_cast< float * >(argp5);
15096  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
15097  if (!SWIG_IsOK(res6)) {
15098  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
15099  }
15100  arg6 = reinterpret_cast< float * >(argp6);
15101  {
15102  Py_BEGIN_ALLOW_THREADS
15103  try {
15104  faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6);
15105  } catch(faiss::FaissException & e) {
15106  PyEval_RestoreThread(_save);
15107  PyErr_SetString(PyExc_RuntimeError, e.what());
15108  SWIG_fail;
15109  }
15110  Py_END_ALLOW_THREADS
15111  }
15112  resultobj = SWIG_Py_Void();
15113  return resultobj;
15114 fail:
15115  return NULL;
15116 }
15117 
15118 
15119 SWIGINTERN PyObject *_wrap_pairwise_L2sqr(PyObject *self, PyObject *args) {
15120  Py_ssize_t argc;
15121  PyObject *argv[10] = {
15122  0
15123  };
15124  Py_ssize_t ii;
15125 
15126  if (!PyTuple_Check(args)) SWIG_fail;
15127  argc = args ? PyObject_Length(args) : 0;
15128  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
15129  argv[ii] = PyTuple_GET_ITEM(args,ii);
15130  }
15131  if (argc == 6) {
15132  int _v;
15133  {
15134  int res = SWIG_AsVal_long(argv[0], NULL);
15135  _v = SWIG_CheckState(res);
15136  }
15137  if (_v) {
15138  {
15139  int res = SWIG_AsVal_long(argv[1], NULL);
15140  _v = SWIG_CheckState(res);
15141  }
15142  if (_v) {
15143  void *vptr = 0;
15144  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
15145  _v = SWIG_CheckState(res);
15146  if (_v) {
15147  {
15148  int res = SWIG_AsVal_long(argv[3], NULL);
15149  _v = SWIG_CheckState(res);
15150  }
15151  if (_v) {
15152  void *vptr = 0;
15153  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
15154  _v = SWIG_CheckState(res);
15155  if (_v) {
15156  void *vptr = 0;
15157  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
15158  _v = SWIG_CheckState(res);
15159  if (_v) {
15160  return _wrap_pairwise_L2sqr__SWIG_3(self, args);
15161  }
15162  }
15163  }
15164  }
15165  }
15166  }
15167  }
15168  if (argc == 7) {
15169  int _v;
15170  {
15171  int res = SWIG_AsVal_long(argv[0], NULL);
15172  _v = SWIG_CheckState(res);
15173  }
15174  if (_v) {
15175  {
15176  int res = SWIG_AsVal_long(argv[1], NULL);
15177  _v = SWIG_CheckState(res);
15178  }
15179  if (_v) {
15180  void *vptr = 0;
15181  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
15182  _v = SWIG_CheckState(res);
15183  if (_v) {
15184  {
15185  int res = SWIG_AsVal_long(argv[3], NULL);
15186  _v = SWIG_CheckState(res);
15187  }
15188  if (_v) {
15189  void *vptr = 0;
15190  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
15191  _v = SWIG_CheckState(res);
15192  if (_v) {
15193  void *vptr = 0;
15194  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
15195  _v = SWIG_CheckState(res);
15196  if (_v) {
15197  {
15198  int res = SWIG_AsVal_long(argv[6], NULL);
15199  _v = SWIG_CheckState(res);
15200  }
15201  if (_v) {
15202  return _wrap_pairwise_L2sqr__SWIG_2(self, args);
15203  }
15204  }
15205  }
15206  }
15207  }
15208  }
15209  }
15210  }
15211  if (argc == 8) {
15212  int _v;
15213  {
15214  int res = SWIG_AsVal_long(argv[0], NULL);
15215  _v = SWIG_CheckState(res);
15216  }
15217  if (_v) {
15218  {
15219  int res = SWIG_AsVal_long(argv[1], NULL);
15220  _v = SWIG_CheckState(res);
15221  }
15222  if (_v) {
15223  void *vptr = 0;
15224  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
15225  _v = SWIG_CheckState(res);
15226  if (_v) {
15227  {
15228  int res = SWIG_AsVal_long(argv[3], NULL);
15229  _v = SWIG_CheckState(res);
15230  }
15231  if (_v) {
15232  void *vptr = 0;
15233  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
15234  _v = SWIG_CheckState(res);
15235  if (_v) {
15236  void *vptr = 0;
15237  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
15238  _v = SWIG_CheckState(res);
15239  if (_v) {
15240  {
15241  int res = SWIG_AsVal_long(argv[6], NULL);
15242  _v = SWIG_CheckState(res);
15243  }
15244  if (_v) {
15245  {
15246  int res = SWIG_AsVal_long(argv[7], NULL);
15247  _v = SWIG_CheckState(res);
15248  }
15249  if (_v) {
15250  return _wrap_pairwise_L2sqr__SWIG_1(self, args);
15251  }
15252  }
15253  }
15254  }
15255  }
15256  }
15257  }
15258  }
15259  }
15260  if (argc == 9) {
15261  int _v;
15262  {
15263  int res = SWIG_AsVal_long(argv[0], NULL);
15264  _v = SWIG_CheckState(res);
15265  }
15266  if (_v) {
15267  {
15268  int res = SWIG_AsVal_long(argv[1], NULL);
15269  _v = SWIG_CheckState(res);
15270  }
15271  if (_v) {
15272  void *vptr = 0;
15273  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
15274  _v = SWIG_CheckState(res);
15275  if (_v) {
15276  {
15277  int res = SWIG_AsVal_long(argv[3], NULL);
15278  _v = SWIG_CheckState(res);
15279  }
15280  if (_v) {
15281  void *vptr = 0;
15282  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
15283  _v = SWIG_CheckState(res);
15284  if (_v) {
15285  void *vptr = 0;
15286  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
15287  _v = SWIG_CheckState(res);
15288  if (_v) {
15289  {
15290  int res = SWIG_AsVal_long(argv[6], NULL);
15291  _v = SWIG_CheckState(res);
15292  }
15293  if (_v) {
15294  {
15295  int res = SWIG_AsVal_long(argv[7], NULL);
15296  _v = SWIG_CheckState(res);
15297  }
15298  if (_v) {
15299  {
15300  int res = SWIG_AsVal_long(argv[8], NULL);
15301  _v = SWIG_CheckState(res);
15302  }
15303  if (_v) {
15304  return _wrap_pairwise_L2sqr__SWIG_0(self, args);
15305  }
15306  }
15307  }
15308  }
15309  }
15310  }
15311  }
15312  }
15313  }
15314  }
15315 
15316 fail:
15317  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'pairwise_L2sqr'.\n"
15318  " Possible C/C++ prototypes are:\n"
15319  " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long,long,long)\n"
15320  " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long,long)\n"
15321  " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long)\n"
15322  " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *)\n");
15323  return 0;
15324 }
15325 
15326 
15327 SWIGINTERN PyObject *_wrap_fvec_inner_products_ny(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15328  PyObject *resultobj = 0;
15329  float *arg1 = (float *) 0 ;
15330  float *arg2 = (float *) 0 ;
15331  float *arg3 = (float *) 0 ;
15332  size_t arg4 ;
15333  size_t arg5 ;
15334  void *argp1 = 0 ;
15335  int res1 = 0 ;
15336  void *argp2 = 0 ;
15337  int res2 = 0 ;
15338  void *argp3 = 0 ;
15339  int res3 = 0 ;
15340  size_t val4 ;
15341  int ecode4 = 0 ;
15342  size_t val5 ;
15343  int ecode5 = 0 ;
15344  PyObject * obj0 = 0 ;
15345  PyObject * obj1 = 0 ;
15346  PyObject * obj2 = 0 ;
15347  PyObject * obj3 = 0 ;
15348  PyObject * obj4 = 0 ;
15349 
15350  if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_inner_products_ny",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15351  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15352  if (!SWIG_IsOK(res1)) {
15353  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_inner_products_ny" "', argument " "1"" of type '" "float *""'");
15354  }
15355  arg1 = reinterpret_cast< float * >(argp1);
15356  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15357  if (!SWIG_IsOK(res2)) {
15358  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_inner_products_ny" "', argument " "2"" of type '" "float const *""'");
15359  }
15360  arg2 = reinterpret_cast< float * >(argp2);
15361  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15362  if (!SWIG_IsOK(res3)) {
15363  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_inner_products_ny" "', argument " "3"" of type '" "float const *""'");
15364  }
15365  arg3 = reinterpret_cast< float * >(argp3);
15366  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15367  if (!SWIG_IsOK(ecode4)) {
15368  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_inner_products_ny" "', argument " "4"" of type '" "size_t""'");
15369  }
15370  arg4 = static_cast< size_t >(val4);
15371  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15372  if (!SWIG_IsOK(ecode5)) {
15373  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_inner_products_ny" "', argument " "5"" of type '" "size_t""'");
15374  }
15375  arg5 = static_cast< size_t >(val5);
15376  {
15377  Py_BEGIN_ALLOW_THREADS
15378  try {
15379  faiss::fvec_inner_products_ny(arg1,(float const *)arg2,(float const *)arg3,arg4,arg5);
15380  } catch(faiss::FaissException & e) {
15381  PyEval_RestoreThread(_save);
15382  PyErr_SetString(PyExc_RuntimeError, e.what());
15383  SWIG_fail;
15384  }
15385  Py_END_ALLOW_THREADS
15386  }
15387  resultobj = SWIG_Py_Void();
15388  return resultobj;
15389 fail:
15390  return NULL;
15391 }
15392 
15393 
15394 SWIGINTERN PyObject *_wrap_fvec_L2sqr_ny(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15395  PyObject *resultobj = 0;
15396  float *arg1 = (float *) 0 ;
15397  float *arg2 = (float *) 0 ;
15398  float *arg3 = (float *) 0 ;
15399  size_t arg4 ;
15400  size_t arg5 ;
15401  void *argp1 = 0 ;
15402  int res1 = 0 ;
15403  void *argp2 = 0 ;
15404  int res2 = 0 ;
15405  void *argp3 = 0 ;
15406  int res3 = 0 ;
15407  size_t val4 ;
15408  int ecode4 = 0 ;
15409  size_t val5 ;
15410  int ecode5 = 0 ;
15411  PyObject * obj0 = 0 ;
15412  PyObject * obj1 = 0 ;
15413  PyObject * obj2 = 0 ;
15414  PyObject * obj3 = 0 ;
15415  PyObject * obj4 = 0 ;
15416 
15417  if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_L2sqr_ny",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15418  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15419  if (!SWIG_IsOK(res1)) {
15420  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_L2sqr_ny" "', argument " "1"" of type '" "float *""'");
15421  }
15422  arg1 = reinterpret_cast< float * >(argp1);
15423  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15424  if (!SWIG_IsOK(res2)) {
15425  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_L2sqr_ny" "', argument " "2"" of type '" "float const *""'");
15426  }
15427  arg2 = reinterpret_cast< float * >(argp2);
15428  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15429  if (!SWIG_IsOK(res3)) {
15430  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_L2sqr_ny" "', argument " "3"" of type '" "float const *""'");
15431  }
15432  arg3 = reinterpret_cast< float * >(argp3);
15433  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15434  if (!SWIG_IsOK(ecode4)) {
15435  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_L2sqr_ny" "', argument " "4"" of type '" "size_t""'");
15436  }
15437  arg4 = static_cast< size_t >(val4);
15438  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15439  if (!SWIG_IsOK(ecode5)) {
15440  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_L2sqr_ny" "', argument " "5"" of type '" "size_t""'");
15441  }
15442  arg5 = static_cast< size_t >(val5);
15443  {
15444  Py_BEGIN_ALLOW_THREADS
15445  try {
15446  faiss::fvec_L2sqr_ny(arg1,(float const *)arg2,(float const *)arg3,arg4,arg5);
15447  } catch(faiss::FaissException & e) {
15448  PyEval_RestoreThread(_save);
15449  PyErr_SetString(PyExc_RuntimeError, e.what());
15450  SWIG_fail;
15451  }
15452  Py_END_ALLOW_THREADS
15453  }
15454  resultobj = SWIG_Py_Void();
15455  return resultobj;
15456 fail:
15457  return NULL;
15458 }
15459 
15460 
15461 SWIGINTERN PyObject *_wrap_fvec_norm_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15462  PyObject *resultobj = 0;
15463  float *arg1 = (float *) 0 ;
15464  size_t arg2 ;
15465  void *argp1 = 0 ;
15466  int res1 = 0 ;
15467  size_t val2 ;
15468  int ecode2 = 0 ;
15469  PyObject * obj0 = 0 ;
15470  PyObject * obj1 = 0 ;
15471  float result;
15472 
15473  if (!PyArg_ParseTuple(args,(char *)"OO:fvec_norm_L2sqr",&obj0,&obj1)) SWIG_fail;
15474  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15475  if (!SWIG_IsOK(res1)) {
15476  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_norm_L2sqr" "', argument " "1"" of type '" "float const *""'");
15477  }
15478  arg1 = reinterpret_cast< float * >(argp1);
15479  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
15480  if (!SWIG_IsOK(ecode2)) {
15481  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fvec_norm_L2sqr" "', argument " "2"" of type '" "size_t""'");
15482  }
15483  arg2 = static_cast< size_t >(val2);
15484  {
15485  Py_BEGIN_ALLOW_THREADS
15486  try {
15487  result = (float)faiss::fvec_norm_L2sqr((float const *)arg1,arg2);
15488  } catch(faiss::FaissException & e) {
15489  PyEval_RestoreThread(_save);
15490  PyErr_SetString(PyExc_RuntimeError, e.what());
15491  SWIG_fail;
15492  }
15493  Py_END_ALLOW_THREADS
15494  }
15495  resultobj = SWIG_From_float(static_cast< float >(result));
15496  return resultobj;
15497 fail:
15498  return NULL;
15499 }
15500 
15501 
15502 SWIGINTERN PyObject *_wrap_fvec_norms_L2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15503  PyObject *resultobj = 0;
15504  float *arg1 = (float *) 0 ;
15505  float *arg2 = (float *) 0 ;
15506  size_t arg3 ;
15507  size_t arg4 ;
15508  void *argp1 = 0 ;
15509  int res1 = 0 ;
15510  void *argp2 = 0 ;
15511  int res2 = 0 ;
15512  size_t val3 ;
15513  int ecode3 = 0 ;
15514  size_t val4 ;
15515  int ecode4 = 0 ;
15516  PyObject * obj0 = 0 ;
15517  PyObject * obj1 = 0 ;
15518  PyObject * obj2 = 0 ;
15519  PyObject * obj3 = 0 ;
15520 
15521  if (!PyArg_ParseTuple(args,(char *)"OOOO:fvec_norms_L2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
15522  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15523  if (!SWIG_IsOK(res1)) {
15524  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_norms_L2" "', argument " "1"" of type '" "float *""'");
15525  }
15526  arg1 = reinterpret_cast< float * >(argp1);
15527  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15528  if (!SWIG_IsOK(res2)) {
15529  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_norms_L2" "', argument " "2"" of type '" "float const *""'");
15530  }
15531  arg2 = reinterpret_cast< float * >(argp2);
15532  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15533  if (!SWIG_IsOK(ecode3)) {
15534  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_norms_L2" "', argument " "3"" of type '" "size_t""'");
15535  }
15536  arg3 = static_cast< size_t >(val3);
15537  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15538  if (!SWIG_IsOK(ecode4)) {
15539  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_norms_L2" "', argument " "4"" of type '" "size_t""'");
15540  }
15541  arg4 = static_cast< size_t >(val4);
15542  {
15543  Py_BEGIN_ALLOW_THREADS
15544  try {
15545  faiss::fvec_norms_L2(arg1,(float const *)arg2,arg3,arg4);
15546  } catch(faiss::FaissException & e) {
15547  PyEval_RestoreThread(_save);
15548  PyErr_SetString(PyExc_RuntimeError, e.what());
15549  SWIG_fail;
15550  }
15551  Py_END_ALLOW_THREADS
15552  }
15553  resultobj = SWIG_Py_Void();
15554  return resultobj;
15555 fail:
15556  return NULL;
15557 }
15558 
15559 
15560 SWIGINTERN PyObject *_wrap_fvec_norms_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15561  PyObject *resultobj = 0;
15562  float *arg1 = (float *) 0 ;
15563  float *arg2 = (float *) 0 ;
15564  size_t arg3 ;
15565  size_t arg4 ;
15566  void *argp1 = 0 ;
15567  int res1 = 0 ;
15568  void *argp2 = 0 ;
15569  int res2 = 0 ;
15570  size_t val3 ;
15571  int ecode3 = 0 ;
15572  size_t val4 ;
15573  int ecode4 = 0 ;
15574  PyObject * obj0 = 0 ;
15575  PyObject * obj1 = 0 ;
15576  PyObject * obj2 = 0 ;
15577  PyObject * obj3 = 0 ;
15578 
15579  if (!PyArg_ParseTuple(args,(char *)"OOOO:fvec_norms_L2sqr",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
15580  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15581  if (!SWIG_IsOK(res1)) {
15582  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_norms_L2sqr" "', argument " "1"" of type '" "float *""'");
15583  }
15584  arg1 = reinterpret_cast< float * >(argp1);
15585  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15586  if (!SWIG_IsOK(res2)) {
15587  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_norms_L2sqr" "', argument " "2"" of type '" "float const *""'");
15588  }
15589  arg2 = reinterpret_cast< float * >(argp2);
15590  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15591  if (!SWIG_IsOK(ecode3)) {
15592  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_norms_L2sqr" "', argument " "3"" of type '" "size_t""'");
15593  }
15594  arg3 = static_cast< size_t >(val3);
15595  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15596  if (!SWIG_IsOK(ecode4)) {
15597  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_norms_L2sqr" "', argument " "4"" of type '" "size_t""'");
15598  }
15599  arg4 = static_cast< size_t >(val4);
15600  {
15601  Py_BEGIN_ALLOW_THREADS
15602  try {
15603  faiss::fvec_norms_L2sqr(arg1,(float const *)arg2,arg3,arg4);
15604  } catch(faiss::FaissException & e) {
15605  PyEval_RestoreThread(_save);
15606  PyErr_SetString(PyExc_RuntimeError, e.what());
15607  SWIG_fail;
15608  }
15609  Py_END_ALLOW_THREADS
15610  }
15611  resultobj = SWIG_Py_Void();
15612  return resultobj;
15613 fail:
15614  return NULL;
15615 }
15616 
15617 
15618 SWIGINTERN PyObject *_wrap_fvec_renorm_L2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15619  PyObject *resultobj = 0;
15620  size_t arg1 ;
15621  size_t arg2 ;
15622  float *arg3 = (float *) 0 ;
15623  size_t val1 ;
15624  int ecode1 = 0 ;
15625  size_t val2 ;
15626  int ecode2 = 0 ;
15627  void *argp3 = 0 ;
15628  int res3 = 0 ;
15629  PyObject * obj0 = 0 ;
15630  PyObject * obj1 = 0 ;
15631  PyObject * obj2 = 0 ;
15632 
15633  if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_renorm_L2",&obj0,&obj1,&obj2)) SWIG_fail;
15634  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15635  if (!SWIG_IsOK(ecode1)) {
15636  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_renorm_L2" "', argument " "1"" of type '" "size_t""'");
15637  }
15638  arg1 = static_cast< size_t >(val1);
15639  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
15640  if (!SWIG_IsOK(ecode2)) {
15641  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fvec_renorm_L2" "', argument " "2"" of type '" "size_t""'");
15642  }
15643  arg2 = static_cast< size_t >(val2);
15644  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15645  if (!SWIG_IsOK(res3)) {
15646  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_renorm_L2" "', argument " "3"" of type '" "float *""'");
15647  }
15648  arg3 = reinterpret_cast< float * >(argp3);
15649  {
15650  Py_BEGIN_ALLOW_THREADS
15651  try {
15652  faiss::fvec_renorm_L2(arg1,arg2,arg3);
15653  } catch(faiss::FaissException & e) {
15654  PyEval_RestoreThread(_save);
15655  PyErr_SetString(PyExc_RuntimeError, e.what());
15656  SWIG_fail;
15657  }
15658  Py_END_ALLOW_THREADS
15659  }
15660  resultobj = SWIG_Py_Void();
15661  return resultobj;
15662 fail:
15663  return NULL;
15664 }
15665 
15666 
15667 SWIGINTERN PyObject *_wrap_inner_product_to_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15668  PyObject *resultobj = 0;
15669  float *arg1 = (float *) 0 ;
15670  float *arg2 = (float *) 0 ;
15671  float *arg3 = (float *) 0 ;
15672  size_t arg4 ;
15673  size_t arg5 ;
15674  void *argp1 = 0 ;
15675  int res1 = 0 ;
15676  void *argp2 = 0 ;
15677  int res2 = 0 ;
15678  void *argp3 = 0 ;
15679  int res3 = 0 ;
15680  size_t val4 ;
15681  int ecode4 = 0 ;
15682  size_t val5 ;
15683  int ecode5 = 0 ;
15684  PyObject * obj0 = 0 ;
15685  PyObject * obj1 = 0 ;
15686  PyObject * obj2 = 0 ;
15687  PyObject * obj3 = 0 ;
15688  PyObject * obj4 = 0 ;
15689 
15690  if (!PyArg_ParseTuple(args,(char *)"OOOOO:inner_product_to_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15691  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15692  if (!SWIG_IsOK(res1)) {
15693  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "inner_product_to_L2sqr" "', argument " "1"" of type '" "float *""'");
15694  }
15695  arg1 = reinterpret_cast< float * >(argp1);
15696  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15697  if (!SWIG_IsOK(res2)) {
15698  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "inner_product_to_L2sqr" "', argument " "2"" of type '" "float const *""'");
15699  }
15700  arg2 = reinterpret_cast< float * >(argp2);
15701  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15702  if (!SWIG_IsOK(res3)) {
15703  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "inner_product_to_L2sqr" "', argument " "3"" of type '" "float const *""'");
15704  }
15705  arg3 = reinterpret_cast< float * >(argp3);
15706  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15707  if (!SWIG_IsOK(ecode4)) {
15708  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "inner_product_to_L2sqr" "', argument " "4"" of type '" "size_t""'");
15709  }
15710  arg4 = static_cast< size_t >(val4);
15711  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15712  if (!SWIG_IsOK(ecode5)) {
15713  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "inner_product_to_L2sqr" "', argument " "5"" of type '" "size_t""'");
15714  }
15715  arg5 = static_cast< size_t >(val5);
15716  {
15717  Py_BEGIN_ALLOW_THREADS
15718  try {
15719  faiss::inner_product_to_L2sqr(arg1,(float const *)arg2,(float const *)arg3,arg4,arg5);
15720  } catch(faiss::FaissException & e) {
15721  PyEval_RestoreThread(_save);
15722  PyErr_SetString(PyExc_RuntimeError, e.what());
15723  SWIG_fail;
15724  }
15725  Py_END_ALLOW_THREADS
15726  }
15727  resultobj = SWIG_Py_Void();
15728  return resultobj;
15729 fail:
15730  return NULL;
15731 }
15732 
15733 
15734 SWIGINTERN PyObject *_wrap_fvec_inner_products_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15735  PyObject *resultobj = 0;
15736  float *arg1 = (float *) 0 ;
15737  float *arg2 = (float *) 0 ;
15738  float *arg3 = (float *) 0 ;
15739  long *arg4 = (long *) 0 ;
15740  size_t arg5 ;
15741  size_t arg6 ;
15742  size_t arg7 ;
15743  void *argp1 = 0 ;
15744  int res1 = 0 ;
15745  void *argp2 = 0 ;
15746  int res2 = 0 ;
15747  void *argp3 = 0 ;
15748  int res3 = 0 ;
15749  void *argp4 = 0 ;
15750  int res4 = 0 ;
15751  size_t val5 ;
15752  int ecode5 = 0 ;
15753  size_t val6 ;
15754  int ecode6 = 0 ;
15755  size_t val7 ;
15756  int ecode7 = 0 ;
15757  PyObject * obj0 = 0 ;
15758  PyObject * obj1 = 0 ;
15759  PyObject * obj2 = 0 ;
15760  PyObject * obj3 = 0 ;
15761  PyObject * obj4 = 0 ;
15762  PyObject * obj5 = 0 ;
15763  PyObject * obj6 = 0 ;
15764 
15765  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:fvec_inner_products_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15766  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15767  if (!SWIG_IsOK(res1)) {
15768  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_inner_products_by_idx" "', argument " "1"" of type '" "float *""'");
15769  }
15770  arg1 = reinterpret_cast< float * >(argp1);
15771  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15772  if (!SWIG_IsOK(res2)) {
15773  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_inner_products_by_idx" "', argument " "2"" of type '" "float const *""'");
15774  }
15775  arg2 = reinterpret_cast< float * >(argp2);
15776  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15777  if (!SWIG_IsOK(res3)) {
15778  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_inner_products_by_idx" "', argument " "3"" of type '" "float const *""'");
15779  }
15780  arg3 = reinterpret_cast< float * >(argp3);
15781  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
15782  if (!SWIG_IsOK(res4)) {
15783  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_inner_products_by_idx" "', argument " "4"" of type '" "long const *""'");
15784  }
15785  arg4 = reinterpret_cast< long * >(argp4);
15786  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15787  if (!SWIG_IsOK(ecode5)) {
15788  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_inner_products_by_idx" "', argument " "5"" of type '" "size_t""'");
15789  }
15790  arg5 = static_cast< size_t >(val5);
15791  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
15792  if (!SWIG_IsOK(ecode6)) {
15793  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fvec_inner_products_by_idx" "', argument " "6"" of type '" "size_t""'");
15794  }
15795  arg6 = static_cast< size_t >(val6);
15796  ecode7 = SWIG_AsVal_size_t(obj6, &val7);
15797  if (!SWIG_IsOK(ecode7)) {
15798  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fvec_inner_products_by_idx" "', argument " "7"" of type '" "size_t""'");
15799  }
15800  arg7 = static_cast< size_t >(val7);
15801  {
15802  Py_BEGIN_ALLOW_THREADS
15803  try {
15804  faiss::fvec_inner_products_by_idx(arg1,(float const *)arg2,(float const *)arg3,(long const *)arg4,arg5,arg6,arg7);
15805  } catch(faiss::FaissException & e) {
15806  PyEval_RestoreThread(_save);
15807  PyErr_SetString(PyExc_RuntimeError, e.what());
15808  SWIG_fail;
15809  }
15810  Py_END_ALLOW_THREADS
15811  }
15812  resultobj = SWIG_Py_Void();
15813  return resultobj;
15814 fail:
15815  return NULL;
15816 }
15817 
15818 
15819 SWIGINTERN PyObject *_wrap_fvec_L2sqr_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15820  PyObject *resultobj = 0;
15821  float *arg1 = (float *) 0 ;
15822  float *arg2 = (float *) 0 ;
15823  float *arg3 = (float *) 0 ;
15824  long *arg4 = (long *) 0 ;
15825  size_t arg5 ;
15826  size_t arg6 ;
15827  size_t arg7 ;
15828  void *argp1 = 0 ;
15829  int res1 = 0 ;
15830  void *argp2 = 0 ;
15831  int res2 = 0 ;
15832  void *argp3 = 0 ;
15833  int res3 = 0 ;
15834  void *argp4 = 0 ;
15835  int res4 = 0 ;
15836  size_t val5 ;
15837  int ecode5 = 0 ;
15838  size_t val6 ;
15839  int ecode6 = 0 ;
15840  size_t val7 ;
15841  int ecode7 = 0 ;
15842  PyObject * obj0 = 0 ;
15843  PyObject * obj1 = 0 ;
15844  PyObject * obj2 = 0 ;
15845  PyObject * obj3 = 0 ;
15846  PyObject * obj4 = 0 ;
15847  PyObject * obj5 = 0 ;
15848  PyObject * obj6 = 0 ;
15849 
15850  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:fvec_L2sqr_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15851  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15852  if (!SWIG_IsOK(res1)) {
15853  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_L2sqr_by_idx" "', argument " "1"" of type '" "float *""'");
15854  }
15855  arg1 = reinterpret_cast< float * >(argp1);
15856  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15857  if (!SWIG_IsOK(res2)) {
15858  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_L2sqr_by_idx" "', argument " "2"" of type '" "float const *""'");
15859  }
15860  arg2 = reinterpret_cast< float * >(argp2);
15861  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15862  if (!SWIG_IsOK(res3)) {
15863  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_L2sqr_by_idx" "', argument " "3"" of type '" "float const *""'");
15864  }
15865  arg3 = reinterpret_cast< float * >(argp3);
15866  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
15867  if (!SWIG_IsOK(res4)) {
15868  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_L2sqr_by_idx" "', argument " "4"" of type '" "long const *""'");
15869  }
15870  arg4 = reinterpret_cast< long * >(argp4);
15871  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15872  if (!SWIG_IsOK(ecode5)) {
15873  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_L2sqr_by_idx" "', argument " "5"" of type '" "size_t""'");
15874  }
15875  arg5 = static_cast< size_t >(val5);
15876  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
15877  if (!SWIG_IsOK(ecode6)) {
15878  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fvec_L2sqr_by_idx" "', argument " "6"" of type '" "size_t""'");
15879  }
15880  arg6 = static_cast< size_t >(val6);
15881  ecode7 = SWIG_AsVal_size_t(obj6, &val7);
15882  if (!SWIG_IsOK(ecode7)) {
15883  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fvec_L2sqr_by_idx" "', argument " "7"" of type '" "size_t""'");
15884  }
15885  arg7 = static_cast< size_t >(val7);
15886  {
15887  Py_BEGIN_ALLOW_THREADS
15888  try {
15889  faiss::fvec_L2sqr_by_idx(arg1,(float const *)arg2,(float const *)arg3,(long const *)arg4,arg5,arg6,arg7);
15890  } catch(faiss::FaissException & e) {
15891  PyEval_RestoreThread(_save);
15892  PyErr_SetString(PyExc_RuntimeError, e.what());
15893  SWIG_fail;
15894  }
15895  Py_END_ALLOW_THREADS
15896  }
15897  resultobj = SWIG_Py_Void();
15898  return resultobj;
15899 fail:
15900  return NULL;
15901 }
15902 
15903 
15904 SWIGINTERN int Swig_var_distance_compute_blas_threshold_set(PyObject *_val) {
15905  {
15906  int val;
15907  int res = SWIG_AsVal_int(_val, &val);
15908  if (!SWIG_IsOK(res)) {
15909  SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::distance_compute_blas_threshold""' of type '""int""'");
15910  }
15911  faiss::distance_compute_blas_threshold = static_cast< int >(val);
15912  }
15913  return 0;
15914 fail:
15915  return 1;
15916 }
15917 
15918 
15919 SWIGINTERN PyObject *Swig_var_distance_compute_blas_threshold_get(void) {
15920  PyObject *pyobj = 0;
15921 
15922  pyobj = SWIG_From_int(static_cast< int >(faiss::distance_compute_blas_threshold));
15923  return pyobj;
15924 }
15925 
15926 
15927 SWIGINTERN PyObject *_wrap_knn_inner_product(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15928  PyObject *resultobj = 0;
15929  float *arg1 = (float *) 0 ;
15930  float *arg2 = (float *) 0 ;
15931  size_t arg3 ;
15932  size_t arg4 ;
15933  size_t arg5 ;
15935  void *argp1 = 0 ;
15936  int res1 = 0 ;
15937  void *argp2 = 0 ;
15938  int res2 = 0 ;
15939  size_t val3 ;
15940  int ecode3 = 0 ;
15941  size_t val4 ;
15942  int ecode4 = 0 ;
15943  size_t val5 ;
15944  int ecode5 = 0 ;
15945  void *argp6 = 0 ;
15946  int res6 = 0 ;
15947  PyObject * obj0 = 0 ;
15948  PyObject * obj1 = 0 ;
15949  PyObject * obj2 = 0 ;
15950  PyObject * obj3 = 0 ;
15951  PyObject * obj4 = 0 ;
15952  PyObject * obj5 = 0 ;
15953 
15954  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:knn_inner_product",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
15955  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15956  if (!SWIG_IsOK(res1)) {
15957  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_inner_product" "', argument " "1"" of type '" "float const *""'");
15958  }
15959  arg1 = reinterpret_cast< float * >(argp1);
15960  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15961  if (!SWIG_IsOK(res2)) {
15962  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_inner_product" "', argument " "2"" of type '" "float const *""'");
15963  }
15964  arg2 = reinterpret_cast< float * >(argp2);
15965  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15966  if (!SWIG_IsOK(ecode3)) {
15967  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "knn_inner_product" "', argument " "3"" of type '" "size_t""'");
15968  }
15969  arg3 = static_cast< size_t >(val3);
15970  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15971  if (!SWIG_IsOK(ecode4)) {
15972  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_inner_product" "', argument " "4"" of type '" "size_t""'");
15973  }
15974  arg4 = static_cast< size_t >(val4);
15975  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15976  if (!SWIG_IsOK(ecode5)) {
15977  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_inner_product" "', argument " "5"" of type '" "size_t""'");
15978  }
15979  arg5 = static_cast< size_t >(val5);
15980  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
15981  if (!SWIG_IsOK(res6)) {
15982  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "knn_inner_product" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
15983  }
15984  arg6 = reinterpret_cast< faiss::float_minheap_array_t * >(argp6);
15985  {
15986  Py_BEGIN_ALLOW_THREADS
15987  try {
15988  faiss::knn_inner_product((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6);
15989  } catch(faiss::FaissException & e) {
15990  PyEval_RestoreThread(_save);
15991  PyErr_SetString(PyExc_RuntimeError, e.what());
15992  SWIG_fail;
15993  }
15994  Py_END_ALLOW_THREADS
15995  }
15996  resultobj = SWIG_Py_Void();
15997  return resultobj;
15998 fail:
15999  return NULL;
16000 }
16001 
16002 
16003 SWIGINTERN PyObject *_wrap_knn_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16004  PyObject *resultobj = 0;
16005  float *arg1 = (float *) 0 ;
16006  float *arg2 = (float *) 0 ;
16007  size_t arg3 ;
16008  size_t arg4 ;
16009  size_t arg5 ;
16011  void *argp1 = 0 ;
16012  int res1 = 0 ;
16013  void *argp2 = 0 ;
16014  int res2 = 0 ;
16015  size_t val3 ;
16016  int ecode3 = 0 ;
16017  size_t val4 ;
16018  int ecode4 = 0 ;
16019  size_t val5 ;
16020  int ecode5 = 0 ;
16021  void *argp6 = 0 ;
16022  int res6 = 0 ;
16023  PyObject * obj0 = 0 ;
16024  PyObject * obj1 = 0 ;
16025  PyObject * obj2 = 0 ;
16026  PyObject * obj3 = 0 ;
16027  PyObject * obj4 = 0 ;
16028  PyObject * obj5 = 0 ;
16029 
16030  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:knn_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
16031  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16032  if (!SWIG_IsOK(res1)) {
16033  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_L2sqr" "', argument " "1"" of type '" "float const *""'");
16034  }
16035  arg1 = reinterpret_cast< float * >(argp1);
16036  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16037  if (!SWIG_IsOK(res2)) {
16038  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_L2sqr" "', argument " "2"" of type '" "float const *""'");
16039  }
16040  arg2 = reinterpret_cast< float * >(argp2);
16041  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16042  if (!SWIG_IsOK(ecode3)) {
16043  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "knn_L2sqr" "', argument " "3"" of type '" "size_t""'");
16044  }
16045  arg3 = static_cast< size_t >(val3);
16046  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16047  if (!SWIG_IsOK(ecode4)) {
16048  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_L2sqr" "', argument " "4"" of type '" "size_t""'");
16049  }
16050  arg4 = static_cast< size_t >(val4);
16051  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16052  if (!SWIG_IsOK(ecode5)) {
16053  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_L2sqr" "', argument " "5"" of type '" "size_t""'");
16054  }
16055  arg5 = static_cast< size_t >(val5);
16056  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
16057  if (!SWIG_IsOK(res6)) {
16058  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "knn_L2sqr" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
16059  }
16060  arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
16061  {
16062  Py_BEGIN_ALLOW_THREADS
16063  try {
16064  faiss::knn_L2sqr((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6);
16065  } catch(faiss::FaissException & e) {
16066  PyEval_RestoreThread(_save);
16067  PyErr_SetString(PyExc_RuntimeError, e.what());
16068  SWIG_fail;
16069  }
16070  Py_END_ALLOW_THREADS
16071  }
16072  resultobj = SWIG_Py_Void();
16073  return resultobj;
16074 fail:
16075  return NULL;
16076 }
16077 
16078 
16079 SWIGINTERN PyObject *_wrap_knn_L2sqr_base_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16080  PyObject *resultobj = 0;
16081  float *arg1 = (float *) 0 ;
16082  float *arg2 = (float *) 0 ;
16083  size_t arg3 ;
16084  size_t arg4 ;
16085  size_t arg5 ;
16087  float *arg7 = (float *) 0 ;
16088  void *argp1 = 0 ;
16089  int res1 = 0 ;
16090  void *argp2 = 0 ;
16091  int res2 = 0 ;
16092  size_t val3 ;
16093  int ecode3 = 0 ;
16094  size_t val4 ;
16095  int ecode4 = 0 ;
16096  size_t val5 ;
16097  int ecode5 = 0 ;
16098  void *argp6 = 0 ;
16099  int res6 = 0 ;
16100  void *argp7 = 0 ;
16101  int res7 = 0 ;
16102  PyObject * obj0 = 0 ;
16103  PyObject * obj1 = 0 ;
16104  PyObject * obj2 = 0 ;
16105  PyObject * obj3 = 0 ;
16106  PyObject * obj4 = 0 ;
16107  PyObject * obj5 = 0 ;
16108  PyObject * obj6 = 0 ;
16109 
16110  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:knn_L2sqr_base_shift",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
16111  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16112  if (!SWIG_IsOK(res1)) {
16113  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_L2sqr_base_shift" "', argument " "1"" of type '" "float const *""'");
16114  }
16115  arg1 = reinterpret_cast< float * >(argp1);
16116  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16117  if (!SWIG_IsOK(res2)) {
16118  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_L2sqr_base_shift" "', argument " "2"" of type '" "float const *""'");
16119  }
16120  arg2 = reinterpret_cast< float * >(argp2);
16121  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16122  if (!SWIG_IsOK(ecode3)) {
16123  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "knn_L2sqr_base_shift" "', argument " "3"" of type '" "size_t""'");
16124  }
16125  arg3 = static_cast< size_t >(val3);
16126  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16127  if (!SWIG_IsOK(ecode4)) {
16128  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_L2sqr_base_shift" "', argument " "4"" of type '" "size_t""'");
16129  }
16130  arg4 = static_cast< size_t >(val4);
16131  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16132  if (!SWIG_IsOK(ecode5)) {
16133  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_L2sqr_base_shift" "', argument " "5"" of type '" "size_t""'");
16134  }
16135  arg5 = static_cast< size_t >(val5);
16136  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
16137  if (!SWIG_IsOK(res6)) {
16138  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "knn_L2sqr_base_shift" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
16139  }
16140  arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
16141  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
16142  if (!SWIG_IsOK(res7)) {
16143  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "knn_L2sqr_base_shift" "', argument " "7"" of type '" "float const *""'");
16144  }
16145  arg7 = reinterpret_cast< float * >(argp7);
16146  {
16147  Py_BEGIN_ALLOW_THREADS
16148  try {
16149  faiss::knn_L2sqr_base_shift((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6,(float const *)arg7);
16150  } catch(faiss::FaissException & e) {
16151  PyEval_RestoreThread(_save);
16152  PyErr_SetString(PyExc_RuntimeError, e.what());
16153  SWIG_fail;
16154  }
16155  Py_END_ALLOW_THREADS
16156  }
16157  resultobj = SWIG_Py_Void();
16158  return resultobj;
16159 fail:
16160  return NULL;
16161 }
16162 
16163 
16164 SWIGINTERN PyObject *_wrap_knn_inner_products_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16165  PyObject *resultobj = 0;
16166  float *arg1 = (float *) 0 ;
16167  float *arg2 = (float *) 0 ;
16168  long *arg3 = (long *) 0 ;
16169  size_t arg4 ;
16170  size_t arg5 ;
16171  size_t arg6 ;
16173  void *argp1 = 0 ;
16174  int res1 = 0 ;
16175  void *argp2 = 0 ;
16176  int res2 = 0 ;
16177  void *argp3 = 0 ;
16178  int res3 = 0 ;
16179  size_t val4 ;
16180  int ecode4 = 0 ;
16181  size_t val5 ;
16182  int ecode5 = 0 ;
16183  size_t val6 ;
16184  int ecode6 = 0 ;
16185  void *argp7 = 0 ;
16186  int res7 = 0 ;
16187  PyObject * obj0 = 0 ;
16188  PyObject * obj1 = 0 ;
16189  PyObject * obj2 = 0 ;
16190  PyObject * obj3 = 0 ;
16191  PyObject * obj4 = 0 ;
16192  PyObject * obj5 = 0 ;
16193  PyObject * obj6 = 0 ;
16194 
16195  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:knn_inner_products_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
16196  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16197  if (!SWIG_IsOK(res1)) {
16198  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_inner_products_by_idx" "', argument " "1"" of type '" "float const *""'");
16199  }
16200  arg1 = reinterpret_cast< float * >(argp1);
16201  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16202  if (!SWIG_IsOK(res2)) {
16203  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_inner_products_by_idx" "', argument " "2"" of type '" "float const *""'");
16204  }
16205  arg2 = reinterpret_cast< float * >(argp2);
16206  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
16207  if (!SWIG_IsOK(res3)) {
16208  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "knn_inner_products_by_idx" "', argument " "3"" of type '" "long const *""'");
16209  }
16210  arg3 = reinterpret_cast< long * >(argp3);
16211  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16212  if (!SWIG_IsOK(ecode4)) {
16213  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_inner_products_by_idx" "', argument " "4"" of type '" "size_t""'");
16214  }
16215  arg4 = static_cast< size_t >(val4);
16216  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16217  if (!SWIG_IsOK(ecode5)) {
16218  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_inner_products_by_idx" "', argument " "5"" of type '" "size_t""'");
16219  }
16220  arg5 = static_cast< size_t >(val5);
16221  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
16222  if (!SWIG_IsOK(ecode6)) {
16223  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "knn_inner_products_by_idx" "', argument " "6"" of type '" "size_t""'");
16224  }
16225  arg6 = static_cast< size_t >(val6);
16226  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
16227  if (!SWIG_IsOK(res7)) {
16228  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "knn_inner_products_by_idx" "', argument " "7"" of type '" "faiss::float_minheap_array_t *""'");
16229  }
16230  arg7 = reinterpret_cast< faiss::float_minheap_array_t * >(argp7);
16231  {
16232  Py_BEGIN_ALLOW_THREADS
16233  try {
16234  faiss::knn_inner_products_by_idx((float const *)arg1,(float const *)arg2,(long const *)arg3,arg4,arg5,arg6,arg7);
16235  } catch(faiss::FaissException & e) {
16236  PyEval_RestoreThread(_save);
16237  PyErr_SetString(PyExc_RuntimeError, e.what());
16238  SWIG_fail;
16239  }
16240  Py_END_ALLOW_THREADS
16241  }
16242  resultobj = SWIG_Py_Void();
16243  return resultobj;
16244 fail:
16245  return NULL;
16246 }
16247 
16248 
16249 SWIGINTERN PyObject *_wrap_knn_L2sqr_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16250  PyObject *resultobj = 0;
16251  float *arg1 = (float *) 0 ;
16252  float *arg2 = (float *) 0 ;
16253  long *arg3 = (long *) 0 ;
16254  size_t arg4 ;
16255  size_t arg5 ;
16256  size_t arg6 ;
16258  void *argp1 = 0 ;
16259  int res1 = 0 ;
16260  void *argp2 = 0 ;
16261  int res2 = 0 ;
16262  void *argp3 = 0 ;
16263  int res3 = 0 ;
16264  size_t val4 ;
16265  int ecode4 = 0 ;
16266  size_t val5 ;
16267  int ecode5 = 0 ;
16268  size_t val6 ;
16269  int ecode6 = 0 ;
16270  void *argp7 = 0 ;
16271  int res7 = 0 ;
16272  PyObject * obj0 = 0 ;
16273  PyObject * obj1 = 0 ;
16274  PyObject * obj2 = 0 ;
16275  PyObject * obj3 = 0 ;
16276  PyObject * obj4 = 0 ;
16277  PyObject * obj5 = 0 ;
16278  PyObject * obj6 = 0 ;
16279 
16280  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:knn_L2sqr_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
16281  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16282  if (!SWIG_IsOK(res1)) {
16283  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_L2sqr_by_idx" "', argument " "1"" of type '" "float const *""'");
16284  }
16285  arg1 = reinterpret_cast< float * >(argp1);
16286  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16287  if (!SWIG_IsOK(res2)) {
16288  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_L2sqr_by_idx" "', argument " "2"" of type '" "float const *""'");
16289  }
16290  arg2 = reinterpret_cast< float * >(argp2);
16291  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
16292  if (!SWIG_IsOK(res3)) {
16293  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "knn_L2sqr_by_idx" "', argument " "3"" of type '" "long const *""'");
16294  }
16295  arg3 = reinterpret_cast< long * >(argp3);
16296  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16297  if (!SWIG_IsOK(ecode4)) {
16298  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_L2sqr_by_idx" "', argument " "4"" of type '" "size_t""'");
16299  }
16300  arg4 = static_cast< size_t >(val4);
16301  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16302  if (!SWIG_IsOK(ecode5)) {
16303  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_L2sqr_by_idx" "', argument " "5"" of type '" "size_t""'");
16304  }
16305  arg5 = static_cast< size_t >(val5);
16306  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
16307  if (!SWIG_IsOK(ecode6)) {
16308  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "knn_L2sqr_by_idx" "', argument " "6"" of type '" "size_t""'");
16309  }
16310  arg6 = static_cast< size_t >(val6);
16311  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
16312  if (!SWIG_IsOK(res7)) {
16313  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "knn_L2sqr_by_idx" "', argument " "7"" of type '" "faiss::float_maxheap_array_t *""'");
16314  }
16315  arg7 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp7);
16316  {
16317  Py_BEGIN_ALLOW_THREADS
16318  try {
16319  faiss::knn_L2sqr_by_idx((float const *)arg1,(float const *)arg2,(long const *)arg3,arg4,arg5,arg6,arg7);
16320  } catch(faiss::FaissException & e) {
16321  PyEval_RestoreThread(_save);
16322  PyErr_SetString(PyExc_RuntimeError, e.what());
16323  SWIG_fail;
16324  }
16325  Py_END_ALLOW_THREADS
16326  }
16327  resultobj = SWIG_Py_Void();
16328  return resultobj;
16329 fail:
16330  return NULL;
16331 }
16332 
16333 
16334 SWIGINTERN PyObject *_wrap_range_search_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16335  PyObject *resultobj = 0;
16336  float *arg1 = (float *) 0 ;
16337  float *arg2 = (float *) 0 ;
16338  size_t arg3 ;
16339  size_t arg4 ;
16340  size_t arg5 ;
16341  float arg6 ;
16343  void *argp1 = 0 ;
16344  int res1 = 0 ;
16345  void *argp2 = 0 ;
16346  int res2 = 0 ;
16347  size_t val3 ;
16348  int ecode3 = 0 ;
16349  size_t val4 ;
16350  int ecode4 = 0 ;
16351  size_t val5 ;
16352  int ecode5 = 0 ;
16353  float val6 ;
16354  int ecode6 = 0 ;
16355  void *argp7 = 0 ;
16356  int res7 = 0 ;
16357  PyObject * obj0 = 0 ;
16358  PyObject * obj1 = 0 ;
16359  PyObject * obj2 = 0 ;
16360  PyObject * obj3 = 0 ;
16361  PyObject * obj4 = 0 ;
16362  PyObject * obj5 = 0 ;
16363  PyObject * obj6 = 0 ;
16364 
16365  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:range_search_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
16366  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16367  if (!SWIG_IsOK(res1)) {
16368  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "range_search_L2sqr" "', argument " "1"" of type '" "float const *""'");
16369  }
16370  arg1 = reinterpret_cast< float * >(argp1);
16371  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16372  if (!SWIG_IsOK(res2)) {
16373  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "range_search_L2sqr" "', argument " "2"" of type '" "float const *""'");
16374  }
16375  arg2 = reinterpret_cast< float * >(argp2);
16376  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16377  if (!SWIG_IsOK(ecode3)) {
16378  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "range_search_L2sqr" "', argument " "3"" of type '" "size_t""'");
16379  }
16380  arg3 = static_cast< size_t >(val3);
16381  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16382  if (!SWIG_IsOK(ecode4)) {
16383  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "range_search_L2sqr" "', argument " "4"" of type '" "size_t""'");
16384  }
16385  arg4 = static_cast< size_t >(val4);
16386  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16387  if (!SWIG_IsOK(ecode5)) {
16388  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "range_search_L2sqr" "', argument " "5"" of type '" "size_t""'");
16389  }
16390  arg5 = static_cast< size_t >(val5);
16391  ecode6 = SWIG_AsVal_float(obj5, &val6);
16392  if (!SWIG_IsOK(ecode6)) {
16393  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "range_search_L2sqr" "', argument " "6"" of type '" "float""'");
16394  }
16395  arg6 = static_cast< float >(val6);
16396  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
16397  if (!SWIG_IsOK(res7)) {
16398  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "range_search_L2sqr" "', argument " "7"" of type '" "faiss::RangeSearchResult *""'");
16399  }
16400  arg7 = reinterpret_cast< faiss::RangeSearchResult * >(argp7);
16401  {
16402  Py_BEGIN_ALLOW_THREADS
16403  try {
16404  faiss::range_search_L2sqr((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6,arg7);
16405  } catch(faiss::FaissException & e) {
16406  PyEval_RestoreThread(_save);
16407  PyErr_SetString(PyExc_RuntimeError, e.what());
16408  SWIG_fail;
16409  }
16410  Py_END_ALLOW_THREADS
16411  }
16412  resultobj = SWIG_Py_Void();
16413  return resultobj;
16414 fail:
16415  return NULL;
16416 }
16417 
16418 
16419 SWIGINTERN PyObject *_wrap_range_search_inner_product(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16420  PyObject *resultobj = 0;
16421  float *arg1 = (float *) 0 ;
16422  float *arg2 = (float *) 0 ;
16423  size_t arg3 ;
16424  size_t arg4 ;
16425  size_t arg5 ;
16426  float arg6 ;
16428  void *argp1 = 0 ;
16429  int res1 = 0 ;
16430  void *argp2 = 0 ;
16431  int res2 = 0 ;
16432  size_t val3 ;
16433  int ecode3 = 0 ;
16434  size_t val4 ;
16435  int ecode4 = 0 ;
16436  size_t val5 ;
16437  int ecode5 = 0 ;
16438  float val6 ;
16439  int ecode6 = 0 ;
16440  void *argp7 = 0 ;
16441  int res7 = 0 ;
16442  PyObject * obj0 = 0 ;
16443  PyObject * obj1 = 0 ;
16444  PyObject * obj2 = 0 ;
16445  PyObject * obj3 = 0 ;
16446  PyObject * obj4 = 0 ;
16447  PyObject * obj5 = 0 ;
16448  PyObject * obj6 = 0 ;
16449 
16450  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:range_search_inner_product",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
16451  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16452  if (!SWIG_IsOK(res1)) {
16453  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "range_search_inner_product" "', argument " "1"" of type '" "float const *""'");
16454  }
16455  arg1 = reinterpret_cast< float * >(argp1);
16456  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16457  if (!SWIG_IsOK(res2)) {
16458  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "range_search_inner_product" "', argument " "2"" of type '" "float const *""'");
16459  }
16460  arg2 = reinterpret_cast< float * >(argp2);
16461  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16462  if (!SWIG_IsOK(ecode3)) {
16463  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "range_search_inner_product" "', argument " "3"" of type '" "size_t""'");
16464  }
16465  arg3 = static_cast< size_t >(val3);
16466  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16467  if (!SWIG_IsOK(ecode4)) {
16468  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "range_search_inner_product" "', argument " "4"" of type '" "size_t""'");
16469  }
16470  arg4 = static_cast< size_t >(val4);
16471  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16472  if (!SWIG_IsOK(ecode5)) {
16473  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "range_search_inner_product" "', argument " "5"" of type '" "size_t""'");
16474  }
16475  arg5 = static_cast< size_t >(val5);
16476  ecode6 = SWIG_AsVal_float(obj5, &val6);
16477  if (!SWIG_IsOK(ecode6)) {
16478  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "range_search_inner_product" "', argument " "6"" of type '" "float""'");
16479  }
16480  arg6 = static_cast< float >(val6);
16481  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
16482  if (!SWIG_IsOK(res7)) {
16483  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "range_search_inner_product" "', argument " "7"" of type '" "faiss::RangeSearchResult *""'");
16484  }
16485  arg7 = reinterpret_cast< faiss::RangeSearchResult * >(argp7);
16486  {
16487  Py_BEGIN_ALLOW_THREADS
16488  try {
16489  faiss::range_search_inner_product((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6,arg7);
16490  } catch(faiss::FaissException & e) {
16491  PyEval_RestoreThread(_save);
16492  PyErr_SetString(PyExc_RuntimeError, e.what());
16493  SWIG_fail;
16494  }
16495  Py_END_ALLOW_THREADS
16496  }
16497  resultobj = SWIG_Py_Void();
16498  return resultobj;
16499 fail:
16500  return NULL;
16501 }
16502 
16503 
16504 SWIGINTERN PyObject *_wrap_fvec_madd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16505  PyObject *resultobj = 0;
16506  size_t arg1 ;
16507  float *arg2 = (float *) 0 ;
16508  float arg3 ;
16509  float *arg4 = (float *) 0 ;
16510  float *arg5 = (float *) 0 ;
16511  size_t val1 ;
16512  int ecode1 = 0 ;
16513  void *argp2 = 0 ;
16514  int res2 = 0 ;
16515  float val3 ;
16516  int ecode3 = 0 ;
16517  void *argp4 = 0 ;
16518  int res4 = 0 ;
16519  void *argp5 = 0 ;
16520  int res5 = 0 ;
16521  PyObject * obj0 = 0 ;
16522  PyObject * obj1 = 0 ;
16523  PyObject * obj2 = 0 ;
16524  PyObject * obj3 = 0 ;
16525  PyObject * obj4 = 0 ;
16526 
16527  if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_madd",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
16528  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16529  if (!SWIG_IsOK(ecode1)) {
16530  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_madd" "', argument " "1"" of type '" "size_t""'");
16531  }
16532  arg1 = static_cast< size_t >(val1);
16533  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16534  if (!SWIG_IsOK(res2)) {
16535  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_madd" "', argument " "2"" of type '" "float const *""'");
16536  }
16537  arg2 = reinterpret_cast< float * >(argp2);
16538  ecode3 = SWIG_AsVal_float(obj2, &val3);
16539  if (!SWIG_IsOK(ecode3)) {
16540  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_madd" "', argument " "3"" of type '" "float""'");
16541  }
16542  arg3 = static_cast< float >(val3);
16543  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16544  if (!SWIG_IsOK(res4)) {
16545  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_madd" "', argument " "4"" of type '" "float const *""'");
16546  }
16547  arg4 = reinterpret_cast< float * >(argp4);
16548  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
16549  if (!SWIG_IsOK(res5)) {
16550  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fvec_madd" "', argument " "5"" of type '" "float *""'");
16551  }
16552  arg5 = reinterpret_cast< float * >(argp5);
16553  {
16554  Py_BEGIN_ALLOW_THREADS
16555  try {
16556  faiss::fvec_madd(arg1,(float const *)arg2,arg3,(float const *)arg4,arg5);
16557  } catch(faiss::FaissException & e) {
16558  PyEval_RestoreThread(_save);
16559  PyErr_SetString(PyExc_RuntimeError, e.what());
16560  SWIG_fail;
16561  }
16562  Py_END_ALLOW_THREADS
16563  }
16564  resultobj = SWIG_Py_Void();
16565  return resultobj;
16566 fail:
16567  return NULL;
16568 }
16569 
16570 
16571 SWIGINTERN PyObject *_wrap_fvec_madd_and_argmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16572  PyObject *resultobj = 0;
16573  size_t arg1 ;
16574  float *arg2 = (float *) 0 ;
16575  float arg3 ;
16576  float *arg4 = (float *) 0 ;
16577  float *arg5 = (float *) 0 ;
16578  size_t val1 ;
16579  int ecode1 = 0 ;
16580  void *argp2 = 0 ;
16581  int res2 = 0 ;
16582  float val3 ;
16583  int ecode3 = 0 ;
16584  void *argp4 = 0 ;
16585  int res4 = 0 ;
16586  void *argp5 = 0 ;
16587  int res5 = 0 ;
16588  PyObject * obj0 = 0 ;
16589  PyObject * obj1 = 0 ;
16590  PyObject * obj2 = 0 ;
16591  PyObject * obj3 = 0 ;
16592  PyObject * obj4 = 0 ;
16593  int result;
16594 
16595  if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_madd_and_argmin",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
16596  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16597  if (!SWIG_IsOK(ecode1)) {
16598  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_madd_and_argmin" "', argument " "1"" of type '" "size_t""'");
16599  }
16600  arg1 = static_cast< size_t >(val1);
16601  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16602  if (!SWIG_IsOK(res2)) {
16603  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_madd_and_argmin" "', argument " "2"" of type '" "float const *""'");
16604  }
16605  arg2 = reinterpret_cast< float * >(argp2);
16606  ecode3 = SWIG_AsVal_float(obj2, &val3);
16607  if (!SWIG_IsOK(ecode3)) {
16608  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_madd_and_argmin" "', argument " "3"" of type '" "float""'");
16609  }
16610  arg3 = static_cast< float >(val3);
16611  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16612  if (!SWIG_IsOK(res4)) {
16613  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_madd_and_argmin" "', argument " "4"" of type '" "float const *""'");
16614  }
16615  arg4 = reinterpret_cast< float * >(argp4);
16616  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
16617  if (!SWIG_IsOK(res5)) {
16618  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fvec_madd_and_argmin" "', argument " "5"" of type '" "float *""'");
16619  }
16620  arg5 = reinterpret_cast< float * >(argp5);
16621  {
16622  Py_BEGIN_ALLOW_THREADS
16623  try {
16624  result = (int)faiss::fvec_madd_and_argmin(arg1,(float const *)arg2,arg3,(float const *)arg4,arg5);
16625  } catch(faiss::FaissException & e) {
16626  PyEval_RestoreThread(_save);
16627  PyErr_SetString(PyExc_RuntimeError, e.what());
16628  SWIG_fail;
16629  }
16630  Py_END_ALLOW_THREADS
16631  }
16632  resultobj = SWIG_From_int(static_cast< int >(result));
16633  return resultobj;
16634 fail:
16635  return NULL;
16636 }
16637 
16638 
16639 SWIGINTERN PyObject *_wrap_reflection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16640  PyObject *resultobj = 0;
16641  float *arg1 = (float *) 0 ;
16642  float *arg2 = (float *) 0 ;
16643  size_t arg3 ;
16644  size_t arg4 ;
16645  size_t arg5 ;
16646  void *argp1 = 0 ;
16647  int res1 = 0 ;
16648  void *argp2 = 0 ;
16649  int res2 = 0 ;
16650  size_t val3 ;
16651  int ecode3 = 0 ;
16652  size_t val4 ;
16653  int ecode4 = 0 ;
16654  size_t val5 ;
16655  int ecode5 = 0 ;
16656  PyObject * obj0 = 0 ;
16657  PyObject * obj1 = 0 ;
16658  PyObject * obj2 = 0 ;
16659  PyObject * obj3 = 0 ;
16660  PyObject * obj4 = 0 ;
16661 
16662  if (!PyArg_ParseTuple(args,(char *)"OOOOO:reflection",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
16663  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16664  if (!SWIG_IsOK(res1)) {
16665  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "reflection" "', argument " "1"" of type '" "float const *""'");
16666  }
16667  arg1 = reinterpret_cast< float * >(argp1);
16668  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16669  if (!SWIG_IsOK(res2)) {
16670  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "reflection" "', argument " "2"" of type '" "float *""'");
16671  }
16672  arg2 = reinterpret_cast< float * >(argp2);
16673  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16674  if (!SWIG_IsOK(ecode3)) {
16675  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "reflection" "', argument " "3"" of type '" "size_t""'");
16676  }
16677  arg3 = static_cast< size_t >(val3);
16678  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16679  if (!SWIG_IsOK(ecode4)) {
16680  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "reflection" "', argument " "4"" of type '" "size_t""'");
16681  }
16682  arg4 = static_cast< size_t >(val4);
16683  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16684  if (!SWIG_IsOK(ecode5)) {
16685  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "reflection" "', argument " "5"" of type '" "size_t""'");
16686  }
16687  arg5 = static_cast< size_t >(val5);
16688  {
16689  Py_BEGIN_ALLOW_THREADS
16690  try {
16691  faiss::reflection((float const *)arg1,arg2,arg3,arg4,arg5);
16692  } catch(faiss::FaissException & e) {
16693  PyEval_RestoreThread(_save);
16694  PyErr_SetString(PyExc_RuntimeError, e.what());
16695  SWIG_fail;
16696  }
16697  Py_END_ALLOW_THREADS
16698  }
16699  resultobj = SWIG_Py_Void();
16700  return resultobj;
16701 fail:
16702  return NULL;
16703 }
16704 
16705 
16706 SWIGINTERN PyObject *_wrap_km_update_centroids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16707  PyObject *resultobj = 0;
16708  float *arg1 = (float *) 0 ;
16709  float *arg2 = (float *) 0 ;
16710  long *arg3 = (long *) 0 ;
16711  size_t arg4 ;
16712  size_t arg5 ;
16713  size_t arg6 ;
16714  size_t arg7 ;
16715  void *argp1 = 0 ;
16716  int res1 = 0 ;
16717  void *argp2 = 0 ;
16718  int res2 = 0 ;
16719  void *argp3 = 0 ;
16720  int res3 = 0 ;
16721  size_t val4 ;
16722  int ecode4 = 0 ;
16723  size_t val5 ;
16724  int ecode5 = 0 ;
16725  size_t val6 ;
16726  int ecode6 = 0 ;
16727  size_t val7 ;
16728  int ecode7 = 0 ;
16729  PyObject * obj0 = 0 ;
16730  PyObject * obj1 = 0 ;
16731  PyObject * obj2 = 0 ;
16732  PyObject * obj3 = 0 ;
16733  PyObject * obj4 = 0 ;
16734  PyObject * obj5 = 0 ;
16735  PyObject * obj6 = 0 ;
16736  int result;
16737 
16738  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:km_update_centroids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
16739  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
16740  if (!SWIG_IsOK(res1)) {
16741  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "km_update_centroids" "', argument " "1"" of type '" "float const *""'");
16742  }
16743  arg1 = reinterpret_cast< float * >(argp1);
16744  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16745  if (!SWIG_IsOK(res2)) {
16746  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "km_update_centroids" "', argument " "2"" of type '" "float *""'");
16747  }
16748  arg2 = reinterpret_cast< float * >(argp2);
16749  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
16750  if (!SWIG_IsOK(res3)) {
16751  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "km_update_centroids" "', argument " "3"" of type '" "long *""'");
16752  }
16753  arg3 = reinterpret_cast< long * >(argp3);
16754  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
16755  if (!SWIG_IsOK(ecode4)) {
16756  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "km_update_centroids" "', argument " "4"" of type '" "size_t""'");
16757  }
16758  arg4 = static_cast< size_t >(val4);
16759  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
16760  if (!SWIG_IsOK(ecode5)) {
16761  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "km_update_centroids" "', argument " "5"" of type '" "size_t""'");
16762  }
16763  arg5 = static_cast< size_t >(val5);
16764  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
16765  if (!SWIG_IsOK(ecode6)) {
16766  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "km_update_centroids" "', argument " "6"" of type '" "size_t""'");
16767  }
16768  arg6 = static_cast< size_t >(val6);
16769  ecode7 = SWIG_AsVal_size_t(obj6, &val7);
16770  if (!SWIG_IsOK(ecode7)) {
16771  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "km_update_centroids" "', argument " "7"" of type '" "size_t""'");
16772  }
16773  arg7 = static_cast< size_t >(val7);
16774  {
16775  Py_BEGIN_ALLOW_THREADS
16776  try {
16777  result = (int)faiss::km_update_centroids((float const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7);
16778  } catch(faiss::FaissException & e) {
16779  PyEval_RestoreThread(_save);
16780  PyErr_SetString(PyExc_RuntimeError, e.what());
16781  SWIG_fail;
16782  }
16783  Py_END_ALLOW_THREADS
16784  }
16785  resultobj = SWIG_From_int(static_cast< int >(result));
16786  return resultobj;
16787 fail:
16788  return NULL;
16789 }
16790 
16791 
16792 SWIGINTERN PyObject *_wrap_matrix_qr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16793  PyObject *resultobj = 0;
16794  int arg1 ;
16795  int arg2 ;
16796  float *arg3 = (float *) 0 ;
16797  int val1 ;
16798  int ecode1 = 0 ;
16799  int val2 ;
16800  int ecode2 = 0 ;
16801  void *argp3 = 0 ;
16802  int res3 = 0 ;
16803  PyObject * obj0 = 0 ;
16804  PyObject * obj1 = 0 ;
16805  PyObject * obj2 = 0 ;
16806 
16807  if (!PyArg_ParseTuple(args,(char *)"OOO:matrix_qr",&obj0,&obj1,&obj2)) SWIG_fail;
16808  ecode1 = SWIG_AsVal_int(obj0, &val1);
16809  if (!SWIG_IsOK(ecode1)) {
16810  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "matrix_qr" "', argument " "1"" of type '" "int""'");
16811  }
16812  arg1 = static_cast< int >(val1);
16813  ecode2 = SWIG_AsVal_int(obj1, &val2);
16814  if (!SWIG_IsOK(ecode2)) {
16815  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matrix_qr" "', argument " "2"" of type '" "int""'");
16816  }
16817  arg2 = static_cast< int >(val2);
16818  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
16819  if (!SWIG_IsOK(res3)) {
16820  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "matrix_qr" "', argument " "3"" of type '" "float *""'");
16821  }
16822  arg3 = reinterpret_cast< float * >(argp3);
16823  {
16824  Py_BEGIN_ALLOW_THREADS
16825  try {
16826  faiss::matrix_qr(arg1,arg2,arg3);
16827  } catch(faiss::FaissException & e) {
16828  PyEval_RestoreThread(_save);
16829  PyErr_SetString(PyExc_RuntimeError, e.what());
16830  SWIG_fail;
16831  }
16832  Py_END_ALLOW_THREADS
16833  }
16834  resultobj = SWIG_Py_Void();
16835  return resultobj;
16836 fail:
16837  return NULL;
16838 }
16839 
16840 
16841 SWIGINTERN PyObject *_wrap_ranklist_handle_ties(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16842  PyObject *resultobj = 0;
16843  int arg1 ;
16844  long *arg2 = (long *) 0 ;
16845  float *arg3 = (float *) 0 ;
16846  int val1 ;
16847  int ecode1 = 0 ;
16848  void *argp2 = 0 ;
16849  int res2 = 0 ;
16850  void *argp3 = 0 ;
16851  int res3 = 0 ;
16852  PyObject * obj0 = 0 ;
16853  PyObject * obj1 = 0 ;
16854  PyObject * obj2 = 0 ;
16855 
16856  if (!PyArg_ParseTuple(args,(char *)"OOO:ranklist_handle_ties",&obj0,&obj1,&obj2)) SWIG_fail;
16857  ecode1 = SWIG_AsVal_int(obj0, &val1);
16858  if (!SWIG_IsOK(ecode1)) {
16859  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ranklist_handle_ties" "', argument " "1"" of type '" "int""'");
16860  }
16861  arg1 = static_cast< int >(val1);
16862  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
16863  if (!SWIG_IsOK(res2)) {
16864  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ranklist_handle_ties" "', argument " "2"" of type '" "long *""'");
16865  }
16866  arg2 = reinterpret_cast< long * >(argp2);
16867  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
16868  if (!SWIG_IsOK(res3)) {
16869  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ranklist_handle_ties" "', argument " "3"" of type '" "float const *""'");
16870  }
16871  arg3 = reinterpret_cast< float * >(argp3);
16872  {
16873  Py_BEGIN_ALLOW_THREADS
16874  try {
16875  faiss::ranklist_handle_ties(arg1,arg2,(float const *)arg3);
16876  } catch(faiss::FaissException & e) {
16877  PyEval_RestoreThread(_save);
16878  PyErr_SetString(PyExc_RuntimeError, e.what());
16879  SWIG_fail;
16880  }
16881  Py_END_ALLOW_THREADS
16882  }
16883  resultobj = SWIG_Py_Void();
16884  return resultobj;
16885 fail:
16886  return NULL;
16887 }
16888 
16889 
16890 SWIGINTERN PyObject *_wrap_ranklist_intersection_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16891  PyObject *resultobj = 0;
16892  size_t arg1 ;
16893  long *arg2 = (long *) 0 ;
16894  size_t arg3 ;
16895  long *arg4 = (long *) 0 ;
16896  size_t val1 ;
16897  int ecode1 = 0 ;
16898  void *argp2 = 0 ;
16899  int res2 = 0 ;
16900  size_t val3 ;
16901  int ecode3 = 0 ;
16902  void *argp4 = 0 ;
16903  int res4 = 0 ;
16904  PyObject * obj0 = 0 ;
16905  PyObject * obj1 = 0 ;
16906  PyObject * obj2 = 0 ;
16907  PyObject * obj3 = 0 ;
16908  size_t result;
16909 
16910  if (!PyArg_ParseTuple(args,(char *)"OOOO:ranklist_intersection_size",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
16911  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16912  if (!SWIG_IsOK(ecode1)) {
16913  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ranklist_intersection_size" "', argument " "1"" of type '" "size_t""'");
16914  }
16915  arg1 = static_cast< size_t >(val1);
16916  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
16917  if (!SWIG_IsOK(res2)) {
16918  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ranklist_intersection_size" "', argument " "2"" of type '" "long const *""'");
16919  }
16920  arg2 = reinterpret_cast< long * >(argp2);
16921  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16922  if (!SWIG_IsOK(ecode3)) {
16923  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ranklist_intersection_size" "', argument " "3"" of type '" "size_t""'");
16924  }
16925  arg3 = static_cast< size_t >(val3);
16926  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
16927  if (!SWIG_IsOK(res4)) {
16928  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ranklist_intersection_size" "', argument " "4"" of type '" "long const *""'");
16929  }
16930  arg4 = reinterpret_cast< long * >(argp4);
16931  {
16932  Py_BEGIN_ALLOW_THREADS
16933  try {
16934  result = (size_t)faiss::ranklist_intersection_size(arg1,(long const *)arg2,arg3,(long const *)arg4);
16935  } catch(faiss::FaissException & e) {
16936  PyEval_RestoreThread(_save);
16937  PyErr_SetString(PyExc_RuntimeError, e.what());
16938  SWIG_fail;
16939  }
16940  Py_END_ALLOW_THREADS
16941  }
16942  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
16943  return resultobj;
16944 fail:
16945  return NULL;
16946 }
16947 
16948 
16949 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16950  PyObject *resultobj = 0;
16951  size_t arg1 ;
16952  size_t arg2 ;
16953  long *arg3 = (long *) 0 ;
16954  float *arg4 = (float *) 0 ;
16955  long *arg5 = (long *) 0 ;
16956  float *arg6 = (float *) 0 ;
16957  bool arg7 ;
16958  long arg8 ;
16959  size_t val1 ;
16960  int ecode1 = 0 ;
16961  size_t val2 ;
16962  int ecode2 = 0 ;
16963  void *argp3 = 0 ;
16964  int res3 = 0 ;
16965  void *argp4 = 0 ;
16966  int res4 = 0 ;
16967  void *argp5 = 0 ;
16968  int res5 = 0 ;
16969  void *argp6 = 0 ;
16970  int res6 = 0 ;
16971  bool val7 ;
16972  int ecode7 = 0 ;
16973  long val8 ;
16974  int ecode8 = 0 ;
16975  PyObject * obj0 = 0 ;
16976  PyObject * obj1 = 0 ;
16977  PyObject * obj2 = 0 ;
16978  PyObject * obj3 = 0 ;
16979  PyObject * obj4 = 0 ;
16980  PyObject * obj5 = 0 ;
16981  PyObject * obj6 = 0 ;
16982  PyObject * obj7 = 0 ;
16983  size_t result;
16984 
16985  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
16986  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16987  if (!SWIG_IsOK(ecode1)) {
16988  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
16989  }
16990  arg1 = static_cast< size_t >(val1);
16991  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
16992  if (!SWIG_IsOK(ecode2)) {
16993  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
16994  }
16995  arg2 = static_cast< size_t >(val2);
16996  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
16997  if (!SWIG_IsOK(res3)) {
16998  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
16999  }
17000  arg3 = reinterpret_cast< long * >(argp3);
17001  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17002  if (!SWIG_IsOK(res4)) {
17003  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
17004  }
17005  arg4 = reinterpret_cast< float * >(argp4);
17006  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
17007  if (!SWIG_IsOK(res5)) {
17008  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
17009  }
17010  arg5 = reinterpret_cast< long * >(argp5);
17011  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
17012  if (!SWIG_IsOK(res6)) {
17013  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
17014  }
17015  arg6 = reinterpret_cast< float * >(argp6);
17016  ecode7 = SWIG_AsVal_bool(obj6, &val7);
17017  if (!SWIG_IsOK(ecode7)) {
17018  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "merge_result_table_with" "', argument " "7"" of type '" "bool""'");
17019  }
17020  arg7 = static_cast< bool >(val7);
17021  ecode8 = SWIG_AsVal_long(obj7, &val8);
17022  if (!SWIG_IsOK(ecode8)) {
17023  SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "merge_result_table_with" "', argument " "8"" of type '" "long""'");
17024  }
17025  arg8 = static_cast< long >(val8);
17026  {
17027  Py_BEGIN_ALLOW_THREADS
17028  try {
17029  result = (size_t)faiss::merge_result_table_with(arg1,arg2,arg3,arg4,(long const *)arg5,(float const *)arg6,arg7,arg8);
17030  } catch(faiss::FaissException & e) {
17031  PyEval_RestoreThread(_save);
17032  PyErr_SetString(PyExc_RuntimeError, e.what());
17033  SWIG_fail;
17034  }
17035  Py_END_ALLOW_THREADS
17036  }
17037  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
17038  return resultobj;
17039 fail:
17040  return NULL;
17041 }
17042 
17043 
17044 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17045  PyObject *resultobj = 0;
17046  size_t arg1 ;
17047  size_t arg2 ;
17048  long *arg3 = (long *) 0 ;
17049  float *arg4 = (float *) 0 ;
17050  long *arg5 = (long *) 0 ;
17051  float *arg6 = (float *) 0 ;
17052  bool arg7 ;
17053  size_t val1 ;
17054  int ecode1 = 0 ;
17055  size_t val2 ;
17056  int ecode2 = 0 ;
17057  void *argp3 = 0 ;
17058  int res3 = 0 ;
17059  void *argp4 = 0 ;
17060  int res4 = 0 ;
17061  void *argp5 = 0 ;
17062  int res5 = 0 ;
17063  void *argp6 = 0 ;
17064  int res6 = 0 ;
17065  bool val7 ;
17066  int ecode7 = 0 ;
17067  PyObject * obj0 = 0 ;
17068  PyObject * obj1 = 0 ;
17069  PyObject * obj2 = 0 ;
17070  PyObject * obj3 = 0 ;
17071  PyObject * obj4 = 0 ;
17072  PyObject * obj5 = 0 ;
17073  PyObject * obj6 = 0 ;
17074  size_t result;
17075 
17076  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
17077  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17078  if (!SWIG_IsOK(ecode1)) {
17079  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
17080  }
17081  arg1 = static_cast< size_t >(val1);
17082  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
17083  if (!SWIG_IsOK(ecode2)) {
17084  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
17085  }
17086  arg2 = static_cast< size_t >(val2);
17087  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
17088  if (!SWIG_IsOK(res3)) {
17089  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
17090  }
17091  arg3 = reinterpret_cast< long * >(argp3);
17092  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17093  if (!SWIG_IsOK(res4)) {
17094  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
17095  }
17096  arg4 = reinterpret_cast< float * >(argp4);
17097  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
17098  if (!SWIG_IsOK(res5)) {
17099  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
17100  }
17101  arg5 = reinterpret_cast< long * >(argp5);
17102  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
17103  if (!SWIG_IsOK(res6)) {
17104  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
17105  }
17106  arg6 = reinterpret_cast< float * >(argp6);
17107  ecode7 = SWIG_AsVal_bool(obj6, &val7);
17108  if (!SWIG_IsOK(ecode7)) {
17109  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "merge_result_table_with" "', argument " "7"" of type '" "bool""'");
17110  }
17111  arg7 = static_cast< bool >(val7);
17112  {
17113  Py_BEGIN_ALLOW_THREADS
17114  try {
17115  result = (size_t)faiss::merge_result_table_with(arg1,arg2,arg3,arg4,(long const *)arg5,(float const *)arg6,arg7);
17116  } catch(faiss::FaissException & e) {
17117  PyEval_RestoreThread(_save);
17118  PyErr_SetString(PyExc_RuntimeError, e.what());
17119  SWIG_fail;
17120  }
17121  Py_END_ALLOW_THREADS
17122  }
17123  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
17124  return resultobj;
17125 fail:
17126  return NULL;
17127 }
17128 
17129 
17130 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17131  PyObject *resultobj = 0;
17132  size_t arg1 ;
17133  size_t arg2 ;
17134  long *arg3 = (long *) 0 ;
17135  float *arg4 = (float *) 0 ;
17136  long *arg5 = (long *) 0 ;
17137  float *arg6 = (float *) 0 ;
17138  size_t val1 ;
17139  int ecode1 = 0 ;
17140  size_t val2 ;
17141  int ecode2 = 0 ;
17142  void *argp3 = 0 ;
17143  int res3 = 0 ;
17144  void *argp4 = 0 ;
17145  int res4 = 0 ;
17146  void *argp5 = 0 ;
17147  int res5 = 0 ;
17148  void *argp6 = 0 ;
17149  int res6 = 0 ;
17150  PyObject * obj0 = 0 ;
17151  PyObject * obj1 = 0 ;
17152  PyObject * obj2 = 0 ;
17153  PyObject * obj3 = 0 ;
17154  PyObject * obj4 = 0 ;
17155  PyObject * obj5 = 0 ;
17156  size_t result;
17157 
17158  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
17159  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17160  if (!SWIG_IsOK(ecode1)) {
17161  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
17162  }
17163  arg1 = static_cast< size_t >(val1);
17164  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
17165  if (!SWIG_IsOK(ecode2)) {
17166  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
17167  }
17168  arg2 = static_cast< size_t >(val2);
17169  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
17170  if (!SWIG_IsOK(res3)) {
17171  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
17172  }
17173  arg3 = reinterpret_cast< long * >(argp3);
17174  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17175  if (!SWIG_IsOK(res4)) {
17176  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
17177  }
17178  arg4 = reinterpret_cast< float * >(argp4);
17179  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
17180  if (!SWIG_IsOK(res5)) {
17181  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
17182  }
17183  arg5 = reinterpret_cast< long * >(argp5);
17184  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
17185  if (!SWIG_IsOK(res6)) {
17186  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
17187  }
17188  arg6 = reinterpret_cast< float * >(argp6);
17189  {
17190  Py_BEGIN_ALLOW_THREADS
17191  try {
17192  result = (size_t)faiss::merge_result_table_with(arg1,arg2,arg3,arg4,(long const *)arg5,(float const *)arg6);
17193  } catch(faiss::FaissException & e) {
17194  PyEval_RestoreThread(_save);
17195  PyErr_SetString(PyExc_RuntimeError, e.what());
17196  SWIG_fail;
17197  }
17198  Py_END_ALLOW_THREADS
17199  }
17200  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
17201  return resultobj;
17202 fail:
17203  return NULL;
17204 }
17205 
17206 
17207 SWIGINTERN PyObject *_wrap_merge_result_table_with(PyObject *self, PyObject *args) {
17208  Py_ssize_t argc;
17209  PyObject *argv[9] = {
17210  0
17211  };
17212  Py_ssize_t ii;
17213 
17214  if (!PyTuple_Check(args)) SWIG_fail;
17215  argc = args ? PyObject_Length(args) : 0;
17216  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
17217  argv[ii] = PyTuple_GET_ITEM(args,ii);
17218  }
17219  if (argc == 6) {
17220  int _v;
17221  {
17222  int res = SWIG_AsVal_size_t(argv[0], NULL);
17223  _v = SWIG_CheckState(res);
17224  }
17225  if (_v) {
17226  {
17227  int res = SWIG_AsVal_size_t(argv[1], NULL);
17228  _v = SWIG_CheckState(res);
17229  }
17230  if (_v) {
17231  void *vptr = 0;
17232  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
17233  _v = SWIG_CheckState(res);
17234  if (_v) {
17235  void *vptr = 0;
17236  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17237  _v = SWIG_CheckState(res);
17238  if (_v) {
17239  void *vptr = 0;
17240  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
17241  _v = SWIG_CheckState(res);
17242  if (_v) {
17243  void *vptr = 0;
17244  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
17245  _v = SWIG_CheckState(res);
17246  if (_v) {
17247  return _wrap_merge_result_table_with__SWIG_2(self, args);
17248  }
17249  }
17250  }
17251  }
17252  }
17253  }
17254  }
17255  if (argc == 7) {
17256  int _v;
17257  {
17258  int res = SWIG_AsVal_size_t(argv[0], NULL);
17259  _v = SWIG_CheckState(res);
17260  }
17261  if (_v) {
17262  {
17263  int res = SWIG_AsVal_size_t(argv[1], NULL);
17264  _v = SWIG_CheckState(res);
17265  }
17266  if (_v) {
17267  void *vptr = 0;
17268  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
17269  _v = SWIG_CheckState(res);
17270  if (_v) {
17271  void *vptr = 0;
17272  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17273  _v = SWIG_CheckState(res);
17274  if (_v) {
17275  void *vptr = 0;
17276  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
17277  _v = SWIG_CheckState(res);
17278  if (_v) {
17279  void *vptr = 0;
17280  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
17281  _v = SWIG_CheckState(res);
17282  if (_v) {
17283  {
17284  int res = SWIG_AsVal_bool(argv[6], NULL);
17285  _v = SWIG_CheckState(res);
17286  }
17287  if (_v) {
17288  return _wrap_merge_result_table_with__SWIG_1(self, args);
17289  }
17290  }
17291  }
17292  }
17293  }
17294  }
17295  }
17296  }
17297  if (argc == 8) {
17298  int _v;
17299  {
17300  int res = SWIG_AsVal_size_t(argv[0], NULL);
17301  _v = SWIG_CheckState(res);
17302  }
17303  if (_v) {
17304  {
17305  int res = SWIG_AsVal_size_t(argv[1], NULL);
17306  _v = SWIG_CheckState(res);
17307  }
17308  if (_v) {
17309  void *vptr = 0;
17310  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
17311  _v = SWIG_CheckState(res);
17312  if (_v) {
17313  void *vptr = 0;
17314  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17315  _v = SWIG_CheckState(res);
17316  if (_v) {
17317  void *vptr = 0;
17318  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
17319  _v = SWIG_CheckState(res);
17320  if (_v) {
17321  void *vptr = 0;
17322  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
17323  _v = SWIG_CheckState(res);
17324  if (_v) {
17325  {
17326  int res = SWIG_AsVal_bool(argv[6], NULL);
17327  _v = SWIG_CheckState(res);
17328  }
17329  if (_v) {
17330  {
17331  int res = SWIG_AsVal_long(argv[7], NULL);
17332  _v = SWIG_CheckState(res);
17333  }
17334  if (_v) {
17335  return _wrap_merge_result_table_with__SWIG_0(self, args);
17336  }
17337  }
17338  }
17339  }
17340  }
17341  }
17342  }
17343  }
17344  }
17345 
17346 fail:
17347  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'merge_result_table_with'.\n"
17348  " Possible C/C++ prototypes are:\n"
17349  " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *,bool,long)\n"
17350  " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *,bool)\n"
17351  " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *)\n");
17352  return 0;
17353 }
17354 
17355 
17356 SWIGINTERN PyObject *_wrap_fvec_argsort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17357  PyObject *resultobj = 0;
17358  size_t arg1 ;
17359  float *arg2 = (float *) 0 ;
17360  size_t *arg3 = (size_t *) 0 ;
17361  size_t val1 ;
17362  int ecode1 = 0 ;
17363  void *argp2 = 0 ;
17364  int res2 = 0 ;
17365  void *argp3 = 0 ;
17366  int res3 = 0 ;
17367  PyObject * obj0 = 0 ;
17368  PyObject * obj1 = 0 ;
17369  PyObject * obj2 = 0 ;
17370 
17371  if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_argsort",&obj0,&obj1,&obj2)) SWIG_fail;
17372  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17373  if (!SWIG_IsOK(ecode1)) {
17374  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_argsort" "', argument " "1"" of type '" "size_t""'");
17375  }
17376  arg1 = static_cast< size_t >(val1);
17377  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
17378  if (!SWIG_IsOK(res2)) {
17379  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_argsort" "', argument " "2"" of type '" "float const *""'");
17380  }
17381  arg2 = reinterpret_cast< float * >(argp2);
17382  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
17383  if (!SWIG_IsOK(res3)) {
17384  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_argsort" "', argument " "3"" of type '" "size_t *""'");
17385  }
17386  arg3 = reinterpret_cast< size_t * >(argp3);
17387  {
17388  Py_BEGIN_ALLOW_THREADS
17389  try {
17390  faiss::fvec_argsort(arg1,(float const *)arg2,arg3);
17391  } catch(faiss::FaissException & e) {
17392  PyEval_RestoreThread(_save);
17393  PyErr_SetString(PyExc_RuntimeError, e.what());
17394  SWIG_fail;
17395  }
17396  Py_END_ALLOW_THREADS
17397  }
17398  resultobj = SWIG_Py_Void();
17399  return resultobj;
17400 fail:
17401  return NULL;
17402 }
17403 
17404 
17405 SWIGINTERN PyObject *_wrap_fvec_argsort_parallel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17406  PyObject *resultobj = 0;
17407  size_t arg1 ;
17408  float *arg2 = (float *) 0 ;
17409  size_t *arg3 = (size_t *) 0 ;
17410  size_t val1 ;
17411  int ecode1 = 0 ;
17412  void *argp2 = 0 ;
17413  int res2 = 0 ;
17414  void *argp3 = 0 ;
17415  int res3 = 0 ;
17416  PyObject * obj0 = 0 ;
17417  PyObject * obj1 = 0 ;
17418  PyObject * obj2 = 0 ;
17419 
17420  if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_argsort_parallel",&obj0,&obj1,&obj2)) SWIG_fail;
17421  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17422  if (!SWIG_IsOK(ecode1)) {
17423  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_argsort_parallel" "', argument " "1"" of type '" "size_t""'");
17424  }
17425  arg1 = static_cast< size_t >(val1);
17426  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
17427  if (!SWIG_IsOK(res2)) {
17428  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_argsort_parallel" "', argument " "2"" of type '" "float const *""'");
17429  }
17430  arg2 = reinterpret_cast< float * >(argp2);
17431  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
17432  if (!SWIG_IsOK(res3)) {
17433  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_argsort_parallel" "', argument " "3"" of type '" "size_t *""'");
17434  }
17435  arg3 = reinterpret_cast< size_t * >(argp3);
17436  {
17437  Py_BEGIN_ALLOW_THREADS
17438  try {
17439  faiss::fvec_argsort_parallel(arg1,(float const *)arg2,arg3);
17440  } catch(faiss::FaissException & e) {
17441  PyEval_RestoreThread(_save);
17442  PyErr_SetString(PyExc_RuntimeError, e.what());
17443  SWIG_fail;
17444  }
17445  Py_END_ALLOW_THREADS
17446  }
17447  resultobj = SWIG_Py_Void();
17448  return resultobj;
17449 fail:
17450  return NULL;
17451 }
17452 
17453 
17454 SWIGINTERN PyObject *_wrap_ivec_hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17455  PyObject *resultobj = 0;
17456  size_t arg1 ;
17457  int *arg2 = (int *) 0 ;
17458  int arg3 ;
17459  int *arg4 = (int *) 0 ;
17460  size_t val1 ;
17461  int ecode1 = 0 ;
17462  void *argp2 = 0 ;
17463  int res2 = 0 ;
17464  int val3 ;
17465  int ecode3 = 0 ;
17466  void *argp4 = 0 ;
17467  int res4 = 0 ;
17468  PyObject * obj0 = 0 ;
17469  PyObject * obj1 = 0 ;
17470  PyObject * obj2 = 0 ;
17471  PyObject * obj3 = 0 ;
17472  int result;
17473 
17474  if (!PyArg_ParseTuple(args,(char *)"OOOO:ivec_hist",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17475  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17476  if (!SWIG_IsOK(ecode1)) {
17477  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ivec_hist" "', argument " "1"" of type '" "size_t""'");
17478  }
17479  arg1 = static_cast< size_t >(val1);
17480  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
17481  if (!SWIG_IsOK(res2)) {
17482  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec_hist" "', argument " "2"" of type '" "int const *""'");
17483  }
17484  arg2 = reinterpret_cast< int * >(argp2);
17485  ecode3 = SWIG_AsVal_int(obj2, &val3);
17486  if (!SWIG_IsOK(ecode3)) {
17487  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ivec_hist" "', argument " "3"" of type '" "int""'");
17488  }
17489  arg3 = static_cast< int >(val3);
17490  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
17491  if (!SWIG_IsOK(res4)) {
17492  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ivec_hist" "', argument " "4"" of type '" "int *""'");
17493  }
17494  arg4 = reinterpret_cast< int * >(argp4);
17495  {
17496  Py_BEGIN_ALLOW_THREADS
17497  try {
17498  result = (int)faiss::ivec_hist(arg1,(int const *)arg2,arg3,arg4);
17499  } catch(faiss::FaissException & e) {
17500  PyEval_RestoreThread(_save);
17501  PyErr_SetString(PyExc_RuntimeError, e.what());
17502  SWIG_fail;
17503  }
17504  Py_END_ALLOW_THREADS
17505  }
17506  resultobj = SWIG_From_int(static_cast< int >(result));
17507  return resultobj;
17508 fail:
17509  return NULL;
17510 }
17511 
17512 
17513 SWIGINTERN PyObject *_wrap_bincode_hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17514  PyObject *resultobj = 0;
17515  size_t arg1 ;
17516  size_t arg2 ;
17517  uint8_t *arg3 = (uint8_t *) 0 ;
17518  int *arg4 = (int *) 0 ;
17519  size_t val1 ;
17520  int ecode1 = 0 ;
17521  size_t val2 ;
17522  int ecode2 = 0 ;
17523  void *argp3 = 0 ;
17524  int res3 = 0 ;
17525  void *argp4 = 0 ;
17526  int res4 = 0 ;
17527  PyObject * obj0 = 0 ;
17528  PyObject * obj1 = 0 ;
17529  PyObject * obj2 = 0 ;
17530  PyObject * obj3 = 0 ;
17531 
17532  if (!PyArg_ParseTuple(args,(char *)"OOOO:bincode_hist",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17533  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17534  if (!SWIG_IsOK(ecode1)) {
17535  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bincode_hist" "', argument " "1"" of type '" "size_t""'");
17536  }
17537  arg1 = static_cast< size_t >(val1);
17538  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
17539  if (!SWIG_IsOK(ecode2)) {
17540  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bincode_hist" "', argument " "2"" of type '" "size_t""'");
17541  }
17542  arg2 = static_cast< size_t >(val2);
17543  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
17544  if (!SWIG_IsOK(res3)) {
17545  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "bincode_hist" "', argument " "3"" of type '" "uint8_t const *""'");
17546  }
17547  arg3 = reinterpret_cast< uint8_t * >(argp3);
17548  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
17549  if (!SWIG_IsOK(res4)) {
17550  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "bincode_hist" "', argument " "4"" of type '" "int *""'");
17551  }
17552  arg4 = reinterpret_cast< int * >(argp4);
17553  {
17554  Py_BEGIN_ALLOW_THREADS
17555  try {
17556  faiss::bincode_hist(arg1,arg2,(unsigned char const *)arg3,arg4);
17557  } catch(faiss::FaissException & e) {
17558  PyEval_RestoreThread(_save);
17559  PyErr_SetString(PyExc_RuntimeError, e.what());
17560  SWIG_fail;
17561  }
17562  Py_END_ALLOW_THREADS
17563  }
17564  resultobj = SWIG_Py_Void();
17565  return resultobj;
17566 fail:
17567  return NULL;
17568 }
17569 
17570 
17571 SWIGINTERN PyObject *_wrap_ivec_checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17572  PyObject *resultobj = 0;
17573  size_t arg1 ;
17574  int *arg2 = (int *) 0 ;
17575  size_t val1 ;
17576  int ecode1 = 0 ;
17577  void *argp2 = 0 ;
17578  int res2 = 0 ;
17579  PyObject * obj0 = 0 ;
17580  PyObject * obj1 = 0 ;
17581  size_t result;
17582 
17583  if (!PyArg_ParseTuple(args,(char *)"OO:ivec_checksum",&obj0,&obj1)) SWIG_fail;
17584  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17585  if (!SWIG_IsOK(ecode1)) {
17586  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ivec_checksum" "', argument " "1"" of type '" "size_t""'");
17587  }
17588  arg1 = static_cast< size_t >(val1);
17589  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
17590  if (!SWIG_IsOK(res2)) {
17591  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec_checksum" "', argument " "2"" of type '" "int const *""'");
17592  }
17593  arg2 = reinterpret_cast< int * >(argp2);
17594  {
17595  Py_BEGIN_ALLOW_THREADS
17596  try {
17597  result = (size_t)faiss::ivec_checksum(arg1,(int const *)arg2);
17598  } catch(faiss::FaissException & e) {
17599  PyEval_RestoreThread(_save);
17600  PyErr_SetString(PyExc_RuntimeError, e.what());
17601  SWIG_fail;
17602  }
17603  Py_END_ALLOW_THREADS
17604  }
17605  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
17606  return resultobj;
17607 fail:
17608  return NULL;
17609 }
17610 
17611 
17612 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17613  PyObject *resultobj = 0;
17614  size_t arg1 ;
17615  size_t *arg2 = (size_t *) 0 ;
17616  size_t arg3 ;
17617  float *arg4 = (float *) 0 ;
17618  bool arg5 ;
17619  long arg6 ;
17620  size_t val1 ;
17621  int ecode1 = 0 ;
17622  void *argp2 = 0 ;
17623  int res2 = 0 ;
17624  size_t val3 ;
17625  int ecode3 = 0 ;
17626  void *argp4 = 0 ;
17627  int res4 = 0 ;
17628  bool val5 ;
17629  int ecode5 = 0 ;
17630  long val6 ;
17631  int ecode6 = 0 ;
17632  PyObject * obj0 = 0 ;
17633  PyObject * obj1 = 0 ;
17634  PyObject * obj2 = 0 ;
17635  PyObject * obj3 = 0 ;
17636  PyObject * obj4 = 0 ;
17637  PyObject * obj5 = 0 ;
17638  float *result = 0 ;
17639 
17640  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
17641  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17642  if (!SWIG_IsOK(ecode1)) {
17643  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
17644  }
17645  arg1 = static_cast< size_t >(val1);
17646  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
17647  if (!SWIG_IsOK(res2)) {
17648  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
17649  }
17650  arg2 = reinterpret_cast< size_t * >(argp2);
17651  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
17652  if (!SWIG_IsOK(ecode3)) {
17653  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
17654  }
17655  arg3 = static_cast< size_t >(val3);
17656  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17657  if (!SWIG_IsOK(res4)) {
17658  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
17659  }
17660  arg4 = reinterpret_cast< float * >(argp4);
17661  ecode5 = SWIG_AsVal_bool(obj4, &val5);
17662  if (!SWIG_IsOK(ecode5)) {
17663  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvecs_maybe_subsample" "', argument " "5"" of type '" "bool""'");
17664  }
17665  arg5 = static_cast< bool >(val5);
17666  ecode6 = SWIG_AsVal_long(obj5, &val6);
17667  if (!SWIG_IsOK(ecode6)) {
17668  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fvecs_maybe_subsample" "', argument " "6"" of type '" "long""'");
17669  }
17670  arg6 = static_cast< long >(val6);
17671  {
17672  Py_BEGIN_ALLOW_THREADS
17673  try {
17674  result = (float *)faiss::fvecs_maybe_subsample(arg1,arg2,arg3,(float const *)arg4,arg5,arg6);
17675  } catch(faiss::FaissException & e) {
17676  PyEval_RestoreThread(_save);
17677  PyErr_SetString(PyExc_RuntimeError, e.what());
17678  SWIG_fail;
17679  }
17680  Py_END_ALLOW_THREADS
17681  }
17682  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
17683  return resultobj;
17684 fail:
17685  return NULL;
17686 }
17687 
17688 
17689 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17690  PyObject *resultobj = 0;
17691  size_t arg1 ;
17692  size_t *arg2 = (size_t *) 0 ;
17693  size_t arg3 ;
17694  float *arg4 = (float *) 0 ;
17695  bool arg5 ;
17696  size_t val1 ;
17697  int ecode1 = 0 ;
17698  void *argp2 = 0 ;
17699  int res2 = 0 ;
17700  size_t val3 ;
17701  int ecode3 = 0 ;
17702  void *argp4 = 0 ;
17703  int res4 = 0 ;
17704  bool val5 ;
17705  int ecode5 = 0 ;
17706  PyObject * obj0 = 0 ;
17707  PyObject * obj1 = 0 ;
17708  PyObject * obj2 = 0 ;
17709  PyObject * obj3 = 0 ;
17710  PyObject * obj4 = 0 ;
17711  float *result = 0 ;
17712 
17713  if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
17714  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17715  if (!SWIG_IsOK(ecode1)) {
17716  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
17717  }
17718  arg1 = static_cast< size_t >(val1);
17719  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
17720  if (!SWIG_IsOK(res2)) {
17721  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
17722  }
17723  arg2 = reinterpret_cast< size_t * >(argp2);
17724  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
17725  if (!SWIG_IsOK(ecode3)) {
17726  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
17727  }
17728  arg3 = static_cast< size_t >(val3);
17729  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17730  if (!SWIG_IsOK(res4)) {
17731  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
17732  }
17733  arg4 = reinterpret_cast< float * >(argp4);
17734  ecode5 = SWIG_AsVal_bool(obj4, &val5);
17735  if (!SWIG_IsOK(ecode5)) {
17736  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvecs_maybe_subsample" "', argument " "5"" of type '" "bool""'");
17737  }
17738  arg5 = static_cast< bool >(val5);
17739  {
17740  Py_BEGIN_ALLOW_THREADS
17741  try {
17742  result = (float *)faiss::fvecs_maybe_subsample(arg1,arg2,arg3,(float const *)arg4,arg5);
17743  } catch(faiss::FaissException & e) {
17744  PyEval_RestoreThread(_save);
17745  PyErr_SetString(PyExc_RuntimeError, e.what());
17746  SWIG_fail;
17747  }
17748  Py_END_ALLOW_THREADS
17749  }
17750  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
17751  return resultobj;
17752 fail:
17753  return NULL;
17754 }
17755 
17756 
17757 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17758  PyObject *resultobj = 0;
17759  size_t arg1 ;
17760  size_t *arg2 = (size_t *) 0 ;
17761  size_t arg3 ;
17762  float *arg4 = (float *) 0 ;
17763  size_t val1 ;
17764  int ecode1 = 0 ;
17765  void *argp2 = 0 ;
17766  int res2 = 0 ;
17767  size_t val3 ;
17768  int ecode3 = 0 ;
17769  void *argp4 = 0 ;
17770  int res4 = 0 ;
17771  PyObject * obj0 = 0 ;
17772  PyObject * obj1 = 0 ;
17773  PyObject * obj2 = 0 ;
17774  PyObject * obj3 = 0 ;
17775  float *result = 0 ;
17776 
17777  if (!PyArg_ParseTuple(args,(char *)"OOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17778  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17779  if (!SWIG_IsOK(ecode1)) {
17780  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
17781  }
17782  arg1 = static_cast< size_t >(val1);
17783  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
17784  if (!SWIG_IsOK(res2)) {
17785  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
17786  }
17787  arg2 = reinterpret_cast< size_t * >(argp2);
17788  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
17789  if (!SWIG_IsOK(ecode3)) {
17790  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
17791  }
17792  arg3 = static_cast< size_t >(val3);
17793  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17794  if (!SWIG_IsOK(res4)) {
17795  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
17796  }
17797  arg4 = reinterpret_cast< float * >(argp4);
17798  {
17799  Py_BEGIN_ALLOW_THREADS
17800  try {
17801  result = (float *)faiss::fvecs_maybe_subsample(arg1,arg2,arg3,(float const *)arg4);
17802  } catch(faiss::FaissException & e) {
17803  PyEval_RestoreThread(_save);
17804  PyErr_SetString(PyExc_RuntimeError, e.what());
17805  SWIG_fail;
17806  }
17807  Py_END_ALLOW_THREADS
17808  }
17809  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
17810  return resultobj;
17811 fail:
17812  return NULL;
17813 }
17814 
17815 
17816 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample(PyObject *self, PyObject *args) {
17817  Py_ssize_t argc;
17818  PyObject *argv[7] = {
17819  0
17820  };
17821  Py_ssize_t ii;
17822 
17823  if (!PyTuple_Check(args)) SWIG_fail;
17824  argc = args ? PyObject_Length(args) : 0;
17825  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
17826  argv[ii] = PyTuple_GET_ITEM(args,ii);
17827  }
17828  if (argc == 4) {
17829  int _v;
17830  {
17831  int res = SWIG_AsVal_size_t(argv[0], NULL);
17832  _v = SWIG_CheckState(res);
17833  }
17834  if (_v) {
17835  void *vptr = 0;
17836  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
17837  _v = SWIG_CheckState(res);
17838  if (_v) {
17839  {
17840  int res = SWIG_AsVal_size_t(argv[2], NULL);
17841  _v = SWIG_CheckState(res);
17842  }
17843  if (_v) {
17844  void *vptr = 0;
17845  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17846  _v = SWIG_CheckState(res);
17847  if (_v) {
17848  return _wrap_fvecs_maybe_subsample__SWIG_2(self, args);
17849  }
17850  }
17851  }
17852  }
17853  }
17854  if (argc == 5) {
17855  int _v;
17856  {
17857  int res = SWIG_AsVal_size_t(argv[0], NULL);
17858  _v = SWIG_CheckState(res);
17859  }
17860  if (_v) {
17861  void *vptr = 0;
17862  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
17863  _v = SWIG_CheckState(res);
17864  if (_v) {
17865  {
17866  int res = SWIG_AsVal_size_t(argv[2], NULL);
17867  _v = SWIG_CheckState(res);
17868  }
17869  if (_v) {
17870  void *vptr = 0;
17871  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17872  _v = SWIG_CheckState(res);
17873  if (_v) {
17874  {
17875  int res = SWIG_AsVal_bool(argv[4], NULL);
17876  _v = SWIG_CheckState(res);
17877  }
17878  if (_v) {
17879  return _wrap_fvecs_maybe_subsample__SWIG_1(self, args);
17880  }
17881  }
17882  }
17883  }
17884  }
17885  }
17886  if (argc == 6) {
17887  int _v;
17888  {
17889  int res = SWIG_AsVal_size_t(argv[0], NULL);
17890  _v = SWIG_CheckState(res);
17891  }
17892  if (_v) {
17893  void *vptr = 0;
17894  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
17895  _v = SWIG_CheckState(res);
17896  if (_v) {
17897  {
17898  int res = SWIG_AsVal_size_t(argv[2], NULL);
17899  _v = SWIG_CheckState(res);
17900  }
17901  if (_v) {
17902  void *vptr = 0;
17903  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
17904  _v = SWIG_CheckState(res);
17905  if (_v) {
17906  {
17907  int res = SWIG_AsVal_bool(argv[4], NULL);
17908  _v = SWIG_CheckState(res);
17909  }
17910  if (_v) {
17911  {
17912  int res = SWIG_AsVal_long(argv[5], NULL);
17913  _v = SWIG_CheckState(res);
17914  }
17915  if (_v) {
17916  return _wrap_fvecs_maybe_subsample__SWIG_0(self, args);
17917  }
17918  }
17919  }
17920  }
17921  }
17922  }
17923  }
17924 
17925 fail:
17926  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'fvecs_maybe_subsample'.\n"
17927  " Possible C/C++ prototypes are:\n"
17928  " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *,bool,long)\n"
17929  " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *,bool)\n"
17930  " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *)\n");
17931  return 0;
17932 }
17933 
17934 
17935 SWIGINTERN PyObject *_wrap_binary_to_real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17936  PyObject *resultobj = 0;
17937  size_t arg1 ;
17938  uint8_t *arg2 = (uint8_t *) 0 ;
17939  float *arg3 = (float *) 0 ;
17940  size_t val1 ;
17941  int ecode1 = 0 ;
17942  void *argp2 = 0 ;
17943  int res2 = 0 ;
17944  void *argp3 = 0 ;
17945  int res3 = 0 ;
17946  PyObject * obj0 = 0 ;
17947  PyObject * obj1 = 0 ;
17948  PyObject * obj2 = 0 ;
17949 
17950  if (!PyArg_ParseTuple(args,(char *)"OOO:binary_to_real",&obj0,&obj1,&obj2)) SWIG_fail;
17951  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
17952  if (!SWIG_IsOK(ecode1)) {
17953  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "binary_to_real" "', argument " "1"" of type '" "size_t""'");
17954  }
17955  arg1 = static_cast< size_t >(val1);
17956  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
17957  if (!SWIG_IsOK(res2)) {
17958  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "binary_to_real" "', argument " "2"" of type '" "uint8_t const *""'");
17959  }
17960  arg2 = reinterpret_cast< uint8_t * >(argp2);
17961  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17962  if (!SWIG_IsOK(res3)) {
17963  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "binary_to_real" "', argument " "3"" of type '" "float *""'");
17964  }
17965  arg3 = reinterpret_cast< float * >(argp3);
17966  {
17967  Py_BEGIN_ALLOW_THREADS
17968  try {
17969  faiss::binary_to_real(arg1,(unsigned char const *)arg2,arg3);
17970  } catch(faiss::FaissException & e) {
17971  PyEval_RestoreThread(_save);
17972  PyErr_SetString(PyExc_RuntimeError, e.what());
17973  SWIG_fail;
17974  }
17975  Py_END_ALLOW_THREADS
17976  }
17977  resultobj = SWIG_Py_Void();
17978  return resultobj;
17979 fail:
17980  return NULL;
17981 }
17982 
17983 
17984 SWIGINTERN PyObject *_wrap_real_to_binary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17985  PyObject *resultobj = 0;
17986  size_t arg1 ;
17987  float *arg2 = (float *) 0 ;
17988  uint8_t *arg3 = (uint8_t *) 0 ;
17989  size_t val1 ;
17990  int ecode1 = 0 ;
17991  void *argp2 = 0 ;
17992  int res2 = 0 ;
17993  void *argp3 = 0 ;
17994  int res3 = 0 ;
17995  PyObject * obj0 = 0 ;
17996  PyObject * obj1 = 0 ;
17997  PyObject * obj2 = 0 ;
17998 
17999  if (!PyArg_ParseTuple(args,(char *)"OOO:real_to_binary",&obj0,&obj1,&obj2)) SWIG_fail;
18000  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
18001  if (!SWIG_IsOK(ecode1)) {
18002  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "real_to_binary" "', argument " "1"" of type '" "size_t""'");
18003  }
18004  arg1 = static_cast< size_t >(val1);
18005  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
18006  if (!SWIG_IsOK(res2)) {
18007  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "real_to_binary" "', argument " "2"" of type '" "float const *""'");
18008  }
18009  arg2 = reinterpret_cast< float * >(argp2);
18010  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
18011  if (!SWIG_IsOK(res3)) {
18012  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "real_to_binary" "', argument " "3"" of type '" "uint8_t *""'");
18013  }
18014  arg3 = reinterpret_cast< uint8_t * >(argp3);
18015  {
18016  Py_BEGIN_ALLOW_THREADS
18017  try {
18018  faiss::real_to_binary(arg1,(float const *)arg2,arg3);
18019  } catch(faiss::FaissException & e) {
18020  PyEval_RestoreThread(_save);
18021  PyErr_SetString(PyExc_RuntimeError, e.what());
18022  SWIG_fail;
18023  }
18024  Py_END_ALLOW_THREADS
18025  }
18026  resultobj = SWIG_Py_Void();
18027  return resultobj;
18028 fail:
18029  return NULL;
18030 }
18031 
18032 
18033 SWIGINTERN PyObject *_wrap_Index_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18034  PyObject *resultobj = 0;
18035  faiss::Index *arg1 = (faiss::Index *) 0 ;
18036  int arg2 ;
18037  void *argp1 = 0 ;
18038  int res1 = 0 ;
18039  int val2 ;
18040  int ecode2 = 0 ;
18041  PyObject * obj0 = 0 ;
18042  PyObject * obj1 = 0 ;
18043 
18044  if (!PyArg_ParseTuple(args,(char *)"OO:Index_d_set",&obj0,&obj1)) SWIG_fail;
18045  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18046  if (!SWIG_IsOK(res1)) {
18047  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_d_set" "', argument " "1"" of type '" "faiss::Index *""'");
18048  }
18049  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18050  ecode2 = SWIG_AsVal_int(obj1, &val2);
18051  if (!SWIG_IsOK(ecode2)) {
18052  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_d_set" "', argument " "2"" of type '" "int""'");
18053  }
18054  arg2 = static_cast< int >(val2);
18055  if (arg1) (arg1)->d = arg2;
18056  resultobj = SWIG_Py_Void();
18057  return resultobj;
18058 fail:
18059  return NULL;
18060 }
18061 
18062 
18063 SWIGINTERN PyObject *_wrap_Index_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18064  PyObject *resultobj = 0;
18065  faiss::Index *arg1 = (faiss::Index *) 0 ;
18066  void *argp1 = 0 ;
18067  int res1 = 0 ;
18068  PyObject * obj0 = 0 ;
18069  int result;
18070 
18071  if (!PyArg_ParseTuple(args,(char *)"O:Index_d_get",&obj0)) SWIG_fail;
18072  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18073  if (!SWIG_IsOK(res1)) {
18074  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_d_get" "', argument " "1"" of type '" "faiss::Index *""'");
18075  }
18076  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18077  result = (int) ((arg1)->d);
18078  resultobj = SWIG_From_int(static_cast< int >(result));
18079  return resultobj;
18080 fail:
18081  return NULL;
18082 }
18083 
18084 
18085 SWIGINTERN PyObject *_wrap_Index_ntotal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18086  PyObject *resultobj = 0;
18087  faiss::Index *arg1 = (faiss::Index *) 0 ;
18088  faiss::Index::idx_t arg2 ;
18089  void *argp1 = 0 ;
18090  int res1 = 0 ;
18091  long val2 ;
18092  int ecode2 = 0 ;
18093  PyObject * obj0 = 0 ;
18094  PyObject * obj1 = 0 ;
18095 
18096  if (!PyArg_ParseTuple(args,(char *)"OO:Index_ntotal_set",&obj0,&obj1)) SWIG_fail;
18097  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18098  if (!SWIG_IsOK(res1)) {
18099  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_ntotal_set" "', argument " "1"" of type '" "faiss::Index *""'");
18100  }
18101  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18102  ecode2 = SWIG_AsVal_long(obj1, &val2);
18103  if (!SWIG_IsOK(ecode2)) {
18104  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_ntotal_set" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18105  }
18106  arg2 = static_cast< faiss::Index::idx_t >(val2);
18107  if (arg1) (arg1)->ntotal = arg2;
18108  resultobj = SWIG_Py_Void();
18109  return resultobj;
18110 fail:
18111  return NULL;
18112 }
18113 
18114 
18115 SWIGINTERN PyObject *_wrap_Index_ntotal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18116  PyObject *resultobj = 0;
18117  faiss::Index *arg1 = (faiss::Index *) 0 ;
18118  void *argp1 = 0 ;
18119  int res1 = 0 ;
18120  PyObject * obj0 = 0 ;
18121  faiss::Index::idx_t result;
18122 
18123  if (!PyArg_ParseTuple(args,(char *)"O:Index_ntotal_get",&obj0)) SWIG_fail;
18124  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18125  if (!SWIG_IsOK(res1)) {
18126  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_ntotal_get" "', argument " "1"" of type '" "faiss::Index *""'");
18127  }
18128  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18129  result = (faiss::Index::idx_t) ((arg1)->ntotal);
18130  resultobj = SWIG_From_long(static_cast< long >(result));
18131  return resultobj;
18132 fail:
18133  return NULL;
18134 }
18135 
18136 
18137 SWIGINTERN PyObject *_wrap_Index_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18138  PyObject *resultobj = 0;
18139  faiss::Index *arg1 = (faiss::Index *) 0 ;
18140  bool arg2 ;
18141  void *argp1 = 0 ;
18142  int res1 = 0 ;
18143  bool val2 ;
18144  int ecode2 = 0 ;
18145  PyObject * obj0 = 0 ;
18146  PyObject * obj1 = 0 ;
18147 
18148  if (!PyArg_ParseTuple(args,(char *)"OO:Index_verbose_set",&obj0,&obj1)) SWIG_fail;
18149  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18150  if (!SWIG_IsOK(res1)) {
18151  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_verbose_set" "', argument " "1"" of type '" "faiss::Index *""'");
18152  }
18153  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18154  ecode2 = SWIG_AsVal_bool(obj1, &val2);
18155  if (!SWIG_IsOK(ecode2)) {
18156  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_verbose_set" "', argument " "2"" of type '" "bool""'");
18157  }
18158  arg2 = static_cast< bool >(val2);
18159  if (arg1) (arg1)->verbose = arg2;
18160  resultobj = SWIG_Py_Void();
18161  return resultobj;
18162 fail:
18163  return NULL;
18164 }
18165 
18166 
18167 SWIGINTERN PyObject *_wrap_Index_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18168  PyObject *resultobj = 0;
18169  faiss::Index *arg1 = (faiss::Index *) 0 ;
18170  void *argp1 = 0 ;
18171  int res1 = 0 ;
18172  PyObject * obj0 = 0 ;
18173  bool result;
18174 
18175  if (!PyArg_ParseTuple(args,(char *)"O:Index_verbose_get",&obj0)) SWIG_fail;
18176  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18177  if (!SWIG_IsOK(res1)) {
18178  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_verbose_get" "', argument " "1"" of type '" "faiss::Index *""'");
18179  }
18180  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18181  result = (bool) ((arg1)->verbose);
18182  resultobj = SWIG_From_bool(static_cast< bool >(result));
18183  return resultobj;
18184 fail:
18185  return NULL;
18186 }
18187 
18188 
18189 SWIGINTERN PyObject *_wrap_Index_is_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18190  PyObject *resultobj = 0;
18191  faiss::Index *arg1 = (faiss::Index *) 0 ;
18192  bool arg2 ;
18193  void *argp1 = 0 ;
18194  int res1 = 0 ;
18195  bool val2 ;
18196  int ecode2 = 0 ;
18197  PyObject * obj0 = 0 ;
18198  PyObject * obj1 = 0 ;
18199 
18200  if (!PyArg_ParseTuple(args,(char *)"OO:Index_is_trained_set",&obj0,&obj1)) SWIG_fail;
18201  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18202  if (!SWIG_IsOK(res1)) {
18203  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_is_trained_set" "', argument " "1"" of type '" "faiss::Index *""'");
18204  }
18205  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18206  ecode2 = SWIG_AsVal_bool(obj1, &val2);
18207  if (!SWIG_IsOK(ecode2)) {
18208  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_is_trained_set" "', argument " "2"" of type '" "bool""'");
18209  }
18210  arg2 = static_cast< bool >(val2);
18211  if (arg1) (arg1)->is_trained = arg2;
18212  resultobj = SWIG_Py_Void();
18213  return resultobj;
18214 fail:
18215  return NULL;
18216 }
18217 
18218 
18219 SWIGINTERN PyObject *_wrap_Index_is_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18220  PyObject *resultobj = 0;
18221  faiss::Index *arg1 = (faiss::Index *) 0 ;
18222  void *argp1 = 0 ;
18223  int res1 = 0 ;
18224  PyObject * obj0 = 0 ;
18225  bool result;
18226 
18227  if (!PyArg_ParseTuple(args,(char *)"O:Index_is_trained_get",&obj0)) SWIG_fail;
18228  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18229  if (!SWIG_IsOK(res1)) {
18230  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_is_trained_get" "', argument " "1"" of type '" "faiss::Index *""'");
18231  }
18232  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18233  result = (bool) ((arg1)->is_trained);
18234  resultobj = SWIG_From_bool(static_cast< bool >(result));
18235  return resultobj;
18236 fail:
18237  return NULL;
18238 }
18239 
18240 
18241 SWIGINTERN PyObject *_wrap_Index_metric_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18242  PyObject *resultobj = 0;
18243  faiss::Index *arg1 = (faiss::Index *) 0 ;
18244  faiss::MetricType arg2 ;
18245  void *argp1 = 0 ;
18246  int res1 = 0 ;
18247  int val2 ;
18248  int ecode2 = 0 ;
18249  PyObject * obj0 = 0 ;
18250  PyObject * obj1 = 0 ;
18251 
18252  if (!PyArg_ParseTuple(args,(char *)"OO:Index_metric_type_set",&obj0,&obj1)) SWIG_fail;
18253  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18254  if (!SWIG_IsOK(res1)) {
18255  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_metric_type_set" "', argument " "1"" of type '" "faiss::Index *""'");
18256  }
18257  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18258  ecode2 = SWIG_AsVal_int(obj1, &val2);
18259  if (!SWIG_IsOK(ecode2)) {
18260  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_metric_type_set" "', argument " "2"" of type '" "faiss::MetricType""'");
18261  }
18262  arg2 = static_cast< faiss::MetricType >(val2);
18263  if (arg1) (arg1)->metric_type = arg2;
18264  resultobj = SWIG_Py_Void();
18265  return resultobj;
18266 fail:
18267  return NULL;
18268 }
18269 
18270 
18271 SWIGINTERN PyObject *_wrap_Index_metric_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18272  PyObject *resultobj = 0;
18273  faiss::Index *arg1 = (faiss::Index *) 0 ;
18274  void *argp1 = 0 ;
18275  int res1 = 0 ;
18276  PyObject * obj0 = 0 ;
18277  faiss::MetricType result;
18278 
18279  if (!PyArg_ParseTuple(args,(char *)"O:Index_metric_type_get",&obj0)) SWIG_fail;
18280  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18281  if (!SWIG_IsOK(res1)) {
18282  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_metric_type_get" "', argument " "1"" of type '" "faiss::Index *""'");
18283  }
18284  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18285  result = (faiss::MetricType) ((arg1)->metric_type);
18286  resultobj = SWIG_From_int(static_cast< int >(result));
18287  return resultobj;
18288 fail:
18289  return NULL;
18290 }
18291 
18292 
18293 SWIGINTERN PyObject *_wrap_delete_Index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18294  PyObject *resultobj = 0;
18295  faiss::Index *arg1 = (faiss::Index *) 0 ;
18296  void *argp1 = 0 ;
18297  int res1 = 0 ;
18298  PyObject * obj0 = 0 ;
18299 
18300  if (!PyArg_ParseTuple(args,(char *)"O:delete_Index",&obj0)) SWIG_fail;
18301  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
18302  if (!SWIG_IsOK(res1)) {
18303  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Index" "', argument " "1"" of type '" "faiss::Index *""'");
18304  }
18305  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18306  {
18307  Py_BEGIN_ALLOW_THREADS
18308  try {
18309  delete arg1;
18310  } catch(faiss::FaissException & e) {
18311  PyEval_RestoreThread(_save);
18312  PyErr_SetString(PyExc_RuntimeError, e.what());
18313  SWIG_fail;
18314  }
18315  Py_END_ALLOW_THREADS
18316  }
18317  resultobj = SWIG_Py_Void();
18318  return resultobj;
18319 fail:
18320  return NULL;
18321 }
18322 
18323 
18324 SWIGINTERN PyObject *_wrap_Index_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18325  PyObject *resultobj = 0;
18326  faiss::Index *arg1 = (faiss::Index *) 0 ;
18327  faiss::Index::idx_t arg2 ;
18328  float *arg3 = (float *) 0 ;
18329  void *argp1 = 0 ;
18330  int res1 = 0 ;
18331  long val2 ;
18332  int ecode2 = 0 ;
18333  void *argp3 = 0 ;
18334  int res3 = 0 ;
18335  PyObject * obj0 = 0 ;
18336  PyObject * obj1 = 0 ;
18337  PyObject * obj2 = 0 ;
18338 
18339  if (!PyArg_ParseTuple(args,(char *)"OOO:Index_train",&obj0,&obj1,&obj2)) SWIG_fail;
18340  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18341  if (!SWIG_IsOK(res1)) {
18342  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_train" "', argument " "1"" of type '" "faiss::Index *""'");
18343  }
18344  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18345  ecode2 = SWIG_AsVal_long(obj1, &val2);
18346  if (!SWIG_IsOK(ecode2)) {
18347  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18348  }
18349  arg2 = static_cast< faiss::Index::idx_t >(val2);
18350  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18351  if (!SWIG_IsOK(res3)) {
18352  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_train" "', argument " "3"" of type '" "float const *""'");
18353  }
18354  arg3 = reinterpret_cast< float * >(argp3);
18355  {
18356  Py_BEGIN_ALLOW_THREADS
18357  try {
18358  (arg1)->train(arg2,(float const *)arg3);
18359  } catch(faiss::FaissException & e) {
18360  PyEval_RestoreThread(_save);
18361  PyErr_SetString(PyExc_RuntimeError, e.what());
18362  SWIG_fail;
18363  }
18364  Py_END_ALLOW_THREADS
18365  }
18366  resultobj = SWIG_Py_Void();
18367  return resultobj;
18368 fail:
18369  return NULL;
18370 }
18371 
18372 
18373 SWIGINTERN PyObject *_wrap_Index_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18374  PyObject *resultobj = 0;
18375  faiss::Index *arg1 = (faiss::Index *) 0 ;
18376  faiss::Index::idx_t arg2 ;
18377  float *arg3 = (float *) 0 ;
18378  void *argp1 = 0 ;
18379  int res1 = 0 ;
18380  long val2 ;
18381  int ecode2 = 0 ;
18382  void *argp3 = 0 ;
18383  int res3 = 0 ;
18384  PyObject * obj0 = 0 ;
18385  PyObject * obj1 = 0 ;
18386  PyObject * obj2 = 0 ;
18387 
18388  if (!PyArg_ParseTuple(args,(char *)"OOO:Index_add",&obj0,&obj1,&obj2)) SWIG_fail;
18389  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18390  if (!SWIG_IsOK(res1)) {
18391  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_add" "', argument " "1"" of type '" "faiss::Index *""'");
18392  }
18393  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18394  ecode2 = SWIG_AsVal_long(obj1, &val2);
18395  if (!SWIG_IsOK(ecode2)) {
18396  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18397  }
18398  arg2 = static_cast< faiss::Index::idx_t >(val2);
18399  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18400  if (!SWIG_IsOK(res3)) {
18401  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_add" "', argument " "3"" of type '" "float const *""'");
18402  }
18403  arg3 = reinterpret_cast< float * >(argp3);
18404  {
18405  Py_BEGIN_ALLOW_THREADS
18406  try {
18407  (arg1)->add(arg2,(float const *)arg3);
18408  } catch(faiss::FaissException & e) {
18409  PyEval_RestoreThread(_save);
18410  PyErr_SetString(PyExc_RuntimeError, e.what());
18411  SWIG_fail;
18412  }
18413  Py_END_ALLOW_THREADS
18414  }
18415  resultobj = SWIG_Py_Void();
18416  return resultobj;
18417 fail:
18418  return NULL;
18419 }
18420 
18421 
18422 SWIGINTERN PyObject *_wrap_Index_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18423  PyObject *resultobj = 0;
18424  faiss::Index *arg1 = (faiss::Index *) 0 ;
18425  faiss::Index::idx_t arg2 ;
18426  float *arg3 = (float *) 0 ;
18427  long *arg4 = (long *) 0 ;
18428  void *argp1 = 0 ;
18429  int res1 = 0 ;
18430  long val2 ;
18431  int ecode2 = 0 ;
18432  void *argp3 = 0 ;
18433  int res3 = 0 ;
18434  void *argp4 = 0 ;
18435  int res4 = 0 ;
18436  PyObject * obj0 = 0 ;
18437  PyObject * obj1 = 0 ;
18438  PyObject * obj2 = 0 ;
18439  PyObject * obj3 = 0 ;
18440 
18441  if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
18442  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18443  if (!SWIG_IsOK(res1)) {
18444  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_add_with_ids" "', argument " "1"" of type '" "faiss::Index *""'");
18445  }
18446  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18447  ecode2 = SWIG_AsVal_long(obj1, &val2);
18448  if (!SWIG_IsOK(ecode2)) {
18449  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18450  }
18451  arg2 = static_cast< faiss::Index::idx_t >(val2);
18452  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18453  if (!SWIG_IsOK(res3)) {
18454  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_add_with_ids" "', argument " "3"" of type '" "float const *""'");
18455  }
18456  arg3 = reinterpret_cast< float * >(argp3);
18457  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
18458  if (!SWIG_IsOK(res4)) {
18459  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_add_with_ids" "', argument " "4"" of type '" "long const *""'");
18460  }
18461  arg4 = reinterpret_cast< long * >(argp4);
18462  {
18463  Py_BEGIN_ALLOW_THREADS
18464  try {
18465  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
18466  } catch(faiss::FaissException & e) {
18467  PyEval_RestoreThread(_save);
18468  PyErr_SetString(PyExc_RuntimeError, e.what());
18469  SWIG_fail;
18470  }
18471  Py_END_ALLOW_THREADS
18472  }
18473  resultobj = SWIG_Py_Void();
18474  return resultobj;
18475 fail:
18476  return NULL;
18477 }
18478 
18479 
18480 SWIGINTERN PyObject *_wrap_Index_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18481  PyObject *resultobj = 0;
18482  faiss::Index *arg1 = (faiss::Index *) 0 ;
18483  faiss::Index::idx_t arg2 ;
18484  float *arg3 = (float *) 0 ;
18485  faiss::Index::idx_t arg4 ;
18486  float *arg5 = (float *) 0 ;
18488  void *argp1 = 0 ;
18489  int res1 = 0 ;
18490  long val2 ;
18491  int ecode2 = 0 ;
18492  void *argp3 = 0 ;
18493  int res3 = 0 ;
18494  long val4 ;
18495  int ecode4 = 0 ;
18496  void *argp5 = 0 ;
18497  int res5 = 0 ;
18498  void *argp6 = 0 ;
18499  int res6 = 0 ;
18500  PyObject * obj0 = 0 ;
18501  PyObject * obj1 = 0 ;
18502  PyObject * obj2 = 0 ;
18503  PyObject * obj3 = 0 ;
18504  PyObject * obj4 = 0 ;
18505  PyObject * obj5 = 0 ;
18506 
18507  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Index_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
18508  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18509  if (!SWIG_IsOK(res1)) {
18510  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_search" "', argument " "1"" of type '" "faiss::Index const *""'");
18511  }
18512  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18513  ecode2 = SWIG_AsVal_long(obj1, &val2);
18514  if (!SWIG_IsOK(ecode2)) {
18515  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18516  }
18517  arg2 = static_cast< faiss::Index::idx_t >(val2);
18518  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18519  if (!SWIG_IsOK(res3)) {
18520  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_search" "', argument " "3"" of type '" "float const *""'");
18521  }
18522  arg3 = reinterpret_cast< float * >(argp3);
18523  ecode4 = SWIG_AsVal_long(obj3, &val4);
18524  if (!SWIG_IsOK(ecode4)) {
18525  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
18526  }
18527  arg4 = static_cast< faiss::Index::idx_t >(val4);
18528  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
18529  if (!SWIG_IsOK(res5)) {
18530  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index_search" "', argument " "5"" of type '" "float *""'");
18531  }
18532  arg5 = reinterpret_cast< float * >(argp5);
18533  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
18534  if (!SWIG_IsOK(res6)) {
18535  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Index_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
18536  }
18537  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
18538  {
18539  Py_BEGIN_ALLOW_THREADS
18540  try {
18541  ((faiss::Index const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
18542  } catch(faiss::FaissException & e) {
18543  PyEval_RestoreThread(_save);
18544  PyErr_SetString(PyExc_RuntimeError, e.what());
18545  SWIG_fail;
18546  }
18547  Py_END_ALLOW_THREADS
18548  }
18549  resultobj = SWIG_Py_Void();
18550  return resultobj;
18551 fail:
18552  return NULL;
18553 }
18554 
18555 
18556 SWIGINTERN PyObject *_wrap_Index_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18557  PyObject *resultobj = 0;
18558  faiss::Index *arg1 = (faiss::Index *) 0 ;
18559  faiss::Index::idx_t arg2 ;
18560  float *arg3 = (float *) 0 ;
18561  float arg4 ;
18563  void *argp1 = 0 ;
18564  int res1 = 0 ;
18565  long val2 ;
18566  int ecode2 = 0 ;
18567  void *argp3 = 0 ;
18568  int res3 = 0 ;
18569  float val4 ;
18570  int ecode4 = 0 ;
18571  void *argp5 = 0 ;
18572  int res5 = 0 ;
18573  PyObject * obj0 = 0 ;
18574  PyObject * obj1 = 0 ;
18575  PyObject * obj2 = 0 ;
18576  PyObject * obj3 = 0 ;
18577  PyObject * obj4 = 0 ;
18578 
18579  if (!PyArg_ParseTuple(args,(char *)"OOOOO:Index_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
18580  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18581  if (!SWIG_IsOK(res1)) {
18582  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_range_search" "', argument " "1"" of type '" "faiss::Index const *""'");
18583  }
18584  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18585  ecode2 = SWIG_AsVal_long(obj1, &val2);
18586  if (!SWIG_IsOK(ecode2)) {
18587  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18588  }
18589  arg2 = static_cast< faiss::Index::idx_t >(val2);
18590  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18591  if (!SWIG_IsOK(res3)) {
18592  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_range_search" "', argument " "3"" of type '" "float const *""'");
18593  }
18594  arg3 = reinterpret_cast< float * >(argp3);
18595  ecode4 = SWIG_AsVal_float(obj3, &val4);
18596  if (!SWIG_IsOK(ecode4)) {
18597  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_range_search" "', argument " "4"" of type '" "float""'");
18598  }
18599  arg4 = static_cast< float >(val4);
18600  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
18601  if (!SWIG_IsOK(res5)) {
18602  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
18603  }
18604  arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
18605  {
18606  Py_BEGIN_ALLOW_THREADS
18607  try {
18608  ((faiss::Index const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
18609  } catch(faiss::FaissException & e) {
18610  PyEval_RestoreThread(_save);
18611  PyErr_SetString(PyExc_RuntimeError, e.what());
18612  SWIG_fail;
18613  }
18614  Py_END_ALLOW_THREADS
18615  }
18616  resultobj = SWIG_Py_Void();
18617  return resultobj;
18618 fail:
18619  return NULL;
18620 }
18621 
18622 
18623 SWIGINTERN PyObject *_wrap_Index_assign__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18624  PyObject *resultobj = 0;
18625  faiss::Index *arg1 = (faiss::Index *) 0 ;
18626  faiss::Index::idx_t arg2 ;
18627  float *arg3 = (float *) 0 ;
18629  faiss::Index::idx_t arg5 ;
18630  void *argp1 = 0 ;
18631  int res1 = 0 ;
18632  long val2 ;
18633  int ecode2 = 0 ;
18634  void *argp3 = 0 ;
18635  int res3 = 0 ;
18636  void *argp4 = 0 ;
18637  int res4 = 0 ;
18638  long val5 ;
18639  int ecode5 = 0 ;
18640  PyObject * obj0 = 0 ;
18641  PyObject * obj1 = 0 ;
18642  PyObject * obj2 = 0 ;
18643  PyObject * obj3 = 0 ;
18644  PyObject * obj4 = 0 ;
18645 
18646  if (!PyArg_ParseTuple(args,(char *)"OOOOO:Index_assign",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
18647  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18648  if (!SWIG_IsOK(res1)) {
18649  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_assign" "', argument " "1"" of type '" "faiss::Index *""'");
18650  }
18651  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18652  ecode2 = SWIG_AsVal_long(obj1, &val2);
18653  if (!SWIG_IsOK(ecode2)) {
18654  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_assign" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18655  }
18656  arg2 = static_cast< faiss::Index::idx_t >(val2);
18657  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18658  if (!SWIG_IsOK(res3)) {
18659  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_assign" "', argument " "3"" of type '" "float const *""'");
18660  }
18661  arg3 = reinterpret_cast< float * >(argp3);
18662  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
18663  if (!SWIG_IsOK(res4)) {
18664  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_assign" "', argument " "4"" of type '" "faiss::Index::idx_t *""'");
18665  }
18666  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
18667  ecode5 = SWIG_AsVal_long(obj4, &val5);
18668  if (!SWIG_IsOK(ecode5)) {
18669  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Index_assign" "', argument " "5"" of type '" "faiss::Index::idx_t""'");
18670  }
18671  arg5 = static_cast< faiss::Index::idx_t >(val5);
18672  {
18673  Py_BEGIN_ALLOW_THREADS
18674  try {
18675  (arg1)->assign(arg2,(float const *)arg3,arg4,arg5);
18676  } catch(faiss::FaissException & e) {
18677  PyEval_RestoreThread(_save);
18678  PyErr_SetString(PyExc_RuntimeError, e.what());
18679  SWIG_fail;
18680  }
18681  Py_END_ALLOW_THREADS
18682  }
18683  resultobj = SWIG_Py_Void();
18684  return resultobj;
18685 fail:
18686  return NULL;
18687 }
18688 
18689 
18690 SWIGINTERN PyObject *_wrap_Index_assign__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18691  PyObject *resultobj = 0;
18692  faiss::Index *arg1 = (faiss::Index *) 0 ;
18693  faiss::Index::idx_t arg2 ;
18694  float *arg3 = (float *) 0 ;
18696  void *argp1 = 0 ;
18697  int res1 = 0 ;
18698  long val2 ;
18699  int ecode2 = 0 ;
18700  void *argp3 = 0 ;
18701  int res3 = 0 ;
18702  void *argp4 = 0 ;
18703  int res4 = 0 ;
18704  PyObject * obj0 = 0 ;
18705  PyObject * obj1 = 0 ;
18706  PyObject * obj2 = 0 ;
18707  PyObject * obj3 = 0 ;
18708 
18709  if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_assign",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
18710  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18711  if (!SWIG_IsOK(res1)) {
18712  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_assign" "', argument " "1"" of type '" "faiss::Index *""'");
18713  }
18714  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18715  ecode2 = SWIG_AsVal_long(obj1, &val2);
18716  if (!SWIG_IsOK(ecode2)) {
18717  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_assign" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18718  }
18719  arg2 = static_cast< faiss::Index::idx_t >(val2);
18720  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18721  if (!SWIG_IsOK(res3)) {
18722  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_assign" "', argument " "3"" of type '" "float const *""'");
18723  }
18724  arg3 = reinterpret_cast< float * >(argp3);
18725  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
18726  if (!SWIG_IsOK(res4)) {
18727  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_assign" "', argument " "4"" of type '" "faiss::Index::idx_t *""'");
18728  }
18729  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
18730  {
18731  Py_BEGIN_ALLOW_THREADS
18732  try {
18733  (arg1)->assign(arg2,(float const *)arg3,arg4);
18734  } catch(faiss::FaissException & e) {
18735  PyEval_RestoreThread(_save);
18736  PyErr_SetString(PyExc_RuntimeError, e.what());
18737  SWIG_fail;
18738  }
18739  Py_END_ALLOW_THREADS
18740  }
18741  resultobj = SWIG_Py_Void();
18742  return resultobj;
18743 fail:
18744  return NULL;
18745 }
18746 
18747 
18748 SWIGINTERN PyObject *_wrap_Index_assign(PyObject *self, PyObject *args) {
18749  Py_ssize_t argc;
18750  PyObject *argv[6] = {
18751  0
18752  };
18753  Py_ssize_t ii;
18754 
18755  if (!PyTuple_Check(args)) SWIG_fail;
18756  argc = args ? PyObject_Length(args) : 0;
18757  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
18758  argv[ii] = PyTuple_GET_ITEM(args,ii);
18759  }
18760  if (argc == 4) {
18761  int _v;
18762  void *vptr = 0;
18763  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
18764  _v = SWIG_CheckState(res);
18765  if (_v) {
18766  {
18767  int res = SWIG_AsVal_long(argv[1], NULL);
18768  _v = SWIG_CheckState(res);
18769  }
18770  if (_v) {
18771  void *vptr = 0;
18772  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
18773  _v = SWIG_CheckState(res);
18774  if (_v) {
18775  void *vptr = 0;
18776  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
18777  _v = SWIG_CheckState(res);
18778  if (_v) {
18779  return _wrap_Index_assign__SWIG_1(self, args);
18780  }
18781  }
18782  }
18783  }
18784  }
18785  if (argc == 5) {
18786  int _v;
18787  void *vptr = 0;
18788  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
18789  _v = SWIG_CheckState(res);
18790  if (_v) {
18791  {
18792  int res = SWIG_AsVal_long(argv[1], NULL);
18793  _v = SWIG_CheckState(res);
18794  }
18795  if (_v) {
18796  void *vptr = 0;
18797  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
18798  _v = SWIG_CheckState(res);
18799  if (_v) {
18800  void *vptr = 0;
18801  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
18802  _v = SWIG_CheckState(res);
18803  if (_v) {
18804  {
18805  int res = SWIG_AsVal_long(argv[4], NULL);
18806  _v = SWIG_CheckState(res);
18807  }
18808  if (_v) {
18809  return _wrap_Index_assign__SWIG_0(self, args);
18810  }
18811  }
18812  }
18813  }
18814  }
18815  }
18816 
18817 fail:
18818  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Index_assign'.\n"
18819  " Possible C/C++ prototypes are:\n"
18820  " faiss::Index::assign(faiss::Index::idx_t,float const *,faiss::Index::idx_t *,faiss::Index::idx_t)\n"
18821  " faiss::Index::assign(faiss::Index::idx_t,float const *,faiss::Index::idx_t *)\n");
18822  return 0;
18823 }
18824 
18825 
18826 SWIGINTERN PyObject *_wrap_Index_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18827  PyObject *resultobj = 0;
18828  faiss::Index *arg1 = (faiss::Index *) 0 ;
18829  void *argp1 = 0 ;
18830  int res1 = 0 ;
18831  PyObject * obj0 = 0 ;
18832 
18833  if (!PyArg_ParseTuple(args,(char *)"O:Index_reset",&obj0)) SWIG_fail;
18834  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18835  if (!SWIG_IsOK(res1)) {
18836  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_reset" "', argument " "1"" of type '" "faiss::Index *""'");
18837  }
18838  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18839  {
18840  Py_BEGIN_ALLOW_THREADS
18841  try {
18842  (arg1)->reset();
18843  } catch(faiss::FaissException & e) {
18844  PyEval_RestoreThread(_save);
18845  PyErr_SetString(PyExc_RuntimeError, e.what());
18846  SWIG_fail;
18847  }
18848  Py_END_ALLOW_THREADS
18849  }
18850  resultobj = SWIG_Py_Void();
18851  return resultobj;
18852 fail:
18853  return NULL;
18854 }
18855 
18856 
18857 SWIGINTERN PyObject *_wrap_Index_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18858  PyObject *resultobj = 0;
18859  faiss::Index *arg1 = (faiss::Index *) 0 ;
18860  faiss::IDSelector *arg2 = 0 ;
18861  void *argp1 = 0 ;
18862  int res1 = 0 ;
18863  void *argp2 = 0 ;
18864  int res2 = 0 ;
18865  PyObject * obj0 = 0 ;
18866  PyObject * obj1 = 0 ;
18867  long result;
18868 
18869  if (!PyArg_ParseTuple(args,(char *)"OO:Index_remove_ids",&obj0,&obj1)) SWIG_fail;
18870  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18871  if (!SWIG_IsOK(res1)) {
18872  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_remove_ids" "', argument " "1"" of type '" "faiss::Index *""'");
18873  }
18874  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18875  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
18876  if (!SWIG_IsOK(res2)) {
18877  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
18878  }
18879  if (!argp2) {
18880  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
18881  }
18882  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
18883  {
18884  Py_BEGIN_ALLOW_THREADS
18885  try {
18886  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
18887  } catch(faiss::FaissException & e) {
18888  PyEval_RestoreThread(_save);
18889  PyErr_SetString(PyExc_RuntimeError, e.what());
18890  SWIG_fail;
18891  }
18892  Py_END_ALLOW_THREADS
18893  }
18894  resultobj = SWIG_From_long(static_cast< long >(result));
18895  return resultobj;
18896 fail:
18897  return NULL;
18898 }
18899 
18900 
18901 SWIGINTERN PyObject *_wrap_Index_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18902  PyObject *resultobj = 0;
18903  faiss::Index *arg1 = (faiss::Index *) 0 ;
18904  faiss::Index::idx_t arg2 ;
18905  float *arg3 = (float *) 0 ;
18906  void *argp1 = 0 ;
18907  int res1 = 0 ;
18908  long val2 ;
18909  int ecode2 = 0 ;
18910  void *argp3 = 0 ;
18911  int res3 = 0 ;
18912  PyObject * obj0 = 0 ;
18913  PyObject * obj1 = 0 ;
18914  PyObject * obj2 = 0 ;
18915 
18916  if (!PyArg_ParseTuple(args,(char *)"OOO:Index_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
18917  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18918  if (!SWIG_IsOK(res1)) {
18919  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_reconstruct" "', argument " "1"" of type '" "faiss::Index const *""'");
18920  }
18921  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18922  ecode2 = SWIG_AsVal_long(obj1, &val2);
18923  if (!SWIG_IsOK(ecode2)) {
18924  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18925  }
18926  arg2 = static_cast< faiss::Index::idx_t >(val2);
18927  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18928  if (!SWIG_IsOK(res3)) {
18929  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_reconstruct" "', argument " "3"" of type '" "float *""'");
18930  }
18931  arg3 = reinterpret_cast< float * >(argp3);
18932  {
18933  Py_BEGIN_ALLOW_THREADS
18934  try {
18935  ((faiss::Index const *)arg1)->reconstruct(arg2,arg3);
18936  } catch(faiss::FaissException & e) {
18937  PyEval_RestoreThread(_save);
18938  PyErr_SetString(PyExc_RuntimeError, e.what());
18939  SWIG_fail;
18940  }
18941  Py_END_ALLOW_THREADS
18942  }
18943  resultobj = SWIG_Py_Void();
18944  return resultobj;
18945 fail:
18946  return NULL;
18947 }
18948 
18949 
18950 SWIGINTERN PyObject *_wrap_Index_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18951  PyObject *resultobj = 0;
18952  faiss::Index *arg1 = (faiss::Index *) 0 ;
18953  faiss::Index::idx_t arg2 ;
18954  faiss::Index::idx_t arg3 ;
18955  float *arg4 = (float *) 0 ;
18956  void *argp1 = 0 ;
18957  int res1 = 0 ;
18958  long val2 ;
18959  int ecode2 = 0 ;
18960  long val3 ;
18961  int ecode3 = 0 ;
18962  void *argp4 = 0 ;
18963  int res4 = 0 ;
18964  PyObject * obj0 = 0 ;
18965  PyObject * obj1 = 0 ;
18966  PyObject * obj2 = 0 ;
18967  PyObject * obj3 = 0 ;
18968 
18969  if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
18970  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
18971  if (!SWIG_IsOK(res1)) {
18972  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_reconstruct_n" "', argument " "1"" of type '" "faiss::Index const *""'");
18973  }
18974  arg1 = reinterpret_cast< faiss::Index * >(argp1);
18975  ecode2 = SWIG_AsVal_long(obj1, &val2);
18976  if (!SWIG_IsOK(ecode2)) {
18977  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
18978  }
18979  arg2 = static_cast< faiss::Index::idx_t >(val2);
18980  ecode3 = SWIG_AsVal_long(obj2, &val3);
18981  if (!SWIG_IsOK(ecode3)) {
18982  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Index_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
18983  }
18984  arg3 = static_cast< faiss::Index::idx_t >(val3);
18985  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
18986  if (!SWIG_IsOK(res4)) {
18987  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_reconstruct_n" "', argument " "4"" of type '" "float *""'");
18988  }
18989  arg4 = reinterpret_cast< float * >(argp4);
18990  {
18991  Py_BEGIN_ALLOW_THREADS
18992  try {
18993  ((faiss::Index const *)arg1)->reconstruct_n(arg2,arg3,arg4);
18994  } catch(faiss::FaissException & e) {
18995  PyEval_RestoreThread(_save);
18996  PyErr_SetString(PyExc_RuntimeError, e.what());
18997  SWIG_fail;
18998  }
18999  Py_END_ALLOW_THREADS
19000  }
19001  resultobj = SWIG_Py_Void();
19002  return resultobj;
19003 fail:
19004  return NULL;
19005 }
19006 
19007 
19008 SWIGINTERN PyObject *_wrap_Index_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19009  PyObject *resultobj = 0;
19010  faiss::Index *arg1 = (faiss::Index *) 0 ;
19011  faiss::Index::idx_t arg2 ;
19012  float *arg3 = (float *) 0 ;
19013  faiss::Index::idx_t arg4 ;
19014  float *arg5 = (float *) 0 ;
19016  float *arg7 = (float *) 0 ;
19017  void *argp1 = 0 ;
19018  int res1 = 0 ;
19019  long val2 ;
19020  int ecode2 = 0 ;
19021  void *argp3 = 0 ;
19022  int res3 = 0 ;
19023  long val4 ;
19024  int ecode4 = 0 ;
19025  void *argp5 = 0 ;
19026  int res5 = 0 ;
19027  void *argp6 = 0 ;
19028  int res6 = 0 ;
19029  void *argp7 = 0 ;
19030  int res7 = 0 ;
19031  PyObject * obj0 = 0 ;
19032  PyObject * obj1 = 0 ;
19033  PyObject * obj2 = 0 ;
19034  PyObject * obj3 = 0 ;
19035  PyObject * obj4 = 0 ;
19036  PyObject * obj5 = 0 ;
19037  PyObject * obj6 = 0 ;
19038 
19039  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:Index_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
19040  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
19041  if (!SWIG_IsOK(res1)) {
19042  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_search_and_reconstruct" "', argument " "1"" of type '" "faiss::Index const *""'");
19043  }
19044  arg1 = reinterpret_cast< faiss::Index * >(argp1);
19045  ecode2 = SWIG_AsVal_long(obj1, &val2);
19046  if (!SWIG_IsOK(ecode2)) {
19047  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
19048  }
19049  arg2 = static_cast< faiss::Index::idx_t >(val2);
19050  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
19051  if (!SWIG_IsOK(res3)) {
19052  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
19053  }
19054  arg3 = reinterpret_cast< float * >(argp3);
19055  ecode4 = SWIG_AsVal_long(obj3, &val4);
19056  if (!SWIG_IsOK(ecode4)) {
19057  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
19058  }
19059  arg4 = static_cast< faiss::Index::idx_t >(val4);
19060  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
19061  if (!SWIG_IsOK(res5)) {
19062  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
19063  }
19064  arg5 = reinterpret_cast< float * >(argp5);
19065  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
19066  if (!SWIG_IsOK(res6)) {
19067  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Index_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
19068  }
19069  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
19070  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
19071  if (!SWIG_IsOK(res7)) {
19072  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Index_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
19073  }
19074  arg7 = reinterpret_cast< float * >(argp7);
19075  {
19076  Py_BEGIN_ALLOW_THREADS
19077  try {
19078  ((faiss::Index const *)arg1)->search_and_reconstruct(arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
19079  } catch(faiss::FaissException & e) {
19080  PyEval_RestoreThread(_save);
19081  PyErr_SetString(PyExc_RuntimeError, e.what());
19082  SWIG_fail;
19083  }
19084  Py_END_ALLOW_THREADS
19085  }
19086  resultobj = SWIG_Py_Void();
19087  return resultobj;
19088 fail:
19089  return NULL;
19090 }
19091 
19092 
19093 SWIGINTERN PyObject *_wrap_Index_compute_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19094  PyObject *resultobj = 0;
19095  faiss::Index *arg1 = (faiss::Index *) 0 ;
19096  float *arg2 = (float *) 0 ;
19097  float *arg3 = (float *) 0 ;
19098  faiss::Index::idx_t arg4 ;
19099  void *argp1 = 0 ;
19100  int res1 = 0 ;
19101  void *argp2 = 0 ;
19102  int res2 = 0 ;
19103  void *argp3 = 0 ;
19104  int res3 = 0 ;
19105  long val4 ;
19106  int ecode4 = 0 ;
19107  PyObject * obj0 = 0 ;
19108  PyObject * obj1 = 0 ;
19109  PyObject * obj2 = 0 ;
19110  PyObject * obj3 = 0 ;
19111 
19112  if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_compute_residual",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
19113  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
19114  if (!SWIG_IsOK(res1)) {
19115  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_compute_residual" "', argument " "1"" of type '" "faiss::Index const *""'");
19116  }
19117  arg1 = reinterpret_cast< faiss::Index * >(argp1);
19118  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
19119  if (!SWIG_IsOK(res2)) {
19120  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_compute_residual" "', argument " "2"" of type '" "float const *""'");
19121  }
19122  arg2 = reinterpret_cast< float * >(argp2);
19123  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
19124  if (!SWIG_IsOK(res3)) {
19125  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_compute_residual" "', argument " "3"" of type '" "float *""'");
19126  }
19127  arg3 = reinterpret_cast< float * >(argp3);
19128  ecode4 = SWIG_AsVal_long(obj3, &val4);
19129  if (!SWIG_IsOK(ecode4)) {
19130  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_compute_residual" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
19131  }
19132  arg4 = static_cast< faiss::Index::idx_t >(val4);
19133  {
19134  Py_BEGIN_ALLOW_THREADS
19135  try {
19136  ((faiss::Index const *)arg1)->compute_residual((float const *)arg2,arg3,arg4);
19137  } catch(faiss::FaissException & e) {
19138  PyEval_RestoreThread(_save);
19139  PyErr_SetString(PyExc_RuntimeError, e.what());
19140  SWIG_fail;
19141  }
19142  Py_END_ALLOW_THREADS
19143  }
19144  resultobj = SWIG_Py_Void();
19145  return resultobj;
19146 fail:
19147  return NULL;
19148 }
19149 
19150 
19151 SWIGINTERN PyObject *_wrap_Index_display(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19152  PyObject *resultobj = 0;
19153  faiss::Index *arg1 = (faiss::Index *) 0 ;
19154  void *argp1 = 0 ;
19155  int res1 = 0 ;
19156  PyObject * obj0 = 0 ;
19157 
19158  if (!PyArg_ParseTuple(args,(char *)"O:Index_display",&obj0)) SWIG_fail;
19159  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
19160  if (!SWIG_IsOK(res1)) {
19161  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_display" "', argument " "1"" of type '" "faiss::Index const *""'");
19162  }
19163  arg1 = reinterpret_cast< faiss::Index * >(argp1);
19164  {
19165  Py_BEGIN_ALLOW_THREADS
19166  try {
19167  ((faiss::Index const *)arg1)->display();
19168  } catch(faiss::FaissException & e) {
19169  PyEval_RestoreThread(_save);
19170  PyErr_SetString(PyExc_RuntimeError, e.what());
19171  SWIG_fail;
19172  }
19173  Py_END_ALLOW_THREADS
19174  }
19175  resultobj = SWIG_Py_Void();
19176  return resultobj;
19177 fail:
19178  return NULL;
19179 }
19180 
19181 
19182 SWIGINTERN PyObject *Index_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19183  PyObject *obj;
19184  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
19185  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Index, SWIG_NewClientData(obj));
19186  return SWIG_Py_Void();
19187 }
19188 
19189 SWIGINTERN PyObject *_wrap_ClusteringParameters_niter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19190  PyObject *resultobj = 0;
19192  int arg2 ;
19193  void *argp1 = 0 ;
19194  int res1 = 0 ;
19195  int val2 ;
19196  int ecode2 = 0 ;
19197  PyObject * obj0 = 0 ;
19198  PyObject * obj1 = 0 ;
19199 
19200  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_niter_set",&obj0,&obj1)) SWIG_fail;
19201  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19202  if (!SWIG_IsOK(res1)) {
19203  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_niter_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19204  }
19205  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19206  ecode2 = SWIG_AsVal_int(obj1, &val2);
19207  if (!SWIG_IsOK(ecode2)) {
19208  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_niter_set" "', argument " "2"" of type '" "int""'");
19209  }
19210  arg2 = static_cast< int >(val2);
19211  if (arg1) (arg1)->niter = arg2;
19212  resultobj = SWIG_Py_Void();
19213  return resultobj;
19214 fail:
19215  return NULL;
19216 }
19217 
19218 
19219 SWIGINTERN PyObject *_wrap_ClusteringParameters_niter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19220  PyObject *resultobj = 0;
19222  void *argp1 = 0 ;
19223  int res1 = 0 ;
19224  PyObject * obj0 = 0 ;
19225  int result;
19226 
19227  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_niter_get",&obj0)) SWIG_fail;
19228  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19229  if (!SWIG_IsOK(res1)) {
19230  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_niter_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19231  }
19232  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19233  result = (int) ((arg1)->niter);
19234  resultobj = SWIG_From_int(static_cast< int >(result));
19235  return resultobj;
19236 fail:
19237  return NULL;
19238 }
19239 
19240 
19241 SWIGINTERN PyObject *_wrap_ClusteringParameters_nredo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19242  PyObject *resultobj = 0;
19244  int arg2 ;
19245  void *argp1 = 0 ;
19246  int res1 = 0 ;
19247  int val2 ;
19248  int ecode2 = 0 ;
19249  PyObject * obj0 = 0 ;
19250  PyObject * obj1 = 0 ;
19251 
19252  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_nredo_set",&obj0,&obj1)) SWIG_fail;
19253  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19254  if (!SWIG_IsOK(res1)) {
19255  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_nredo_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19256  }
19257  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19258  ecode2 = SWIG_AsVal_int(obj1, &val2);
19259  if (!SWIG_IsOK(ecode2)) {
19260  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_nredo_set" "', argument " "2"" of type '" "int""'");
19261  }
19262  arg2 = static_cast< int >(val2);
19263  if (arg1) (arg1)->nredo = arg2;
19264  resultobj = SWIG_Py_Void();
19265  return resultobj;
19266 fail:
19267  return NULL;
19268 }
19269 
19270 
19271 SWIGINTERN PyObject *_wrap_ClusteringParameters_nredo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19272  PyObject *resultobj = 0;
19274  void *argp1 = 0 ;
19275  int res1 = 0 ;
19276  PyObject * obj0 = 0 ;
19277  int result;
19278 
19279  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_nredo_get",&obj0)) SWIG_fail;
19280  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19281  if (!SWIG_IsOK(res1)) {
19282  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_nredo_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19283  }
19284  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19285  result = (int) ((arg1)->nredo);
19286  resultobj = SWIG_From_int(static_cast< int >(result));
19287  return resultobj;
19288 fail:
19289  return NULL;
19290 }
19291 
19292 
19293 SWIGINTERN PyObject *_wrap_ClusteringParameters_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19294  PyObject *resultobj = 0;
19296  bool arg2 ;
19297  void *argp1 = 0 ;
19298  int res1 = 0 ;
19299  bool val2 ;
19300  int ecode2 = 0 ;
19301  PyObject * obj0 = 0 ;
19302  PyObject * obj1 = 0 ;
19303 
19304  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_verbose_set",&obj0,&obj1)) SWIG_fail;
19305  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19306  if (!SWIG_IsOK(res1)) {
19307  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_verbose_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19308  }
19309  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19310  ecode2 = SWIG_AsVal_bool(obj1, &val2);
19311  if (!SWIG_IsOK(ecode2)) {
19312  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_verbose_set" "', argument " "2"" of type '" "bool""'");
19313  }
19314  arg2 = static_cast< bool >(val2);
19315  if (arg1) (arg1)->verbose = arg2;
19316  resultobj = SWIG_Py_Void();
19317  return resultobj;
19318 fail:
19319  return NULL;
19320 }
19321 
19322 
19323 SWIGINTERN PyObject *_wrap_ClusteringParameters_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19324  PyObject *resultobj = 0;
19326  void *argp1 = 0 ;
19327  int res1 = 0 ;
19328  PyObject * obj0 = 0 ;
19329  bool result;
19330 
19331  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_verbose_get",&obj0)) SWIG_fail;
19332  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19333  if (!SWIG_IsOK(res1)) {
19334  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_verbose_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19335  }
19336  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19337  result = (bool) ((arg1)->verbose);
19338  resultobj = SWIG_From_bool(static_cast< bool >(result));
19339  return resultobj;
19340 fail:
19341  return NULL;
19342 }
19343 
19344 
19345 SWIGINTERN PyObject *_wrap_ClusteringParameters_spherical_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19346  PyObject *resultobj = 0;
19348  bool arg2 ;
19349  void *argp1 = 0 ;
19350  int res1 = 0 ;
19351  bool val2 ;
19352  int ecode2 = 0 ;
19353  PyObject * obj0 = 0 ;
19354  PyObject * obj1 = 0 ;
19355 
19356  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_spherical_set",&obj0,&obj1)) SWIG_fail;
19357  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19358  if (!SWIG_IsOK(res1)) {
19359  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_spherical_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19360  }
19361  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19362  ecode2 = SWIG_AsVal_bool(obj1, &val2);
19363  if (!SWIG_IsOK(ecode2)) {
19364  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_spherical_set" "', argument " "2"" of type '" "bool""'");
19365  }
19366  arg2 = static_cast< bool >(val2);
19367  if (arg1) (arg1)->spherical = arg2;
19368  resultobj = SWIG_Py_Void();
19369  return resultobj;
19370 fail:
19371  return NULL;
19372 }
19373 
19374 
19375 SWIGINTERN PyObject *_wrap_ClusteringParameters_spherical_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19376  PyObject *resultobj = 0;
19378  void *argp1 = 0 ;
19379  int res1 = 0 ;
19380  PyObject * obj0 = 0 ;
19381  bool result;
19382 
19383  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_spherical_get",&obj0)) SWIG_fail;
19384  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19385  if (!SWIG_IsOK(res1)) {
19386  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_spherical_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19387  }
19388  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19389  result = (bool) ((arg1)->spherical);
19390  resultobj = SWIG_From_bool(static_cast< bool >(result));
19391  return resultobj;
19392 fail:
19393  return NULL;
19394 }
19395 
19396 
19397 SWIGINTERN PyObject *_wrap_ClusteringParameters_update_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19398  PyObject *resultobj = 0;
19400  bool arg2 ;
19401  void *argp1 = 0 ;
19402  int res1 = 0 ;
19403  bool val2 ;
19404  int ecode2 = 0 ;
19405  PyObject * obj0 = 0 ;
19406  PyObject * obj1 = 0 ;
19407 
19408  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_update_index_set",&obj0,&obj1)) SWIG_fail;
19409  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19410  if (!SWIG_IsOK(res1)) {
19411  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_update_index_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19412  }
19413  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19414  ecode2 = SWIG_AsVal_bool(obj1, &val2);
19415  if (!SWIG_IsOK(ecode2)) {
19416  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_update_index_set" "', argument " "2"" of type '" "bool""'");
19417  }
19418  arg2 = static_cast< bool >(val2);
19419  if (arg1) (arg1)->update_index = arg2;
19420  resultobj = SWIG_Py_Void();
19421  return resultobj;
19422 fail:
19423  return NULL;
19424 }
19425 
19426 
19427 SWIGINTERN PyObject *_wrap_ClusteringParameters_update_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19428  PyObject *resultobj = 0;
19430  void *argp1 = 0 ;
19431  int res1 = 0 ;
19432  PyObject * obj0 = 0 ;
19433  bool result;
19434 
19435  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_update_index_get",&obj0)) SWIG_fail;
19436  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19437  if (!SWIG_IsOK(res1)) {
19438  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_update_index_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19439  }
19440  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19441  result = (bool) ((arg1)->update_index);
19442  resultobj = SWIG_From_bool(static_cast< bool >(result));
19443  return resultobj;
19444 fail:
19445  return NULL;
19446 }
19447 
19448 
19449 SWIGINTERN PyObject *_wrap_ClusteringParameters_frozen_centroids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19450  PyObject *resultobj = 0;
19452  bool arg2 ;
19453  void *argp1 = 0 ;
19454  int res1 = 0 ;
19455  bool val2 ;
19456  int ecode2 = 0 ;
19457  PyObject * obj0 = 0 ;
19458  PyObject * obj1 = 0 ;
19459 
19460  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_frozen_centroids_set",&obj0,&obj1)) SWIG_fail;
19461  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19462  if (!SWIG_IsOK(res1)) {
19463  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_frozen_centroids_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19464  }
19465  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19466  ecode2 = SWIG_AsVal_bool(obj1, &val2);
19467  if (!SWIG_IsOK(ecode2)) {
19468  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_frozen_centroids_set" "', argument " "2"" of type '" "bool""'");
19469  }
19470  arg2 = static_cast< bool >(val2);
19471  if (arg1) (arg1)->frozen_centroids = arg2;
19472  resultobj = SWIG_Py_Void();
19473  return resultobj;
19474 fail:
19475  return NULL;
19476 }
19477 
19478 
19479 SWIGINTERN PyObject *_wrap_ClusteringParameters_frozen_centroids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19480  PyObject *resultobj = 0;
19482  void *argp1 = 0 ;
19483  int res1 = 0 ;
19484  PyObject * obj0 = 0 ;
19485  bool result;
19486 
19487  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_frozen_centroids_get",&obj0)) SWIG_fail;
19488  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19489  if (!SWIG_IsOK(res1)) {
19490  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_frozen_centroids_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19491  }
19492  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19493  result = (bool) ((arg1)->frozen_centroids);
19494  resultobj = SWIG_From_bool(static_cast< bool >(result));
19495  return resultobj;
19496 fail:
19497  return NULL;
19498 }
19499 
19500 
19501 SWIGINTERN PyObject *_wrap_ClusteringParameters_min_points_per_centroid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19502  PyObject *resultobj = 0;
19504  int arg2 ;
19505  void *argp1 = 0 ;
19506  int res1 = 0 ;
19507  int val2 ;
19508  int ecode2 = 0 ;
19509  PyObject * obj0 = 0 ;
19510  PyObject * obj1 = 0 ;
19511 
19512  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_min_points_per_centroid_set",&obj0,&obj1)) SWIG_fail;
19513  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19514  if (!SWIG_IsOK(res1)) {
19515  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_min_points_per_centroid_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19516  }
19517  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19518  ecode2 = SWIG_AsVal_int(obj1, &val2);
19519  if (!SWIG_IsOK(ecode2)) {
19520  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_min_points_per_centroid_set" "', argument " "2"" of type '" "int""'");
19521  }
19522  arg2 = static_cast< int >(val2);
19523  if (arg1) (arg1)->min_points_per_centroid = arg2;
19524  resultobj = SWIG_Py_Void();
19525  return resultobj;
19526 fail:
19527  return NULL;
19528 }
19529 
19530 
19531 SWIGINTERN PyObject *_wrap_ClusteringParameters_min_points_per_centroid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19532  PyObject *resultobj = 0;
19534  void *argp1 = 0 ;
19535  int res1 = 0 ;
19536  PyObject * obj0 = 0 ;
19537  int result;
19538 
19539  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_min_points_per_centroid_get",&obj0)) SWIG_fail;
19540  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19541  if (!SWIG_IsOK(res1)) {
19542  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_min_points_per_centroid_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19543  }
19544  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19545  result = (int) ((arg1)->min_points_per_centroid);
19546  resultobj = SWIG_From_int(static_cast< int >(result));
19547  return resultobj;
19548 fail:
19549  return NULL;
19550 }
19551 
19552 
19553 SWIGINTERN PyObject *_wrap_ClusteringParameters_max_points_per_centroid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19554  PyObject *resultobj = 0;
19556  int arg2 ;
19557  void *argp1 = 0 ;
19558  int res1 = 0 ;
19559  int val2 ;
19560  int ecode2 = 0 ;
19561  PyObject * obj0 = 0 ;
19562  PyObject * obj1 = 0 ;
19563 
19564  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_max_points_per_centroid_set",&obj0,&obj1)) SWIG_fail;
19565  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19566  if (!SWIG_IsOK(res1)) {
19567  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_max_points_per_centroid_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19568  }
19569  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19570  ecode2 = SWIG_AsVal_int(obj1, &val2);
19571  if (!SWIG_IsOK(ecode2)) {
19572  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_max_points_per_centroid_set" "', argument " "2"" of type '" "int""'");
19573  }
19574  arg2 = static_cast< int >(val2);
19575  if (arg1) (arg1)->max_points_per_centroid = arg2;
19576  resultobj = SWIG_Py_Void();
19577  return resultobj;
19578 fail:
19579  return NULL;
19580 }
19581 
19582 
19583 SWIGINTERN PyObject *_wrap_ClusteringParameters_max_points_per_centroid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19584  PyObject *resultobj = 0;
19586  void *argp1 = 0 ;
19587  int res1 = 0 ;
19588  PyObject * obj0 = 0 ;
19589  int result;
19590 
19591  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_max_points_per_centroid_get",&obj0)) SWIG_fail;
19592  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19593  if (!SWIG_IsOK(res1)) {
19594  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_max_points_per_centroid_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19595  }
19596  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19597  result = (int) ((arg1)->max_points_per_centroid);
19598  resultobj = SWIG_From_int(static_cast< int >(result));
19599  return resultobj;
19600 fail:
19601  return NULL;
19602 }
19603 
19604 
19605 SWIGINTERN PyObject *_wrap_ClusteringParameters_seed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19606  PyObject *resultobj = 0;
19608  int arg2 ;
19609  void *argp1 = 0 ;
19610  int res1 = 0 ;
19611  int val2 ;
19612  int ecode2 = 0 ;
19613  PyObject * obj0 = 0 ;
19614  PyObject * obj1 = 0 ;
19615 
19616  if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_seed_set",&obj0,&obj1)) SWIG_fail;
19617  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19618  if (!SWIG_IsOK(res1)) {
19619  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_seed_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19620  }
19621  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19622  ecode2 = SWIG_AsVal_int(obj1, &val2);
19623  if (!SWIG_IsOK(ecode2)) {
19624  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_seed_set" "', argument " "2"" of type '" "int""'");
19625  }
19626  arg2 = static_cast< int >(val2);
19627  if (arg1) (arg1)->seed = arg2;
19628  resultobj = SWIG_Py_Void();
19629  return resultobj;
19630 fail:
19631  return NULL;
19632 }
19633 
19634 
19635 SWIGINTERN PyObject *_wrap_ClusteringParameters_seed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19636  PyObject *resultobj = 0;
19638  void *argp1 = 0 ;
19639  int res1 = 0 ;
19640  PyObject * obj0 = 0 ;
19641  int result;
19642 
19643  if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_seed_get",&obj0)) SWIG_fail;
19644  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19645  if (!SWIG_IsOK(res1)) {
19646  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_seed_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19647  }
19648  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19649  result = (int) ((arg1)->seed);
19650  resultobj = SWIG_From_int(static_cast< int >(result));
19651  return resultobj;
19652 fail:
19653  return NULL;
19654 }
19655 
19656 
19657 SWIGINTERN PyObject *_wrap_new_ClusteringParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19658  PyObject *resultobj = 0;
19659  faiss::ClusteringParameters *result = 0 ;
19660 
19661  if (!PyArg_ParseTuple(args,(char *)":new_ClusteringParameters")) SWIG_fail;
19662  {
19663  Py_BEGIN_ALLOW_THREADS
19664  try {
19666  } catch(faiss::FaissException & e) {
19667  PyEval_RestoreThread(_save);
19668  PyErr_SetString(PyExc_RuntimeError, e.what());
19669  SWIG_fail;
19670  }
19671  Py_END_ALLOW_THREADS
19672  }
19673  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, SWIG_POINTER_NEW | 0 );
19674  return resultobj;
19675 fail:
19676  return NULL;
19677 }
19678 
19679 
19680 SWIGINTERN PyObject *_wrap_delete_ClusteringParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19681  PyObject *resultobj = 0;
19683  void *argp1 = 0 ;
19684  int res1 = 0 ;
19685  PyObject * obj0 = 0 ;
19686 
19687  if (!PyArg_ParseTuple(args,(char *)"O:delete_ClusteringParameters",&obj0)) SWIG_fail;
19688  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, SWIG_POINTER_DISOWN | 0 );
19689  if (!SWIG_IsOK(res1)) {
19690  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ClusteringParameters" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
19691  }
19692  arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
19693  delete arg1;
19694  resultobj = SWIG_Py_Void();
19695  return resultobj;
19696 fail:
19697  return NULL;
19698 }
19699 
19700 
19701 SWIGINTERN PyObject *ClusteringParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19702  PyObject *obj;
19703  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
19704  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ClusteringParameters, SWIG_NewClientData(obj));
19705  return SWIG_Py_Void();
19706 }
19707 
19708 SWIGINTERN PyObject *_wrap_Clustering_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19709  PyObject *resultobj = 0;
19710  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19711  size_t arg2 ;
19712  void *argp1 = 0 ;
19713  int res1 = 0 ;
19714  size_t val2 ;
19715  int ecode2 = 0 ;
19716  PyObject * obj0 = 0 ;
19717  PyObject * obj1 = 0 ;
19718 
19719  if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_d_set",&obj0,&obj1)) SWIG_fail;
19720  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19721  if (!SWIG_IsOK(res1)) {
19722  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_d_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19723  }
19724  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19725  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19726  if (!SWIG_IsOK(ecode2)) {
19727  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Clustering_d_set" "', argument " "2"" of type '" "size_t""'");
19728  }
19729  arg2 = static_cast< size_t >(val2);
19730  if (arg1) (arg1)->d = arg2;
19731  resultobj = SWIG_Py_Void();
19732  return resultobj;
19733 fail:
19734  return NULL;
19735 }
19736 
19737 
19738 SWIGINTERN PyObject *_wrap_Clustering_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19739  PyObject *resultobj = 0;
19740  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19741  void *argp1 = 0 ;
19742  int res1 = 0 ;
19743  PyObject * obj0 = 0 ;
19744  size_t result;
19745 
19746  if (!PyArg_ParseTuple(args,(char *)"O:Clustering_d_get",&obj0)) SWIG_fail;
19747  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19748  if (!SWIG_IsOK(res1)) {
19749  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_d_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19750  }
19751  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19752  result = (size_t) ((arg1)->d);
19753  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19754  return resultobj;
19755 fail:
19756  return NULL;
19757 }
19758 
19759 
19760 SWIGINTERN PyObject *_wrap_Clustering_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19761  PyObject *resultobj = 0;
19762  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19763  size_t arg2 ;
19764  void *argp1 = 0 ;
19765  int res1 = 0 ;
19766  size_t val2 ;
19767  int ecode2 = 0 ;
19768  PyObject * obj0 = 0 ;
19769  PyObject * obj1 = 0 ;
19770 
19771  if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_k_set",&obj0,&obj1)) SWIG_fail;
19772  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19773  if (!SWIG_IsOK(res1)) {
19774  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_k_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19775  }
19776  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19777  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19778  if (!SWIG_IsOK(ecode2)) {
19779  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Clustering_k_set" "', argument " "2"" of type '" "size_t""'");
19780  }
19781  arg2 = static_cast< size_t >(val2);
19782  if (arg1) (arg1)->k = arg2;
19783  resultobj = SWIG_Py_Void();
19784  return resultobj;
19785 fail:
19786  return NULL;
19787 }
19788 
19789 
19790 SWIGINTERN PyObject *_wrap_Clustering_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19791  PyObject *resultobj = 0;
19792  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19793  void *argp1 = 0 ;
19794  int res1 = 0 ;
19795  PyObject * obj0 = 0 ;
19796  size_t result;
19797 
19798  if (!PyArg_ParseTuple(args,(char *)"O:Clustering_k_get",&obj0)) SWIG_fail;
19799  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19800  if (!SWIG_IsOK(res1)) {
19801  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_k_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19802  }
19803  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19804  result = (size_t) ((arg1)->k);
19805  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19806  return resultobj;
19807 fail:
19808  return NULL;
19809 }
19810 
19811 
19812 SWIGINTERN PyObject *_wrap_Clustering_centroids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19813  PyObject *resultobj = 0;
19814  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19815  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
19816  void *argp1 = 0 ;
19817  int res1 = 0 ;
19818  void *argp2 = 0 ;
19819  int res2 = 0 ;
19820  PyObject * obj0 = 0 ;
19821  PyObject * obj1 = 0 ;
19822 
19823  if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_centroids_set",&obj0,&obj1)) SWIG_fail;
19824  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19825  if (!SWIG_IsOK(res1)) {
19826  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_centroids_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19827  }
19828  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19829  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19830  if (!SWIG_IsOK(res2)) {
19831  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Clustering_centroids_set" "', argument " "2"" of type '" "std::vector< float > *""'");
19832  }
19833  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
19834  if (arg1) (arg1)->centroids = *arg2;
19835  resultobj = SWIG_Py_Void();
19836  return resultobj;
19837 fail:
19838  return NULL;
19839 }
19840 
19841 
19842 SWIGINTERN PyObject *_wrap_Clustering_centroids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19843  PyObject *resultobj = 0;
19844  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19845  void *argp1 = 0 ;
19846  int res1 = 0 ;
19847  PyObject * obj0 = 0 ;
19848  std::vector< float > *result = 0 ;
19849 
19850  if (!PyArg_ParseTuple(args,(char *)"O:Clustering_centroids_get",&obj0)) SWIG_fail;
19851  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19852  if (!SWIG_IsOK(res1)) {
19853  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_centroids_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19854  }
19855  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19856  result = (std::vector< float > *)& ((arg1)->centroids);
19857  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19858  return resultobj;
19859 fail:
19860  return NULL;
19861 }
19862 
19863 
19864 SWIGINTERN PyObject *_wrap_Clustering_obj_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19865  PyObject *resultobj = 0;
19866  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19867  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
19868  void *argp1 = 0 ;
19869  int res1 = 0 ;
19870  void *argp2 = 0 ;
19871  int res2 = 0 ;
19872  PyObject * obj0 = 0 ;
19873  PyObject * obj1 = 0 ;
19874 
19875  if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_obj_set",&obj0,&obj1)) SWIG_fail;
19876  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19877  if (!SWIG_IsOK(res1)) {
19878  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_obj_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
19879  }
19880  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19881  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19882  if (!SWIG_IsOK(res2)) {
19883  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Clustering_obj_set" "', argument " "2"" of type '" "std::vector< float > *""'");
19884  }
19885  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
19886  if (arg1) (arg1)->obj = *arg2;
19887  resultobj = SWIG_Py_Void();
19888  return resultobj;
19889 fail:
19890  return NULL;
19891 }
19892 
19893 
19894 SWIGINTERN PyObject *_wrap_Clustering_obj_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19895  PyObject *resultobj = 0;
19896  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
19897  void *argp1 = 0 ;
19898  int res1 = 0 ;
19899  PyObject * obj0 = 0 ;
19900  std::vector< float > *result = 0 ;
19901 
19902  if (!PyArg_ParseTuple(args,(char *)"O:Clustering_obj_get",&obj0)) SWIG_fail;
19903  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
19904  if (!SWIG_IsOK(res1)) {
19905  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_obj_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
19906  }
19907  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
19908  result = (std::vector< float > *)& ((arg1)->obj);
19909  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19910  return resultobj;
19911 fail:
19912  return NULL;
19913 }
19914 
19915 
19916 SWIGINTERN PyObject *_wrap_new_Clustering__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19917  PyObject *resultobj = 0;
19918  int arg1 ;
19919  int arg2 ;
19920  int val1 ;
19921  int ecode1 = 0 ;
19922  int val2 ;
19923  int ecode2 = 0 ;
19924  PyObject * obj0 = 0 ;
19925  PyObject * obj1 = 0 ;
19926  faiss::Clustering *result = 0 ;
19927 
19928  if (!PyArg_ParseTuple(args,(char *)"OO:new_Clustering",&obj0,&obj1)) SWIG_fail;
19929  ecode1 = SWIG_AsVal_int(obj0, &val1);
19930  if (!SWIG_IsOK(ecode1)) {
19931  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Clustering" "', argument " "1"" of type '" "int""'");
19932  }
19933  arg1 = static_cast< int >(val1);
19934  ecode2 = SWIG_AsVal_int(obj1, &val2);
19935  if (!SWIG_IsOK(ecode2)) {
19936  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Clustering" "', argument " "2"" of type '" "int""'");
19937  }
19938  arg2 = static_cast< int >(val2);
19939  {
19940  Py_BEGIN_ALLOW_THREADS
19941  try {
19942  result = (faiss::Clustering *)new faiss::Clustering(arg1,arg2);
19943  } catch(faiss::FaissException & e) {
19944  PyEval_RestoreThread(_save);
19945  PyErr_SetString(PyExc_RuntimeError, e.what());
19946  SWIG_fail;
19947  }
19948  Py_END_ALLOW_THREADS
19949  }
19950  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_NEW | 0 );
19951  return resultobj;
19952 fail:
19953  return NULL;
19954 }
19955 
19956 
19957 SWIGINTERN PyObject *_wrap_new_Clustering__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19958  PyObject *resultobj = 0;
19959  int arg1 ;
19960  int arg2 ;
19961  faiss::ClusteringParameters *arg3 = 0 ;
19962  int val1 ;
19963  int ecode1 = 0 ;
19964  int val2 ;
19965  int ecode2 = 0 ;
19966  void *argp3 = 0 ;
19967  int res3 = 0 ;
19968  PyObject * obj0 = 0 ;
19969  PyObject * obj1 = 0 ;
19970  PyObject * obj2 = 0 ;
19971  faiss::Clustering *result = 0 ;
19972 
19973  if (!PyArg_ParseTuple(args,(char *)"OOO:new_Clustering",&obj0,&obj1,&obj2)) SWIG_fail;
19974  ecode1 = SWIG_AsVal_int(obj0, &val1);
19975  if (!SWIG_IsOK(ecode1)) {
19976  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Clustering" "', argument " "1"" of type '" "int""'");
19977  }
19978  arg1 = static_cast< int >(val1);
19979  ecode2 = SWIG_AsVal_int(obj1, &val2);
19980  if (!SWIG_IsOK(ecode2)) {
19981  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Clustering" "', argument " "2"" of type '" "int""'");
19982  }
19983  arg2 = static_cast< int >(val2);
19984  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0);
19985  if (!SWIG_IsOK(res3)) {
19986  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Clustering" "', argument " "3"" of type '" "faiss::ClusteringParameters const &""'");
19987  }
19988  if (!argp3) {
19989  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Clustering" "', argument " "3"" of type '" "faiss::ClusteringParameters const &""'");
19990  }
19991  arg3 = reinterpret_cast< faiss::ClusteringParameters * >(argp3);
19992  {
19993  Py_BEGIN_ALLOW_THREADS
19994  try {
19995  result = (faiss::Clustering *)new faiss::Clustering(arg1,arg2,(faiss::ClusteringParameters const &)*arg3);
19996  } catch(faiss::FaissException & e) {
19997  PyEval_RestoreThread(_save);
19998  PyErr_SetString(PyExc_RuntimeError, e.what());
19999  SWIG_fail;
20000  }
20001  Py_END_ALLOW_THREADS
20002  }
20003  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_NEW | 0 );
20004  return resultobj;
20005 fail:
20006  return NULL;
20007 }
20008 
20009 
20010 SWIGINTERN PyObject *_wrap_new_Clustering(PyObject *self, PyObject *args) {
20011  Py_ssize_t argc;
20012  PyObject *argv[4] = {
20013  0
20014  };
20015  Py_ssize_t ii;
20016 
20017  if (!PyTuple_Check(args)) SWIG_fail;
20018  argc = args ? PyObject_Length(args) : 0;
20019  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
20020  argv[ii] = PyTuple_GET_ITEM(args,ii);
20021  }
20022  if (argc == 2) {
20023  int _v;
20024  {
20025  int res = SWIG_AsVal_int(argv[0], NULL);
20026  _v = SWIG_CheckState(res);
20027  }
20028  if (_v) {
20029  {
20030  int res = SWIG_AsVal_int(argv[1], NULL);
20031  _v = SWIG_CheckState(res);
20032  }
20033  if (_v) {
20034  return _wrap_new_Clustering__SWIG_0(self, args);
20035  }
20036  }
20037  }
20038  if (argc == 3) {
20039  int _v;
20040  {
20041  int res = SWIG_AsVal_int(argv[0], NULL);
20042  _v = SWIG_CheckState(res);
20043  }
20044  if (_v) {
20045  {
20046  int res = SWIG_AsVal_int(argv[1], NULL);
20047  _v = SWIG_CheckState(res);
20048  }
20049  if (_v) {
20050  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__ClusteringParameters, 0);
20051  _v = SWIG_CheckState(res);
20052  if (_v) {
20053  return _wrap_new_Clustering__SWIG_1(self, args);
20054  }
20055  }
20056  }
20057  }
20058 
20059 fail:
20060  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Clustering'.\n"
20061  " Possible C/C++ prototypes are:\n"
20062  " faiss::Clustering::Clustering(int,int)\n"
20063  " faiss::Clustering::Clustering(int,int,faiss::ClusteringParameters const &)\n");
20064  return 0;
20065 }
20066 
20067 
20068 SWIGINTERN PyObject *_wrap_Clustering_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20069  PyObject *resultobj = 0;
20070  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
20071  faiss::Clustering::idx_t arg2 ;
20072  float *arg3 = (float *) 0 ;
20073  faiss::Index *arg4 = 0 ;
20074  void *argp1 = 0 ;
20075  int res1 = 0 ;
20076  long val2 ;
20077  int ecode2 = 0 ;
20078  void *argp3 = 0 ;
20079  int res3 = 0 ;
20080  void *argp4 = 0 ;
20081  int res4 = 0 ;
20082  PyObject * obj0 = 0 ;
20083  PyObject * obj1 = 0 ;
20084  PyObject * obj2 = 0 ;
20085  PyObject * obj3 = 0 ;
20086 
20087  if (!PyArg_ParseTuple(args,(char *)"OOOO:Clustering_train",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
20088  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
20089  if (!SWIG_IsOK(res1)) {
20090  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_train" "', argument " "1"" of type '" "faiss::Clustering *""'");
20091  }
20092  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
20093  ecode2 = SWIG_AsVal_long(obj1, &val2);
20094  if (!SWIG_IsOK(ecode2)) {
20095  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Clustering_train" "', argument " "2"" of type '" "faiss::Clustering::idx_t""'");
20096  }
20097  arg2 = static_cast< faiss::Clustering::idx_t >(val2);
20098  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20099  if (!SWIG_IsOK(res3)) {
20100  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Clustering_train" "', argument " "3"" of type '" "float const *""'");
20101  }
20102  arg3 = reinterpret_cast< float * >(argp3);
20103  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_faiss__Index, 0 );
20104  if (!SWIG_IsOK(res4)) {
20105  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Clustering_train" "', argument " "4"" of type '" "faiss::Index &""'");
20106  }
20107  if (!argp4) {
20108  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Clustering_train" "', argument " "4"" of type '" "faiss::Index &""'");
20109  }
20110  arg4 = reinterpret_cast< faiss::Index * >(argp4);
20111  {
20112  Py_BEGIN_ALLOW_THREADS
20113  try {
20114  (arg1)->train(arg2,(float const *)arg3,*arg4);
20115  } catch(faiss::FaissException & e) {
20116  PyEval_RestoreThread(_save);
20117  PyErr_SetString(PyExc_RuntimeError, e.what());
20118  SWIG_fail;
20119  }
20120  Py_END_ALLOW_THREADS
20121  }
20122  resultobj = SWIG_Py_Void();
20123  return resultobj;
20124 fail:
20125  return NULL;
20126 }
20127 
20128 
20129 SWIGINTERN PyObject *_wrap_delete_Clustering(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20130  PyObject *resultobj = 0;
20131  faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
20132  void *argp1 = 0 ;
20133  int res1 = 0 ;
20134  PyObject * obj0 = 0 ;
20135 
20136  if (!PyArg_ParseTuple(args,(char *)"O:delete_Clustering",&obj0)) SWIG_fail;
20137  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_DISOWN | 0 );
20138  if (!SWIG_IsOK(res1)) {
20139  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Clustering" "', argument " "1"" of type '" "faiss::Clustering *""'");
20140  }
20141  arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
20142  {
20143  Py_BEGIN_ALLOW_THREADS
20144  try {
20145  delete arg1;
20146  } catch(faiss::FaissException & e) {
20147  PyEval_RestoreThread(_save);
20148  PyErr_SetString(PyExc_RuntimeError, e.what());
20149  SWIG_fail;
20150  }
20151  Py_END_ALLOW_THREADS
20152  }
20153  resultobj = SWIG_Py_Void();
20154  return resultobj;
20155 fail:
20156  return NULL;
20157 }
20158 
20159 
20160 SWIGINTERN PyObject *Clustering_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20161  PyObject *obj;
20162  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
20163  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Clustering, SWIG_NewClientData(obj));
20164  return SWIG_Py_Void();
20165 }
20166 
20167 SWIGINTERN PyObject *_wrap_kmeans_clustering(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20168  PyObject *resultobj = 0;
20169  size_t arg1 ;
20170  size_t arg2 ;
20171  size_t arg3 ;
20172  float *arg4 = (float *) 0 ;
20173  float *arg5 = (float *) 0 ;
20174  size_t val1 ;
20175  int ecode1 = 0 ;
20176  size_t val2 ;
20177  int ecode2 = 0 ;
20178  size_t val3 ;
20179  int ecode3 = 0 ;
20180  void *argp4 = 0 ;
20181  int res4 = 0 ;
20182  void *argp5 = 0 ;
20183  int res5 = 0 ;
20184  PyObject * obj0 = 0 ;
20185  PyObject * obj1 = 0 ;
20186  PyObject * obj2 = 0 ;
20187  PyObject * obj3 = 0 ;
20188  PyObject * obj4 = 0 ;
20189  float result;
20190 
20191  if (!PyArg_ParseTuple(args,(char *)"OOOOO:kmeans_clustering",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
20192  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
20193  if (!SWIG_IsOK(ecode1)) {
20194  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "kmeans_clustering" "', argument " "1"" of type '" "size_t""'");
20195  }
20196  arg1 = static_cast< size_t >(val1);
20197  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20198  if (!SWIG_IsOK(ecode2)) {
20199  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kmeans_clustering" "', argument " "2"" of type '" "size_t""'");
20200  }
20201  arg2 = static_cast< size_t >(val2);
20202  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20203  if (!SWIG_IsOK(ecode3)) {
20204  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "kmeans_clustering" "', argument " "3"" of type '" "size_t""'");
20205  }
20206  arg3 = static_cast< size_t >(val3);
20207  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
20208  if (!SWIG_IsOK(res4)) {
20209  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "kmeans_clustering" "', argument " "4"" of type '" "float const *""'");
20210  }
20211  arg4 = reinterpret_cast< float * >(argp4);
20212  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
20213  if (!SWIG_IsOK(res5)) {
20214  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "kmeans_clustering" "', argument " "5"" of type '" "float *""'");
20215  }
20216  arg5 = reinterpret_cast< float * >(argp5);
20217  {
20218  Py_BEGIN_ALLOW_THREADS
20219  try {
20220  result = (float)faiss::kmeans_clustering(arg1,arg2,arg3,(float const *)arg4,arg5);
20221  } catch(faiss::FaissException & e) {
20222  PyEval_RestoreThread(_save);
20223  PyErr_SetString(PyExc_RuntimeError, e.what());
20224  SWIG_fail;
20225  }
20226  Py_END_ALLOW_THREADS
20227  }
20228  resultobj = SWIG_From_float(static_cast< float >(result));
20229  return resultobj;
20230 fail:
20231  return NULL;
20232 }
20233 
20234 
20235 SWIGINTERN PyObject *_wrap_ProductQuantizer_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20236  PyObject *resultobj = 0;
20238  size_t arg2 ;
20239  void *argp1 = 0 ;
20240  int res1 = 0 ;
20241  size_t val2 ;
20242  int ecode2 = 0 ;
20243  PyObject * obj0 = 0 ;
20244  PyObject * obj1 = 0 ;
20245 
20246  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_d_set",&obj0,&obj1)) SWIG_fail;
20247  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20248  if (!SWIG_IsOK(res1)) {
20249  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_d_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20250  }
20251  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20252  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20253  if (!SWIG_IsOK(ecode2)) {
20254  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_d_set" "', argument " "2"" of type '" "size_t""'");
20255  }
20256  arg2 = static_cast< size_t >(val2);
20257  if (arg1) (arg1)->d = arg2;
20258  resultobj = SWIG_Py_Void();
20259  return resultobj;
20260 fail:
20261  return NULL;
20262 }
20263 
20264 
20265 SWIGINTERN PyObject *_wrap_ProductQuantizer_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20266  PyObject *resultobj = 0;
20268  void *argp1 = 0 ;
20269  int res1 = 0 ;
20270  PyObject * obj0 = 0 ;
20271  size_t result;
20272 
20273  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_d_get",&obj0)) SWIG_fail;
20274  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20275  if (!SWIG_IsOK(res1)) {
20276  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_d_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20277  }
20278  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20279  result = (size_t) ((arg1)->d);
20280  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20281  return resultobj;
20282 fail:
20283  return NULL;
20284 }
20285 
20286 
20287 SWIGINTERN PyObject *_wrap_ProductQuantizer_M_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20288  PyObject *resultobj = 0;
20290  size_t arg2 ;
20291  void *argp1 = 0 ;
20292  int res1 = 0 ;
20293  size_t val2 ;
20294  int ecode2 = 0 ;
20295  PyObject * obj0 = 0 ;
20296  PyObject * obj1 = 0 ;
20297 
20298  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_M_set",&obj0,&obj1)) SWIG_fail;
20299  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20300  if (!SWIG_IsOK(res1)) {
20301  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_M_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20302  }
20303  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20304  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20305  if (!SWIG_IsOK(ecode2)) {
20306  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_M_set" "', argument " "2"" of type '" "size_t""'");
20307  }
20308  arg2 = static_cast< size_t >(val2);
20309  if (arg1) (arg1)->M = arg2;
20310  resultobj = SWIG_Py_Void();
20311  return resultobj;
20312 fail:
20313  return NULL;
20314 }
20315 
20316 
20317 SWIGINTERN PyObject *_wrap_ProductQuantizer_M_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20318  PyObject *resultobj = 0;
20320  void *argp1 = 0 ;
20321  int res1 = 0 ;
20322  PyObject * obj0 = 0 ;
20323  size_t result;
20324 
20325  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_M_get",&obj0)) SWIG_fail;
20326  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20327  if (!SWIG_IsOK(res1)) {
20328  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_M_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20329  }
20330  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20331  result = (size_t) ((arg1)->M);
20332  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20333  return resultobj;
20334 fail:
20335  return NULL;
20336 }
20337 
20338 
20339 SWIGINTERN PyObject *_wrap_ProductQuantizer_nbits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20340  PyObject *resultobj = 0;
20342  size_t arg2 ;
20343  void *argp1 = 0 ;
20344  int res1 = 0 ;
20345  size_t val2 ;
20346  int ecode2 = 0 ;
20347  PyObject * obj0 = 0 ;
20348  PyObject * obj1 = 0 ;
20349 
20350  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_nbits_set",&obj0,&obj1)) SWIG_fail;
20351  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20352  if (!SWIG_IsOK(res1)) {
20353  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_nbits_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20354  }
20355  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20356  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20357  if (!SWIG_IsOK(ecode2)) {
20358  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_nbits_set" "', argument " "2"" of type '" "size_t""'");
20359  }
20360  arg2 = static_cast< size_t >(val2);
20361  if (arg1) (arg1)->nbits = arg2;
20362  resultobj = SWIG_Py_Void();
20363  return resultobj;
20364 fail:
20365  return NULL;
20366 }
20367 
20368 
20369 SWIGINTERN PyObject *_wrap_ProductQuantizer_nbits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20370  PyObject *resultobj = 0;
20372  void *argp1 = 0 ;
20373  int res1 = 0 ;
20374  PyObject * obj0 = 0 ;
20375  size_t result;
20376 
20377  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_nbits_get",&obj0)) SWIG_fail;
20378  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20379  if (!SWIG_IsOK(res1)) {
20380  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_nbits_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20381  }
20382  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20383  result = (size_t) ((arg1)->nbits);
20384  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20385  return resultobj;
20386 fail:
20387  return NULL;
20388 }
20389 
20390 
20391 SWIGINTERN PyObject *_wrap_ProductQuantizer_dsub_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20392  PyObject *resultobj = 0;
20394  size_t arg2 ;
20395  void *argp1 = 0 ;
20396  int res1 = 0 ;
20397  size_t val2 ;
20398  int ecode2 = 0 ;
20399  PyObject * obj0 = 0 ;
20400  PyObject * obj1 = 0 ;
20401 
20402  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_dsub_set",&obj0,&obj1)) SWIG_fail;
20403  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20404  if (!SWIG_IsOK(res1)) {
20405  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_dsub_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20406  }
20407  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20408  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20409  if (!SWIG_IsOK(ecode2)) {
20410  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_dsub_set" "', argument " "2"" of type '" "size_t""'");
20411  }
20412  arg2 = static_cast< size_t >(val2);
20413  if (arg1) (arg1)->dsub = arg2;
20414  resultobj = SWIG_Py_Void();
20415  return resultobj;
20416 fail:
20417  return NULL;
20418 }
20419 
20420 
20421 SWIGINTERN PyObject *_wrap_ProductQuantizer_dsub_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20422  PyObject *resultobj = 0;
20424  void *argp1 = 0 ;
20425  int res1 = 0 ;
20426  PyObject * obj0 = 0 ;
20427  size_t result;
20428 
20429  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_dsub_get",&obj0)) SWIG_fail;
20430  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20431  if (!SWIG_IsOK(res1)) {
20432  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_dsub_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20433  }
20434  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20435  result = (size_t) ((arg1)->dsub);
20436  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20437  return resultobj;
20438 fail:
20439  return NULL;
20440 }
20441 
20442 
20443 SWIGINTERN PyObject *_wrap_ProductQuantizer_byte_per_idx_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20444  PyObject *resultobj = 0;
20446  size_t arg2 ;
20447  void *argp1 = 0 ;
20448  int res1 = 0 ;
20449  size_t val2 ;
20450  int ecode2 = 0 ;
20451  PyObject * obj0 = 0 ;
20452  PyObject * obj1 = 0 ;
20453 
20454  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_byte_per_idx_set",&obj0,&obj1)) SWIG_fail;
20455  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20456  if (!SWIG_IsOK(res1)) {
20457  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_byte_per_idx_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20458  }
20459  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20460  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20461  if (!SWIG_IsOK(ecode2)) {
20462  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_byte_per_idx_set" "', argument " "2"" of type '" "size_t""'");
20463  }
20464  arg2 = static_cast< size_t >(val2);
20465  if (arg1) (arg1)->byte_per_idx = arg2;
20466  resultobj = SWIG_Py_Void();
20467  return resultobj;
20468 fail:
20469  return NULL;
20470 }
20471 
20472 
20473 SWIGINTERN PyObject *_wrap_ProductQuantizer_byte_per_idx_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20474  PyObject *resultobj = 0;
20476  void *argp1 = 0 ;
20477  int res1 = 0 ;
20478  PyObject * obj0 = 0 ;
20479  size_t result;
20480 
20481  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_byte_per_idx_get",&obj0)) SWIG_fail;
20482  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20483  if (!SWIG_IsOK(res1)) {
20484  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_byte_per_idx_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20485  }
20486  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20487  result = (size_t) ((arg1)->byte_per_idx);
20488  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20489  return resultobj;
20490 fail:
20491  return NULL;
20492 }
20493 
20494 
20495 SWIGINTERN PyObject *_wrap_ProductQuantizer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20496  PyObject *resultobj = 0;
20498  size_t arg2 ;
20499  void *argp1 = 0 ;
20500  int res1 = 0 ;
20501  size_t val2 ;
20502  int ecode2 = 0 ;
20503  PyObject * obj0 = 0 ;
20504  PyObject * obj1 = 0 ;
20505 
20506  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_code_size_set",&obj0,&obj1)) SWIG_fail;
20507  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20508  if (!SWIG_IsOK(res1)) {
20509  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_code_size_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20510  }
20511  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20512  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20513  if (!SWIG_IsOK(ecode2)) {
20514  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_code_size_set" "', argument " "2"" of type '" "size_t""'");
20515  }
20516  arg2 = static_cast< size_t >(val2);
20517  if (arg1) (arg1)->code_size = arg2;
20518  resultobj = SWIG_Py_Void();
20519  return resultobj;
20520 fail:
20521  return NULL;
20522 }
20523 
20524 
20525 SWIGINTERN PyObject *_wrap_ProductQuantizer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20526  PyObject *resultobj = 0;
20528  void *argp1 = 0 ;
20529  int res1 = 0 ;
20530  PyObject * obj0 = 0 ;
20531  size_t result;
20532 
20533  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_code_size_get",&obj0)) SWIG_fail;
20534  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20535  if (!SWIG_IsOK(res1)) {
20536  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_code_size_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20537  }
20538  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20539  result = (size_t) ((arg1)->code_size);
20540  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20541  return resultobj;
20542 fail:
20543  return NULL;
20544 }
20545 
20546 
20547 SWIGINTERN PyObject *_wrap_ProductQuantizer_ksub_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20548  PyObject *resultobj = 0;
20550  size_t arg2 ;
20551  void *argp1 = 0 ;
20552  int res1 = 0 ;
20553  size_t val2 ;
20554  int ecode2 = 0 ;
20555  PyObject * obj0 = 0 ;
20556  PyObject * obj1 = 0 ;
20557 
20558  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_ksub_set",&obj0,&obj1)) SWIG_fail;
20559  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20560  if (!SWIG_IsOK(res1)) {
20561  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_ksub_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20562  }
20563  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20564  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20565  if (!SWIG_IsOK(ecode2)) {
20566  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_ksub_set" "', argument " "2"" of type '" "size_t""'");
20567  }
20568  arg2 = static_cast< size_t >(val2);
20569  if (arg1) (arg1)->ksub = arg2;
20570  resultobj = SWIG_Py_Void();
20571  return resultobj;
20572 fail:
20573  return NULL;
20574 }
20575 
20576 
20577 SWIGINTERN PyObject *_wrap_ProductQuantizer_ksub_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20578  PyObject *resultobj = 0;
20580  void *argp1 = 0 ;
20581  int res1 = 0 ;
20582  PyObject * obj0 = 0 ;
20583  size_t result;
20584 
20585  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_ksub_get",&obj0)) SWIG_fail;
20586  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20587  if (!SWIG_IsOK(res1)) {
20588  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_ksub_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20589  }
20590  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20591  result = (size_t) ((arg1)->ksub);
20592  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
20593  return resultobj;
20594 fail:
20595  return NULL;
20596 }
20597 
20598 
20599 SWIGINTERN PyObject *_wrap_ProductQuantizer_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20600  PyObject *resultobj = 0;
20602  bool arg2 ;
20603  void *argp1 = 0 ;
20604  int res1 = 0 ;
20605  bool val2 ;
20606  int ecode2 = 0 ;
20607  PyObject * obj0 = 0 ;
20608  PyObject * obj1 = 0 ;
20609 
20610  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_verbose_set",&obj0,&obj1)) SWIG_fail;
20611  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20612  if (!SWIG_IsOK(res1)) {
20613  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_verbose_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20614  }
20615  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20616  ecode2 = SWIG_AsVal_bool(obj1, &val2);
20617  if (!SWIG_IsOK(ecode2)) {
20618  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_verbose_set" "', argument " "2"" of type '" "bool""'");
20619  }
20620  arg2 = static_cast< bool >(val2);
20621  if (arg1) (arg1)->verbose = arg2;
20622  resultobj = SWIG_Py_Void();
20623  return resultobj;
20624 fail:
20625  return NULL;
20626 }
20627 
20628 
20629 SWIGINTERN PyObject *_wrap_ProductQuantizer_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20630  PyObject *resultobj = 0;
20632  void *argp1 = 0 ;
20633  int res1 = 0 ;
20634  PyObject * obj0 = 0 ;
20635  bool result;
20636 
20637  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_verbose_get",&obj0)) SWIG_fail;
20638  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20639  if (!SWIG_IsOK(res1)) {
20640  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_verbose_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20641  }
20642  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20643  result = (bool) ((arg1)->verbose);
20644  resultobj = SWIG_From_bool(static_cast< bool >(result));
20645  return resultobj;
20646 fail:
20647  return NULL;
20648 }
20649 
20650 
20651 SWIGINTERN PyObject *_wrap_ProductQuantizer_train_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20652  PyObject *resultobj = 0;
20655  void *argp1 = 0 ;
20656  int res1 = 0 ;
20657  int val2 ;
20658  int ecode2 = 0 ;
20659  PyObject * obj0 = 0 ;
20660  PyObject * obj1 = 0 ;
20661 
20662  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_train_type_set",&obj0,&obj1)) SWIG_fail;
20663  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20664  if (!SWIG_IsOK(res1)) {
20665  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_train_type_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20666  }
20667  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20668  ecode2 = SWIG_AsVal_int(obj1, &val2);
20669  if (!SWIG_IsOK(ecode2)) {
20670  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_train_type_set" "', argument " "2"" of type '" "faiss::ProductQuantizer::train_type_t""'");
20671  }
20672  arg2 = static_cast< faiss::ProductQuantizer::train_type_t >(val2);
20673  if (arg1) (arg1)->train_type = arg2;
20674  resultobj = SWIG_Py_Void();
20675  return resultobj;
20676 fail:
20677  return NULL;
20678 }
20679 
20680 
20681 SWIGINTERN PyObject *_wrap_ProductQuantizer_train_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20682  PyObject *resultobj = 0;
20684  void *argp1 = 0 ;
20685  int res1 = 0 ;
20686  PyObject * obj0 = 0 ;
20688 
20689  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_train_type_get",&obj0)) SWIG_fail;
20690  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20691  if (!SWIG_IsOK(res1)) {
20692  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_train_type_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20693  }
20694  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20695  result = (faiss::ProductQuantizer::train_type_t) ((arg1)->train_type);
20696  resultobj = SWIG_From_int(static_cast< int >(result));
20697  return resultobj;
20698 fail:
20699  return NULL;
20700 }
20701 
20702 
20703 SWIGINTERN PyObject *_wrap_ProductQuantizer_cp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20704  PyObject *resultobj = 0;
20707  void *argp1 = 0 ;
20708  int res1 = 0 ;
20709  void *argp2 = 0 ;
20710  int res2 = 0 ;
20711  PyObject * obj0 = 0 ;
20712  PyObject * obj1 = 0 ;
20713 
20714  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_cp_set",&obj0,&obj1)) SWIG_fail;
20715  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20716  if (!SWIG_IsOK(res1)) {
20717  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_cp_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20718  }
20719  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20720  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
20721  if (!SWIG_IsOK(res2)) {
20722  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
20723  }
20724  arg2 = reinterpret_cast< faiss::ClusteringParameters * >(argp2);
20725  if (arg1) (arg1)->cp = *arg2;
20726  resultobj = SWIG_Py_Void();
20727  return resultobj;
20728 fail:
20729  return NULL;
20730 }
20731 
20732 
20733 SWIGINTERN PyObject *_wrap_ProductQuantizer_cp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20734  PyObject *resultobj = 0;
20736  void *argp1 = 0 ;
20737  int res1 = 0 ;
20738  PyObject * obj0 = 0 ;
20739  faiss::ClusteringParameters *result = 0 ;
20740 
20741  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_cp_get",&obj0)) SWIG_fail;
20742  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20743  if (!SWIG_IsOK(res1)) {
20744  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_cp_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20745  }
20746  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20747  result = (faiss::ClusteringParameters *)& ((arg1)->cp);
20748  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
20749  return resultobj;
20750 fail:
20751  return NULL;
20752 }
20753 
20754 
20755 SWIGINTERN PyObject *_wrap_ProductQuantizer_assign_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20756  PyObject *resultobj = 0;
20758  faiss::Index *arg2 = (faiss::Index *) 0 ;
20759  void *argp1 = 0 ;
20760  int res1 = 0 ;
20761  void *argp2 = 0 ;
20762  int res2 = 0 ;
20763  PyObject * obj0 = 0 ;
20764  PyObject * obj1 = 0 ;
20765 
20766  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_assign_index_set",&obj0,&obj1)) SWIG_fail;
20767  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20768  if (!SWIG_IsOK(res1)) {
20769  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_assign_index_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20770  }
20771  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20772  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
20773  if (!SWIG_IsOK(res2)) {
20774  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_assign_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
20775  }
20776  arg2 = reinterpret_cast< faiss::Index * >(argp2);
20777  if (arg1) (arg1)->assign_index = arg2;
20778  resultobj = SWIG_Py_Void();
20779  return resultobj;
20780 fail:
20781  return NULL;
20782 }
20783 
20784 
20785 SWIGINTERN PyObject *_wrap_ProductQuantizer_assign_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20786  PyObject *resultobj = 0;
20788  void *argp1 = 0 ;
20789  int res1 = 0 ;
20790  PyObject * obj0 = 0 ;
20791  faiss::Index *result = 0 ;
20792 
20793  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_assign_index_get",&obj0)) SWIG_fail;
20794  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20795  if (!SWIG_IsOK(res1)) {
20796  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_assign_index_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20797  }
20798  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20799  result = (faiss::Index *) ((arg1)->assign_index);
20800  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
20801  return resultobj;
20802 fail:
20803  return NULL;
20804 }
20805 
20806 
20807 SWIGINTERN PyObject *_wrap_ProductQuantizer_centroids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20808  PyObject *resultobj = 0;
20810  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
20811  void *argp1 = 0 ;
20812  int res1 = 0 ;
20813  void *argp2 = 0 ;
20814  int res2 = 0 ;
20815  PyObject * obj0 = 0 ;
20816  PyObject * obj1 = 0 ;
20817 
20818  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_centroids_set",&obj0,&obj1)) SWIG_fail;
20819  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20820  if (!SWIG_IsOK(res1)) {
20821  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_centroids_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20822  }
20823  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20824  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
20825  if (!SWIG_IsOK(res2)) {
20826  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_centroids_set" "', argument " "2"" of type '" "std::vector< float > *""'");
20827  }
20828  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
20829  if (arg1) (arg1)->centroids = *arg2;
20830  resultobj = SWIG_Py_Void();
20831  return resultobj;
20832 fail:
20833  return NULL;
20834 }
20835 
20836 
20837 SWIGINTERN PyObject *_wrap_ProductQuantizer_centroids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20838  PyObject *resultobj = 0;
20840  void *argp1 = 0 ;
20841  int res1 = 0 ;
20842  PyObject * obj0 = 0 ;
20843  std::vector< float > *result = 0 ;
20844 
20845  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_centroids_get",&obj0)) SWIG_fail;
20846  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20847  if (!SWIG_IsOK(res1)) {
20848  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_centroids_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20849  }
20850  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20851  result = (std::vector< float > *)& ((arg1)->centroids);
20852  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
20853  return resultobj;
20854 fail:
20855  return NULL;
20856 }
20857 
20858 
20859 SWIGINTERN PyObject *_wrap_ProductQuantizer_get_centroids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20860  PyObject *resultobj = 0;
20862  size_t arg2 ;
20863  size_t arg3 ;
20864  void *argp1 = 0 ;
20865  int res1 = 0 ;
20866  size_t val2 ;
20867  int ecode2 = 0 ;
20868  size_t val3 ;
20869  int ecode3 = 0 ;
20870  PyObject * obj0 = 0 ;
20871  PyObject * obj1 = 0 ;
20872  PyObject * obj2 = 0 ;
20873  float *result = 0 ;
20874 
20875  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_get_centroids",&obj0,&obj1,&obj2)) SWIG_fail;
20876  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20877  if (!SWIG_IsOK(res1)) {
20878  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_get_centroids" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20879  }
20880  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20881  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20882  if (!SWIG_IsOK(ecode2)) {
20883  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_get_centroids" "', argument " "2"" of type '" "size_t""'");
20884  }
20885  arg2 = static_cast< size_t >(val2);
20886  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20887  if (!SWIG_IsOK(ecode3)) {
20888  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_get_centroids" "', argument " "3"" of type '" "size_t""'");
20889  }
20890  arg3 = static_cast< size_t >(val3);
20891  {
20892  Py_BEGIN_ALLOW_THREADS
20893  try {
20894  result = (float *)(arg1)->get_centroids(arg2,arg3);
20895  } catch(faiss::FaissException & e) {
20896  PyEval_RestoreThread(_save);
20897  PyErr_SetString(PyExc_RuntimeError, e.what());
20898  SWIG_fail;
20899  }
20900  Py_END_ALLOW_THREADS
20901  }
20902  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
20903  return resultobj;
20904 fail:
20905  return NULL;
20906 }
20907 
20908 
20909 SWIGINTERN PyObject *_wrap_ProductQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20910  PyObject *resultobj = 0;
20912  int arg2 ;
20913  float *arg3 = (float *) 0 ;
20914  void *argp1 = 0 ;
20915  int res1 = 0 ;
20916  int val2 ;
20917  int ecode2 = 0 ;
20918  void *argp3 = 0 ;
20919  int res3 = 0 ;
20920  PyObject * obj0 = 0 ;
20921  PyObject * obj1 = 0 ;
20922  PyObject * obj2 = 0 ;
20923 
20924  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
20925  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20926  if (!SWIG_IsOK(res1)) {
20927  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_train" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20928  }
20929  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20930  ecode2 = SWIG_AsVal_int(obj1, &val2);
20931  if (!SWIG_IsOK(ecode2)) {
20932  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_train" "', argument " "2"" of type '" "int""'");
20933  }
20934  arg2 = static_cast< int >(val2);
20935  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20936  if (!SWIG_IsOK(res3)) {
20937  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_train" "', argument " "3"" of type '" "float const *""'");
20938  }
20939  arg3 = reinterpret_cast< float * >(argp3);
20940  {
20941  Py_BEGIN_ALLOW_THREADS
20942  try {
20943  (arg1)->train(arg2,(float const *)arg3);
20944  } catch(faiss::FaissException & e) {
20945  PyEval_RestoreThread(_save);
20946  PyErr_SetString(PyExc_RuntimeError, e.what());
20947  SWIG_fail;
20948  }
20949  Py_END_ALLOW_THREADS
20950  }
20951  resultobj = SWIG_Py_Void();
20952  return resultobj;
20953 fail:
20954  return NULL;
20955 }
20956 
20957 
20958 SWIGINTERN PyObject *_wrap_new_ProductQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20959  PyObject *resultobj = 0;
20960  size_t arg1 ;
20961  size_t arg2 ;
20962  size_t arg3 ;
20963  size_t val1 ;
20964  int ecode1 = 0 ;
20965  size_t val2 ;
20966  int ecode2 = 0 ;
20967  size_t val3 ;
20968  int ecode3 = 0 ;
20969  PyObject * obj0 = 0 ;
20970  PyObject * obj1 = 0 ;
20971  PyObject * obj2 = 0 ;
20972  faiss::ProductQuantizer *result = 0 ;
20973 
20974  if (!PyArg_ParseTuple(args,(char *)"OOO:new_ProductQuantizer",&obj0,&obj1,&obj2)) SWIG_fail;
20975  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
20976  if (!SWIG_IsOK(ecode1)) {
20977  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ProductQuantizer" "', argument " "1"" of type '" "size_t""'");
20978  }
20979  arg1 = static_cast< size_t >(val1);
20980  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20981  if (!SWIG_IsOK(ecode2)) {
20982  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ProductQuantizer" "', argument " "2"" of type '" "size_t""'");
20983  }
20984  arg2 = static_cast< size_t >(val2);
20985  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20986  if (!SWIG_IsOK(ecode3)) {
20987  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ProductQuantizer" "', argument " "3"" of type '" "size_t""'");
20988  }
20989  arg3 = static_cast< size_t >(val3);
20990  {
20991  Py_BEGIN_ALLOW_THREADS
20992  try {
20993  result = (faiss::ProductQuantizer *)new faiss::ProductQuantizer(arg1,arg2,arg3);
20994  } catch(faiss::FaissException & e) {
20995  PyEval_RestoreThread(_save);
20996  PyErr_SetString(PyExc_RuntimeError, e.what());
20997  SWIG_fail;
20998  }
20999  Py_END_ALLOW_THREADS
21000  }
21001  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_NEW | 0 );
21002  return resultobj;
21003 fail:
21004  return NULL;
21005 }
21006 
21007 
21008 SWIGINTERN PyObject *_wrap_new_ProductQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21009  PyObject *resultobj = 0;
21010  faiss::ProductQuantizer *result = 0 ;
21011 
21012  if (!PyArg_ParseTuple(args,(char *)":new_ProductQuantizer")) SWIG_fail;
21013  {
21014  Py_BEGIN_ALLOW_THREADS
21015  try {
21017  } catch(faiss::FaissException & e) {
21018  PyEval_RestoreThread(_save);
21019  PyErr_SetString(PyExc_RuntimeError, e.what());
21020  SWIG_fail;
21021  }
21022  Py_END_ALLOW_THREADS
21023  }
21024  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_NEW | 0 );
21025  return resultobj;
21026 fail:
21027  return NULL;
21028 }
21029 
21030 
21031 SWIGINTERN PyObject *_wrap_new_ProductQuantizer(PyObject *self, PyObject *args) {
21032  Py_ssize_t argc;
21033  PyObject *argv[4] = {
21034  0
21035  };
21036  Py_ssize_t ii;
21037 
21038  if (!PyTuple_Check(args)) SWIG_fail;
21039  argc = args ? PyObject_Length(args) : 0;
21040  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
21041  argv[ii] = PyTuple_GET_ITEM(args,ii);
21042  }
21043  if (argc == 0) {
21044  return _wrap_new_ProductQuantizer__SWIG_1(self, args);
21045  }
21046  if (argc == 3) {
21047  int _v;
21048  {
21049  int res = SWIG_AsVal_size_t(argv[0], NULL);
21050  _v = SWIG_CheckState(res);
21051  }
21052  if (_v) {
21053  {
21054  int res = SWIG_AsVal_size_t(argv[1], NULL);
21055  _v = SWIG_CheckState(res);
21056  }
21057  if (_v) {
21058  {
21059  int res = SWIG_AsVal_size_t(argv[2], NULL);
21060  _v = SWIG_CheckState(res);
21061  }
21062  if (_v) {
21063  return _wrap_new_ProductQuantizer__SWIG_0(self, args);
21064  }
21065  }
21066  }
21067  }
21068 
21069 fail:
21070  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ProductQuantizer'.\n"
21071  " Possible C/C++ prototypes are:\n"
21072  " faiss::ProductQuantizer::ProductQuantizer(size_t,size_t,size_t)\n"
21073  " faiss::ProductQuantizer::ProductQuantizer()\n");
21074  return 0;
21075 }
21076 
21077 
21078 SWIGINTERN PyObject *_wrap_ProductQuantizer_set_derived_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21079  PyObject *resultobj = 0;
21081  void *argp1 = 0 ;
21082  int res1 = 0 ;
21083  PyObject * obj0 = 0 ;
21084 
21085  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_set_derived_values",&obj0)) SWIG_fail;
21086  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21087  if (!SWIG_IsOK(res1)) {
21088  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_set_derived_values" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
21089  }
21090  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21091  {
21092  Py_BEGIN_ALLOW_THREADS
21093  try {
21094  (arg1)->set_derived_values();
21095  } catch(faiss::FaissException & e) {
21096  PyEval_RestoreThread(_save);
21097  PyErr_SetString(PyExc_RuntimeError, e.what());
21098  SWIG_fail;
21099  }
21100  Py_END_ALLOW_THREADS
21101  }
21102  resultobj = SWIG_Py_Void();
21103  return resultobj;
21104 fail:
21105  return NULL;
21106 }
21107 
21108 
21109 SWIGINTERN PyObject *_wrap_ProductQuantizer_set_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21110  PyObject *resultobj = 0;
21112  float *arg2 = (float *) 0 ;
21113  int arg3 ;
21114  void *argp1 = 0 ;
21115  int res1 = 0 ;
21116  void *argp2 = 0 ;
21117  int res2 = 0 ;
21118  int val3 ;
21119  int ecode3 = 0 ;
21120  PyObject * obj0 = 0 ;
21121  PyObject * obj1 = 0 ;
21122  PyObject * obj2 = 0 ;
21123 
21124  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_set_params",&obj0,&obj1,&obj2)) SWIG_fail;
21125  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21126  if (!SWIG_IsOK(res1)) {
21127  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_set_params" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
21128  }
21129  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21130  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21131  if (!SWIG_IsOK(res2)) {
21132  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_set_params" "', argument " "2"" of type '" "float const *""'");
21133  }
21134  arg2 = reinterpret_cast< float * >(argp2);
21135  ecode3 = SWIG_AsVal_int(obj2, &val3);
21136  if (!SWIG_IsOK(ecode3)) {
21137  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_set_params" "', argument " "3"" of type '" "int""'");
21138  }
21139  arg3 = static_cast< int >(val3);
21140  {
21141  Py_BEGIN_ALLOW_THREADS
21142  try {
21143  (arg1)->set_params((float const *)arg2,arg3);
21144  } catch(faiss::FaissException & e) {
21145  PyEval_RestoreThread(_save);
21146  PyErr_SetString(PyExc_RuntimeError, e.what());
21147  SWIG_fail;
21148  }
21149  Py_END_ALLOW_THREADS
21150  }
21151  resultobj = SWIG_Py_Void();
21152  return resultobj;
21153 fail:
21154  return NULL;
21155 }
21156 
21157 
21158 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21159  PyObject *resultobj = 0;
21161  float *arg2 = (float *) 0 ;
21162  uint8_t *arg3 = (uint8_t *) 0 ;
21163  void *argp1 = 0 ;
21164  int res1 = 0 ;
21165  void *argp2 = 0 ;
21166  int res2 = 0 ;
21167  void *argp3 = 0 ;
21168  int res3 = 0 ;
21169  PyObject * obj0 = 0 ;
21170  PyObject * obj1 = 0 ;
21171  PyObject * obj2 = 0 ;
21172 
21173  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_code",&obj0,&obj1,&obj2)) SWIG_fail;
21174  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21175  if (!SWIG_IsOK(res1)) {
21176  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_code" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21177  }
21178  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21179  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21180  if (!SWIG_IsOK(res2)) {
21181  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_code" "', argument " "2"" of type '" "float const *""'");
21182  }
21183  arg2 = reinterpret_cast< float * >(argp2);
21184  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
21185  if (!SWIG_IsOK(res3)) {
21186  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_code" "', argument " "3"" of type '" "uint8_t *""'");
21187  }
21188  arg3 = reinterpret_cast< uint8_t * >(argp3);
21189  {
21190  Py_BEGIN_ALLOW_THREADS
21191  try {
21192  ((faiss::ProductQuantizer const *)arg1)->compute_code((float const *)arg2,arg3);
21193  } catch(faiss::FaissException & e) {
21194  PyEval_RestoreThread(_save);
21195  PyErr_SetString(PyExc_RuntimeError, e.what());
21196  SWIG_fail;
21197  }
21198  Py_END_ALLOW_THREADS
21199  }
21200  resultobj = SWIG_Py_Void();
21201  return resultobj;
21202 fail:
21203  return NULL;
21204 }
21205 
21206 
21207 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21208  PyObject *resultobj = 0;
21210  float *arg2 = (float *) 0 ;
21211  uint8_t *arg3 = (uint8_t *) 0 ;
21212  size_t arg4 ;
21213  void *argp1 = 0 ;
21214  int res1 = 0 ;
21215  void *argp2 = 0 ;
21216  int res2 = 0 ;
21217  void *argp3 = 0 ;
21218  int res3 = 0 ;
21219  size_t val4 ;
21220  int ecode4 = 0 ;
21221  PyObject * obj0 = 0 ;
21222  PyObject * obj1 = 0 ;
21223  PyObject * obj2 = 0 ;
21224  PyObject * obj3 = 0 ;
21225 
21226  if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_compute_codes",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21227  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21228  if (!SWIG_IsOK(res1)) {
21229  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_codes" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21230  }
21231  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21232  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21233  if (!SWIG_IsOK(res2)) {
21234  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_codes" "', argument " "2"" of type '" "float const *""'");
21235  }
21236  arg2 = reinterpret_cast< float * >(argp2);
21237  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
21238  if (!SWIG_IsOK(res3)) {
21239  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_codes" "', argument " "3"" of type '" "uint8_t *""'");
21240  }
21241  arg3 = reinterpret_cast< uint8_t * >(argp3);
21242  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
21243  if (!SWIG_IsOK(ecode4)) {
21244  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProductQuantizer_compute_codes" "', argument " "4"" of type '" "size_t""'");
21245  }
21246  arg4 = static_cast< size_t >(val4);
21247  {
21248  Py_BEGIN_ALLOW_THREADS
21249  try {
21250  ((faiss::ProductQuantizer const *)arg1)->compute_codes((float const *)arg2,arg3,arg4);
21251  } catch(faiss::FaissException & e) {
21252  PyEval_RestoreThread(_save);
21253  PyErr_SetString(PyExc_RuntimeError, e.what());
21254  SWIG_fail;
21255  }
21256  Py_END_ALLOW_THREADS
21257  }
21258  resultobj = SWIG_Py_Void();
21259  return resultobj;
21260 fail:
21261  return NULL;
21262 }
21263 
21264 
21265 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21266  PyObject *resultobj = 0;
21268  uint8_t *arg2 = (uint8_t *) 0 ;
21269  float *arg3 = (float *) 0 ;
21270  void *argp1 = 0 ;
21271  int res1 = 0 ;
21272  void *argp2 = 0 ;
21273  int res2 = 0 ;
21274  void *argp3 = 0 ;
21275  int res3 = 0 ;
21276  PyObject * obj0 = 0 ;
21277  PyObject * obj1 = 0 ;
21278  PyObject * obj2 = 0 ;
21279 
21280  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_decode",&obj0,&obj1,&obj2)) SWIG_fail;
21281  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21282  if (!SWIG_IsOK(res1)) {
21283  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_decode" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21284  }
21285  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21286  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
21287  if (!SWIG_IsOK(res2)) {
21288  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
21289  }
21290  arg2 = reinterpret_cast< uint8_t * >(argp2);
21291  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21292  if (!SWIG_IsOK(res3)) {
21293  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_decode" "', argument " "3"" of type '" "float *""'");
21294  }
21295  arg3 = reinterpret_cast< float * >(argp3);
21296  {
21297  Py_BEGIN_ALLOW_THREADS
21298  try {
21299  ((faiss::ProductQuantizer const *)arg1)->decode((uint8_t const *)arg2,arg3);
21300  } catch(faiss::FaissException & e) {
21301  PyEval_RestoreThread(_save);
21302  PyErr_SetString(PyExc_RuntimeError, e.what());
21303  SWIG_fail;
21304  }
21305  Py_END_ALLOW_THREADS
21306  }
21307  resultobj = SWIG_Py_Void();
21308  return resultobj;
21309 fail:
21310  return NULL;
21311 }
21312 
21313 
21314 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21315  PyObject *resultobj = 0;
21317  uint8_t *arg2 = (uint8_t *) 0 ;
21318  float *arg3 = (float *) 0 ;
21319  size_t arg4 ;
21320  void *argp1 = 0 ;
21321  int res1 = 0 ;
21322  void *argp2 = 0 ;
21323  int res2 = 0 ;
21324  void *argp3 = 0 ;
21325  int res3 = 0 ;
21326  size_t val4 ;
21327  int ecode4 = 0 ;
21328  PyObject * obj0 = 0 ;
21329  PyObject * obj1 = 0 ;
21330  PyObject * obj2 = 0 ;
21331  PyObject * obj3 = 0 ;
21332 
21333  if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_decode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21334  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21335  if (!SWIG_IsOK(res1)) {
21336  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_decode" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21337  }
21338  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21339  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
21340  if (!SWIG_IsOK(res2)) {
21341  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
21342  }
21343  arg2 = reinterpret_cast< uint8_t * >(argp2);
21344  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21345  if (!SWIG_IsOK(res3)) {
21346  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_decode" "', argument " "3"" of type '" "float *""'");
21347  }
21348  arg3 = reinterpret_cast< float * >(argp3);
21349  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
21350  if (!SWIG_IsOK(ecode4)) {
21351  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProductQuantizer_decode" "', argument " "4"" of type '" "size_t""'");
21352  }
21353  arg4 = static_cast< size_t >(val4);
21354  {
21355  Py_BEGIN_ALLOW_THREADS
21356  try {
21357  ((faiss::ProductQuantizer const *)arg1)->decode((uint8_t const *)arg2,arg3,arg4);
21358  } catch(faiss::FaissException & e) {
21359  PyEval_RestoreThread(_save);
21360  PyErr_SetString(PyExc_RuntimeError, e.what());
21361  SWIG_fail;
21362  }
21363  Py_END_ALLOW_THREADS
21364  }
21365  resultobj = SWIG_Py_Void();
21366  return resultobj;
21367 fail:
21368  return NULL;
21369 }
21370 
21371 
21372 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode(PyObject *self, PyObject *args) {
21373  Py_ssize_t argc;
21374  PyObject *argv[5] = {
21375  0
21376  };
21377  Py_ssize_t ii;
21378 
21379  if (!PyTuple_Check(args)) SWIG_fail;
21380  argc = args ? PyObject_Length(args) : 0;
21381  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
21382  argv[ii] = PyTuple_GET_ITEM(args,ii);
21383  }
21384  if (argc == 3) {
21385  int _v;
21386  void *vptr = 0;
21387  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21388  _v = SWIG_CheckState(res);
21389  if (_v) {
21390  void *vptr = 0;
21391  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
21392  _v = SWIG_CheckState(res);
21393  if (_v) {
21394  void *vptr = 0;
21395  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
21396  _v = SWIG_CheckState(res);
21397  if (_v) {
21398  return _wrap_ProductQuantizer_decode__SWIG_0(self, args);
21399  }
21400  }
21401  }
21402  }
21403  if (argc == 4) {
21404  int _v;
21405  void *vptr = 0;
21406  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21407  _v = SWIG_CheckState(res);
21408  if (_v) {
21409  void *vptr = 0;
21410  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
21411  _v = SWIG_CheckState(res);
21412  if (_v) {
21413  void *vptr = 0;
21414  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
21415  _v = SWIG_CheckState(res);
21416  if (_v) {
21417  {
21418  int res = SWIG_AsVal_size_t(argv[3], NULL);
21419  _v = SWIG_CheckState(res);
21420  }
21421  if (_v) {
21422  return _wrap_ProductQuantizer_decode__SWIG_1(self, args);
21423  }
21424  }
21425  }
21426  }
21427  }
21428 
21429 fail:
21430  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_decode'.\n"
21431  " Possible C/C++ prototypes are:\n"
21432  " faiss::ProductQuantizer::decode(uint8_t const *,float *) const\n"
21433  " faiss::ProductQuantizer::decode(uint8_t const *,float *,size_t) const\n");
21434  return 0;
21435 }
21436 
21437 
21438 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_code_from_distance_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21439  PyObject *resultobj = 0;
21441  float *arg2 = (float *) 0 ;
21442  uint8_t *arg3 = (uint8_t *) 0 ;
21443  void *argp1 = 0 ;
21444  int res1 = 0 ;
21445  void *argp2 = 0 ;
21446  int res2 = 0 ;
21447  void *argp3 = 0 ;
21448  int res3 = 0 ;
21449  PyObject * obj0 = 0 ;
21450  PyObject * obj1 = 0 ;
21451  PyObject * obj2 = 0 ;
21452 
21453  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_code_from_distance_table",&obj0,&obj1,&obj2)) SWIG_fail;
21454  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21455  if (!SWIG_IsOK(res1)) {
21456  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21457  }
21458  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21459  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21460  if (!SWIG_IsOK(res2)) {
21461  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "2"" of type '" "float const *""'");
21462  }
21463  arg2 = reinterpret_cast< float * >(argp2);
21464  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
21465  if (!SWIG_IsOK(res3)) {
21466  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "3"" of type '" "uint8_t *""'");
21467  }
21468  arg3 = reinterpret_cast< uint8_t * >(argp3);
21469  {
21470  Py_BEGIN_ALLOW_THREADS
21471  try {
21472  ((faiss::ProductQuantizer const *)arg1)->compute_code_from_distance_table((float const *)arg2,arg3);
21473  } catch(faiss::FaissException & e) {
21474  PyEval_RestoreThread(_save);
21475  PyErr_SetString(PyExc_RuntimeError, e.what());
21476  SWIG_fail;
21477  }
21478  Py_END_ALLOW_THREADS
21479  }
21480  resultobj = SWIG_Py_Void();
21481  return resultobj;
21482 fail:
21483  return NULL;
21484 }
21485 
21486 
21487 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_distance_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21488  PyObject *resultobj = 0;
21490  float *arg2 = (float *) 0 ;
21491  float *arg3 = (float *) 0 ;
21492  void *argp1 = 0 ;
21493  int res1 = 0 ;
21494  void *argp2 = 0 ;
21495  int res2 = 0 ;
21496  void *argp3 = 0 ;
21497  int res3 = 0 ;
21498  PyObject * obj0 = 0 ;
21499  PyObject * obj1 = 0 ;
21500  PyObject * obj2 = 0 ;
21501 
21502  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_distance_table",&obj0,&obj1,&obj2)) SWIG_fail;
21503  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21504  if (!SWIG_IsOK(res1)) {
21505  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_distance_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21506  }
21507  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21508  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21509  if (!SWIG_IsOK(res2)) {
21510  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_distance_table" "', argument " "2"" of type '" "float const *""'");
21511  }
21512  arg2 = reinterpret_cast< float * >(argp2);
21513  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21514  if (!SWIG_IsOK(res3)) {
21515  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_distance_table" "', argument " "3"" of type '" "float *""'");
21516  }
21517  arg3 = reinterpret_cast< float * >(argp3);
21518  {
21519  Py_BEGIN_ALLOW_THREADS
21520  try {
21521  ((faiss::ProductQuantizer const *)arg1)->compute_distance_table((float const *)arg2,arg3);
21522  } catch(faiss::FaissException & e) {
21523  PyEval_RestoreThread(_save);
21524  PyErr_SetString(PyExc_RuntimeError, e.what());
21525  SWIG_fail;
21526  }
21527  Py_END_ALLOW_THREADS
21528  }
21529  resultobj = SWIG_Py_Void();
21530  return resultobj;
21531 fail:
21532  return NULL;
21533 }
21534 
21535 
21536 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_inner_prod_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21537  PyObject *resultobj = 0;
21539  float *arg2 = (float *) 0 ;
21540  float *arg3 = (float *) 0 ;
21541  void *argp1 = 0 ;
21542  int res1 = 0 ;
21543  void *argp2 = 0 ;
21544  int res2 = 0 ;
21545  void *argp3 = 0 ;
21546  int res3 = 0 ;
21547  PyObject * obj0 = 0 ;
21548  PyObject * obj1 = 0 ;
21549  PyObject * obj2 = 0 ;
21550 
21551  if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_inner_prod_table",&obj0,&obj1,&obj2)) SWIG_fail;
21552  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21553  if (!SWIG_IsOK(res1)) {
21554  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21555  }
21556  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21557  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21558  if (!SWIG_IsOK(res2)) {
21559  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "2"" of type '" "float const *""'");
21560  }
21561  arg2 = reinterpret_cast< float * >(argp2);
21562  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21563  if (!SWIG_IsOK(res3)) {
21564  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "3"" of type '" "float *""'");
21565  }
21566  arg3 = reinterpret_cast< float * >(argp3);
21567  {
21568  Py_BEGIN_ALLOW_THREADS
21569  try {
21570  ((faiss::ProductQuantizer const *)arg1)->compute_inner_prod_table((float const *)arg2,arg3);
21571  } catch(faiss::FaissException & e) {
21572  PyEval_RestoreThread(_save);
21573  PyErr_SetString(PyExc_RuntimeError, e.what());
21574  SWIG_fail;
21575  }
21576  Py_END_ALLOW_THREADS
21577  }
21578  resultobj = SWIG_Py_Void();
21579  return resultobj;
21580 fail:
21581  return NULL;
21582 }
21583 
21584 
21585 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_distance_tables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21586  PyObject *resultobj = 0;
21588  size_t arg2 ;
21589  float *arg3 = (float *) 0 ;
21590  float *arg4 = (float *) 0 ;
21591  void *argp1 = 0 ;
21592  int res1 = 0 ;
21593  size_t val2 ;
21594  int ecode2 = 0 ;
21595  void *argp3 = 0 ;
21596  int res3 = 0 ;
21597  void *argp4 = 0 ;
21598  int res4 = 0 ;
21599  PyObject * obj0 = 0 ;
21600  PyObject * obj1 = 0 ;
21601  PyObject * obj2 = 0 ;
21602  PyObject * obj3 = 0 ;
21603 
21604  if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_compute_distance_tables",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21605  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21606  if (!SWIG_IsOK(res1)) {
21607  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21608  }
21609  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21610  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
21611  if (!SWIG_IsOK(ecode2)) {
21612  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "2"" of type '" "size_t""'");
21613  }
21614  arg2 = static_cast< size_t >(val2);
21615  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21616  if (!SWIG_IsOK(res3)) {
21617  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "3"" of type '" "float const *""'");
21618  }
21619  arg3 = reinterpret_cast< float * >(argp3);
21620  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
21621  if (!SWIG_IsOK(res4)) {
21622  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "4"" of type '" "float *""'");
21623  }
21624  arg4 = reinterpret_cast< float * >(argp4);
21625  {
21626  Py_BEGIN_ALLOW_THREADS
21627  try {
21628  ((faiss::ProductQuantizer const *)arg1)->compute_distance_tables(arg2,(float const *)arg3,arg4);
21629  } catch(faiss::FaissException & e) {
21630  PyEval_RestoreThread(_save);
21631  PyErr_SetString(PyExc_RuntimeError, e.what());
21632  SWIG_fail;
21633  }
21634  Py_END_ALLOW_THREADS
21635  }
21636  resultobj = SWIG_Py_Void();
21637  return resultobj;
21638 fail:
21639  return NULL;
21640 }
21641 
21642 
21643 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_inner_prod_tables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21644  PyObject *resultobj = 0;
21646  size_t arg2 ;
21647  float *arg3 = (float *) 0 ;
21648  float *arg4 = (float *) 0 ;
21649  void *argp1 = 0 ;
21650  int res1 = 0 ;
21651  size_t val2 ;
21652  int ecode2 = 0 ;
21653  void *argp3 = 0 ;
21654  int res3 = 0 ;
21655  void *argp4 = 0 ;
21656  int res4 = 0 ;
21657  PyObject * obj0 = 0 ;
21658  PyObject * obj1 = 0 ;
21659  PyObject * obj2 = 0 ;
21660  PyObject * obj3 = 0 ;
21661 
21662  if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_compute_inner_prod_tables",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21663  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21664  if (!SWIG_IsOK(res1)) {
21665  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21666  }
21667  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21668  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
21669  if (!SWIG_IsOK(ecode2)) {
21670  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "2"" of type '" "size_t""'");
21671  }
21672  arg2 = static_cast< size_t >(val2);
21673  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21674  if (!SWIG_IsOK(res3)) {
21675  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "3"" of type '" "float const *""'");
21676  }
21677  arg3 = reinterpret_cast< float * >(argp3);
21678  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
21679  if (!SWIG_IsOK(res4)) {
21680  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "4"" of type '" "float *""'");
21681  }
21682  arg4 = reinterpret_cast< float * >(argp4);
21683  {
21684  Py_BEGIN_ALLOW_THREADS
21685  try {
21686  ((faiss::ProductQuantizer const *)arg1)->compute_inner_prod_tables(arg2,(float const *)arg3,arg4);
21687  } catch(faiss::FaissException & e) {
21688  PyEval_RestoreThread(_save);
21689  PyErr_SetString(PyExc_RuntimeError, e.what());
21690  SWIG_fail;
21691  }
21692  Py_END_ALLOW_THREADS
21693  }
21694  resultobj = SWIG_Py_Void();
21695  return resultobj;
21696 fail:
21697  return NULL;
21698 }
21699 
21700 
21701 SWIGINTERN PyObject *_wrap_ProductQuantizer_search__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21702  PyObject *resultobj = 0;
21704  float *arg2 = (float *) 0 ;
21705  size_t arg3 ;
21706  uint8_t *arg4 = (uint8_t *) 0 ;
21707  size_t arg5 ;
21709  bool arg7 ;
21710  void *argp1 = 0 ;
21711  int res1 = 0 ;
21712  void *argp2 = 0 ;
21713  int res2 = 0 ;
21714  size_t val3 ;
21715  int ecode3 = 0 ;
21716  void *argp4 = 0 ;
21717  int res4 = 0 ;
21718  size_t val5 ;
21719  int ecode5 = 0 ;
21720  void *argp6 = 0 ;
21721  int res6 = 0 ;
21722  bool val7 ;
21723  int ecode7 = 0 ;
21724  PyObject * obj0 = 0 ;
21725  PyObject * obj1 = 0 ;
21726  PyObject * obj2 = 0 ;
21727  PyObject * obj3 = 0 ;
21728  PyObject * obj4 = 0 ;
21729  PyObject * obj5 = 0 ;
21730  PyObject * obj6 = 0 ;
21731 
21732  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:ProductQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
21733  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21734  if (!SWIG_IsOK(res1)) {
21735  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21736  }
21737  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21738  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21739  if (!SWIG_IsOK(res2)) {
21740  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search" "', argument " "2"" of type '" "float const *""'");
21741  }
21742  arg2 = reinterpret_cast< float * >(argp2);
21743  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21744  if (!SWIG_IsOK(ecode3)) {
21745  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search" "', argument " "3"" of type '" "size_t""'");
21746  }
21747  arg3 = static_cast< size_t >(val3);
21748  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21749  if (!SWIG_IsOK(res4)) {
21750  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search" "', argument " "4"" of type '" "uint8_t const *""'");
21751  }
21752  arg4 = reinterpret_cast< uint8_t * >(argp4);
21753  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21754  if (!SWIG_IsOK(ecode5)) {
21755  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search" "', argument " "5"" of type '" "size_t""'");
21756  }
21757  arg5 = static_cast< size_t >(val5);
21758  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
21759  if (!SWIG_IsOK(res6)) {
21760  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
21761  }
21762  arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
21763  ecode7 = SWIG_AsVal_bool(obj6, &val7);
21764  if (!SWIG_IsOK(ecode7)) {
21765  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ProductQuantizer_search" "', argument " "7"" of type '" "bool""'");
21766  }
21767  arg7 = static_cast< bool >(val7);
21768  {
21769  Py_BEGIN_ALLOW_THREADS
21770  try {
21771  ((faiss::ProductQuantizer const *)arg1)->search((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6,arg7);
21772  } catch(faiss::FaissException & e) {
21773  PyEval_RestoreThread(_save);
21774  PyErr_SetString(PyExc_RuntimeError, e.what());
21775  SWIG_fail;
21776  }
21777  Py_END_ALLOW_THREADS
21778  }
21779  resultobj = SWIG_Py_Void();
21780  return resultobj;
21781 fail:
21782  return NULL;
21783 }
21784 
21785 
21786 SWIGINTERN PyObject *_wrap_ProductQuantizer_search__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21787  PyObject *resultobj = 0;
21789  float *arg2 = (float *) 0 ;
21790  size_t arg3 ;
21791  uint8_t *arg4 = (uint8_t *) 0 ;
21792  size_t arg5 ;
21794  void *argp1 = 0 ;
21795  int res1 = 0 ;
21796  void *argp2 = 0 ;
21797  int res2 = 0 ;
21798  size_t val3 ;
21799  int ecode3 = 0 ;
21800  void *argp4 = 0 ;
21801  int res4 = 0 ;
21802  size_t val5 ;
21803  int ecode5 = 0 ;
21804  void *argp6 = 0 ;
21805  int res6 = 0 ;
21806  PyObject * obj0 = 0 ;
21807  PyObject * obj1 = 0 ;
21808  PyObject * obj2 = 0 ;
21809  PyObject * obj3 = 0 ;
21810  PyObject * obj4 = 0 ;
21811  PyObject * obj5 = 0 ;
21812 
21813  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ProductQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
21814  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21815  if (!SWIG_IsOK(res1)) {
21816  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21817  }
21818  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21819  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
21820  if (!SWIG_IsOK(res2)) {
21821  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search" "', argument " "2"" of type '" "float const *""'");
21822  }
21823  arg2 = reinterpret_cast< float * >(argp2);
21824  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21825  if (!SWIG_IsOK(ecode3)) {
21826  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search" "', argument " "3"" of type '" "size_t""'");
21827  }
21828  arg3 = static_cast< size_t >(val3);
21829  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21830  if (!SWIG_IsOK(res4)) {
21831  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search" "', argument " "4"" of type '" "uint8_t const *""'");
21832  }
21833  arg4 = reinterpret_cast< uint8_t * >(argp4);
21834  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21835  if (!SWIG_IsOK(ecode5)) {
21836  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search" "', argument " "5"" of type '" "size_t""'");
21837  }
21838  arg5 = static_cast< size_t >(val5);
21839  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
21840  if (!SWIG_IsOK(res6)) {
21841  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
21842  }
21843  arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
21844  {
21845  Py_BEGIN_ALLOW_THREADS
21846  try {
21847  ((faiss::ProductQuantizer const *)arg1)->search((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6);
21848  } catch(faiss::FaissException & e) {
21849  PyEval_RestoreThread(_save);
21850  PyErr_SetString(PyExc_RuntimeError, e.what());
21851  SWIG_fail;
21852  }
21853  Py_END_ALLOW_THREADS
21854  }
21855  resultobj = SWIG_Py_Void();
21856  return resultobj;
21857 fail:
21858  return NULL;
21859 }
21860 
21861 
21862 SWIGINTERN PyObject *_wrap_ProductQuantizer_search(PyObject *self, PyObject *args) {
21863  Py_ssize_t argc;
21864  PyObject *argv[8] = {
21865  0
21866  };
21867  Py_ssize_t ii;
21868 
21869  if (!PyTuple_Check(args)) SWIG_fail;
21870  argc = args ? PyObject_Length(args) : 0;
21871  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
21872  argv[ii] = PyTuple_GET_ITEM(args,ii);
21873  }
21874  if (argc == 6) {
21875  int _v;
21876  void *vptr = 0;
21877  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21878  _v = SWIG_CheckState(res);
21879  if (_v) {
21880  void *vptr = 0;
21881  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
21882  _v = SWIG_CheckState(res);
21883  if (_v) {
21884  {
21885  int res = SWIG_AsVal_size_t(argv[2], NULL);
21886  _v = SWIG_CheckState(res);
21887  }
21888  if (_v) {
21889  void *vptr = 0;
21890  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21891  _v = SWIG_CheckState(res);
21892  if (_v) {
21893  {
21894  int res = SWIG_AsVal_size_t(argv[4], NULL);
21895  _v = SWIG_CheckState(res);
21896  }
21897  if (_v) {
21898  void *vptr = 0;
21899  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
21900  _v = SWIG_CheckState(res);
21901  if (_v) {
21902  return _wrap_ProductQuantizer_search__SWIG_1(self, args);
21903  }
21904  }
21905  }
21906  }
21907  }
21908  }
21909  }
21910  if (argc == 7) {
21911  int _v;
21912  void *vptr = 0;
21913  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21914  _v = SWIG_CheckState(res);
21915  if (_v) {
21916  void *vptr = 0;
21917  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
21918  _v = SWIG_CheckState(res);
21919  if (_v) {
21920  {
21921  int res = SWIG_AsVal_size_t(argv[2], NULL);
21922  _v = SWIG_CheckState(res);
21923  }
21924  if (_v) {
21925  void *vptr = 0;
21926  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21927  _v = SWIG_CheckState(res);
21928  if (_v) {
21929  {
21930  int res = SWIG_AsVal_size_t(argv[4], NULL);
21931  _v = SWIG_CheckState(res);
21932  }
21933  if (_v) {
21934  void *vptr = 0;
21935  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
21936  _v = SWIG_CheckState(res);
21937  if (_v) {
21938  {
21939  int res = SWIG_AsVal_bool(argv[6], NULL);
21940  _v = SWIG_CheckState(res);
21941  }
21942  if (_v) {
21943  return _wrap_ProductQuantizer_search__SWIG_0(self, args);
21944  }
21945  }
21946  }
21947  }
21948  }
21949  }
21950  }
21951  }
21952 
21953 fail:
21954  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search'.\n"
21955  " Possible C/C++ prototypes are:\n"
21956  " faiss::ProductQuantizer::search(float const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *,bool) const\n"
21957  " faiss::ProductQuantizer::search(float const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *) const\n");
21958  return 0;
21959 }
21960 
21961 
21962 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21963  PyObject *resultobj = 0;
21965  float *arg2 = (float *) 0 ;
21966  size_t arg3 ;
21967  uint8_t *arg4 = (uint8_t *) 0 ;
21968  size_t arg5 ;
21970  bool arg7 ;
21971  void *argp1 = 0 ;
21972  int res1 = 0 ;
21973  void *argp2 = 0 ;
21974  int res2 = 0 ;
21975  size_t val3 ;
21976  int ecode3 = 0 ;
21977  void *argp4 = 0 ;
21978  int res4 = 0 ;
21979  size_t val5 ;
21980  int ecode5 = 0 ;
21981  void *argp6 = 0 ;
21982  int res6 = 0 ;
21983  bool val7 ;
21984  int ecode7 = 0 ;
21985  PyObject * obj0 = 0 ;
21986  PyObject * obj1 = 0 ;
21987  PyObject * obj2 = 0 ;
21988  PyObject * obj3 = 0 ;
21989  PyObject * obj4 = 0 ;
21990  PyObject * obj5 = 0 ;
21991  PyObject * obj6 = 0 ;
21992 
21993  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:ProductQuantizer_search_ip",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
21994  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21995  if (!SWIG_IsOK(res1)) {
21996  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_ip" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21997  }
21998  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21999  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
22000  if (!SWIG_IsOK(res2)) {
22001  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_ip" "', argument " "2"" of type '" "float const *""'");
22002  }
22003  arg2 = reinterpret_cast< float * >(argp2);
22004  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
22005  if (!SWIG_IsOK(ecode3)) {
22006  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_ip" "', argument " "3"" of type '" "size_t""'");
22007  }
22008  arg3 = static_cast< size_t >(val3);
22009  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
22010  if (!SWIG_IsOK(res4)) {
22011  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_ip" "', argument " "4"" of type '" "uint8_t const *""'");
22012  }
22013  arg4 = reinterpret_cast< uint8_t * >(argp4);
22014  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
22015  if (!SWIG_IsOK(ecode5)) {
22016  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_ip" "', argument " "5"" of type '" "size_t""'");
22017  }
22018  arg5 = static_cast< size_t >(val5);
22019  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
22020  if (!SWIG_IsOK(res6)) {
22021  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_ip" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
22022  }
22023  arg6 = reinterpret_cast< faiss::float_minheap_array_t * >(argp6);
22024  ecode7 = SWIG_AsVal_bool(obj6, &val7);
22025  if (!SWIG_IsOK(ecode7)) {
22026  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ProductQuantizer_search_ip" "', argument " "7"" of type '" "bool""'");
22027  }
22028  arg7 = static_cast< bool >(val7);
22029  {
22030  Py_BEGIN_ALLOW_THREADS
22031  try {
22032  ((faiss::ProductQuantizer const *)arg1)->search_ip((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6,arg7);
22033  } catch(faiss::FaissException & e) {
22034  PyEval_RestoreThread(_save);
22035  PyErr_SetString(PyExc_RuntimeError, e.what());
22036  SWIG_fail;
22037  }
22038  Py_END_ALLOW_THREADS
22039  }
22040  resultobj = SWIG_Py_Void();
22041  return resultobj;
22042 fail:
22043  return NULL;
22044 }
22045 
22046 
22047 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22048  PyObject *resultobj = 0;
22050  float *arg2 = (float *) 0 ;
22051  size_t arg3 ;
22052  uint8_t *arg4 = (uint8_t *) 0 ;
22053  size_t arg5 ;
22055  void *argp1 = 0 ;
22056  int res1 = 0 ;
22057  void *argp2 = 0 ;
22058  int res2 = 0 ;
22059  size_t val3 ;
22060  int ecode3 = 0 ;
22061  void *argp4 = 0 ;
22062  int res4 = 0 ;
22063  size_t val5 ;
22064  int ecode5 = 0 ;
22065  void *argp6 = 0 ;
22066  int res6 = 0 ;
22067  PyObject * obj0 = 0 ;
22068  PyObject * obj1 = 0 ;
22069  PyObject * obj2 = 0 ;
22070  PyObject * obj3 = 0 ;
22071  PyObject * obj4 = 0 ;
22072  PyObject * obj5 = 0 ;
22073 
22074  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ProductQuantizer_search_ip",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
22075  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22076  if (!SWIG_IsOK(res1)) {
22077  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_ip" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
22078  }
22079  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
22080  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
22081  if (!SWIG_IsOK(res2)) {
22082  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_ip" "', argument " "2"" of type '" "float const *""'");
22083  }
22084  arg2 = reinterpret_cast< float * >(argp2);
22085  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
22086  if (!SWIG_IsOK(ecode3)) {
22087  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_ip" "', argument " "3"" of type '" "size_t""'");
22088  }
22089  arg3 = static_cast< size_t >(val3);
22090  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
22091  if (!SWIG_IsOK(res4)) {
22092  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_ip" "', argument " "4"" of type '" "uint8_t const *""'");
22093  }
22094  arg4 = reinterpret_cast< uint8_t * >(argp4);
22095  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
22096  if (!SWIG_IsOK(ecode5)) {
22097  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_ip" "', argument " "5"" of type '" "size_t""'");
22098  }
22099  arg5 = static_cast< size_t >(val5);
22100  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
22101  if (!SWIG_IsOK(res6)) {
22102  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_ip" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
22103  }
22104  arg6 = reinterpret_cast< faiss::float_minheap_array_t * >(argp6);
22105  {
22106  Py_BEGIN_ALLOW_THREADS
22107  try {
22108  ((faiss::ProductQuantizer const *)arg1)->search_ip((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6);
22109  } catch(faiss::FaissException & e) {
22110  PyEval_RestoreThread(_save);
22111  PyErr_SetString(PyExc_RuntimeError, e.what());
22112  SWIG_fail;
22113  }
22114  Py_END_ALLOW_THREADS
22115  }
22116  resultobj = SWIG_Py_Void();
22117  return resultobj;
22118 fail:
22119  return NULL;
22120 }
22121 
22122 
22123 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip(PyObject *self, PyObject *args) {
22124  Py_ssize_t argc;
22125  PyObject *argv[8] = {
22126  0
22127  };
22128  Py_ssize_t ii;
22129 
22130  if (!PyTuple_Check(args)) SWIG_fail;
22131  argc = args ? PyObject_Length(args) : 0;
22132  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
22133  argv[ii] = PyTuple_GET_ITEM(args,ii);
22134  }
22135  if (argc == 6) {
22136  int _v;
22137  void *vptr = 0;
22138  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
22139  _v = SWIG_CheckState(res);
22140  if (_v) {
22141  void *vptr = 0;
22142  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
22143  _v = SWIG_CheckState(res);
22144  if (_v) {
22145  {
22146  int res = SWIG_AsVal_size_t(argv[2], NULL);
22147  _v = SWIG_CheckState(res);
22148  }
22149  if (_v) {
22150  void *vptr = 0;
22151  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
22152  _v = SWIG_CheckState(res);
22153  if (_v) {
22154  {
22155  int res = SWIG_AsVal_size_t(argv[4], NULL);
22156  _v = SWIG_CheckState(res);
22157  }
22158  if (_v) {
22159  void *vptr = 0;
22160  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
22161  _v = SWIG_CheckState(res);
22162  if (_v) {
22163  return _wrap_ProductQuantizer_search_ip__SWIG_1(self, args);
22164  }
22165  }
22166  }
22167  }
22168  }
22169  }
22170  }
22171  if (argc == 7) {
22172  int _v;
22173  void *vptr = 0;
22174  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
22175  _v = SWIG_CheckState(res);
22176  if (_v) {
22177  void *vptr = 0;
22178  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
22179  _v = SWIG_CheckState(res);
22180  if (_v) {
22181  {
22182  int res = SWIG_AsVal_size_t(argv[2], NULL);
22183  _v = SWIG_CheckState(res);
22184  }
22185  if (_v) {
22186  void *vptr = 0;
22187  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
22188  _v = SWIG_CheckState(res);
22189  if (_v) {
22190  {
22191  int res = SWIG_AsVal_size_t(argv[4], NULL);
22192  _v = SWIG_CheckState(res);
22193  }
22194  if (_v) {
22195  void *vptr = 0;
22196  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
22197  _v = SWIG_CheckState(res);
22198  if (_v) {
22199  {
22200  int res = SWIG_AsVal_bool(argv[6], NULL);
22201  _v = SWIG_CheckState(res);
22202  }
22203  if (_v) {
22204  return _wrap_ProductQuantizer_search_ip__SWIG_0(self, args);
22205  }
22206  }
22207  }
22208  }
22209  }
22210  }
22211  }
22212  }
22213 
22214 fail:
22215  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search_ip'.\n"
22216  " Possible C/C++ prototypes are:\n"
22217  " faiss::ProductQuantizer::search_ip(float const *,size_t,uint8_t const *,size_t const,faiss::float_minheap_array_t *,bool) const\n"
22218  " faiss::ProductQuantizer::search_ip(float const *,size_t,uint8_t const *,size_t const,faiss::float_minheap_array_t *) const\n");
22219  return 0;
22220 }
22221 
22222 
22223 SWIGINTERN PyObject *_wrap_ProductQuantizer_sdc_table_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22224  PyObject *resultobj = 0;
22226  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
22227  void *argp1 = 0 ;
22228  int res1 = 0 ;
22229  void *argp2 = 0 ;
22230  int res2 = 0 ;
22231  PyObject * obj0 = 0 ;
22232  PyObject * obj1 = 0 ;
22233 
22234  if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_sdc_table_set",&obj0,&obj1)) SWIG_fail;
22235  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22236  if (!SWIG_IsOK(res1)) {
22237  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_sdc_table_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
22238  }
22239  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
22240  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22241  if (!SWIG_IsOK(res2)) {
22242  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_sdc_table_set" "', argument " "2"" of type '" "std::vector< float > *""'");
22243  }
22244  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
22245  if (arg1) (arg1)->sdc_table = *arg2;
22246  resultobj = SWIG_Py_Void();
22247  return resultobj;
22248 fail:
22249  return NULL;
22250 }
22251 
22252 
22253 SWIGINTERN PyObject *_wrap_ProductQuantizer_sdc_table_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22254  PyObject *resultobj = 0;
22256  void *argp1 = 0 ;
22257  int res1 = 0 ;
22258  PyObject * obj0 = 0 ;
22259  std::vector< float > *result = 0 ;
22260 
22261  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_sdc_table_get",&obj0)) SWIG_fail;
22262  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22263  if (!SWIG_IsOK(res1)) {
22264  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_sdc_table_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
22265  }
22266  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
22267  result = (std::vector< float > *)& ((arg1)->sdc_table);
22268  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22269  return resultobj;
22270 fail:
22271  return NULL;
22272 }
22273 
22274 
22275 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_sdc_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22276  PyObject *resultobj = 0;
22278  void *argp1 = 0 ;
22279  int res1 = 0 ;
22280  PyObject * obj0 = 0 ;
22281 
22282  if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_compute_sdc_table",&obj0)) SWIG_fail;
22283  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22284  if (!SWIG_IsOK(res1)) {
22285  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_sdc_table" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
22286  }
22287  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
22288  {
22289  Py_BEGIN_ALLOW_THREADS
22290  try {
22291  (arg1)->compute_sdc_table();
22292  } catch(faiss::FaissException & e) {
22293  PyEval_RestoreThread(_save);
22294  PyErr_SetString(PyExc_RuntimeError, e.what());
22295  SWIG_fail;
22296  }
22297  Py_END_ALLOW_THREADS
22298  }
22299  resultobj = SWIG_Py_Void();
22300  return resultobj;
22301 fail:
22302  return NULL;
22303 }
22304 
22305 
22306 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22307  PyObject *resultobj = 0;
22309  uint8_t *arg2 = (uint8_t *) 0 ;
22310  size_t arg3 ;
22311  uint8_t *arg4 = (uint8_t *) 0 ;
22312  size_t arg5 ;
22314  bool arg7 ;
22315  void *argp1 = 0 ;
22316  int res1 = 0 ;
22317  void *argp2 = 0 ;
22318  int res2 = 0 ;
22319  size_t val3 ;
22320  int ecode3 = 0 ;
22321  void *argp4 = 0 ;
22322  int res4 = 0 ;
22323  size_t val5 ;
22324  int ecode5 = 0 ;
22325  void *argp6 = 0 ;
22326  int res6 = 0 ;
22327  bool val7 ;
22328  int ecode7 = 0 ;
22329  PyObject * obj0 = 0 ;
22330  PyObject * obj1 = 0 ;
22331  PyObject * obj2 = 0 ;
22332  PyObject * obj3 = 0 ;
22333  PyObject * obj4 = 0 ;
22334  PyObject * obj5 = 0 ;
22335  PyObject * obj6 = 0 ;
22336 
22337  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:ProductQuantizer_search_sdc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
22338  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22339  if (!SWIG_IsOK(res1)) {
22340  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_sdc" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
22341  }
22342  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
22343  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
22344  if (!SWIG_IsOK(res2)) {
22345  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_sdc" "', argument " "2"" of type '" "uint8_t const *""'");
22346  }
22347  arg2 = reinterpret_cast< uint8_t * >(argp2);
22348  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
22349  if (!SWIG_IsOK(ecode3)) {
22350  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_sdc" "', argument " "3"" of type '" "size_t""'");
22351  }
22352  arg3 = static_cast< size_t >(val3);
22353  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
22354  if (!SWIG_IsOK(res4)) {
22355  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_sdc" "', argument " "4"" of type '" "uint8_t const *""'");
22356  }
22357  arg4 = reinterpret_cast< uint8_t * >(argp4);
22358  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
22359  if (!SWIG_IsOK(ecode5)) {
22360  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_sdc" "', argument " "5"" of type '" "size_t""'");
22361  }
22362  arg5 = static_cast< size_t >(val5);
22363  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
22364  if (!SWIG_IsOK(res6)) {
22365  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_sdc" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
22366  }
22367  arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
22368  ecode7 = SWIG_AsVal_bool(obj6, &val7);
22369  if (!SWIG_IsOK(ecode7)) {
22370  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ProductQuantizer_search_sdc" "', argument " "7"" of type '" "bool""'");
22371  }
22372  arg7 = static_cast< bool >(val7);
22373  {
22374  Py_BEGIN_ALLOW_THREADS
22375  try {
22376  ((faiss::ProductQuantizer const *)arg1)->search_sdc((uint8_t const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6,arg7);
22377  } catch(faiss::FaissException & e) {
22378  PyEval_RestoreThread(_save);
22379  PyErr_SetString(PyExc_RuntimeError, e.what());
22380  SWIG_fail;
22381  }
22382  Py_END_ALLOW_THREADS
22383  }
22384  resultobj = SWIG_Py_Void();
22385  return resultobj;
22386 fail:
22387  return NULL;
22388 }
22389 
22390 
22391 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22392  PyObject *resultobj = 0;
22394  uint8_t *arg2 = (uint8_t *) 0 ;
22395  size_t arg3 ;
22396  uint8_t *arg4 = (uint8_t *) 0 ;
22397  size_t arg5 ;
22399  void *argp1 = 0 ;
22400  int res1 = 0 ;
22401  void *argp2 = 0 ;
22402  int res2 = 0 ;
22403  size_t val3 ;
22404  int ecode3 = 0 ;
22405  void *argp4 = 0 ;
22406  int res4 = 0 ;
22407  size_t val5 ;
22408  int ecode5 = 0 ;
22409  void *argp6 = 0 ;
22410  int res6 = 0 ;
22411  PyObject * obj0 = 0 ;
22412  PyObject * obj1 = 0 ;
22413  PyObject * obj2 = 0 ;
22414  PyObject * obj3 = 0 ;
22415  PyObject * obj4 = 0 ;
22416  PyObject * obj5 = 0 ;
22417 
22418  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ProductQuantizer_search_sdc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
22419  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
22420  if (!SWIG_IsOK(res1)) {
22421  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_sdc" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
22422  }
22423  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
22424  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
22425  if (!SWIG_IsOK(res2)) {
22426  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_sdc" "', argument " "2"" of type '" "uint8_t const *""'");
22427  }
22428  arg2 = reinterpret_cast< uint8_t * >(argp2);
22429  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
22430  if (!SWIG_IsOK(ecode3)) {
22431  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_sdc" "', argument " "3"" of type '" "size_t""'");
22432  }
22433  arg3 = static_cast< size_t >(val3);
22434  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
22435  if (!SWIG_IsOK(res4)) {
22436  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_sdc" "', argument " "4"" of type '" "uint8_t const *""'");
22437  }
22438  arg4 = reinterpret_cast< uint8_t * >(argp4);
22439  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
22440  if (!SWIG_IsOK(ecode5)) {
22441  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_sdc" "', argument " "5"" of type '" "size_t""'");
22442  }
22443  arg5 = static_cast< size_t >(val5);
22444  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
22445  if (!SWIG_IsOK(res6)) {
22446  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_sdc" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
22447  }
22448  arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
22449  {
22450  Py_BEGIN_ALLOW_THREADS
22451  try {
22452  ((faiss::ProductQuantizer const *)arg1)->search_sdc((uint8_t const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6);
22453  } catch(faiss::FaissException & e) {
22454  PyEval_RestoreThread(_save);
22455  PyErr_SetString(PyExc_RuntimeError, e.what());
22456  SWIG_fail;
22457  }
22458  Py_END_ALLOW_THREADS
22459  }
22460  resultobj = SWIG_Py_Void();
22461  return resultobj;
22462 fail:
22463  return NULL;
22464 }
22465 
22466 
22467 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc(PyObject *self, PyObject *args) {
22468  Py_ssize_t argc;
22469  PyObject *argv[8] = {
22470  0
22471  };
22472  Py_ssize_t ii;
22473 
22474  if (!PyTuple_Check(args)) SWIG_fail;
22475  argc = args ? PyObject_Length(args) : 0;
22476  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
22477  argv[ii] = PyTuple_GET_ITEM(args,ii);
22478  }
22479  if (argc == 6) {
22480  int _v;
22481  void *vptr = 0;
22482  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
22483  _v = SWIG_CheckState(res);
22484  if (_v) {
22485  void *vptr = 0;
22486  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
22487  _v = SWIG_CheckState(res);
22488  if (_v) {
22489  {
22490  int res = SWIG_AsVal_size_t(argv[2], NULL);
22491  _v = SWIG_CheckState(res);
22492  }
22493  if (_v) {
22494  void *vptr = 0;
22495  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
22496  _v = SWIG_CheckState(res);
22497  if (_v) {
22498  {
22499  int res = SWIG_AsVal_size_t(argv[4], NULL);
22500  _v = SWIG_CheckState(res);
22501  }
22502  if (_v) {
22503  void *vptr = 0;
22504  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
22505  _v = SWIG_CheckState(res);
22506  if (_v) {
22507  return _wrap_ProductQuantizer_search_sdc__SWIG_1(self, args);
22508  }
22509  }
22510  }
22511  }
22512  }
22513  }
22514  }
22515  if (argc == 7) {
22516  int _v;
22517  void *vptr = 0;
22518  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
22519  _v = SWIG_CheckState(res);
22520  if (_v) {
22521  void *vptr = 0;
22522  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
22523  _v = SWIG_CheckState(res);
22524  if (_v) {
22525  {
22526  int res = SWIG_AsVal_size_t(argv[2], NULL);
22527  _v = SWIG_CheckState(res);
22528  }
22529  if (_v) {
22530  void *vptr = 0;
22531  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
22532  _v = SWIG_CheckState(res);
22533  if (_v) {
22534  {
22535  int res = SWIG_AsVal_size_t(argv[4], NULL);
22536  _v = SWIG_CheckState(res);
22537  }
22538  if (_v) {
22539  void *vptr = 0;
22540  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
22541  _v = SWIG_CheckState(res);
22542  if (_v) {
22543  {
22544  int res = SWIG_AsVal_bool(argv[6], NULL);
22545  _v = SWIG_CheckState(res);
22546  }
22547  if (_v) {
22548  return _wrap_ProductQuantizer_search_sdc__SWIG_0(self, args);
22549  }
22550  }
22551  }
22552  }
22553  }
22554  }
22555  }
22556  }
22557 
22558 fail:
22559  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search_sdc'.\n"
22560  " Possible C/C++ prototypes are:\n"
22561  " faiss::ProductQuantizer::search_sdc(uint8_t const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *,bool) const\n"
22562  " faiss::ProductQuantizer::search_sdc(uint8_t const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *) const\n");
22563  return 0;
22564 }
22565 
22566 
22567 SWIGINTERN PyObject *_wrap_delete_ProductQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22568  PyObject *resultobj = 0;
22570  void *argp1 = 0 ;
22571  int res1 = 0 ;
22572  PyObject * obj0 = 0 ;
22573 
22574  if (!PyArg_ParseTuple(args,(char *)"O:delete_ProductQuantizer",&obj0)) SWIG_fail;
22575  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_DISOWN | 0 );
22576  if (!SWIG_IsOK(res1)) {
22577  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProductQuantizer" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
22578  }
22579  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
22580  delete arg1;
22581  resultobj = SWIG_Py_Void();
22582  return resultobj;
22583 fail:
22584  return NULL;
22585 }
22586 
22587 
22588 SWIGINTERN PyObject *ProductQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22589  PyObject *obj;
22590  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
22591  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ProductQuantizer, SWIG_NewClientData(obj));
22592  return SWIG_Py_Void();
22593 }
22594 
22595 SWIGINTERN PyObject *_wrap_VectorTransform_d_in_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22596  PyObject *resultobj = 0;
22598  int arg2 ;
22599  void *argp1 = 0 ;
22600  int res1 = 0 ;
22601  int val2 ;
22602  int ecode2 = 0 ;
22603  PyObject * obj0 = 0 ;
22604  PyObject * obj1 = 0 ;
22605 
22606  if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransform_d_in_set",&obj0,&obj1)) SWIG_fail;
22607  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22608  if (!SWIG_IsOK(res1)) {
22609  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_in_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22610  }
22611  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22612  ecode2 = SWIG_AsVal_int(obj1, &val2);
22613  if (!SWIG_IsOK(ecode2)) {
22614  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_d_in_set" "', argument " "2"" of type '" "int""'");
22615  }
22616  arg2 = static_cast< int >(val2);
22617  if (arg1) (arg1)->d_in = arg2;
22618  resultobj = SWIG_Py_Void();
22619  return resultobj;
22620 fail:
22621  return NULL;
22622 }
22623 
22624 
22625 SWIGINTERN PyObject *_wrap_VectorTransform_d_in_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22626  PyObject *resultobj = 0;
22628  void *argp1 = 0 ;
22629  int res1 = 0 ;
22630  PyObject * obj0 = 0 ;
22631  int result;
22632 
22633  if (!PyArg_ParseTuple(args,(char *)"O:VectorTransform_d_in_get",&obj0)) SWIG_fail;
22634  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22635  if (!SWIG_IsOK(res1)) {
22636  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_in_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22637  }
22638  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22639  result = (int) ((arg1)->d_in);
22640  resultobj = SWIG_From_int(static_cast< int >(result));
22641  return resultobj;
22642 fail:
22643  return NULL;
22644 }
22645 
22646 
22647 SWIGINTERN PyObject *_wrap_VectorTransform_d_out_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22648  PyObject *resultobj = 0;
22650  int arg2 ;
22651  void *argp1 = 0 ;
22652  int res1 = 0 ;
22653  int val2 ;
22654  int ecode2 = 0 ;
22655  PyObject * obj0 = 0 ;
22656  PyObject * obj1 = 0 ;
22657 
22658  if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransform_d_out_set",&obj0,&obj1)) SWIG_fail;
22659  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22660  if (!SWIG_IsOK(res1)) {
22661  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_out_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22662  }
22663  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22664  ecode2 = SWIG_AsVal_int(obj1, &val2);
22665  if (!SWIG_IsOK(ecode2)) {
22666  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_d_out_set" "', argument " "2"" of type '" "int""'");
22667  }
22668  arg2 = static_cast< int >(val2);
22669  if (arg1) (arg1)->d_out = arg2;
22670  resultobj = SWIG_Py_Void();
22671  return resultobj;
22672 fail:
22673  return NULL;
22674 }
22675 
22676 
22677 SWIGINTERN PyObject *_wrap_VectorTransform_d_out_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22678  PyObject *resultobj = 0;
22680  void *argp1 = 0 ;
22681  int res1 = 0 ;
22682  PyObject * obj0 = 0 ;
22683  int result;
22684 
22685  if (!PyArg_ParseTuple(args,(char *)"O:VectorTransform_d_out_get",&obj0)) SWIG_fail;
22686  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22687  if (!SWIG_IsOK(res1)) {
22688  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_out_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22689  }
22690  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22691  result = (int) ((arg1)->d_out);
22692  resultobj = SWIG_From_int(static_cast< int >(result));
22693  return resultobj;
22694 fail:
22695  return NULL;
22696 }
22697 
22698 
22699 SWIGINTERN PyObject *_wrap_VectorTransform_is_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22700  PyObject *resultobj = 0;
22702  bool arg2 ;
22703  void *argp1 = 0 ;
22704  int res1 = 0 ;
22705  bool val2 ;
22706  int ecode2 = 0 ;
22707  PyObject * obj0 = 0 ;
22708  PyObject * obj1 = 0 ;
22709 
22710  if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransform_is_trained_set",&obj0,&obj1)) SWIG_fail;
22711  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22712  if (!SWIG_IsOK(res1)) {
22713  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_is_trained_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22714  }
22715  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22716  ecode2 = SWIG_AsVal_bool(obj1, &val2);
22717  if (!SWIG_IsOK(ecode2)) {
22718  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_is_trained_set" "', argument " "2"" of type '" "bool""'");
22719  }
22720  arg2 = static_cast< bool >(val2);
22721  if (arg1) (arg1)->is_trained = arg2;
22722  resultobj = SWIG_Py_Void();
22723  return resultobj;
22724 fail:
22725  return NULL;
22726 }
22727 
22728 
22729 SWIGINTERN PyObject *_wrap_VectorTransform_is_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22730  PyObject *resultobj = 0;
22732  void *argp1 = 0 ;
22733  int res1 = 0 ;
22734  PyObject * obj0 = 0 ;
22735  bool result;
22736 
22737  if (!PyArg_ParseTuple(args,(char *)"O:VectorTransform_is_trained_get",&obj0)) SWIG_fail;
22738  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22739  if (!SWIG_IsOK(res1)) {
22740  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_is_trained_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22741  }
22742  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22743  result = (bool) ((arg1)->is_trained);
22744  resultobj = SWIG_From_bool(static_cast< bool >(result));
22745  return resultobj;
22746 fail:
22747  return NULL;
22748 }
22749 
22750 
22751 SWIGINTERN PyObject *_wrap_VectorTransform_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22752  PyObject *resultobj = 0;
22754  faiss::VectorTransform::idx_t arg2 ;
22755  float *arg3 = (float *) 0 ;
22756  void *argp1 = 0 ;
22757  int res1 = 0 ;
22758  long val2 ;
22759  int ecode2 = 0 ;
22760  void *argp3 = 0 ;
22761  int res3 = 0 ;
22762  PyObject * obj0 = 0 ;
22763  PyObject * obj1 = 0 ;
22764  PyObject * obj2 = 0 ;
22765 
22766  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorTransform_train",&obj0,&obj1,&obj2)) SWIG_fail;
22767  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22768  if (!SWIG_IsOK(res1)) {
22769  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_train" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22770  }
22771  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22772  ecode2 = SWIG_AsVal_long(obj1, &val2);
22773  if (!SWIG_IsOK(ecode2)) {
22774  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_train" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22775  }
22776  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
22777  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22778  if (!SWIG_IsOK(res3)) {
22779  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_train" "', argument " "3"" of type '" "float const *""'");
22780  }
22781  arg3 = reinterpret_cast< float * >(argp3);
22782  {
22783  Py_BEGIN_ALLOW_THREADS
22784  try {
22785  (arg1)->train(arg2,(float const *)arg3);
22786  } catch(faiss::FaissException & e) {
22787  PyEval_RestoreThread(_save);
22788  PyErr_SetString(PyExc_RuntimeError, e.what());
22789  SWIG_fail;
22790  }
22791  Py_END_ALLOW_THREADS
22792  }
22793  resultobj = SWIG_Py_Void();
22794  return resultobj;
22795 fail:
22796  return NULL;
22797 }
22798 
22799 
22800 SWIGINTERN PyObject *_wrap_VectorTransform_apply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22801  PyObject *resultobj = 0;
22803  faiss::VectorTransform::idx_t arg2 ;
22804  float *arg3 = (float *) 0 ;
22805  void *argp1 = 0 ;
22806  int res1 = 0 ;
22807  long val2 ;
22808  int ecode2 = 0 ;
22809  void *argp3 = 0 ;
22810  int res3 = 0 ;
22811  PyObject * obj0 = 0 ;
22812  PyObject * obj1 = 0 ;
22813  PyObject * obj2 = 0 ;
22814  float *result = 0 ;
22815 
22816  if (!PyArg_ParseTuple(args,(char *)"OOO:VectorTransform_apply",&obj0,&obj1,&obj2)) SWIG_fail;
22817  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22818  if (!SWIG_IsOK(res1)) {
22819  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_apply" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
22820  }
22821  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22822  ecode2 = SWIG_AsVal_long(obj1, &val2);
22823  if (!SWIG_IsOK(ecode2)) {
22824  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_apply" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22825  }
22826  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
22827  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22828  if (!SWIG_IsOK(res3)) {
22829  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_apply" "', argument " "3"" of type '" "float const *""'");
22830  }
22831  arg3 = reinterpret_cast< float * >(argp3);
22832  {
22833  Py_BEGIN_ALLOW_THREADS
22834  try {
22835  result = (float *)((faiss::VectorTransform const *)arg1)->apply(arg2,(float const *)arg3);
22836  } catch(faiss::FaissException & e) {
22837  PyEval_RestoreThread(_save);
22838  PyErr_SetString(PyExc_RuntimeError, e.what());
22839  SWIG_fail;
22840  }
22841  Py_END_ALLOW_THREADS
22842  }
22843  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
22844  return resultobj;
22845 fail:
22846  return NULL;
22847 }
22848 
22849 
22850 SWIGINTERN PyObject *_wrap_VectorTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22851  PyObject *resultobj = 0;
22853  faiss::VectorTransform::idx_t arg2 ;
22854  float *arg3 = (float *) 0 ;
22855  float *arg4 = (float *) 0 ;
22856  void *argp1 = 0 ;
22857  int res1 = 0 ;
22858  long val2 ;
22859  int ecode2 = 0 ;
22860  void *argp3 = 0 ;
22861  int res3 = 0 ;
22862  void *argp4 = 0 ;
22863  int res4 = 0 ;
22864  PyObject * obj0 = 0 ;
22865  PyObject * obj1 = 0 ;
22866  PyObject * obj2 = 0 ;
22867  PyObject * obj3 = 0 ;
22868 
22869  if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
22870  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22871  if (!SWIG_IsOK(res1)) {
22872  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
22873  }
22874  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22875  ecode2 = SWIG_AsVal_long(obj1, &val2);
22876  if (!SWIG_IsOK(ecode2)) {
22877  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22878  }
22879  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
22880  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22881  if (!SWIG_IsOK(res3)) {
22882  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
22883  }
22884  arg3 = reinterpret_cast< float * >(argp3);
22885  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
22886  if (!SWIG_IsOK(res4)) {
22887  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VectorTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
22888  }
22889  arg4 = reinterpret_cast< float * >(argp4);
22890  {
22891  Py_BEGIN_ALLOW_THREADS
22892  try {
22893  ((faiss::VectorTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
22894  } catch(faiss::FaissException & e) {
22895  PyEval_RestoreThread(_save);
22896  PyErr_SetString(PyExc_RuntimeError, e.what());
22897  SWIG_fail;
22898  }
22899  Py_END_ALLOW_THREADS
22900  }
22901  resultobj = SWIG_Py_Void();
22902  return resultobj;
22903 fail:
22904  return NULL;
22905 }
22906 
22907 
22908 SWIGINTERN PyObject *_wrap_VectorTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22909  PyObject *resultobj = 0;
22911  faiss::VectorTransform::idx_t arg2 ;
22912  float *arg3 = (float *) 0 ;
22913  float *arg4 = (float *) 0 ;
22914  void *argp1 = 0 ;
22915  int res1 = 0 ;
22916  long val2 ;
22917  int ecode2 = 0 ;
22918  void *argp3 = 0 ;
22919  int res3 = 0 ;
22920  void *argp4 = 0 ;
22921  int res4 = 0 ;
22922  PyObject * obj0 = 0 ;
22923  PyObject * obj1 = 0 ;
22924  PyObject * obj2 = 0 ;
22925  PyObject * obj3 = 0 ;
22926 
22927  if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
22928  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
22929  if (!SWIG_IsOK(res1)) {
22930  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_reverse_transform" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
22931  }
22932  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22933  ecode2 = SWIG_AsVal_long(obj1, &val2);
22934  if (!SWIG_IsOK(ecode2)) {
22935  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22936  }
22937  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
22938  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22939  if (!SWIG_IsOK(res3)) {
22940  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
22941  }
22942  arg3 = reinterpret_cast< float * >(argp3);
22943  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
22944  if (!SWIG_IsOK(res4)) {
22945  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VectorTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
22946  }
22947  arg4 = reinterpret_cast< float * >(argp4);
22948  {
22949  Py_BEGIN_ALLOW_THREADS
22950  try {
22951  ((faiss::VectorTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
22952  } catch(faiss::FaissException & e) {
22953  PyEval_RestoreThread(_save);
22954  PyErr_SetString(PyExc_RuntimeError, e.what());
22955  SWIG_fail;
22956  }
22957  Py_END_ALLOW_THREADS
22958  }
22959  resultobj = SWIG_Py_Void();
22960  return resultobj;
22961 fail:
22962  return NULL;
22963 }
22964 
22965 
22966 SWIGINTERN PyObject *_wrap_delete_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22967  PyObject *resultobj = 0;
22969  void *argp1 = 0 ;
22970  int res1 = 0 ;
22971  PyObject * obj0 = 0 ;
22972 
22973  if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorTransform",&obj0)) SWIG_fail;
22974  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, SWIG_POINTER_DISOWN | 0 );
22975  if (!SWIG_IsOK(res1)) {
22976  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
22977  }
22978  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
22979  {
22980  Py_BEGIN_ALLOW_THREADS
22981  try {
22982  delete arg1;
22983  } catch(faiss::FaissException & e) {
22984  PyEval_RestoreThread(_save);
22985  PyErr_SetString(PyExc_RuntimeError, e.what());
22986  SWIG_fail;
22987  }
22988  Py_END_ALLOW_THREADS
22989  }
22990  resultobj = SWIG_Py_Void();
22991  return resultobj;
22992 fail:
22993  return NULL;
22994 }
22995 
22996 
22997 SWIGINTERN PyObject *VectorTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22998  PyObject *obj;
22999  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
23000  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VectorTransform, SWIG_NewClientData(obj));
23001  return SWIG_Py_Void();
23002 }
23003 
23004 SWIGINTERN PyObject *_wrap_LinearTransform_have_bias_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23005  PyObject *resultobj = 0;
23007  bool arg2 ;
23008  void *argp1 = 0 ;
23009  int res1 = 0 ;
23010  bool val2 ;
23011  int ecode2 = 0 ;
23012  PyObject * obj0 = 0 ;
23013  PyObject * obj1 = 0 ;
23014 
23015  if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_have_bias_set",&obj0,&obj1)) SWIG_fail;
23016  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23017  if (!SWIG_IsOK(res1)) {
23018  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_have_bias_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23019  }
23020  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23021  ecode2 = SWIG_AsVal_bool(obj1, &val2);
23022  if (!SWIG_IsOK(ecode2)) {
23023  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_have_bias_set" "', argument " "2"" of type '" "bool""'");
23024  }
23025  arg2 = static_cast< bool >(val2);
23026  if (arg1) (arg1)->have_bias = arg2;
23027  resultobj = SWIG_Py_Void();
23028  return resultobj;
23029 fail:
23030  return NULL;
23031 }
23032 
23033 
23034 SWIGINTERN PyObject *_wrap_LinearTransform_have_bias_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23035  PyObject *resultobj = 0;
23037  void *argp1 = 0 ;
23038  int res1 = 0 ;
23039  PyObject * obj0 = 0 ;
23040  bool result;
23041 
23042  if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_have_bias_get",&obj0)) SWIG_fail;
23043  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23044  if (!SWIG_IsOK(res1)) {
23045  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_have_bias_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23046  }
23047  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23048  result = (bool) ((arg1)->have_bias);
23049  resultobj = SWIG_From_bool(static_cast< bool >(result));
23050  return resultobj;
23051 fail:
23052  return NULL;
23053 }
23054 
23055 
23056 SWIGINTERN PyObject *_wrap_LinearTransform_is_orthonormal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23057  PyObject *resultobj = 0;
23059  bool arg2 ;
23060  void *argp1 = 0 ;
23061  int res1 = 0 ;
23062  bool val2 ;
23063  int ecode2 = 0 ;
23064  PyObject * obj0 = 0 ;
23065  PyObject * obj1 = 0 ;
23066 
23067  if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_is_orthonormal_set",&obj0,&obj1)) SWIG_fail;
23068  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23069  if (!SWIG_IsOK(res1)) {
23070  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_is_orthonormal_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23071  }
23072  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23073  ecode2 = SWIG_AsVal_bool(obj1, &val2);
23074  if (!SWIG_IsOK(ecode2)) {
23075  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_is_orthonormal_set" "', argument " "2"" of type '" "bool""'");
23076  }
23077  arg2 = static_cast< bool >(val2);
23078  if (arg1) (arg1)->is_orthonormal = arg2;
23079  resultobj = SWIG_Py_Void();
23080  return resultobj;
23081 fail:
23082  return NULL;
23083 }
23084 
23085 
23086 SWIGINTERN PyObject *_wrap_LinearTransform_is_orthonormal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23087  PyObject *resultobj = 0;
23089  void *argp1 = 0 ;
23090  int res1 = 0 ;
23091  PyObject * obj0 = 0 ;
23092  bool result;
23093 
23094  if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_is_orthonormal_get",&obj0)) SWIG_fail;
23095  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23096  if (!SWIG_IsOK(res1)) {
23097  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_is_orthonormal_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23098  }
23099  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23100  result = (bool) ((arg1)->is_orthonormal);
23101  resultobj = SWIG_From_bool(static_cast< bool >(result));
23102  return resultobj;
23103 fail:
23104  return NULL;
23105 }
23106 
23107 
23108 SWIGINTERN PyObject *_wrap_LinearTransform_A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23109  PyObject *resultobj = 0;
23111  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
23112  void *argp1 = 0 ;
23113  int res1 = 0 ;
23114  void *argp2 = 0 ;
23115  int res2 = 0 ;
23116  PyObject * obj0 = 0 ;
23117  PyObject * obj1 = 0 ;
23118 
23119  if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_A_set",&obj0,&obj1)) SWIG_fail;
23120  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23121  if (!SWIG_IsOK(res1)) {
23122  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_A_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23123  }
23124  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23125  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
23126  if (!SWIG_IsOK(res2)) {
23127  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LinearTransform_A_set" "', argument " "2"" of type '" "std::vector< float > *""'");
23128  }
23129  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
23130  if (arg1) (arg1)->A = *arg2;
23131  resultobj = SWIG_Py_Void();
23132  return resultobj;
23133 fail:
23134  return NULL;
23135 }
23136 
23137 
23138 SWIGINTERN PyObject *_wrap_LinearTransform_A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23139  PyObject *resultobj = 0;
23141  void *argp1 = 0 ;
23142  int res1 = 0 ;
23143  PyObject * obj0 = 0 ;
23144  std::vector< float > *result = 0 ;
23145 
23146  if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_A_get",&obj0)) SWIG_fail;
23147  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23148  if (!SWIG_IsOK(res1)) {
23149  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_A_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23150  }
23151  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23152  result = (std::vector< float > *)& ((arg1)->A);
23153  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
23154  return resultobj;
23155 fail:
23156  return NULL;
23157 }
23158 
23159 
23160 SWIGINTERN PyObject *_wrap_LinearTransform_b_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23161  PyObject *resultobj = 0;
23163  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
23164  void *argp1 = 0 ;
23165  int res1 = 0 ;
23166  void *argp2 = 0 ;
23167  int res2 = 0 ;
23168  PyObject * obj0 = 0 ;
23169  PyObject * obj1 = 0 ;
23170 
23171  if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_b_set",&obj0,&obj1)) SWIG_fail;
23172  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23173  if (!SWIG_IsOK(res1)) {
23174  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_b_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23175  }
23176  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23177  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
23178  if (!SWIG_IsOK(res2)) {
23179  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LinearTransform_b_set" "', argument " "2"" of type '" "std::vector< float > *""'");
23180  }
23181  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
23182  if (arg1) (arg1)->b = *arg2;
23183  resultobj = SWIG_Py_Void();
23184  return resultobj;
23185 fail:
23186  return NULL;
23187 }
23188 
23189 
23190 SWIGINTERN PyObject *_wrap_LinearTransform_b_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23191  PyObject *resultobj = 0;
23193  void *argp1 = 0 ;
23194  int res1 = 0 ;
23195  PyObject * obj0 = 0 ;
23196  std::vector< float > *result = 0 ;
23197 
23198  if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_b_get",&obj0)) SWIG_fail;
23199  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23200  if (!SWIG_IsOK(res1)) {
23201  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_b_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23202  }
23203  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23204  result = (std::vector< float > *)& ((arg1)->b);
23205  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
23206  return resultobj;
23207 fail:
23208  return NULL;
23209 }
23210 
23211 
23212 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23213  PyObject *resultobj = 0;
23214  int arg1 ;
23215  int arg2 ;
23216  bool arg3 ;
23217  int val1 ;
23218  int ecode1 = 0 ;
23219  int val2 ;
23220  int ecode2 = 0 ;
23221  bool val3 ;
23222  int ecode3 = 0 ;
23223  PyObject * obj0 = 0 ;
23224  PyObject * obj1 = 0 ;
23225  PyObject * obj2 = 0 ;
23226  faiss::LinearTransform *result = 0 ;
23227 
23228  if (!PyArg_ParseTuple(args,(char *)"OOO:new_LinearTransform",&obj0,&obj1,&obj2)) SWIG_fail;
23229  ecode1 = SWIG_AsVal_int(obj0, &val1);
23230  if (!SWIG_IsOK(ecode1)) {
23231  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
23232  }
23233  arg1 = static_cast< int >(val1);
23234  ecode2 = SWIG_AsVal_int(obj1, &val2);
23235  if (!SWIG_IsOK(ecode2)) {
23236  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearTransform" "', argument " "2"" of type '" "int""'");
23237  }
23238  arg2 = static_cast< int >(val2);
23239  ecode3 = SWIG_AsVal_bool(obj2, &val3);
23240  if (!SWIG_IsOK(ecode3)) {
23241  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LinearTransform" "', argument " "3"" of type '" "bool""'");
23242  }
23243  arg3 = static_cast< bool >(val3);
23244  {
23245  Py_BEGIN_ALLOW_THREADS
23246  try {
23247  result = (faiss::LinearTransform *)new faiss::LinearTransform(arg1,arg2,arg3);
23248  } catch(faiss::FaissException & e) {
23249  PyEval_RestoreThread(_save);
23250  PyErr_SetString(PyExc_RuntimeError, e.what());
23251  SWIG_fail;
23252  }
23253  Py_END_ALLOW_THREADS
23254  }
23255  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23256  return resultobj;
23257 fail:
23258  return NULL;
23259 }
23260 
23261 
23262 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23263  PyObject *resultobj = 0;
23264  int arg1 ;
23265  int arg2 ;
23266  int val1 ;
23267  int ecode1 = 0 ;
23268  int val2 ;
23269  int ecode2 = 0 ;
23270  PyObject * obj0 = 0 ;
23271  PyObject * obj1 = 0 ;
23272  faiss::LinearTransform *result = 0 ;
23273 
23274  if (!PyArg_ParseTuple(args,(char *)"OO:new_LinearTransform",&obj0,&obj1)) SWIG_fail;
23275  ecode1 = SWIG_AsVal_int(obj0, &val1);
23276  if (!SWIG_IsOK(ecode1)) {
23277  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
23278  }
23279  arg1 = static_cast< int >(val1);
23280  ecode2 = SWIG_AsVal_int(obj1, &val2);
23281  if (!SWIG_IsOK(ecode2)) {
23282  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearTransform" "', argument " "2"" of type '" "int""'");
23283  }
23284  arg2 = static_cast< int >(val2);
23285  {
23286  Py_BEGIN_ALLOW_THREADS
23287  try {
23288  result = (faiss::LinearTransform *)new faiss::LinearTransform(arg1,arg2);
23289  } catch(faiss::FaissException & e) {
23290  PyEval_RestoreThread(_save);
23291  PyErr_SetString(PyExc_RuntimeError, e.what());
23292  SWIG_fail;
23293  }
23294  Py_END_ALLOW_THREADS
23295  }
23296  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23297  return resultobj;
23298 fail:
23299  return NULL;
23300 }
23301 
23302 
23303 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23304  PyObject *resultobj = 0;
23305  int arg1 ;
23306  int val1 ;
23307  int ecode1 = 0 ;
23308  PyObject * obj0 = 0 ;
23309  faiss::LinearTransform *result = 0 ;
23310 
23311  if (!PyArg_ParseTuple(args,(char *)"O:new_LinearTransform",&obj0)) SWIG_fail;
23312  ecode1 = SWIG_AsVal_int(obj0, &val1);
23313  if (!SWIG_IsOK(ecode1)) {
23314  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
23315  }
23316  arg1 = static_cast< int >(val1);
23317  {
23318  Py_BEGIN_ALLOW_THREADS
23319  try {
23320  result = (faiss::LinearTransform *)new faiss::LinearTransform(arg1);
23321  } catch(faiss::FaissException & e) {
23322  PyEval_RestoreThread(_save);
23323  PyErr_SetString(PyExc_RuntimeError, e.what());
23324  SWIG_fail;
23325  }
23326  Py_END_ALLOW_THREADS
23327  }
23328  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23329  return resultobj;
23330 fail:
23331  return NULL;
23332 }
23333 
23334 
23335 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23336  PyObject *resultobj = 0;
23337  faiss::LinearTransform *result = 0 ;
23338 
23339  if (!PyArg_ParseTuple(args,(char *)":new_LinearTransform")) SWIG_fail;
23340  {
23341  Py_BEGIN_ALLOW_THREADS
23342  try {
23344  } catch(faiss::FaissException & e) {
23345  PyEval_RestoreThread(_save);
23346  PyErr_SetString(PyExc_RuntimeError, e.what());
23347  SWIG_fail;
23348  }
23349  Py_END_ALLOW_THREADS
23350  }
23351  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
23352  return resultobj;
23353 fail:
23354  return NULL;
23355 }
23356 
23357 
23358 SWIGINTERN PyObject *_wrap_new_LinearTransform(PyObject *self, PyObject *args) {
23359  Py_ssize_t argc;
23360  PyObject *argv[4] = {
23361  0
23362  };
23363  Py_ssize_t ii;
23364 
23365  if (!PyTuple_Check(args)) SWIG_fail;
23366  argc = args ? PyObject_Length(args) : 0;
23367  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
23368  argv[ii] = PyTuple_GET_ITEM(args,ii);
23369  }
23370  if (argc == 0) {
23371  return _wrap_new_LinearTransform__SWIG_3(self, args);
23372  }
23373  if (argc == 1) {
23374  int _v;
23375  {
23376  int res = SWIG_AsVal_int(argv[0], NULL);
23377  _v = SWIG_CheckState(res);
23378  }
23379  if (_v) {
23380  return _wrap_new_LinearTransform__SWIG_2(self, args);
23381  }
23382  }
23383  if (argc == 2) {
23384  int _v;
23385  {
23386  int res = SWIG_AsVal_int(argv[0], NULL);
23387  _v = SWIG_CheckState(res);
23388  }
23389  if (_v) {
23390  {
23391  int res = SWIG_AsVal_int(argv[1], NULL);
23392  _v = SWIG_CheckState(res);
23393  }
23394  if (_v) {
23395  return _wrap_new_LinearTransform__SWIG_1(self, args);
23396  }
23397  }
23398  }
23399  if (argc == 3) {
23400  int _v;
23401  {
23402  int res = SWIG_AsVal_int(argv[0], NULL);
23403  _v = SWIG_CheckState(res);
23404  }
23405  if (_v) {
23406  {
23407  int res = SWIG_AsVal_int(argv[1], NULL);
23408  _v = SWIG_CheckState(res);
23409  }
23410  if (_v) {
23411  {
23412  int res = SWIG_AsVal_bool(argv[2], NULL);
23413  _v = SWIG_CheckState(res);
23414  }
23415  if (_v) {
23416  return _wrap_new_LinearTransform__SWIG_0(self, args);
23417  }
23418  }
23419  }
23420  }
23421 
23422 fail:
23423  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_LinearTransform'.\n"
23424  " Possible C/C++ prototypes are:\n"
23425  " faiss::LinearTransform::LinearTransform(int,int,bool)\n"
23426  " faiss::LinearTransform::LinearTransform(int,int)\n"
23427  " faiss::LinearTransform::LinearTransform(int)\n"
23428  " faiss::LinearTransform::LinearTransform()\n");
23429  return 0;
23430 }
23431 
23432 
23433 SWIGINTERN PyObject *_wrap_LinearTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23434  PyObject *resultobj = 0;
23436  faiss::VectorTransform::idx_t arg2 ;
23437  float *arg3 = (float *) 0 ;
23438  float *arg4 = (float *) 0 ;
23439  void *argp1 = 0 ;
23440  int res1 = 0 ;
23441  long val2 ;
23442  int ecode2 = 0 ;
23443  void *argp3 = 0 ;
23444  int res3 = 0 ;
23445  void *argp4 = 0 ;
23446  int res4 = 0 ;
23447  PyObject * obj0 = 0 ;
23448  PyObject * obj1 = 0 ;
23449  PyObject * obj2 = 0 ;
23450  PyObject * obj3 = 0 ;
23451 
23452  if (!PyArg_ParseTuple(args,(char *)"OOOO:LinearTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
23453  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23454  if (!SWIG_IsOK(res1)) {
23455  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
23456  }
23457  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23458  ecode2 = SWIG_AsVal_long(obj1, &val2);
23459  if (!SWIG_IsOK(ecode2)) {
23460  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
23461  }
23462  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
23463  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23464  if (!SWIG_IsOK(res3)) {
23465  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LinearTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
23466  }
23467  arg3 = reinterpret_cast< float * >(argp3);
23468  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
23469  if (!SWIG_IsOK(res4)) {
23470  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LinearTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
23471  }
23472  arg4 = reinterpret_cast< float * >(argp4);
23473  {
23474  Py_BEGIN_ALLOW_THREADS
23475  try {
23476  ((faiss::LinearTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
23477  } catch(faiss::FaissException & e) {
23478  PyEval_RestoreThread(_save);
23479  PyErr_SetString(PyExc_RuntimeError, e.what());
23480  SWIG_fail;
23481  }
23482  Py_END_ALLOW_THREADS
23483  }
23484  resultobj = SWIG_Py_Void();
23485  return resultobj;
23486 fail:
23487  return NULL;
23488 }
23489 
23490 
23491 SWIGINTERN PyObject *_wrap_LinearTransform_transform_transpose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23492  PyObject *resultobj = 0;
23494  faiss::VectorTransform::idx_t arg2 ;
23495  float *arg3 = (float *) 0 ;
23496  float *arg4 = (float *) 0 ;
23497  void *argp1 = 0 ;
23498  int res1 = 0 ;
23499  long val2 ;
23500  int ecode2 = 0 ;
23501  void *argp3 = 0 ;
23502  int res3 = 0 ;
23503  void *argp4 = 0 ;
23504  int res4 = 0 ;
23505  PyObject * obj0 = 0 ;
23506  PyObject * obj1 = 0 ;
23507  PyObject * obj2 = 0 ;
23508  PyObject * obj3 = 0 ;
23509 
23510  if (!PyArg_ParseTuple(args,(char *)"OOOO:LinearTransform_transform_transpose",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
23511  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23512  if (!SWIG_IsOK(res1)) {
23513  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_transform_transpose" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
23514  }
23515  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23516  ecode2 = SWIG_AsVal_long(obj1, &val2);
23517  if (!SWIG_IsOK(ecode2)) {
23518  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_transform_transpose" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
23519  }
23520  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
23521  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23522  if (!SWIG_IsOK(res3)) {
23523  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LinearTransform_transform_transpose" "', argument " "3"" of type '" "float const *""'");
23524  }
23525  arg3 = reinterpret_cast< float * >(argp3);
23526  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
23527  if (!SWIG_IsOK(res4)) {
23528  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LinearTransform_transform_transpose" "', argument " "4"" of type '" "float *""'");
23529  }
23530  arg4 = reinterpret_cast< float * >(argp4);
23531  {
23532  Py_BEGIN_ALLOW_THREADS
23533  try {
23534  ((faiss::LinearTransform const *)arg1)->transform_transpose(arg2,(float const *)arg3,arg4);
23535  } catch(faiss::FaissException & e) {
23536  PyEval_RestoreThread(_save);
23537  PyErr_SetString(PyExc_RuntimeError, e.what());
23538  SWIG_fail;
23539  }
23540  Py_END_ALLOW_THREADS
23541  }
23542  resultobj = SWIG_Py_Void();
23543  return resultobj;
23544 fail:
23545  return NULL;
23546 }
23547 
23548 
23549 SWIGINTERN PyObject *_wrap_LinearTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23550  PyObject *resultobj = 0;
23552  faiss::VectorTransform::idx_t arg2 ;
23553  float *arg3 = (float *) 0 ;
23554  float *arg4 = (float *) 0 ;
23555  void *argp1 = 0 ;
23556  int res1 = 0 ;
23557  long val2 ;
23558  int ecode2 = 0 ;
23559  void *argp3 = 0 ;
23560  int res3 = 0 ;
23561  void *argp4 = 0 ;
23562  int res4 = 0 ;
23563  PyObject * obj0 = 0 ;
23564  PyObject * obj1 = 0 ;
23565  PyObject * obj2 = 0 ;
23566  PyObject * obj3 = 0 ;
23567 
23568  if (!PyArg_ParseTuple(args,(char *)"OOOO:LinearTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
23569  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23570  if (!SWIG_IsOK(res1)) {
23571  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_reverse_transform" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
23572  }
23573  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23574  ecode2 = SWIG_AsVal_long(obj1, &val2);
23575  if (!SWIG_IsOK(ecode2)) {
23576  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
23577  }
23578  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
23579  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23580  if (!SWIG_IsOK(res3)) {
23581  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LinearTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
23582  }
23583  arg3 = reinterpret_cast< float * >(argp3);
23584  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
23585  if (!SWIG_IsOK(res4)) {
23586  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LinearTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
23587  }
23588  arg4 = reinterpret_cast< float * >(argp4);
23589  {
23590  Py_BEGIN_ALLOW_THREADS
23591  try {
23592  ((faiss::LinearTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
23593  } catch(faiss::FaissException & e) {
23594  PyEval_RestoreThread(_save);
23595  PyErr_SetString(PyExc_RuntimeError, e.what());
23596  SWIG_fail;
23597  }
23598  Py_END_ALLOW_THREADS
23599  }
23600  resultobj = SWIG_Py_Void();
23601  return resultobj;
23602 fail:
23603  return NULL;
23604 }
23605 
23606 
23607 SWIGINTERN PyObject *_wrap_LinearTransform_set_is_orthonormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23608  PyObject *resultobj = 0;
23610  void *argp1 = 0 ;
23611  int res1 = 0 ;
23612  PyObject * obj0 = 0 ;
23613 
23614  if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_set_is_orthonormal",&obj0)) SWIG_fail;
23615  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23616  if (!SWIG_IsOK(res1)) {
23617  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_set_is_orthonormal" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23618  }
23619  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23620  {
23621  Py_BEGIN_ALLOW_THREADS
23622  try {
23623  (arg1)->set_is_orthonormal();
23624  } catch(faiss::FaissException & e) {
23625  PyEval_RestoreThread(_save);
23626  PyErr_SetString(PyExc_RuntimeError, e.what());
23627  SWIG_fail;
23628  }
23629  Py_END_ALLOW_THREADS
23630  }
23631  resultobj = SWIG_Py_Void();
23632  return resultobj;
23633 fail:
23634  return NULL;
23635 }
23636 
23637 
23638 SWIGINTERN PyObject *_wrap_LinearTransform_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23639  PyObject *resultobj = 0;
23641  bool arg2 ;
23642  void *argp1 = 0 ;
23643  int res1 = 0 ;
23644  bool val2 ;
23645  int ecode2 = 0 ;
23646  PyObject * obj0 = 0 ;
23647  PyObject * obj1 = 0 ;
23648 
23649  if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_verbose_set",&obj0,&obj1)) SWIG_fail;
23650  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23651  if (!SWIG_IsOK(res1)) {
23652  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_verbose_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23653  }
23654  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23655  ecode2 = SWIG_AsVal_bool(obj1, &val2);
23656  if (!SWIG_IsOK(ecode2)) {
23657  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_verbose_set" "', argument " "2"" of type '" "bool""'");
23658  }
23659  arg2 = static_cast< bool >(val2);
23660  if (arg1) (arg1)->verbose = arg2;
23661  resultobj = SWIG_Py_Void();
23662  return resultobj;
23663 fail:
23664  return NULL;
23665 }
23666 
23667 
23668 SWIGINTERN PyObject *_wrap_LinearTransform_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23669  PyObject *resultobj = 0;
23671  void *argp1 = 0 ;
23672  int res1 = 0 ;
23673  PyObject * obj0 = 0 ;
23674  bool result;
23675 
23676  if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_verbose_get",&obj0)) SWIG_fail;
23677  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
23678  if (!SWIG_IsOK(res1)) {
23679  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_verbose_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23680  }
23681  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23682  result = (bool) ((arg1)->verbose);
23683  resultobj = SWIG_From_bool(static_cast< bool >(result));
23684  return resultobj;
23685 fail:
23686  return NULL;
23687 }
23688 
23689 
23690 SWIGINTERN PyObject *_wrap_delete_LinearTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23691  PyObject *resultobj = 0;
23693  void *argp1 = 0 ;
23694  int res1 = 0 ;
23695  PyObject * obj0 = 0 ;
23696 
23697  if (!PyArg_ParseTuple(args,(char *)"O:delete_LinearTransform",&obj0)) SWIG_fail;
23698  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_DISOWN | 0 );
23699  if (!SWIG_IsOK(res1)) {
23700  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearTransform" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
23701  }
23702  arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
23703  {
23704  Py_BEGIN_ALLOW_THREADS
23705  try {
23706  delete arg1;
23707  } catch(faiss::FaissException & e) {
23708  PyEval_RestoreThread(_save);
23709  PyErr_SetString(PyExc_RuntimeError, e.what());
23710  SWIG_fail;
23711  }
23712  Py_END_ALLOW_THREADS
23713  }
23714  resultobj = SWIG_Py_Void();
23715  return resultobj;
23716 fail:
23717  return NULL;
23718 }
23719 
23720 
23721 SWIGINTERN PyObject *LinearTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23722  PyObject *obj;
23723  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
23724  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__LinearTransform, SWIG_NewClientData(obj));
23725  return SWIG_Py_Void();
23726 }
23727 
23728 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23729  PyObject *resultobj = 0;
23730  int arg1 ;
23731  int arg2 ;
23732  int val1 ;
23733  int ecode1 = 0 ;
23734  int val2 ;
23735  int ecode2 = 0 ;
23736  PyObject * obj0 = 0 ;
23737  PyObject * obj1 = 0 ;
23738  faiss::RandomRotationMatrix *result = 0 ;
23739 
23740  if (!PyArg_ParseTuple(args,(char *)"OO:new_RandomRotationMatrix",&obj0,&obj1)) SWIG_fail;
23741  ecode1 = SWIG_AsVal_int(obj0, &val1);
23742  if (!SWIG_IsOK(ecode1)) {
23743  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RandomRotationMatrix" "', argument " "1"" of type '" "int""'");
23744  }
23745  arg1 = static_cast< int >(val1);
23746  ecode2 = SWIG_AsVal_int(obj1, &val2);
23747  if (!SWIG_IsOK(ecode2)) {
23748  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RandomRotationMatrix" "', argument " "2"" of type '" "int""'");
23749  }
23750  arg2 = static_cast< int >(val2);
23751  {
23752  Py_BEGIN_ALLOW_THREADS
23753  try {
23754  result = (faiss::RandomRotationMatrix *)new faiss::RandomRotationMatrix(arg1,arg2);
23755  } catch(faiss::FaissException & e) {
23756  PyEval_RestoreThread(_save);
23757  PyErr_SetString(PyExc_RuntimeError, e.what());
23758  SWIG_fail;
23759  }
23760  Py_END_ALLOW_THREADS
23761  }
23762  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_NEW | 0 );
23763  return resultobj;
23764 fail:
23765  return NULL;
23766 }
23767 
23768 
23769 SWIGINTERN PyObject *_wrap_RandomRotationMatrix_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23770  PyObject *resultobj = 0;
23772  int arg2 ;
23773  void *argp1 = 0 ;
23774  int res1 = 0 ;
23775  int val2 ;
23776  int ecode2 = 0 ;
23777  PyObject * obj0 = 0 ;
23778  PyObject * obj1 = 0 ;
23779 
23780  if (!PyArg_ParseTuple(args,(char *)"OO:RandomRotationMatrix_init",&obj0,&obj1)) SWIG_fail;
23781  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
23782  if (!SWIG_IsOK(res1)) {
23783  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomRotationMatrix_init" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
23784  }
23785  arg1 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp1);
23786  ecode2 = SWIG_AsVal_int(obj1, &val2);
23787  if (!SWIG_IsOK(ecode2)) {
23788  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RandomRotationMatrix_init" "', argument " "2"" of type '" "int""'");
23789  }
23790  arg2 = static_cast< int >(val2);
23791  {
23792  Py_BEGIN_ALLOW_THREADS
23793  try {
23794  (arg1)->init(arg2);
23795  } catch(faiss::FaissException & e) {
23796  PyEval_RestoreThread(_save);
23797  PyErr_SetString(PyExc_RuntimeError, e.what());
23798  SWIG_fail;
23799  }
23800  Py_END_ALLOW_THREADS
23801  }
23802  resultobj = SWIG_Py_Void();
23803  return resultobj;
23804 fail:
23805  return NULL;
23806 }
23807 
23808 
23809 SWIGINTERN PyObject *_wrap_RandomRotationMatrix_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23810  PyObject *resultobj = 0;
23812  faiss::Index::idx_t arg2 ;
23813  float *arg3 = (float *) 0 ;
23814  void *argp1 = 0 ;
23815  int res1 = 0 ;
23816  long val2 ;
23817  int ecode2 = 0 ;
23818  void *argp3 = 0 ;
23819  int res3 = 0 ;
23820  PyObject * obj0 = 0 ;
23821  PyObject * obj1 = 0 ;
23822  PyObject * obj2 = 0 ;
23823 
23824  if (!PyArg_ParseTuple(args,(char *)"OOO:RandomRotationMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
23825  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
23826  if (!SWIG_IsOK(res1)) {
23827  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomRotationMatrix_train" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
23828  }
23829  arg1 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp1);
23830  ecode2 = SWIG_AsVal_long(obj1, &val2);
23831  if (!SWIG_IsOK(ecode2)) {
23832  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RandomRotationMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
23833  }
23834  arg2 = static_cast< faiss::Index::idx_t >(val2);
23835  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23836  if (!SWIG_IsOK(res3)) {
23837  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RandomRotationMatrix_train" "', argument " "3"" of type '" "float const *""'");
23838  }
23839  arg3 = reinterpret_cast< float * >(argp3);
23840  {
23841  Py_BEGIN_ALLOW_THREADS
23842  try {
23843  (arg1)->train(arg2,(float const *)arg3);
23844  } catch(faiss::FaissException & e) {
23845  PyEval_RestoreThread(_save);
23846  PyErr_SetString(PyExc_RuntimeError, e.what());
23847  SWIG_fail;
23848  }
23849  Py_END_ALLOW_THREADS
23850  }
23851  resultobj = SWIG_Py_Void();
23852  return resultobj;
23853 fail:
23854  return NULL;
23855 }
23856 
23857 
23858 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23859  PyObject *resultobj = 0;
23860  faiss::RandomRotationMatrix *result = 0 ;
23861 
23862  if (!PyArg_ParseTuple(args,(char *)":new_RandomRotationMatrix")) SWIG_fail;
23863  {
23864  Py_BEGIN_ALLOW_THREADS
23865  try {
23867  } catch(faiss::FaissException & e) {
23868  PyEval_RestoreThread(_save);
23869  PyErr_SetString(PyExc_RuntimeError, e.what());
23870  SWIG_fail;
23871  }
23872  Py_END_ALLOW_THREADS
23873  }
23874  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_NEW | 0 );
23875  return resultobj;
23876 fail:
23877  return NULL;
23878 }
23879 
23880 
23881 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix(PyObject *self, PyObject *args) {
23882  Py_ssize_t argc;
23883  PyObject *argv[3] = {
23884  0
23885  };
23886  Py_ssize_t ii;
23887 
23888  if (!PyTuple_Check(args)) SWIG_fail;
23889  argc = args ? PyObject_Length(args) : 0;
23890  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
23891  argv[ii] = PyTuple_GET_ITEM(args,ii);
23892  }
23893  if (argc == 0) {
23894  return _wrap_new_RandomRotationMatrix__SWIG_1(self, args);
23895  }
23896  if (argc == 2) {
23897  int _v;
23898  {
23899  int res = SWIG_AsVal_int(argv[0], NULL);
23900  _v = SWIG_CheckState(res);
23901  }
23902  if (_v) {
23903  {
23904  int res = SWIG_AsVal_int(argv[1], NULL);
23905  _v = SWIG_CheckState(res);
23906  }
23907  if (_v) {
23908  return _wrap_new_RandomRotationMatrix__SWIG_0(self, args);
23909  }
23910  }
23911  }
23912 
23913 fail:
23914  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RandomRotationMatrix'.\n"
23915  " Possible C/C++ prototypes are:\n"
23916  " faiss::RandomRotationMatrix::RandomRotationMatrix(int,int)\n"
23917  " faiss::RandomRotationMatrix::RandomRotationMatrix()\n");
23918  return 0;
23919 }
23920 
23921 
23922 SWIGINTERN PyObject *_wrap_delete_RandomRotationMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23923  PyObject *resultobj = 0;
23925  void *argp1 = 0 ;
23926  int res1 = 0 ;
23927  PyObject * obj0 = 0 ;
23928 
23929  if (!PyArg_ParseTuple(args,(char *)"O:delete_RandomRotationMatrix",&obj0)) SWIG_fail;
23930  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_DISOWN | 0 );
23931  if (!SWIG_IsOK(res1)) {
23932  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RandomRotationMatrix" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
23933  }
23934  arg1 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp1);
23935  delete arg1;
23936  resultobj = SWIG_Py_Void();
23937  return resultobj;
23938 fail:
23939  return NULL;
23940 }
23941 
23942 
23943 SWIGINTERN PyObject *RandomRotationMatrix_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23944  PyObject *obj;
23945  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
23946  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_NewClientData(obj));
23947  return SWIG_Py_Void();
23948 }
23949 
23950 SWIGINTERN PyObject *_wrap_PCAMatrix_eigen_power_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23951  PyObject *resultobj = 0;
23952  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
23953  float arg2 ;
23954  void *argp1 = 0 ;
23955  int res1 = 0 ;
23956  float val2 ;
23957  int ecode2 = 0 ;
23958  PyObject * obj0 = 0 ;
23959  PyObject * obj1 = 0 ;
23960 
23961  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_eigen_power_set",&obj0,&obj1)) SWIG_fail;
23962  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23963  if (!SWIG_IsOK(res1)) {
23964  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigen_power_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23965  }
23966  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
23967  ecode2 = SWIG_AsVal_float(obj1, &val2);
23968  if (!SWIG_IsOK(ecode2)) {
23969  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_eigen_power_set" "', argument " "2"" of type '" "float""'");
23970  }
23971  arg2 = static_cast< float >(val2);
23972  if (arg1) (arg1)->eigen_power = arg2;
23973  resultobj = SWIG_Py_Void();
23974  return resultobj;
23975 fail:
23976  return NULL;
23977 }
23978 
23979 
23980 SWIGINTERN PyObject *_wrap_PCAMatrix_eigen_power_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23981  PyObject *resultobj = 0;
23982  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
23983  void *argp1 = 0 ;
23984  int res1 = 0 ;
23985  PyObject * obj0 = 0 ;
23986  float result;
23987 
23988  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_eigen_power_get",&obj0)) SWIG_fail;
23989  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23990  if (!SWIG_IsOK(res1)) {
23991  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigen_power_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23992  }
23993  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
23994  result = (float) ((arg1)->eigen_power);
23995  resultobj = SWIG_From_float(static_cast< float >(result));
23996  return resultobj;
23997 fail:
23998  return NULL;
23999 }
24000 
24001 
24002 SWIGINTERN PyObject *_wrap_PCAMatrix_random_rotation_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24003  PyObject *resultobj = 0;
24004  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24005  bool arg2 ;
24006  void *argp1 = 0 ;
24007  int res1 = 0 ;
24008  bool val2 ;
24009  int ecode2 = 0 ;
24010  PyObject * obj0 = 0 ;
24011  PyObject * obj1 = 0 ;
24012 
24013  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_random_rotation_set",&obj0,&obj1)) SWIG_fail;
24014  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24015  if (!SWIG_IsOK(res1)) {
24016  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_random_rotation_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24017  }
24018  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24019  ecode2 = SWIG_AsVal_bool(obj1, &val2);
24020  if (!SWIG_IsOK(ecode2)) {
24021  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_random_rotation_set" "', argument " "2"" of type '" "bool""'");
24022  }
24023  arg2 = static_cast< bool >(val2);
24024  if (arg1) (arg1)->random_rotation = arg2;
24025  resultobj = SWIG_Py_Void();
24026  return resultobj;
24027 fail:
24028  return NULL;
24029 }
24030 
24031 
24032 SWIGINTERN PyObject *_wrap_PCAMatrix_random_rotation_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24033  PyObject *resultobj = 0;
24034  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24035  void *argp1 = 0 ;
24036  int res1 = 0 ;
24037  PyObject * obj0 = 0 ;
24038  bool result;
24039 
24040  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_random_rotation_get",&obj0)) SWIG_fail;
24041  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24042  if (!SWIG_IsOK(res1)) {
24043  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_random_rotation_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24044  }
24045  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24046  result = (bool) ((arg1)->random_rotation);
24047  resultobj = SWIG_From_bool(static_cast< bool >(result));
24048  return resultobj;
24049 fail:
24050  return NULL;
24051 }
24052 
24053 
24054 SWIGINTERN PyObject *_wrap_PCAMatrix_max_points_per_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24055  PyObject *resultobj = 0;
24056  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24057  size_t arg2 ;
24058  void *argp1 = 0 ;
24059  int res1 = 0 ;
24060  size_t val2 ;
24061  int ecode2 = 0 ;
24062  PyObject * obj0 = 0 ;
24063  PyObject * obj1 = 0 ;
24064 
24065  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_max_points_per_d_set",&obj0,&obj1)) SWIG_fail;
24066  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24067  if (!SWIG_IsOK(res1)) {
24068  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_max_points_per_d_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24069  }
24070  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24071  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
24072  if (!SWIG_IsOK(ecode2)) {
24073  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_max_points_per_d_set" "', argument " "2"" of type '" "size_t""'");
24074  }
24075  arg2 = static_cast< size_t >(val2);
24076  if (arg1) (arg1)->max_points_per_d = arg2;
24077  resultobj = SWIG_Py_Void();
24078  return resultobj;
24079 fail:
24080  return NULL;
24081 }
24082 
24083 
24084 SWIGINTERN PyObject *_wrap_PCAMatrix_max_points_per_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24085  PyObject *resultobj = 0;
24086  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24087  void *argp1 = 0 ;
24088  int res1 = 0 ;
24089  PyObject * obj0 = 0 ;
24090  size_t result;
24091 
24092  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_max_points_per_d_get",&obj0)) SWIG_fail;
24093  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24094  if (!SWIG_IsOK(res1)) {
24095  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_max_points_per_d_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24096  }
24097  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24098  result = (size_t) ((arg1)->max_points_per_d);
24099  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
24100  return resultobj;
24101 fail:
24102  return NULL;
24103 }
24104 
24105 
24106 SWIGINTERN PyObject *_wrap_PCAMatrix_balanced_bins_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24107  PyObject *resultobj = 0;
24108  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24109  int arg2 ;
24110  void *argp1 = 0 ;
24111  int res1 = 0 ;
24112  int val2 ;
24113  int ecode2 = 0 ;
24114  PyObject * obj0 = 0 ;
24115  PyObject * obj1 = 0 ;
24116 
24117  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_balanced_bins_set",&obj0,&obj1)) SWIG_fail;
24118  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24119  if (!SWIG_IsOK(res1)) {
24120  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_balanced_bins_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24121  }
24122  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24123  ecode2 = SWIG_AsVal_int(obj1, &val2);
24124  if (!SWIG_IsOK(ecode2)) {
24125  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_balanced_bins_set" "', argument " "2"" of type '" "int""'");
24126  }
24127  arg2 = static_cast< int >(val2);
24128  if (arg1) (arg1)->balanced_bins = arg2;
24129  resultobj = SWIG_Py_Void();
24130  return resultobj;
24131 fail:
24132  return NULL;
24133 }
24134 
24135 
24136 SWIGINTERN PyObject *_wrap_PCAMatrix_balanced_bins_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24137  PyObject *resultobj = 0;
24138  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24139  void *argp1 = 0 ;
24140  int res1 = 0 ;
24141  PyObject * obj0 = 0 ;
24142  int result;
24143 
24144  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_balanced_bins_get",&obj0)) SWIG_fail;
24145  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24146  if (!SWIG_IsOK(res1)) {
24147  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_balanced_bins_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24148  }
24149  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24150  result = (int) ((arg1)->balanced_bins);
24151  resultobj = SWIG_From_int(static_cast< int >(result));
24152  return resultobj;
24153 fail:
24154  return NULL;
24155 }
24156 
24157 
24158 SWIGINTERN PyObject *_wrap_PCAMatrix_mean_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24159  PyObject *resultobj = 0;
24160  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24161  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
24162  void *argp1 = 0 ;
24163  int res1 = 0 ;
24164  void *argp2 = 0 ;
24165  int res2 = 0 ;
24166  PyObject * obj0 = 0 ;
24167  PyObject * obj1 = 0 ;
24168 
24169  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_mean_set",&obj0,&obj1)) SWIG_fail;
24170  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24171  if (!SWIG_IsOK(res1)) {
24172  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_mean_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24173  }
24174  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24175  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24176  if (!SWIG_IsOK(res2)) {
24177  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_mean_set" "', argument " "2"" of type '" "std::vector< float > *""'");
24178  }
24179  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
24180  if (arg1) (arg1)->mean = *arg2;
24181  resultobj = SWIG_Py_Void();
24182  return resultobj;
24183 fail:
24184  return NULL;
24185 }
24186 
24187 
24188 SWIGINTERN PyObject *_wrap_PCAMatrix_mean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24189  PyObject *resultobj = 0;
24190  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24191  void *argp1 = 0 ;
24192  int res1 = 0 ;
24193  PyObject * obj0 = 0 ;
24194  std::vector< float > *result = 0 ;
24195 
24196  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_mean_get",&obj0)) SWIG_fail;
24197  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24198  if (!SWIG_IsOK(res1)) {
24199  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_mean_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24200  }
24201  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24202  result = (std::vector< float > *)& ((arg1)->mean);
24203  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24204  return resultobj;
24205 fail:
24206  return NULL;
24207 }
24208 
24209 
24210 SWIGINTERN PyObject *_wrap_PCAMatrix_eigenvalues_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24211  PyObject *resultobj = 0;
24212  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24213  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
24214  void *argp1 = 0 ;
24215  int res1 = 0 ;
24216  void *argp2 = 0 ;
24217  int res2 = 0 ;
24218  PyObject * obj0 = 0 ;
24219  PyObject * obj1 = 0 ;
24220 
24221  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_eigenvalues_set",&obj0,&obj1)) SWIG_fail;
24222  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24223  if (!SWIG_IsOK(res1)) {
24224  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigenvalues_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24225  }
24226  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24227  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24228  if (!SWIG_IsOK(res2)) {
24229  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_eigenvalues_set" "', argument " "2"" of type '" "std::vector< float > *""'");
24230  }
24231  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
24232  if (arg1) (arg1)->eigenvalues = *arg2;
24233  resultobj = SWIG_Py_Void();
24234  return resultobj;
24235 fail:
24236  return NULL;
24237 }
24238 
24239 
24240 SWIGINTERN PyObject *_wrap_PCAMatrix_eigenvalues_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24241  PyObject *resultobj = 0;
24242  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24243  void *argp1 = 0 ;
24244  int res1 = 0 ;
24245  PyObject * obj0 = 0 ;
24246  std::vector< float > *result = 0 ;
24247 
24248  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_eigenvalues_get",&obj0)) SWIG_fail;
24249  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24250  if (!SWIG_IsOK(res1)) {
24251  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigenvalues_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24252  }
24253  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24254  result = (std::vector< float > *)& ((arg1)->eigenvalues);
24255  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24256  return resultobj;
24257 fail:
24258  return NULL;
24259 }
24260 
24261 
24262 SWIGINTERN PyObject *_wrap_PCAMatrix_PCAMat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24263  PyObject *resultobj = 0;
24264  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24265  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
24266  void *argp1 = 0 ;
24267  int res1 = 0 ;
24268  void *argp2 = 0 ;
24269  int res2 = 0 ;
24270  PyObject * obj0 = 0 ;
24271  PyObject * obj1 = 0 ;
24272 
24273  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_PCAMat_set",&obj0,&obj1)) SWIG_fail;
24274  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24275  if (!SWIG_IsOK(res1)) {
24276  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_PCAMat_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24277  }
24278  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24279  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24280  if (!SWIG_IsOK(res2)) {
24281  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_PCAMat_set" "', argument " "2"" of type '" "std::vector< float > *""'");
24282  }
24283  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
24284  if (arg1) (arg1)->PCAMat = *arg2;
24285  resultobj = SWIG_Py_Void();
24286  return resultobj;
24287 fail:
24288  return NULL;
24289 }
24290 
24291 
24292 SWIGINTERN PyObject *_wrap_PCAMatrix_PCAMat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24293  PyObject *resultobj = 0;
24294  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24295  void *argp1 = 0 ;
24296  int res1 = 0 ;
24297  PyObject * obj0 = 0 ;
24298  std::vector< float > *result = 0 ;
24299 
24300  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_PCAMat_get",&obj0)) SWIG_fail;
24301  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24302  if (!SWIG_IsOK(res1)) {
24303  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_PCAMat_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24304  }
24305  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24306  result = (std::vector< float > *)& ((arg1)->PCAMat);
24307  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
24308  return resultobj;
24309 fail:
24310  return NULL;
24311 }
24312 
24313 
24314 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24315  PyObject *resultobj = 0;
24316  int arg1 ;
24317  int arg2 ;
24318  float arg3 ;
24319  bool arg4 ;
24320  int val1 ;
24321  int ecode1 = 0 ;
24322  int val2 ;
24323  int ecode2 = 0 ;
24324  float val3 ;
24325  int ecode3 = 0 ;
24326  bool val4 ;
24327  int ecode4 = 0 ;
24328  PyObject * obj0 = 0 ;
24329  PyObject * obj1 = 0 ;
24330  PyObject * obj2 = 0 ;
24331  PyObject * obj3 = 0 ;
24332  faiss::PCAMatrix *result = 0 ;
24333 
24334  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_PCAMatrix",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
24335  ecode1 = SWIG_AsVal_int(obj0, &val1);
24336  if (!SWIG_IsOK(ecode1)) {
24337  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24338  }
24339  arg1 = static_cast< int >(val1);
24340  ecode2 = SWIG_AsVal_int(obj1, &val2);
24341  if (!SWIG_IsOK(ecode2)) {
24342  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
24343  }
24344  arg2 = static_cast< int >(val2);
24345  ecode3 = SWIG_AsVal_float(obj2, &val3);
24346  if (!SWIG_IsOK(ecode3)) {
24347  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PCAMatrix" "', argument " "3"" of type '" "float""'");
24348  }
24349  arg3 = static_cast< float >(val3);
24350  ecode4 = SWIG_AsVal_bool(obj3, &val4);
24351  if (!SWIG_IsOK(ecode4)) {
24352  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_PCAMatrix" "', argument " "4"" of type '" "bool""'");
24353  }
24354  arg4 = static_cast< bool >(val4);
24355  {
24356  Py_BEGIN_ALLOW_THREADS
24357  try {
24358  result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1,arg2,arg3,arg4);
24359  } catch(faiss::FaissException & e) {
24360  PyEval_RestoreThread(_save);
24361  PyErr_SetString(PyExc_RuntimeError, e.what());
24362  SWIG_fail;
24363  }
24364  Py_END_ALLOW_THREADS
24365  }
24366  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24367  return resultobj;
24368 fail:
24369  return NULL;
24370 }
24371 
24372 
24373 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24374  PyObject *resultobj = 0;
24375  int arg1 ;
24376  int arg2 ;
24377  float arg3 ;
24378  int val1 ;
24379  int ecode1 = 0 ;
24380  int val2 ;
24381  int ecode2 = 0 ;
24382  float val3 ;
24383  int ecode3 = 0 ;
24384  PyObject * obj0 = 0 ;
24385  PyObject * obj1 = 0 ;
24386  PyObject * obj2 = 0 ;
24387  faiss::PCAMatrix *result = 0 ;
24388 
24389  if (!PyArg_ParseTuple(args,(char *)"OOO:new_PCAMatrix",&obj0,&obj1,&obj2)) SWIG_fail;
24390  ecode1 = SWIG_AsVal_int(obj0, &val1);
24391  if (!SWIG_IsOK(ecode1)) {
24392  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24393  }
24394  arg1 = static_cast< int >(val1);
24395  ecode2 = SWIG_AsVal_int(obj1, &val2);
24396  if (!SWIG_IsOK(ecode2)) {
24397  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
24398  }
24399  arg2 = static_cast< int >(val2);
24400  ecode3 = SWIG_AsVal_float(obj2, &val3);
24401  if (!SWIG_IsOK(ecode3)) {
24402  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PCAMatrix" "', argument " "3"" of type '" "float""'");
24403  }
24404  arg3 = static_cast< float >(val3);
24405  {
24406  Py_BEGIN_ALLOW_THREADS
24407  try {
24408  result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1,arg2,arg3);
24409  } catch(faiss::FaissException & e) {
24410  PyEval_RestoreThread(_save);
24411  PyErr_SetString(PyExc_RuntimeError, e.what());
24412  SWIG_fail;
24413  }
24414  Py_END_ALLOW_THREADS
24415  }
24416  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24417  return resultobj;
24418 fail:
24419  return NULL;
24420 }
24421 
24422 
24423 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24424  PyObject *resultobj = 0;
24425  int arg1 ;
24426  int arg2 ;
24427  int val1 ;
24428  int ecode1 = 0 ;
24429  int val2 ;
24430  int ecode2 = 0 ;
24431  PyObject * obj0 = 0 ;
24432  PyObject * obj1 = 0 ;
24433  faiss::PCAMatrix *result = 0 ;
24434 
24435  if (!PyArg_ParseTuple(args,(char *)"OO:new_PCAMatrix",&obj0,&obj1)) SWIG_fail;
24436  ecode1 = SWIG_AsVal_int(obj0, &val1);
24437  if (!SWIG_IsOK(ecode1)) {
24438  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24439  }
24440  arg1 = static_cast< int >(val1);
24441  ecode2 = SWIG_AsVal_int(obj1, &val2);
24442  if (!SWIG_IsOK(ecode2)) {
24443  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
24444  }
24445  arg2 = static_cast< int >(val2);
24446  {
24447  Py_BEGIN_ALLOW_THREADS
24448  try {
24449  result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1,arg2);
24450  } catch(faiss::FaissException & e) {
24451  PyEval_RestoreThread(_save);
24452  PyErr_SetString(PyExc_RuntimeError, e.what());
24453  SWIG_fail;
24454  }
24455  Py_END_ALLOW_THREADS
24456  }
24457  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24458  return resultobj;
24459 fail:
24460  return NULL;
24461 }
24462 
24463 
24464 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24465  PyObject *resultobj = 0;
24466  int arg1 ;
24467  int val1 ;
24468  int ecode1 = 0 ;
24469  PyObject * obj0 = 0 ;
24470  faiss::PCAMatrix *result = 0 ;
24471 
24472  if (!PyArg_ParseTuple(args,(char *)"O:new_PCAMatrix",&obj0)) SWIG_fail;
24473  ecode1 = SWIG_AsVal_int(obj0, &val1);
24474  if (!SWIG_IsOK(ecode1)) {
24475  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
24476  }
24477  arg1 = static_cast< int >(val1);
24478  {
24479  Py_BEGIN_ALLOW_THREADS
24480  try {
24481  result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1);
24482  } catch(faiss::FaissException & e) {
24483  PyEval_RestoreThread(_save);
24484  PyErr_SetString(PyExc_RuntimeError, e.what());
24485  SWIG_fail;
24486  }
24487  Py_END_ALLOW_THREADS
24488  }
24489  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24490  return resultobj;
24491 fail:
24492  return NULL;
24493 }
24494 
24495 
24496 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24497  PyObject *resultobj = 0;
24498  faiss::PCAMatrix *result = 0 ;
24499 
24500  if (!PyArg_ParseTuple(args,(char *)":new_PCAMatrix")) SWIG_fail;
24501  {
24502  Py_BEGIN_ALLOW_THREADS
24503  try {
24504  result = (faiss::PCAMatrix *)new faiss::PCAMatrix();
24505  } catch(faiss::FaissException & e) {
24506  PyEval_RestoreThread(_save);
24507  PyErr_SetString(PyExc_RuntimeError, e.what());
24508  SWIG_fail;
24509  }
24510  Py_END_ALLOW_THREADS
24511  }
24512  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
24513  return resultobj;
24514 fail:
24515  return NULL;
24516 }
24517 
24518 
24519 SWIGINTERN PyObject *_wrap_new_PCAMatrix(PyObject *self, PyObject *args) {
24520  Py_ssize_t argc;
24521  PyObject *argv[5] = {
24522  0
24523  };
24524  Py_ssize_t ii;
24525 
24526  if (!PyTuple_Check(args)) SWIG_fail;
24527  argc = args ? PyObject_Length(args) : 0;
24528  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
24529  argv[ii] = PyTuple_GET_ITEM(args,ii);
24530  }
24531  if (argc == 0) {
24532  return _wrap_new_PCAMatrix__SWIG_4(self, args);
24533  }
24534  if (argc == 1) {
24535  int _v;
24536  {
24537  int res = SWIG_AsVal_int(argv[0], NULL);
24538  _v = SWIG_CheckState(res);
24539  }
24540  if (_v) {
24541  return _wrap_new_PCAMatrix__SWIG_3(self, args);
24542  }
24543  }
24544  if (argc == 2) {
24545  int _v;
24546  {
24547  int res = SWIG_AsVal_int(argv[0], NULL);
24548  _v = SWIG_CheckState(res);
24549  }
24550  if (_v) {
24551  {
24552  int res = SWIG_AsVal_int(argv[1], NULL);
24553  _v = SWIG_CheckState(res);
24554  }
24555  if (_v) {
24556  return _wrap_new_PCAMatrix__SWIG_2(self, args);
24557  }
24558  }
24559  }
24560  if (argc == 3) {
24561  int _v;
24562  {
24563  int res = SWIG_AsVal_int(argv[0], NULL);
24564  _v = SWIG_CheckState(res);
24565  }
24566  if (_v) {
24567  {
24568  int res = SWIG_AsVal_int(argv[1], NULL);
24569  _v = SWIG_CheckState(res);
24570  }
24571  if (_v) {
24572  {
24573  int res = SWIG_AsVal_float(argv[2], NULL);
24574  _v = SWIG_CheckState(res);
24575  }
24576  if (_v) {
24577  return _wrap_new_PCAMatrix__SWIG_1(self, args);
24578  }
24579  }
24580  }
24581  }
24582  if (argc == 4) {
24583  int _v;
24584  {
24585  int res = SWIG_AsVal_int(argv[0], NULL);
24586  _v = SWIG_CheckState(res);
24587  }
24588  if (_v) {
24589  {
24590  int res = SWIG_AsVal_int(argv[1], NULL);
24591  _v = SWIG_CheckState(res);
24592  }
24593  if (_v) {
24594  {
24595  int res = SWIG_AsVal_float(argv[2], NULL);
24596  _v = SWIG_CheckState(res);
24597  }
24598  if (_v) {
24599  {
24600  int res = SWIG_AsVal_bool(argv[3], NULL);
24601  _v = SWIG_CheckState(res);
24602  }
24603  if (_v) {
24604  return _wrap_new_PCAMatrix__SWIG_0(self, args);
24605  }
24606  }
24607  }
24608  }
24609  }
24610 
24611 fail:
24612  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_PCAMatrix'.\n"
24613  " Possible C/C++ prototypes are:\n"
24614  " faiss::PCAMatrix::PCAMatrix(int,int,float,bool)\n"
24615  " faiss::PCAMatrix::PCAMatrix(int,int,float)\n"
24616  " faiss::PCAMatrix::PCAMatrix(int,int)\n"
24617  " faiss::PCAMatrix::PCAMatrix(int)\n"
24618  " faiss::PCAMatrix::PCAMatrix()\n");
24619  return 0;
24620 }
24621 
24622 
24623 SWIGINTERN PyObject *_wrap_PCAMatrix_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24624  PyObject *resultobj = 0;
24625  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24626  faiss::Index::idx_t arg2 ;
24627  float *arg3 = (float *) 0 ;
24628  void *argp1 = 0 ;
24629  int res1 = 0 ;
24630  long val2 ;
24631  int ecode2 = 0 ;
24632  void *argp3 = 0 ;
24633  int res3 = 0 ;
24634  PyObject * obj0 = 0 ;
24635  PyObject * obj1 = 0 ;
24636  PyObject * obj2 = 0 ;
24637 
24638  if (!PyArg_ParseTuple(args,(char *)"OOO:PCAMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
24639  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24640  if (!SWIG_IsOK(res1)) {
24641  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_train" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24642  }
24643  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24644  ecode2 = SWIG_AsVal_long(obj1, &val2);
24645  if (!SWIG_IsOK(ecode2)) {
24646  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
24647  }
24648  arg2 = static_cast< faiss::Index::idx_t >(val2);
24649  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
24650  if (!SWIG_IsOK(res3)) {
24651  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PCAMatrix_train" "', argument " "3"" of type '" "float const *""'");
24652  }
24653  arg3 = reinterpret_cast< float * >(argp3);
24654  {
24655  Py_BEGIN_ALLOW_THREADS
24656  try {
24657  (arg1)->train(arg2,(float const *)arg3);
24658  } catch(faiss::FaissException & e) {
24659  PyEval_RestoreThread(_save);
24660  PyErr_SetString(PyExc_RuntimeError, e.what());
24661  SWIG_fail;
24662  }
24663  Py_END_ALLOW_THREADS
24664  }
24665  resultobj = SWIG_Py_Void();
24666  return resultobj;
24667 fail:
24668  return NULL;
24669 }
24670 
24671 
24672 SWIGINTERN PyObject *_wrap_PCAMatrix_copy_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24673  PyObject *resultobj = 0;
24674  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24675  faiss::PCAMatrix *arg2 = 0 ;
24676  void *argp1 = 0 ;
24677  int res1 = 0 ;
24678  void *argp2 = 0 ;
24679  int res2 = 0 ;
24680  PyObject * obj0 = 0 ;
24681  PyObject * obj1 = 0 ;
24682 
24683  if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_copy_from",&obj0,&obj1)) SWIG_fail;
24684  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24685  if (!SWIG_IsOK(res1)) {
24686  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_copy_from" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24687  }
24688  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24689  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__PCAMatrix, 0 | 0);
24690  if (!SWIG_IsOK(res2)) {
24691  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_copy_from" "', argument " "2"" of type '" "faiss::PCAMatrix const &""'");
24692  }
24693  if (!argp2) {
24694  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PCAMatrix_copy_from" "', argument " "2"" of type '" "faiss::PCAMatrix const &""'");
24695  }
24696  arg2 = reinterpret_cast< faiss::PCAMatrix * >(argp2);
24697  {
24698  Py_BEGIN_ALLOW_THREADS
24699  try {
24700  (arg1)->copy_from((faiss::PCAMatrix const &)*arg2);
24701  } catch(faiss::FaissException & e) {
24702  PyEval_RestoreThread(_save);
24703  PyErr_SetString(PyExc_RuntimeError, e.what());
24704  SWIG_fail;
24705  }
24706  Py_END_ALLOW_THREADS
24707  }
24708  resultobj = SWIG_Py_Void();
24709  return resultobj;
24710 fail:
24711  return NULL;
24712 }
24713 
24714 
24715 SWIGINTERN PyObject *_wrap_PCAMatrix_prepare_Ab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24716  PyObject *resultobj = 0;
24717  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24718  void *argp1 = 0 ;
24719  int res1 = 0 ;
24720  PyObject * obj0 = 0 ;
24721 
24722  if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_prepare_Ab",&obj0)) SWIG_fail;
24723  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
24724  if (!SWIG_IsOK(res1)) {
24725  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_prepare_Ab" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24726  }
24727  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24728  {
24729  Py_BEGIN_ALLOW_THREADS
24730  try {
24731  (arg1)->prepare_Ab();
24732  } catch(faiss::FaissException & e) {
24733  PyEval_RestoreThread(_save);
24734  PyErr_SetString(PyExc_RuntimeError, e.what());
24735  SWIG_fail;
24736  }
24737  Py_END_ALLOW_THREADS
24738  }
24739  resultobj = SWIG_Py_Void();
24740  return resultobj;
24741 fail:
24742  return NULL;
24743 }
24744 
24745 
24746 SWIGINTERN PyObject *_wrap_delete_PCAMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24747  PyObject *resultobj = 0;
24748  faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
24749  void *argp1 = 0 ;
24750  int res1 = 0 ;
24751  PyObject * obj0 = 0 ;
24752 
24753  if (!PyArg_ParseTuple(args,(char *)"O:delete_PCAMatrix",&obj0)) SWIG_fail;
24754  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_DISOWN | 0 );
24755  if (!SWIG_IsOK(res1)) {
24756  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PCAMatrix" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
24757  }
24758  arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
24759  delete arg1;
24760  resultobj = SWIG_Py_Void();
24761  return resultobj;
24762 fail:
24763  return NULL;
24764 }
24765 
24766 
24767 SWIGINTERN PyObject *PCAMatrix_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24768  PyObject *obj;
24769  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
24770  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__PCAMatrix, SWIG_NewClientData(obj));
24771  return SWIG_Py_Void();
24772 }
24773 
24774 SWIGINTERN PyObject *_wrap_OPQMatrix_M_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24775  PyObject *resultobj = 0;
24776  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24777  int arg2 ;
24778  void *argp1 = 0 ;
24779  int res1 = 0 ;
24780  int val2 ;
24781  int ecode2 = 0 ;
24782  PyObject * obj0 = 0 ;
24783  PyObject * obj1 = 0 ;
24784 
24785  if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_M_set",&obj0,&obj1)) SWIG_fail;
24786  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24787  if (!SWIG_IsOK(res1)) {
24788  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_M_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24789  }
24790  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24791  ecode2 = SWIG_AsVal_int(obj1, &val2);
24792  if (!SWIG_IsOK(ecode2)) {
24793  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_M_set" "', argument " "2"" of type '" "int""'");
24794  }
24795  arg2 = static_cast< int >(val2);
24796  if (arg1) (arg1)->M = arg2;
24797  resultobj = SWIG_Py_Void();
24798  return resultobj;
24799 fail:
24800  return NULL;
24801 }
24802 
24803 
24804 SWIGINTERN PyObject *_wrap_OPQMatrix_M_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24805  PyObject *resultobj = 0;
24806  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24807  void *argp1 = 0 ;
24808  int res1 = 0 ;
24809  PyObject * obj0 = 0 ;
24810  int result;
24811 
24812  if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_M_get",&obj0)) SWIG_fail;
24813  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24814  if (!SWIG_IsOK(res1)) {
24815  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_M_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24816  }
24817  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24818  result = (int) ((arg1)->M);
24819  resultobj = SWIG_From_int(static_cast< int >(result));
24820  return resultobj;
24821 fail:
24822  return NULL;
24823 }
24824 
24825 
24826 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24827  PyObject *resultobj = 0;
24828  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24829  int arg2 ;
24830  void *argp1 = 0 ;
24831  int res1 = 0 ;
24832  int val2 ;
24833  int ecode2 = 0 ;
24834  PyObject * obj0 = 0 ;
24835  PyObject * obj1 = 0 ;
24836 
24837  if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_niter_set",&obj0,&obj1)) SWIG_fail;
24838  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24839  if (!SWIG_IsOK(res1)) {
24840  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24841  }
24842  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24843  ecode2 = SWIG_AsVal_int(obj1, &val2);
24844  if (!SWIG_IsOK(ecode2)) {
24845  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_niter_set" "', argument " "2"" of type '" "int""'");
24846  }
24847  arg2 = static_cast< int >(val2);
24848  if (arg1) (arg1)->niter = arg2;
24849  resultobj = SWIG_Py_Void();
24850  return resultobj;
24851 fail:
24852  return NULL;
24853 }
24854 
24855 
24856 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24857  PyObject *resultobj = 0;
24858  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24859  void *argp1 = 0 ;
24860  int res1 = 0 ;
24861  PyObject * obj0 = 0 ;
24862  int result;
24863 
24864  if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_niter_get",&obj0)) SWIG_fail;
24865  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24866  if (!SWIG_IsOK(res1)) {
24867  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24868  }
24869  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24870  result = (int) ((arg1)->niter);
24871  resultobj = SWIG_From_int(static_cast< int >(result));
24872  return resultobj;
24873 fail:
24874  return NULL;
24875 }
24876 
24877 
24878 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24879  PyObject *resultobj = 0;
24880  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24881  int arg2 ;
24882  void *argp1 = 0 ;
24883  int res1 = 0 ;
24884  int val2 ;
24885  int ecode2 = 0 ;
24886  PyObject * obj0 = 0 ;
24887  PyObject * obj1 = 0 ;
24888 
24889  if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_niter_pq_set",&obj0,&obj1)) SWIG_fail;
24890  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24891  if (!SWIG_IsOK(res1)) {
24892  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24893  }
24894  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24895  ecode2 = SWIG_AsVal_int(obj1, &val2);
24896  if (!SWIG_IsOK(ecode2)) {
24897  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_niter_pq_set" "', argument " "2"" of type '" "int""'");
24898  }
24899  arg2 = static_cast< int >(val2);
24900  if (arg1) (arg1)->niter_pq = arg2;
24901  resultobj = SWIG_Py_Void();
24902  return resultobj;
24903 fail:
24904  return NULL;
24905 }
24906 
24907 
24908 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24909  PyObject *resultobj = 0;
24910  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24911  void *argp1 = 0 ;
24912  int res1 = 0 ;
24913  PyObject * obj0 = 0 ;
24914  int result;
24915 
24916  if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_niter_pq_get",&obj0)) SWIG_fail;
24917  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24918  if (!SWIG_IsOK(res1)) {
24919  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24920  }
24921  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24922  result = (int) ((arg1)->niter_pq);
24923  resultobj = SWIG_From_int(static_cast< int >(result));
24924  return resultobj;
24925 fail:
24926  return NULL;
24927 }
24928 
24929 
24930 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24931  PyObject *resultobj = 0;
24932  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24933  int arg2 ;
24934  void *argp1 = 0 ;
24935  int res1 = 0 ;
24936  int val2 ;
24937  int ecode2 = 0 ;
24938  PyObject * obj0 = 0 ;
24939  PyObject * obj1 = 0 ;
24940 
24941  if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_niter_pq_0_set",&obj0,&obj1)) SWIG_fail;
24942  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24943  if (!SWIG_IsOK(res1)) {
24944  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_0_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24945  }
24946  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24947  ecode2 = SWIG_AsVal_int(obj1, &val2);
24948  if (!SWIG_IsOK(ecode2)) {
24949  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_niter_pq_0_set" "', argument " "2"" of type '" "int""'");
24950  }
24951  arg2 = static_cast< int >(val2);
24952  if (arg1) (arg1)->niter_pq_0 = arg2;
24953  resultobj = SWIG_Py_Void();
24954  return resultobj;
24955 fail:
24956  return NULL;
24957 }
24958 
24959 
24960 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24961  PyObject *resultobj = 0;
24962  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24963  void *argp1 = 0 ;
24964  int res1 = 0 ;
24965  PyObject * obj0 = 0 ;
24966  int result;
24967 
24968  if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_niter_pq_0_get",&obj0)) SWIG_fail;
24969  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24970  if (!SWIG_IsOK(res1)) {
24971  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_0_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24972  }
24973  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24974  result = (int) ((arg1)->niter_pq_0);
24975  resultobj = SWIG_From_int(static_cast< int >(result));
24976  return resultobj;
24977 fail:
24978  return NULL;
24979 }
24980 
24981 
24982 SWIGINTERN PyObject *_wrap_OPQMatrix_max_train_points_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24983  PyObject *resultobj = 0;
24984  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24985  size_t arg2 ;
24986  void *argp1 = 0 ;
24987  int res1 = 0 ;
24988  size_t val2 ;
24989  int ecode2 = 0 ;
24990  PyObject * obj0 = 0 ;
24991  PyObject * obj1 = 0 ;
24992 
24993  if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_max_train_points_set",&obj0,&obj1)) SWIG_fail;
24994  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24995  if (!SWIG_IsOK(res1)) {
24996  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_max_train_points_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24997  }
24998  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24999  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
25000  if (!SWIG_IsOK(ecode2)) {
25001  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_max_train_points_set" "', argument " "2"" of type '" "size_t""'");
25002  }
25003  arg2 = static_cast< size_t >(val2);
25004  if (arg1) (arg1)->max_train_points = arg2;
25005  resultobj = SWIG_Py_Void();
25006  return resultobj;
25007 fail:
25008  return NULL;
25009 }
25010 
25011 
25012 SWIGINTERN PyObject *_wrap_OPQMatrix_max_train_points_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25013  PyObject *resultobj = 0;
25014  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
25015  void *argp1 = 0 ;
25016  int res1 = 0 ;
25017  PyObject * obj0 = 0 ;
25018  size_t result;
25019 
25020  if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_max_train_points_get",&obj0)) SWIG_fail;
25021  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
25022  if (!SWIG_IsOK(res1)) {
25023  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_max_train_points_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25024  }
25025  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
25026  result = (size_t) ((arg1)->max_train_points);
25027  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
25028  return resultobj;
25029 fail:
25030  return NULL;
25031 }
25032 
25033 
25034 SWIGINTERN PyObject *_wrap_OPQMatrix_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25035  PyObject *resultobj = 0;
25036  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
25037  bool arg2 ;
25038  void *argp1 = 0 ;
25039  int res1 = 0 ;
25040  bool val2 ;
25041  int ecode2 = 0 ;
25042  PyObject * obj0 = 0 ;
25043  PyObject * obj1 = 0 ;
25044 
25045  if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_verbose_set",&obj0,&obj1)) SWIG_fail;
25046  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
25047  if (!SWIG_IsOK(res1)) {
25048  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_verbose_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25049  }
25050  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
25051  ecode2 = SWIG_AsVal_bool(obj1, &val2);
25052  if (!SWIG_IsOK(ecode2)) {
25053  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_verbose_set" "', argument " "2"" of type '" "bool""'");
25054  }
25055  arg2 = static_cast< bool >(val2);
25056  if (arg1) (arg1)->verbose = arg2;
25057  resultobj = SWIG_Py_Void();
25058  return resultobj;
25059 fail:
25060  return NULL;
25061 }
25062 
25063 
25064 SWIGINTERN PyObject *_wrap_OPQMatrix_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25065  PyObject *resultobj = 0;
25066  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
25067  void *argp1 = 0 ;
25068  int res1 = 0 ;
25069  PyObject * obj0 = 0 ;
25070  bool result;
25071 
25072  if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_verbose_get",&obj0)) SWIG_fail;
25073  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
25074  if (!SWIG_IsOK(res1)) {
25075  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_verbose_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25076  }
25077  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
25078  result = (bool) ((arg1)->verbose);
25079  resultobj = SWIG_From_bool(static_cast< bool >(result));
25080  return resultobj;
25081 fail:
25082  return NULL;
25083 }
25084 
25085 
25086 SWIGINTERN PyObject *_wrap_OPQMatrix_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25087  PyObject *resultobj = 0;
25088  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
25090  void *argp1 = 0 ;
25091  int res1 = 0 ;
25092  void *argp2 = 0 ;
25093  int res2 = 0 ;
25094  PyObject * obj0 = 0 ;
25095  PyObject * obj1 = 0 ;
25096 
25097  if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_pq_set",&obj0,&obj1)) SWIG_fail;
25098  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
25099  if (!SWIG_IsOK(res1)) {
25100  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_pq_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25101  }
25102  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
25103  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_DISOWN | 0 );
25104  if (!SWIG_IsOK(res2)) {
25105  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPQMatrix_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
25106  }
25107  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
25108  if (arg1) (arg1)->pq = arg2;
25109  resultobj = SWIG_Py_Void();
25110  return resultobj;
25111 fail:
25112  return NULL;
25113 }
25114 
25115 
25116 SWIGINTERN PyObject *_wrap_OPQMatrix_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25117  PyObject *resultobj = 0;
25118  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
25119  void *argp1 = 0 ;
25120  int res1 = 0 ;
25121  PyObject * obj0 = 0 ;
25122  faiss::ProductQuantizer *result = 0 ;
25123 
25124  if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_pq_get",&obj0)) SWIG_fail;
25125  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
25126  if (!SWIG_IsOK(res1)) {
25127  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_pq_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25128  }
25129  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
25130  result = (faiss::ProductQuantizer *) ((arg1)->pq);
25131  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
25132  return resultobj;
25133 fail:
25134  return NULL;
25135 }
25136 
25137 
25138 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25139  PyObject *resultobj = 0;
25140  int arg1 ;
25141  int arg2 ;
25142  int arg3 ;
25143  int val1 ;
25144  int ecode1 = 0 ;
25145  int val2 ;
25146  int ecode2 = 0 ;
25147  int val3 ;
25148  int ecode3 = 0 ;
25149  PyObject * obj0 = 0 ;
25150  PyObject * obj1 = 0 ;
25151  PyObject * obj2 = 0 ;
25152  faiss::OPQMatrix *result = 0 ;
25153 
25154  if (!PyArg_ParseTuple(args,(char *)"OOO:new_OPQMatrix",&obj0,&obj1,&obj2)) SWIG_fail;
25155  ecode1 = SWIG_AsVal_int(obj0, &val1);
25156  if (!SWIG_IsOK(ecode1)) {
25157  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
25158  }
25159  arg1 = static_cast< int >(val1);
25160  ecode2 = SWIG_AsVal_int(obj1, &val2);
25161  if (!SWIG_IsOK(ecode2)) {
25162  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OPQMatrix" "', argument " "2"" of type '" "int""'");
25163  }
25164  arg2 = static_cast< int >(val2);
25165  ecode3 = SWIG_AsVal_int(obj2, &val3);
25166  if (!SWIG_IsOK(ecode3)) {
25167  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OPQMatrix" "', argument " "3"" of type '" "int""'");
25168  }
25169  arg3 = static_cast< int >(val3);
25170  {
25171  Py_BEGIN_ALLOW_THREADS
25172  try {
25173  result = (faiss::OPQMatrix *)new faiss::OPQMatrix(arg1,arg2,arg3);
25174  } catch(faiss::FaissException & e) {
25175  PyEval_RestoreThread(_save);
25176  PyErr_SetString(PyExc_RuntimeError, e.what());
25177  SWIG_fail;
25178  }
25179  Py_END_ALLOW_THREADS
25180  }
25181  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25182  return resultobj;
25183 fail:
25184  return NULL;
25185 }
25186 
25187 
25188 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25189  PyObject *resultobj = 0;
25190  int arg1 ;
25191  int arg2 ;
25192  int val1 ;
25193  int ecode1 = 0 ;
25194  int val2 ;
25195  int ecode2 = 0 ;
25196  PyObject * obj0 = 0 ;
25197  PyObject * obj1 = 0 ;
25198  faiss::OPQMatrix *result = 0 ;
25199 
25200  if (!PyArg_ParseTuple(args,(char *)"OO:new_OPQMatrix",&obj0,&obj1)) SWIG_fail;
25201  ecode1 = SWIG_AsVal_int(obj0, &val1);
25202  if (!SWIG_IsOK(ecode1)) {
25203  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
25204  }
25205  arg1 = static_cast< int >(val1);
25206  ecode2 = SWIG_AsVal_int(obj1, &val2);
25207  if (!SWIG_IsOK(ecode2)) {
25208  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OPQMatrix" "', argument " "2"" of type '" "int""'");
25209  }
25210  arg2 = static_cast< int >(val2);
25211  {
25212  Py_BEGIN_ALLOW_THREADS
25213  try {
25214  result = (faiss::OPQMatrix *)new faiss::OPQMatrix(arg1,arg2);
25215  } catch(faiss::FaissException & e) {
25216  PyEval_RestoreThread(_save);
25217  PyErr_SetString(PyExc_RuntimeError, e.what());
25218  SWIG_fail;
25219  }
25220  Py_END_ALLOW_THREADS
25221  }
25222  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25223  return resultobj;
25224 fail:
25225  return NULL;
25226 }
25227 
25228 
25229 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25230  PyObject *resultobj = 0;
25231  int arg1 ;
25232  int val1 ;
25233  int ecode1 = 0 ;
25234  PyObject * obj0 = 0 ;
25235  faiss::OPQMatrix *result = 0 ;
25236 
25237  if (!PyArg_ParseTuple(args,(char *)"O:new_OPQMatrix",&obj0)) SWIG_fail;
25238  ecode1 = SWIG_AsVal_int(obj0, &val1);
25239  if (!SWIG_IsOK(ecode1)) {
25240  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
25241  }
25242  arg1 = static_cast< int >(val1);
25243  {
25244  Py_BEGIN_ALLOW_THREADS
25245  try {
25246  result = (faiss::OPQMatrix *)new faiss::OPQMatrix(arg1);
25247  } catch(faiss::FaissException & e) {
25248  PyEval_RestoreThread(_save);
25249  PyErr_SetString(PyExc_RuntimeError, e.what());
25250  SWIG_fail;
25251  }
25252  Py_END_ALLOW_THREADS
25253  }
25254  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25255  return resultobj;
25256 fail:
25257  return NULL;
25258 }
25259 
25260 
25261 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25262  PyObject *resultobj = 0;
25263  faiss::OPQMatrix *result = 0 ;
25264 
25265  if (!PyArg_ParseTuple(args,(char *)":new_OPQMatrix")) SWIG_fail;
25266  {
25267  Py_BEGIN_ALLOW_THREADS
25268  try {
25269  result = (faiss::OPQMatrix *)new faiss::OPQMatrix();
25270  } catch(faiss::FaissException & e) {
25271  PyEval_RestoreThread(_save);
25272  PyErr_SetString(PyExc_RuntimeError, e.what());
25273  SWIG_fail;
25274  }
25275  Py_END_ALLOW_THREADS
25276  }
25277  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
25278  return resultobj;
25279 fail:
25280  return NULL;
25281 }
25282 
25283 
25284 SWIGINTERN PyObject *_wrap_new_OPQMatrix(PyObject *self, PyObject *args) {
25285  Py_ssize_t argc;
25286  PyObject *argv[4] = {
25287  0
25288  };
25289  Py_ssize_t ii;
25290 
25291  if (!PyTuple_Check(args)) SWIG_fail;
25292  argc = args ? PyObject_Length(args) : 0;
25293  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
25294  argv[ii] = PyTuple_GET_ITEM(args,ii);
25295  }
25296  if (argc == 0) {
25297  return _wrap_new_OPQMatrix__SWIG_3(self, args);
25298  }
25299  if (argc == 1) {
25300  int _v;
25301  {
25302  int res = SWIG_AsVal_int(argv[0], NULL);
25303  _v = SWIG_CheckState(res);
25304  }
25305  if (_v) {
25306  return _wrap_new_OPQMatrix__SWIG_2(self, args);
25307  }
25308  }
25309  if (argc == 2) {
25310  int _v;
25311  {
25312  int res = SWIG_AsVal_int(argv[0], NULL);
25313  _v = SWIG_CheckState(res);
25314  }
25315  if (_v) {
25316  {
25317  int res = SWIG_AsVal_int(argv[1], NULL);
25318  _v = SWIG_CheckState(res);
25319  }
25320  if (_v) {
25321  return _wrap_new_OPQMatrix__SWIG_1(self, args);
25322  }
25323  }
25324  }
25325  if (argc == 3) {
25326  int _v;
25327  {
25328  int res = SWIG_AsVal_int(argv[0], NULL);
25329  _v = SWIG_CheckState(res);
25330  }
25331  if (_v) {
25332  {
25333  int res = SWIG_AsVal_int(argv[1], NULL);
25334  _v = SWIG_CheckState(res);
25335  }
25336  if (_v) {
25337  {
25338  int res = SWIG_AsVal_int(argv[2], NULL);
25339  _v = SWIG_CheckState(res);
25340  }
25341  if (_v) {
25342  return _wrap_new_OPQMatrix__SWIG_0(self, args);
25343  }
25344  }
25345  }
25346  }
25347 
25348 fail:
25349  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_OPQMatrix'.\n"
25350  " Possible C/C++ prototypes are:\n"
25351  " faiss::OPQMatrix::OPQMatrix(int,int,int)\n"
25352  " faiss::OPQMatrix::OPQMatrix(int,int)\n"
25353  " faiss::OPQMatrix::OPQMatrix(int)\n"
25354  " faiss::OPQMatrix::OPQMatrix()\n");
25355  return 0;
25356 }
25357 
25358 
25359 SWIGINTERN PyObject *_wrap_OPQMatrix_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25360  PyObject *resultobj = 0;
25361  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
25362  faiss::Index::idx_t arg2 ;
25363  float *arg3 = (float *) 0 ;
25364  void *argp1 = 0 ;
25365  int res1 = 0 ;
25366  long val2 ;
25367  int ecode2 = 0 ;
25368  void *argp3 = 0 ;
25369  int res3 = 0 ;
25370  PyObject * obj0 = 0 ;
25371  PyObject * obj1 = 0 ;
25372  PyObject * obj2 = 0 ;
25373 
25374  if (!PyArg_ParseTuple(args,(char *)"OOO:OPQMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
25375  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
25376  if (!SWIG_IsOK(res1)) {
25377  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_train" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25378  }
25379  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
25380  ecode2 = SWIG_AsVal_long(obj1, &val2);
25381  if (!SWIG_IsOK(ecode2)) {
25382  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25383  }
25384  arg2 = static_cast< faiss::Index::idx_t >(val2);
25385  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25386  if (!SWIG_IsOK(res3)) {
25387  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "OPQMatrix_train" "', argument " "3"" of type '" "float const *""'");
25388  }
25389  arg3 = reinterpret_cast< float * >(argp3);
25390  {
25391  Py_BEGIN_ALLOW_THREADS
25392  try {
25393  (arg1)->train(arg2,(float const *)arg3);
25394  } catch(faiss::FaissException & e) {
25395  PyEval_RestoreThread(_save);
25396  PyErr_SetString(PyExc_RuntimeError, e.what());
25397  SWIG_fail;
25398  }
25399  Py_END_ALLOW_THREADS
25400  }
25401  resultobj = SWIG_Py_Void();
25402  return resultobj;
25403 fail:
25404  return NULL;
25405 }
25406 
25407 
25408 SWIGINTERN PyObject *_wrap_delete_OPQMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25409  PyObject *resultobj = 0;
25410  faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
25411  void *argp1 = 0 ;
25412  int res1 = 0 ;
25413  PyObject * obj0 = 0 ;
25414 
25415  if (!PyArg_ParseTuple(args,(char *)"O:delete_OPQMatrix",&obj0)) SWIG_fail;
25416  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_DISOWN | 0 );
25417  if (!SWIG_IsOK(res1)) {
25418  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OPQMatrix" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
25419  }
25420  arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
25421  delete arg1;
25422  resultobj = SWIG_Py_Void();
25423  return resultobj;
25424 fail:
25425  return NULL;
25426 }
25427 
25428 
25429 SWIGINTERN PyObject *OPQMatrix_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25430  PyObject *obj;
25431  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
25432  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OPQMatrix, SWIG_NewClientData(obj));
25433  return SWIG_Py_Void();
25434 }
25435 
25436 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25437  PyObject *resultobj = 0;
25439  std::vector< int > *arg2 = (std::vector< int > *) 0 ;
25440  void *argp1 = 0 ;
25441  int res1 = 0 ;
25442  void *argp2 = 0 ;
25443  int res2 = 0 ;
25444  PyObject * obj0 = 0 ;
25445  PyObject * obj1 = 0 ;
25446 
25447  if (!PyArg_ParseTuple(args,(char *)"OO:RemapDimensionsTransform_map_set",&obj0,&obj1)) SWIG_fail;
25448  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25449  if (!SWIG_IsOK(res1)) {
25450  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_map_set" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
25451  }
25452  arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
25453  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
25454  if (!SWIG_IsOK(res2)) {
25455  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemapDimensionsTransform_map_set" "', argument " "2"" of type '" "std::vector< int > *""'");
25456  }
25457  arg2 = reinterpret_cast< std::vector< int > * >(argp2);
25458  if (arg1) (arg1)->map = *arg2;
25459  resultobj = SWIG_Py_Void();
25460  return resultobj;
25461 fail:
25462  return NULL;
25463 }
25464 
25465 
25466 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25467  PyObject *resultobj = 0;
25469  void *argp1 = 0 ;
25470  int res1 = 0 ;
25471  PyObject * obj0 = 0 ;
25472  std::vector< int > *result = 0 ;
25473 
25474  if (!PyArg_ParseTuple(args,(char *)"O:RemapDimensionsTransform_map_get",&obj0)) SWIG_fail;
25475  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25476  if (!SWIG_IsOK(res1)) {
25477  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_map_get" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
25478  }
25479  arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
25480  result = (std::vector< int > *)& ((arg1)->map);
25481  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
25482  return resultobj;
25483 fail:
25484  return NULL;
25485 }
25486 
25487 
25488 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25489  PyObject *resultobj = 0;
25490  int arg1 ;
25491  int arg2 ;
25492  int *arg3 = (int *) 0 ;
25493  int val1 ;
25494  int ecode1 = 0 ;
25495  int val2 ;
25496  int ecode2 = 0 ;
25497  void *argp3 = 0 ;
25498  int res3 = 0 ;
25499  PyObject * obj0 = 0 ;
25500  PyObject * obj1 = 0 ;
25501  PyObject * obj2 = 0 ;
25502  faiss::RemapDimensionsTransform *result = 0 ;
25503 
25504  if (!PyArg_ParseTuple(args,(char *)"OOO:new_RemapDimensionsTransform",&obj0,&obj1,&obj2)) SWIG_fail;
25505  ecode1 = SWIG_AsVal_int(obj0, &val1);
25506  if (!SWIG_IsOK(ecode1)) {
25507  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
25508  }
25509  arg1 = static_cast< int >(val1);
25510  ecode2 = SWIG_AsVal_int(obj1, &val2);
25511  if (!SWIG_IsOK(ecode2)) {
25512  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
25513  }
25514  arg2 = static_cast< int >(val2);
25515  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
25516  if (!SWIG_IsOK(res3)) {
25517  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RemapDimensionsTransform" "', argument " "3"" of type '" "int const *""'");
25518  }
25519  arg3 = reinterpret_cast< int * >(argp3);
25520  {
25521  Py_BEGIN_ALLOW_THREADS
25522  try {
25523  result = (faiss::RemapDimensionsTransform *)new faiss::RemapDimensionsTransform(arg1,arg2,(int const *)arg3);
25524  } catch(faiss::FaissException & e) {
25525  PyEval_RestoreThread(_save);
25526  PyErr_SetString(PyExc_RuntimeError, e.what());
25527  SWIG_fail;
25528  }
25529  Py_END_ALLOW_THREADS
25530  }
25531  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25532  return resultobj;
25533 fail:
25534  return NULL;
25535 }
25536 
25537 
25538 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25539  PyObject *resultobj = 0;
25540  int arg1 ;
25541  int arg2 ;
25542  bool arg3 ;
25543  int val1 ;
25544  int ecode1 = 0 ;
25545  int val2 ;
25546  int ecode2 = 0 ;
25547  bool val3 ;
25548  int ecode3 = 0 ;
25549  PyObject * obj0 = 0 ;
25550  PyObject * obj1 = 0 ;
25551  PyObject * obj2 = 0 ;
25552  faiss::RemapDimensionsTransform *result = 0 ;
25553 
25554  if (!PyArg_ParseTuple(args,(char *)"OOO:new_RemapDimensionsTransform",&obj0,&obj1,&obj2)) SWIG_fail;
25555  ecode1 = SWIG_AsVal_int(obj0, &val1);
25556  if (!SWIG_IsOK(ecode1)) {
25557  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
25558  }
25559  arg1 = static_cast< int >(val1);
25560  ecode2 = SWIG_AsVal_int(obj1, &val2);
25561  if (!SWIG_IsOK(ecode2)) {
25562  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
25563  }
25564  arg2 = static_cast< int >(val2);
25565  ecode3 = SWIG_AsVal_bool(obj2, &val3);
25566  if (!SWIG_IsOK(ecode3)) {
25567  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_RemapDimensionsTransform" "', argument " "3"" of type '" "bool""'");
25568  }
25569  arg3 = static_cast< bool >(val3);
25570  {
25571  Py_BEGIN_ALLOW_THREADS
25572  try {
25573  result = (faiss::RemapDimensionsTransform *)new faiss::RemapDimensionsTransform(arg1,arg2,arg3);
25574  } catch(faiss::FaissException & e) {
25575  PyEval_RestoreThread(_save);
25576  PyErr_SetString(PyExc_RuntimeError, e.what());
25577  SWIG_fail;
25578  }
25579  Py_END_ALLOW_THREADS
25580  }
25581  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25582  return resultobj;
25583 fail:
25584  return NULL;
25585 }
25586 
25587 
25588 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25589  PyObject *resultobj = 0;
25590  int arg1 ;
25591  int arg2 ;
25592  int val1 ;
25593  int ecode1 = 0 ;
25594  int val2 ;
25595  int ecode2 = 0 ;
25596  PyObject * obj0 = 0 ;
25597  PyObject * obj1 = 0 ;
25598  faiss::RemapDimensionsTransform *result = 0 ;
25599 
25600  if (!PyArg_ParseTuple(args,(char *)"OO:new_RemapDimensionsTransform",&obj0,&obj1)) SWIG_fail;
25601  ecode1 = SWIG_AsVal_int(obj0, &val1);
25602  if (!SWIG_IsOK(ecode1)) {
25603  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
25604  }
25605  arg1 = static_cast< int >(val1);
25606  ecode2 = SWIG_AsVal_int(obj1, &val2);
25607  if (!SWIG_IsOK(ecode2)) {
25608  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
25609  }
25610  arg2 = static_cast< int >(val2);
25611  {
25612  Py_BEGIN_ALLOW_THREADS
25613  try {
25615  } catch(faiss::FaissException & e) {
25616  PyEval_RestoreThread(_save);
25617  PyErr_SetString(PyExc_RuntimeError, e.what());
25618  SWIG_fail;
25619  }
25620  Py_END_ALLOW_THREADS
25621  }
25622  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25623  return resultobj;
25624 fail:
25625  return NULL;
25626 }
25627 
25628 
25629 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25630  PyObject *resultobj = 0;
25632  faiss::VectorTransform::idx_t arg2 ;
25633  float *arg3 = (float *) 0 ;
25634  float *arg4 = (float *) 0 ;
25635  void *argp1 = 0 ;
25636  int res1 = 0 ;
25637  long val2 ;
25638  int ecode2 = 0 ;
25639  void *argp3 = 0 ;
25640  int res3 = 0 ;
25641  void *argp4 = 0 ;
25642  int res4 = 0 ;
25643  PyObject * obj0 = 0 ;
25644  PyObject * obj1 = 0 ;
25645  PyObject * obj2 = 0 ;
25646  PyObject * obj3 = 0 ;
25647 
25648  if (!PyArg_ParseTuple(args,(char *)"OOOO:RemapDimensionsTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
25649  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25650  if (!SWIG_IsOK(res1)) {
25651  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform const *""'");
25652  }
25653  arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
25654  ecode2 = SWIG_AsVal_long(obj1, &val2);
25655  if (!SWIG_IsOK(ecode2)) {
25656  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
25657  }
25658  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
25659  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25660  if (!SWIG_IsOK(res3)) {
25661  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
25662  }
25663  arg3 = reinterpret_cast< float * >(argp3);
25664  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
25665  if (!SWIG_IsOK(res4)) {
25666  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
25667  }
25668  arg4 = reinterpret_cast< float * >(argp4);
25669  {
25670  Py_BEGIN_ALLOW_THREADS
25671  try {
25672  ((faiss::RemapDimensionsTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
25673  } catch(faiss::FaissException & e) {
25674  PyEval_RestoreThread(_save);
25675  PyErr_SetString(PyExc_RuntimeError, e.what());
25676  SWIG_fail;
25677  }
25678  Py_END_ALLOW_THREADS
25679  }
25680  resultobj = SWIG_Py_Void();
25681  return resultobj;
25682 fail:
25683  return NULL;
25684 }
25685 
25686 
25687 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25688  PyObject *resultobj = 0;
25690  faiss::VectorTransform::idx_t arg2 ;
25691  float *arg3 = (float *) 0 ;
25692  float *arg4 = (float *) 0 ;
25693  void *argp1 = 0 ;
25694  int res1 = 0 ;
25695  long val2 ;
25696  int ecode2 = 0 ;
25697  void *argp3 = 0 ;
25698  int res3 = 0 ;
25699  void *argp4 = 0 ;
25700  int res4 = 0 ;
25701  PyObject * obj0 = 0 ;
25702  PyObject * obj1 = 0 ;
25703  PyObject * obj2 = 0 ;
25704  PyObject * obj3 = 0 ;
25705 
25706  if (!PyArg_ParseTuple(args,(char *)"OOOO:RemapDimensionsTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
25707  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
25708  if (!SWIG_IsOK(res1)) {
25709  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform const *""'");
25710  }
25711  arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
25712  ecode2 = SWIG_AsVal_long(obj1, &val2);
25713  if (!SWIG_IsOK(ecode2)) {
25714  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
25715  }
25716  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
25717  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25718  if (!SWIG_IsOK(res3)) {
25719  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
25720  }
25721  arg3 = reinterpret_cast< float * >(argp3);
25722  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
25723  if (!SWIG_IsOK(res4)) {
25724  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
25725  }
25726  arg4 = reinterpret_cast< float * >(argp4);
25727  {
25728  Py_BEGIN_ALLOW_THREADS
25729  try {
25730  ((faiss::RemapDimensionsTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
25731  } catch(faiss::FaissException & e) {
25732  PyEval_RestoreThread(_save);
25733  PyErr_SetString(PyExc_RuntimeError, e.what());
25734  SWIG_fail;
25735  }
25736  Py_END_ALLOW_THREADS
25737  }
25738  resultobj = SWIG_Py_Void();
25739  return resultobj;
25740 fail:
25741  return NULL;
25742 }
25743 
25744 
25745 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25746  PyObject *resultobj = 0;
25747  faiss::RemapDimensionsTransform *result = 0 ;
25748 
25749  if (!PyArg_ParseTuple(args,(char *)":new_RemapDimensionsTransform")) SWIG_fail;
25750  {
25751  Py_BEGIN_ALLOW_THREADS
25752  try {
25754  } catch(faiss::FaissException & e) {
25755  PyEval_RestoreThread(_save);
25756  PyErr_SetString(PyExc_RuntimeError, e.what());
25757  SWIG_fail;
25758  }
25759  Py_END_ALLOW_THREADS
25760  }
25761  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
25762  return resultobj;
25763 fail:
25764  return NULL;
25765 }
25766 
25767 
25768 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform(PyObject *self, PyObject *args) {
25769  Py_ssize_t argc;
25770  PyObject *argv[4] = {
25771  0
25772  };
25773  Py_ssize_t ii;
25774 
25775  if (!PyTuple_Check(args)) SWIG_fail;
25776  argc = args ? PyObject_Length(args) : 0;
25777  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
25778  argv[ii] = PyTuple_GET_ITEM(args,ii);
25779  }
25780  if (argc == 0) {
25781  return _wrap_new_RemapDimensionsTransform__SWIG_3(self, args);
25782  }
25783  if (argc == 2) {
25784  int _v;
25785  {
25786  int res = SWIG_AsVal_int(argv[0], NULL);
25787  _v = SWIG_CheckState(res);
25788  }
25789  if (_v) {
25790  {
25791  int res = SWIG_AsVal_int(argv[1], NULL);
25792  _v = SWIG_CheckState(res);
25793  }
25794  if (_v) {
25795  return _wrap_new_RemapDimensionsTransform__SWIG_2(self, args);
25796  }
25797  }
25798  }
25799  if (argc == 3) {
25800  int _v;
25801  {
25802  int res = SWIG_AsVal_int(argv[0], NULL);
25803  _v = SWIG_CheckState(res);
25804  }
25805  if (_v) {
25806  {
25807  int res = SWIG_AsVal_int(argv[1], NULL);
25808  _v = SWIG_CheckState(res);
25809  }
25810  if (_v) {
25811  void *vptr = 0;
25812  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
25813  _v = SWIG_CheckState(res);
25814  if (_v) {
25815  return _wrap_new_RemapDimensionsTransform__SWIG_0(self, args);
25816  }
25817  }
25818  }
25819  }
25820  if (argc == 3) {
25821  int _v;
25822  {
25823  int res = SWIG_AsVal_int(argv[0], NULL);
25824  _v = SWIG_CheckState(res);
25825  }
25826  if (_v) {
25827  {
25828  int res = SWIG_AsVal_int(argv[1], NULL);
25829  _v = SWIG_CheckState(res);
25830  }
25831  if (_v) {
25832  {
25833  int res = SWIG_AsVal_bool(argv[2], NULL);
25834  _v = SWIG_CheckState(res);
25835  }
25836  if (_v) {
25837  return _wrap_new_RemapDimensionsTransform__SWIG_1(self, args);
25838  }
25839  }
25840  }
25841  }
25842 
25843 fail:
25844  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RemapDimensionsTransform'.\n"
25845  " Possible C/C++ prototypes are:\n"
25846  " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int,int const *)\n"
25847  " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int,bool)\n"
25848  " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int)\n"
25849  " faiss::RemapDimensionsTransform::RemapDimensionsTransform()\n");
25850  return 0;
25851 }
25852 
25853 
25854 SWIGINTERN PyObject *_wrap_delete_RemapDimensionsTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25855  PyObject *resultobj = 0;
25857  void *argp1 = 0 ;
25858  int res1 = 0 ;
25859  PyObject * obj0 = 0 ;
25860 
25861  if (!PyArg_ParseTuple(args,(char *)"O:delete_RemapDimensionsTransform",&obj0)) SWIG_fail;
25862  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_DISOWN | 0 );
25863  if (!SWIG_IsOK(res1)) {
25864  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RemapDimensionsTransform" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
25865  }
25866  arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
25867  delete arg1;
25868  resultobj = SWIG_Py_Void();
25869  return resultobj;
25870 fail:
25871  return NULL;
25872 }
25873 
25874 
25875 SWIGINTERN PyObject *RemapDimensionsTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25876  PyObject *obj;
25877  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
25878  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_NewClientData(obj));
25879  return SWIG_Py_Void();
25880 }
25881 
25882 SWIGINTERN PyObject *_wrap_NormalizationTransform_norm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25883  PyObject *resultobj = 0;
25885  float arg2 ;
25886  void *argp1 = 0 ;
25887  int res1 = 0 ;
25888  float val2 ;
25889  int ecode2 = 0 ;
25890  PyObject * obj0 = 0 ;
25891  PyObject * obj1 = 0 ;
25892 
25893  if (!PyArg_ParseTuple(args,(char *)"OO:NormalizationTransform_norm_set",&obj0,&obj1)) SWIG_fail;
25894  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
25895  if (!SWIG_IsOK(res1)) {
25896  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_norm_set" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
25897  }
25898  arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
25899  ecode2 = SWIG_AsVal_float(obj1, &val2);
25900  if (!SWIG_IsOK(ecode2)) {
25901  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalizationTransform_norm_set" "', argument " "2"" of type '" "float""'");
25902  }
25903  arg2 = static_cast< float >(val2);
25904  if (arg1) (arg1)->norm = arg2;
25905  resultobj = SWIG_Py_Void();
25906  return resultobj;
25907 fail:
25908  return NULL;
25909 }
25910 
25911 
25912 SWIGINTERN PyObject *_wrap_NormalizationTransform_norm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25913  PyObject *resultobj = 0;
25915  void *argp1 = 0 ;
25916  int res1 = 0 ;
25917  PyObject * obj0 = 0 ;
25918  float result;
25919 
25920  if (!PyArg_ParseTuple(args,(char *)"O:NormalizationTransform_norm_get",&obj0)) SWIG_fail;
25921  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
25922  if (!SWIG_IsOK(res1)) {
25923  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_norm_get" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
25924  }
25925  arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
25926  result = (float) ((arg1)->norm);
25927  resultobj = SWIG_From_float(static_cast< float >(result));
25928  return resultobj;
25929 fail:
25930  return NULL;
25931 }
25932 
25933 
25934 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25935  PyObject *resultobj = 0;
25936  int arg1 ;
25937  float arg2 ;
25938  int val1 ;
25939  int ecode1 = 0 ;
25940  float val2 ;
25941  int ecode2 = 0 ;
25942  PyObject * obj0 = 0 ;
25943  PyObject * obj1 = 0 ;
25944  faiss::NormalizationTransform *result = 0 ;
25945 
25946  if (!PyArg_ParseTuple(args,(char *)"OO:new_NormalizationTransform",&obj0,&obj1)) SWIG_fail;
25947  ecode1 = SWIG_AsVal_int(obj0, &val1);
25948  if (!SWIG_IsOK(ecode1)) {
25949  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NormalizationTransform" "', argument " "1"" of type '" "int""'");
25950  }
25951  arg1 = static_cast< int >(val1);
25952  ecode2 = SWIG_AsVal_float(obj1, &val2);
25953  if (!SWIG_IsOK(ecode2)) {
25954  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NormalizationTransform" "', argument " "2"" of type '" "float""'");
25955  }
25956  arg2 = static_cast< float >(val2);
25957  {
25958  Py_BEGIN_ALLOW_THREADS
25959  try {
25961  } catch(faiss::FaissException & e) {
25962  PyEval_RestoreThread(_save);
25963  PyErr_SetString(PyExc_RuntimeError, e.what());
25964  SWIG_fail;
25965  }
25966  Py_END_ALLOW_THREADS
25967  }
25968  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
25969  return resultobj;
25970 fail:
25971  return NULL;
25972 }
25973 
25974 
25975 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25976  PyObject *resultobj = 0;
25977  int arg1 ;
25978  int val1 ;
25979  int ecode1 = 0 ;
25980  PyObject * obj0 = 0 ;
25981  faiss::NormalizationTransform *result = 0 ;
25982 
25983  if (!PyArg_ParseTuple(args,(char *)"O:new_NormalizationTransform",&obj0)) SWIG_fail;
25984  ecode1 = SWIG_AsVal_int(obj0, &val1);
25985  if (!SWIG_IsOK(ecode1)) {
25986  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NormalizationTransform" "', argument " "1"" of type '" "int""'");
25987  }
25988  arg1 = static_cast< int >(val1);
25989  {
25990  Py_BEGIN_ALLOW_THREADS
25991  try {
25993  } catch(faiss::FaissException & e) {
25994  PyEval_RestoreThread(_save);
25995  PyErr_SetString(PyExc_RuntimeError, e.what());
25996  SWIG_fail;
25997  }
25998  Py_END_ALLOW_THREADS
25999  }
26000  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
26001  return resultobj;
26002 fail:
26003  return NULL;
26004 }
26005 
26006 
26007 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26008  PyObject *resultobj = 0;
26009  faiss::NormalizationTransform *result = 0 ;
26010 
26011  if (!PyArg_ParseTuple(args,(char *)":new_NormalizationTransform")) SWIG_fail;
26012  {
26013  Py_BEGIN_ALLOW_THREADS
26014  try {
26016  } catch(faiss::FaissException & e) {
26017  PyEval_RestoreThread(_save);
26018  PyErr_SetString(PyExc_RuntimeError, e.what());
26019  SWIG_fail;
26020  }
26021  Py_END_ALLOW_THREADS
26022  }
26023  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
26024  return resultobj;
26025 fail:
26026  return NULL;
26027 }
26028 
26029 
26030 SWIGINTERN PyObject *_wrap_new_NormalizationTransform(PyObject *self, PyObject *args) {
26031  Py_ssize_t argc;
26032  PyObject *argv[3] = {
26033  0
26034  };
26035  Py_ssize_t ii;
26036 
26037  if (!PyTuple_Check(args)) SWIG_fail;
26038  argc = args ? PyObject_Length(args) : 0;
26039  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
26040  argv[ii] = PyTuple_GET_ITEM(args,ii);
26041  }
26042  if (argc == 0) {
26043  return _wrap_new_NormalizationTransform__SWIG_2(self, args);
26044  }
26045  if (argc == 1) {
26046  int _v;
26047  {
26048  int res = SWIG_AsVal_int(argv[0], NULL);
26049  _v = SWIG_CheckState(res);
26050  }
26051  if (_v) {
26052  return _wrap_new_NormalizationTransform__SWIG_1(self, args);
26053  }
26054  }
26055  if (argc == 2) {
26056  int _v;
26057  {
26058  int res = SWIG_AsVal_int(argv[0], NULL);
26059  _v = SWIG_CheckState(res);
26060  }
26061  if (_v) {
26062  {
26063  int res = SWIG_AsVal_float(argv[1], NULL);
26064  _v = SWIG_CheckState(res);
26065  }
26066  if (_v) {
26067  return _wrap_new_NormalizationTransform__SWIG_0(self, args);
26068  }
26069  }
26070  }
26071 
26072 fail:
26073  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NormalizationTransform'.\n"
26074  " Possible C/C++ prototypes are:\n"
26075  " faiss::NormalizationTransform::NormalizationTransform(int,float)\n"
26076  " faiss::NormalizationTransform::NormalizationTransform(int)\n"
26077  " faiss::NormalizationTransform::NormalizationTransform()\n");
26078  return 0;
26079 }
26080 
26081 
26082 SWIGINTERN PyObject *_wrap_NormalizationTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26083  PyObject *resultobj = 0;
26085  faiss::VectorTransform::idx_t arg2 ;
26086  float *arg3 = (float *) 0 ;
26087  float *arg4 = (float *) 0 ;
26088  void *argp1 = 0 ;
26089  int res1 = 0 ;
26090  long val2 ;
26091  int ecode2 = 0 ;
26092  void *argp3 = 0 ;
26093  int res3 = 0 ;
26094  void *argp4 = 0 ;
26095  int res4 = 0 ;
26096  PyObject * obj0 = 0 ;
26097  PyObject * obj1 = 0 ;
26098  PyObject * obj2 = 0 ;
26099  PyObject * obj3 = 0 ;
26100 
26101  if (!PyArg_ParseTuple(args,(char *)"OOOO:NormalizationTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26102  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
26103  if (!SWIG_IsOK(res1)) {
26104  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::NormalizationTransform const *""'");
26105  }
26106  arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
26107  ecode2 = SWIG_AsVal_long(obj1, &val2);
26108  if (!SWIG_IsOK(ecode2)) {
26109  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
26110  }
26111  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
26112  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26113  if (!SWIG_IsOK(res3)) {
26114  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
26115  }
26116  arg3 = reinterpret_cast< float * >(argp3);
26117  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
26118  if (!SWIG_IsOK(res4)) {
26119  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
26120  }
26121  arg4 = reinterpret_cast< float * >(argp4);
26122  {
26123  Py_BEGIN_ALLOW_THREADS
26124  try {
26125  ((faiss::NormalizationTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
26126  } catch(faiss::FaissException & e) {
26127  PyEval_RestoreThread(_save);
26128  PyErr_SetString(PyExc_RuntimeError, e.what());
26129  SWIG_fail;
26130  }
26131  Py_END_ALLOW_THREADS
26132  }
26133  resultobj = SWIG_Py_Void();
26134  return resultobj;
26135 fail:
26136  return NULL;
26137 }
26138 
26139 
26140 SWIGINTERN PyObject *_wrap_NormalizationTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26141  PyObject *resultobj = 0;
26143  faiss::VectorTransform::idx_t arg2 ;
26144  float *arg3 = (float *) 0 ;
26145  float *arg4 = (float *) 0 ;
26146  void *argp1 = 0 ;
26147  int res1 = 0 ;
26148  long val2 ;
26149  int ecode2 = 0 ;
26150  void *argp3 = 0 ;
26151  int res3 = 0 ;
26152  void *argp4 = 0 ;
26153  int res4 = 0 ;
26154  PyObject * obj0 = 0 ;
26155  PyObject * obj1 = 0 ;
26156  PyObject * obj2 = 0 ;
26157  PyObject * obj3 = 0 ;
26158 
26159  if (!PyArg_ParseTuple(args,(char *)"OOOO:NormalizationTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26160  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
26161  if (!SWIG_IsOK(res1)) {
26162  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_reverse_transform" "', argument " "1"" of type '" "faiss::NormalizationTransform const *""'");
26163  }
26164  arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
26165  ecode2 = SWIG_AsVal_long(obj1, &val2);
26166  if (!SWIG_IsOK(ecode2)) {
26167  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalizationTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
26168  }
26169  arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
26170  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26171  if (!SWIG_IsOK(res3)) {
26172  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NormalizationTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
26173  }
26174  arg3 = reinterpret_cast< float * >(argp3);
26175  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
26176  if (!SWIG_IsOK(res4)) {
26177  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "NormalizationTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
26178  }
26179  arg4 = reinterpret_cast< float * >(argp4);
26180  {
26181  Py_BEGIN_ALLOW_THREADS
26182  try {
26183  ((faiss::NormalizationTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
26184  } catch(faiss::FaissException & e) {
26185  PyEval_RestoreThread(_save);
26186  PyErr_SetString(PyExc_RuntimeError, e.what());
26187  SWIG_fail;
26188  }
26189  Py_END_ALLOW_THREADS
26190  }
26191  resultobj = SWIG_Py_Void();
26192  return resultobj;
26193 fail:
26194  return NULL;
26195 }
26196 
26197 
26198 SWIGINTERN PyObject *_wrap_delete_NormalizationTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26199  PyObject *resultobj = 0;
26201  void *argp1 = 0 ;
26202  int res1 = 0 ;
26203  PyObject * obj0 = 0 ;
26204 
26205  if (!PyArg_ParseTuple(args,(char *)"O:delete_NormalizationTransform",&obj0)) SWIG_fail;
26206  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_DISOWN | 0 );
26207  if (!SWIG_IsOK(res1)) {
26208  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NormalizationTransform" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
26209  }
26210  arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
26211  delete arg1;
26212  resultobj = SWIG_Py_Void();
26213  return resultobj;
26214 fail:
26215  return NULL;
26216 }
26217 
26218 
26219 SWIGINTERN PyObject *NormalizationTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26220  PyObject *obj;
26221  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
26222  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__NormalizationTransform, SWIG_NewClientData(obj));
26223  return SWIG_Py_Void();
26224 }
26225 
26226 SWIGINTERN PyObject *_wrap_IndexPreTransform_chain_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26227  PyObject *resultobj = 0;
26229  std::vector< faiss::VectorTransform * > *arg2 = (std::vector< faiss::VectorTransform * > *) 0 ;
26230  void *argp1 = 0 ;
26231  int res1 = 0 ;
26232  void *argp2 = 0 ;
26233  int res2 = 0 ;
26234  PyObject * obj0 = 0 ;
26235  PyObject * obj1 = 0 ;
26236 
26237  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_chain_set",&obj0,&obj1)) SWIG_fail;
26238  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26239  if (!SWIG_IsOK(res1)) {
26240  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_chain_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26241  }
26242  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26243  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
26244  if (!SWIG_IsOK(res2)) {
26245  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_chain_set" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > *""'");
26246  }
26247  arg2 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp2);
26248  if (arg1) (arg1)->chain = *arg2;
26249  resultobj = SWIG_Py_Void();
26250  return resultobj;
26251 fail:
26252  return NULL;
26253 }
26254 
26255 
26256 SWIGINTERN PyObject *_wrap_IndexPreTransform_chain_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26257  PyObject *resultobj = 0;
26259  void *argp1 = 0 ;
26260  int res1 = 0 ;
26261  PyObject * obj0 = 0 ;
26262  std::vector< faiss::VectorTransform * > *result = 0 ;
26263 
26264  if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_chain_get",&obj0)) SWIG_fail;
26265  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26266  if (!SWIG_IsOK(res1)) {
26267  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_chain_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26268  }
26269  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26270  result = (std::vector< faiss::VectorTransform * > *)& ((arg1)->chain);
26271  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
26272  return resultobj;
26273 fail:
26274  return NULL;
26275 }
26276 
26277 
26278 SWIGINTERN PyObject *_wrap_IndexPreTransform_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26279  PyObject *resultobj = 0;
26281  faiss::Index *arg2 = (faiss::Index *) 0 ;
26282  void *argp1 = 0 ;
26283  int res1 = 0 ;
26284  void *argp2 = 0 ;
26285  int res2 = 0 ;
26286  PyObject * obj0 = 0 ;
26287  PyObject * obj1 = 0 ;
26288 
26289  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_index_set",&obj0,&obj1)) SWIG_fail;
26290  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26291  if (!SWIG_IsOK(res1)) {
26292  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_index_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26293  }
26294  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26295  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
26296  if (!SWIG_IsOK(res2)) {
26297  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
26298  }
26299  arg2 = reinterpret_cast< faiss::Index * >(argp2);
26300  if (arg1) (arg1)->index = arg2;
26301  resultobj = SWIG_Py_Void();
26302  return resultobj;
26303 fail:
26304  return NULL;
26305 }
26306 
26307 
26308 SWIGINTERN PyObject *_wrap_IndexPreTransform_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26309  PyObject *resultobj = 0;
26311  void *argp1 = 0 ;
26312  int res1 = 0 ;
26313  PyObject * obj0 = 0 ;
26314  faiss::Index *result = 0 ;
26315 
26316  if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_index_get",&obj0)) SWIG_fail;
26317  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26318  if (!SWIG_IsOK(res1)) {
26319  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_index_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26320  }
26321  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26322  result = (faiss::Index *) ((arg1)->index);
26323  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
26324  return resultobj;
26325 fail:
26326  return NULL;
26327 }
26328 
26329 
26330 SWIGINTERN PyObject *_wrap_IndexPreTransform_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26331  PyObject *resultobj = 0;
26333  bool arg2 ;
26334  void *argp1 = 0 ;
26335  int res1 = 0 ;
26336  bool val2 ;
26337  int ecode2 = 0 ;
26338  PyObject * obj0 = 0 ;
26339  PyObject * obj1 = 0 ;
26340 
26341  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_own_fields_set",&obj0,&obj1)) SWIG_fail;
26342  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26343  if (!SWIG_IsOK(res1)) {
26344  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_own_fields_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26345  }
26346  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26347  ecode2 = SWIG_AsVal_bool(obj1, &val2);
26348  if (!SWIG_IsOK(ecode2)) {
26349  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_own_fields_set" "', argument " "2"" of type '" "bool""'");
26350  }
26351  arg2 = static_cast< bool >(val2);
26352  if (arg1) (arg1)->own_fields = arg2;
26353  resultobj = SWIG_Py_Void();
26354  return resultobj;
26355 fail:
26356  return NULL;
26357 }
26358 
26359 
26360 SWIGINTERN PyObject *_wrap_IndexPreTransform_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26361  PyObject *resultobj = 0;
26363  void *argp1 = 0 ;
26364  int res1 = 0 ;
26365  PyObject * obj0 = 0 ;
26366  bool result;
26367 
26368  if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_own_fields_get",&obj0)) SWIG_fail;
26369  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26370  if (!SWIG_IsOK(res1)) {
26371  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_own_fields_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26372  }
26373  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26374  result = (bool) ((arg1)->own_fields);
26375  resultobj = SWIG_From_bool(static_cast< bool >(result));
26376  return resultobj;
26377 fail:
26378  return NULL;
26379 }
26380 
26381 
26382 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26383  PyObject *resultobj = 0;
26384  faiss::Index *arg1 = (faiss::Index *) 0 ;
26385  void *argp1 = 0 ;
26386  int res1 = 0 ;
26387  PyObject * obj0 = 0 ;
26388  faiss::IndexPreTransform *result = 0 ;
26389 
26390  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexPreTransform",&obj0)) SWIG_fail;
26391  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
26392  if (!SWIG_IsOK(res1)) {
26393  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexPreTransform" "', argument " "1"" of type '" "faiss::Index *""'");
26394  }
26395  arg1 = reinterpret_cast< faiss::Index * >(argp1);
26396  {
26397  Py_BEGIN_ALLOW_THREADS
26398  try {
26399  result = (faiss::IndexPreTransform *)new faiss::IndexPreTransform(arg1);
26400  } catch(faiss::FaissException & e) {
26401  PyEval_RestoreThread(_save);
26402  PyErr_SetString(PyExc_RuntimeError, e.what());
26403  SWIG_fail;
26404  }
26405  Py_END_ALLOW_THREADS
26406  }
26407  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
26408  return resultobj;
26409 fail:
26410  return NULL;
26411 }
26412 
26413 
26414 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26415  PyObject *resultobj = 0;
26416  faiss::IndexPreTransform *result = 0 ;
26417 
26418  if (!PyArg_ParseTuple(args,(char *)":new_IndexPreTransform")) SWIG_fail;
26419  {
26420  Py_BEGIN_ALLOW_THREADS
26421  try {
26423  } catch(faiss::FaissException & e) {
26424  PyEval_RestoreThread(_save);
26425  PyErr_SetString(PyExc_RuntimeError, e.what());
26426  SWIG_fail;
26427  }
26428  Py_END_ALLOW_THREADS
26429  }
26430  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
26431  return resultobj;
26432 fail:
26433  return NULL;
26434 }
26435 
26436 
26437 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26438  PyObject *resultobj = 0;
26440  faiss::Index *arg2 = (faiss::Index *) 0 ;
26441  void *argp1 = 0 ;
26442  int res1 = 0 ;
26443  void *argp2 = 0 ;
26444  int res2 = 0 ;
26445  PyObject * obj0 = 0 ;
26446  PyObject * obj1 = 0 ;
26447  faiss::IndexPreTransform *result = 0 ;
26448 
26449  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexPreTransform",&obj0,&obj1)) SWIG_fail;
26450  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
26451  if (!SWIG_IsOK(res1)) {
26452  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexPreTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
26453  }
26454  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
26455  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
26456  if (!SWIG_IsOK(res2)) {
26457  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IndexPreTransform" "', argument " "2"" of type '" "faiss::Index *""'");
26458  }
26459  arg2 = reinterpret_cast< faiss::Index * >(argp2);
26460  {
26461  Py_BEGIN_ALLOW_THREADS
26462  try {
26463  result = (faiss::IndexPreTransform *)new faiss::IndexPreTransform(arg1,arg2);
26464  } catch(faiss::FaissException & e) {
26465  PyEval_RestoreThread(_save);
26466  PyErr_SetString(PyExc_RuntimeError, e.what());
26467  SWIG_fail;
26468  }
26469  Py_END_ALLOW_THREADS
26470  }
26471  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
26472  return resultobj;
26473 fail:
26474  return NULL;
26475 }
26476 
26477 
26478 SWIGINTERN PyObject *_wrap_new_IndexPreTransform(PyObject *self, PyObject *args) {
26479  Py_ssize_t argc;
26480  PyObject *argv[3] = {
26481  0
26482  };
26483  Py_ssize_t ii;
26484 
26485  if (!PyTuple_Check(args)) SWIG_fail;
26486  argc = args ? PyObject_Length(args) : 0;
26487  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
26488  argv[ii] = PyTuple_GET_ITEM(args,ii);
26489  }
26490  if (argc == 0) {
26491  return _wrap_new_IndexPreTransform__SWIG_1(self, args);
26492  }
26493  if (argc == 1) {
26494  int _v;
26495  void *vptr = 0;
26496  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
26497  _v = SWIG_CheckState(res);
26498  if (_v) {
26499  return _wrap_new_IndexPreTransform__SWIG_0(self, args);
26500  }
26501  }
26502  if (argc == 2) {
26503  int _v;
26504  void *vptr = 0;
26505  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__VectorTransform, 0);
26506  _v = SWIG_CheckState(res);
26507  if (_v) {
26508  void *vptr = 0;
26509  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__Index, 0);
26510  _v = SWIG_CheckState(res);
26511  if (_v) {
26512  return _wrap_new_IndexPreTransform__SWIG_2(self, args);
26513  }
26514  }
26515  }
26516 
26517 fail:
26518  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexPreTransform'.\n"
26519  " Possible C/C++ prototypes are:\n"
26520  " faiss::IndexPreTransform::IndexPreTransform(faiss::Index *)\n"
26521  " faiss::IndexPreTransform::IndexPreTransform()\n"
26522  " faiss::IndexPreTransform::IndexPreTransform(faiss::VectorTransform *,faiss::Index *)\n");
26523  return 0;
26524 }
26525 
26526 
26527 SWIGINTERN PyObject *_wrap_IndexPreTransform_prepend_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26528  PyObject *resultobj = 0;
26531  void *argp1 = 0 ;
26532  int res1 = 0 ;
26533  void *argp2 = 0 ;
26534  int res2 = 0 ;
26535  PyObject * obj0 = 0 ;
26536  PyObject * obj1 = 0 ;
26537 
26538  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_prepend_transform",&obj0,&obj1)) SWIG_fail;
26539  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26540  if (!SWIG_IsOK(res1)) {
26541  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_prepend_transform" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26542  }
26543  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26544  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
26545  if (!SWIG_IsOK(res2)) {
26546  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_prepend_transform" "', argument " "2"" of type '" "faiss::VectorTransform *""'");
26547  }
26548  arg2 = reinterpret_cast< faiss::VectorTransform * >(argp2);
26549  {
26550  Py_BEGIN_ALLOW_THREADS
26551  try {
26552  (arg1)->prepend_transform(arg2);
26553  } catch(faiss::FaissException & e) {
26554  PyEval_RestoreThread(_save);
26555  PyErr_SetString(PyExc_RuntimeError, e.what());
26556  SWIG_fail;
26557  }
26558  Py_END_ALLOW_THREADS
26559  }
26560  resultobj = SWIG_Py_Void();
26561  return resultobj;
26562 fail:
26563  return NULL;
26564 }
26565 
26566 
26567 SWIGINTERN PyObject *_wrap_IndexPreTransform_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26568  PyObject *resultobj = 0;
26570  faiss::Index::idx_t arg2 ;
26571  float *arg3 = (float *) 0 ;
26572  void *argp1 = 0 ;
26573  int res1 = 0 ;
26574  long val2 ;
26575  int ecode2 = 0 ;
26576  void *argp3 = 0 ;
26577  int res3 = 0 ;
26578  PyObject * obj0 = 0 ;
26579  PyObject * obj1 = 0 ;
26580  PyObject * obj2 = 0 ;
26581 
26582  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_train",&obj0,&obj1,&obj2)) SWIG_fail;
26583  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26584  if (!SWIG_IsOK(res1)) {
26585  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_train" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26586  }
26587  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26588  ecode2 = SWIG_AsVal_long(obj1, &val2);
26589  if (!SWIG_IsOK(ecode2)) {
26590  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26591  }
26592  arg2 = static_cast< faiss::Index::idx_t >(val2);
26593  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26594  if (!SWIG_IsOK(res3)) {
26595  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_train" "', argument " "3"" of type '" "float const *""'");
26596  }
26597  arg3 = reinterpret_cast< float * >(argp3);
26598  {
26599  Py_BEGIN_ALLOW_THREADS
26600  try {
26601  (arg1)->train(arg2,(float const *)arg3);
26602  } catch(faiss::FaissException & e) {
26603  PyEval_RestoreThread(_save);
26604  PyErr_SetString(PyExc_RuntimeError, e.what());
26605  SWIG_fail;
26606  }
26607  Py_END_ALLOW_THREADS
26608  }
26609  resultobj = SWIG_Py_Void();
26610  return resultobj;
26611 fail:
26612  return NULL;
26613 }
26614 
26615 
26616 SWIGINTERN PyObject *_wrap_IndexPreTransform_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26617  PyObject *resultobj = 0;
26619  faiss::Index::idx_t arg2 ;
26620  float *arg3 = (float *) 0 ;
26621  void *argp1 = 0 ;
26622  int res1 = 0 ;
26623  long val2 ;
26624  int ecode2 = 0 ;
26625  void *argp3 = 0 ;
26626  int res3 = 0 ;
26627  PyObject * obj0 = 0 ;
26628  PyObject * obj1 = 0 ;
26629  PyObject * obj2 = 0 ;
26630 
26631  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_add",&obj0,&obj1,&obj2)) SWIG_fail;
26632  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26633  if (!SWIG_IsOK(res1)) {
26634  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_add" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26635  }
26636  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26637  ecode2 = SWIG_AsVal_long(obj1, &val2);
26638  if (!SWIG_IsOK(ecode2)) {
26639  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26640  }
26641  arg2 = static_cast< faiss::Index::idx_t >(val2);
26642  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26643  if (!SWIG_IsOK(res3)) {
26644  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_add" "', argument " "3"" of type '" "float const *""'");
26645  }
26646  arg3 = reinterpret_cast< float * >(argp3);
26647  {
26648  Py_BEGIN_ALLOW_THREADS
26649  try {
26650  (arg1)->add(arg2,(float const *)arg3);
26651  } catch(faiss::FaissException & e) {
26652  PyEval_RestoreThread(_save);
26653  PyErr_SetString(PyExc_RuntimeError, e.what());
26654  SWIG_fail;
26655  }
26656  Py_END_ALLOW_THREADS
26657  }
26658  resultobj = SWIG_Py_Void();
26659  return resultobj;
26660 fail:
26661  return NULL;
26662 }
26663 
26664 
26665 SWIGINTERN PyObject *_wrap_IndexPreTransform_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26666  PyObject *resultobj = 0;
26668  faiss::Index::idx_t arg2 ;
26669  float *arg3 = (float *) 0 ;
26670  long *arg4 = (long *) 0 ;
26671  void *argp1 = 0 ;
26672  int res1 = 0 ;
26673  long val2 ;
26674  int ecode2 = 0 ;
26675  void *argp3 = 0 ;
26676  int res3 = 0 ;
26677  void *argp4 = 0 ;
26678  int res4 = 0 ;
26679  PyObject * obj0 = 0 ;
26680  PyObject * obj1 = 0 ;
26681  PyObject * obj2 = 0 ;
26682  PyObject * obj3 = 0 ;
26683 
26684  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPreTransform_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26685  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26686  if (!SWIG_IsOK(res1)) {
26687  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_add_with_ids" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26688  }
26689  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26690  ecode2 = SWIG_AsVal_long(obj1, &val2);
26691  if (!SWIG_IsOK(ecode2)) {
26692  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26693  }
26694  arg2 = static_cast< faiss::Index::idx_t >(val2);
26695  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26696  if (!SWIG_IsOK(res3)) {
26697  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_add_with_ids" "', argument " "3"" of type '" "float const *""'");
26698  }
26699  arg3 = reinterpret_cast< float * >(argp3);
26700  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
26701  if (!SWIG_IsOK(res4)) {
26702  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPreTransform_add_with_ids" "', argument " "4"" of type '" "long const *""'");
26703  }
26704  arg4 = reinterpret_cast< long * >(argp4);
26705  {
26706  Py_BEGIN_ALLOW_THREADS
26707  try {
26708  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
26709  } catch(faiss::FaissException & e) {
26710  PyEval_RestoreThread(_save);
26711  PyErr_SetString(PyExc_RuntimeError, e.what());
26712  SWIG_fail;
26713  }
26714  Py_END_ALLOW_THREADS
26715  }
26716  resultobj = SWIG_Py_Void();
26717  return resultobj;
26718 fail:
26719  return NULL;
26720 }
26721 
26722 
26723 SWIGINTERN PyObject *_wrap_IndexPreTransform_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26724  PyObject *resultobj = 0;
26726  void *argp1 = 0 ;
26727  int res1 = 0 ;
26728  PyObject * obj0 = 0 ;
26729 
26730  if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_reset",&obj0)) SWIG_fail;
26731  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26732  if (!SWIG_IsOK(res1)) {
26733  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reset" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26734  }
26735  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26736  {
26737  Py_BEGIN_ALLOW_THREADS
26738  try {
26739  (arg1)->reset();
26740  } catch(faiss::FaissException & e) {
26741  PyEval_RestoreThread(_save);
26742  PyErr_SetString(PyExc_RuntimeError, e.what());
26743  SWIG_fail;
26744  }
26745  Py_END_ALLOW_THREADS
26746  }
26747  resultobj = SWIG_Py_Void();
26748  return resultobj;
26749 fail:
26750  return NULL;
26751 }
26752 
26753 
26754 SWIGINTERN PyObject *_wrap_IndexPreTransform_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26755  PyObject *resultobj = 0;
26757  faiss::IDSelector *arg2 = 0 ;
26758  void *argp1 = 0 ;
26759  int res1 = 0 ;
26760  void *argp2 = 0 ;
26761  int res2 = 0 ;
26762  PyObject * obj0 = 0 ;
26763  PyObject * obj1 = 0 ;
26764  long result;
26765 
26766  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_remove_ids",&obj0,&obj1)) SWIG_fail;
26767  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26768  if (!SWIG_IsOK(res1)) {
26769  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_remove_ids" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
26770  }
26771  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26772  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
26773  if (!SWIG_IsOK(res2)) {
26774  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
26775  }
26776  if (!argp2) {
26777  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexPreTransform_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
26778  }
26779  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
26780  {
26781  Py_BEGIN_ALLOW_THREADS
26782  try {
26783  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
26784  } catch(faiss::FaissException & e) {
26785  PyEval_RestoreThread(_save);
26786  PyErr_SetString(PyExc_RuntimeError, e.what());
26787  SWIG_fail;
26788  }
26789  Py_END_ALLOW_THREADS
26790  }
26791  resultobj = SWIG_From_long(static_cast< long >(result));
26792  return resultobj;
26793 fail:
26794  return NULL;
26795 }
26796 
26797 
26798 SWIGINTERN PyObject *_wrap_IndexPreTransform_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26799  PyObject *resultobj = 0;
26801  faiss::Index::idx_t arg2 ;
26802  float *arg3 = (float *) 0 ;
26803  faiss::Index::idx_t arg4 ;
26804  float *arg5 = (float *) 0 ;
26806  void *argp1 = 0 ;
26807  int res1 = 0 ;
26808  long val2 ;
26809  int ecode2 = 0 ;
26810  void *argp3 = 0 ;
26811  int res3 = 0 ;
26812  long val4 ;
26813  int ecode4 = 0 ;
26814  void *argp5 = 0 ;
26815  int res5 = 0 ;
26816  void *argp6 = 0 ;
26817  int res6 = 0 ;
26818  PyObject * obj0 = 0 ;
26819  PyObject * obj1 = 0 ;
26820  PyObject * obj2 = 0 ;
26821  PyObject * obj3 = 0 ;
26822  PyObject * obj4 = 0 ;
26823  PyObject * obj5 = 0 ;
26824 
26825  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPreTransform_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
26826  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26827  if (!SWIG_IsOK(res1)) {
26828  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_search" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
26829  }
26830  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26831  ecode2 = SWIG_AsVal_long(obj1, &val2);
26832  if (!SWIG_IsOK(ecode2)) {
26833  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26834  }
26835  arg2 = static_cast< faiss::Index::idx_t >(val2);
26836  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26837  if (!SWIG_IsOK(res3)) {
26838  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_search" "', argument " "3"" of type '" "float const *""'");
26839  }
26840  arg3 = reinterpret_cast< float * >(argp3);
26841  ecode4 = SWIG_AsVal_long(obj3, &val4);
26842  if (!SWIG_IsOK(ecode4)) {
26843  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPreTransform_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
26844  }
26845  arg4 = static_cast< faiss::Index::idx_t >(val4);
26846  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
26847  if (!SWIG_IsOK(res5)) {
26848  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPreTransform_search" "', argument " "5"" of type '" "float *""'");
26849  }
26850  arg5 = reinterpret_cast< float * >(argp5);
26851  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
26852  if (!SWIG_IsOK(res6)) {
26853  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPreTransform_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
26854  }
26855  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
26856  {
26857  Py_BEGIN_ALLOW_THREADS
26858  try {
26859  ((faiss::IndexPreTransform const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
26860  } catch(faiss::FaissException & e) {
26861  PyEval_RestoreThread(_save);
26862  PyErr_SetString(PyExc_RuntimeError, e.what());
26863  SWIG_fail;
26864  }
26865  Py_END_ALLOW_THREADS
26866  }
26867  resultobj = SWIG_Py_Void();
26868  return resultobj;
26869 fail:
26870  return NULL;
26871 }
26872 
26873 
26874 SWIGINTERN PyObject *_wrap_IndexPreTransform_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26875  PyObject *resultobj = 0;
26877  faiss::Index::idx_t arg2 ;
26878  float *arg3 = (float *) 0 ;
26879  void *argp1 = 0 ;
26880  int res1 = 0 ;
26881  long val2 ;
26882  int ecode2 = 0 ;
26883  void *argp3 = 0 ;
26884  int res3 = 0 ;
26885  PyObject * obj0 = 0 ;
26886  PyObject * obj1 = 0 ;
26887  PyObject * obj2 = 0 ;
26888 
26889  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
26890  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26891  if (!SWIG_IsOK(res1)) {
26892  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reconstruct" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
26893  }
26894  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26895  ecode2 = SWIG_AsVal_long(obj1, &val2);
26896  if (!SWIG_IsOK(ecode2)) {
26897  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26898  }
26899  arg2 = static_cast< faiss::Index::idx_t >(val2);
26900  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26901  if (!SWIG_IsOK(res3)) {
26902  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_reconstruct" "', argument " "3"" of type '" "float *""'");
26903  }
26904  arg3 = reinterpret_cast< float * >(argp3);
26905  {
26906  Py_BEGIN_ALLOW_THREADS
26907  try {
26908  ((faiss::IndexPreTransform const *)arg1)->reconstruct(arg2,arg3);
26909  } catch(faiss::FaissException & e) {
26910  PyEval_RestoreThread(_save);
26911  PyErr_SetString(PyExc_RuntimeError, e.what());
26912  SWIG_fail;
26913  }
26914  Py_END_ALLOW_THREADS
26915  }
26916  resultobj = SWIG_Py_Void();
26917  return resultobj;
26918 fail:
26919  return NULL;
26920 }
26921 
26922 
26923 SWIGINTERN PyObject *_wrap_IndexPreTransform_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26924  PyObject *resultobj = 0;
26926  faiss::Index::idx_t arg2 ;
26927  faiss::Index::idx_t arg3 ;
26928  float *arg4 = (float *) 0 ;
26929  void *argp1 = 0 ;
26930  int res1 = 0 ;
26931  long val2 ;
26932  int ecode2 = 0 ;
26933  long val3 ;
26934  int ecode3 = 0 ;
26935  void *argp4 = 0 ;
26936  int res4 = 0 ;
26937  PyObject * obj0 = 0 ;
26938  PyObject * obj1 = 0 ;
26939  PyObject * obj2 = 0 ;
26940  PyObject * obj3 = 0 ;
26941 
26942  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPreTransform_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
26943  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
26944  if (!SWIG_IsOK(res1)) {
26945  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
26946  }
26947  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
26948  ecode2 = SWIG_AsVal_long(obj1, &val2);
26949  if (!SWIG_IsOK(ecode2)) {
26950  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26951  }
26952  arg2 = static_cast< faiss::Index::idx_t >(val2);
26953  ecode3 = SWIG_AsVal_long(obj2, &val3);
26954  if (!SWIG_IsOK(ecode3)) {
26955  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
26956  }
26957  arg3 = static_cast< faiss::Index::idx_t >(val3);
26958  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
26959  if (!SWIG_IsOK(res4)) {
26960  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "4"" of type '" "float *""'");
26961  }
26962  arg4 = reinterpret_cast< float * >(argp4);
26963  {
26964  Py_BEGIN_ALLOW_THREADS
26965  try {
26966  ((faiss::IndexPreTransform const *)arg1)->reconstruct_n(arg2,arg3,arg4);
26967  } catch(faiss::FaissException & e) {
26968  PyEval_RestoreThread(_save);
26969  PyErr_SetString(PyExc_RuntimeError, e.what());
26970  SWIG_fail;
26971  }
26972  Py_END_ALLOW_THREADS
26973  }
26974  resultobj = SWIG_Py_Void();
26975  return resultobj;
26976 fail:
26977  return NULL;
26978 }
26979 
26980 
26981 SWIGINTERN PyObject *_wrap_IndexPreTransform_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26982  PyObject *resultobj = 0;
26984  faiss::Index::idx_t arg2 ;
26985  float *arg3 = (float *) 0 ;
26986  faiss::Index::idx_t arg4 ;
26987  float *arg5 = (float *) 0 ;
26989  float *arg7 = (float *) 0 ;
26990  void *argp1 = 0 ;
26991  int res1 = 0 ;
26992  long val2 ;
26993  int ecode2 = 0 ;
26994  void *argp3 = 0 ;
26995  int res3 = 0 ;
26996  long val4 ;
26997  int ecode4 = 0 ;
26998  void *argp5 = 0 ;
26999  int res5 = 0 ;
27000  void *argp6 = 0 ;
27001  int res6 = 0 ;
27002  void *argp7 = 0 ;
27003  int res7 = 0 ;
27004  PyObject * obj0 = 0 ;
27005  PyObject * obj1 = 0 ;
27006  PyObject * obj2 = 0 ;
27007  PyObject * obj3 = 0 ;
27008  PyObject * obj4 = 0 ;
27009  PyObject * obj5 = 0 ;
27010  PyObject * obj6 = 0 ;
27011 
27012  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexPreTransform_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
27013  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27014  if (!SWIG_IsOK(res1)) {
27015  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27016  }
27017  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
27018  ecode2 = SWIG_AsVal_long(obj1, &val2);
27019  if (!SWIG_IsOK(ecode2)) {
27020  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27021  }
27022  arg2 = static_cast< faiss::Index::idx_t >(val2);
27023  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27024  if (!SWIG_IsOK(res3)) {
27025  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
27026  }
27027  arg3 = reinterpret_cast< float * >(argp3);
27028  ecode4 = SWIG_AsVal_long(obj3, &val4);
27029  if (!SWIG_IsOK(ecode4)) {
27030  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27031  }
27032  arg4 = static_cast< faiss::Index::idx_t >(val4);
27033  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27034  if (!SWIG_IsOK(res5)) {
27035  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
27036  }
27037  arg5 = reinterpret_cast< float * >(argp5);
27038  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27039  if (!SWIG_IsOK(res6)) {
27040  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
27041  }
27042  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
27043  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
27044  if (!SWIG_IsOK(res7)) {
27045  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
27046  }
27047  arg7 = reinterpret_cast< float * >(argp7);
27048  {
27049  Py_BEGIN_ALLOW_THREADS
27050  try {
27051  ((faiss::IndexPreTransform const *)arg1)->search_and_reconstruct(arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
27052  } catch(faiss::FaissException & e) {
27053  PyEval_RestoreThread(_save);
27054  PyErr_SetString(PyExc_RuntimeError, e.what());
27055  SWIG_fail;
27056  }
27057  Py_END_ALLOW_THREADS
27058  }
27059  resultobj = SWIG_Py_Void();
27060  return resultobj;
27061 fail:
27062  return NULL;
27063 }
27064 
27065 
27066 SWIGINTERN PyObject *_wrap_IndexPreTransform_apply_chain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27067  PyObject *resultobj = 0;
27069  faiss::Index::idx_t arg2 ;
27070  float *arg3 = (float *) 0 ;
27071  void *argp1 = 0 ;
27072  int res1 = 0 ;
27073  long val2 ;
27074  int ecode2 = 0 ;
27075  void *argp3 = 0 ;
27076  int res3 = 0 ;
27077  PyObject * obj0 = 0 ;
27078  PyObject * obj1 = 0 ;
27079  PyObject * obj2 = 0 ;
27080  float *result = 0 ;
27081 
27082  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_apply_chain",&obj0,&obj1,&obj2)) SWIG_fail;
27083  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27084  if (!SWIG_IsOK(res1)) {
27085  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_apply_chain" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27086  }
27087  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
27088  ecode2 = SWIG_AsVal_long(obj1, &val2);
27089  if (!SWIG_IsOK(ecode2)) {
27090  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_apply_chain" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27091  }
27092  arg2 = static_cast< faiss::Index::idx_t >(val2);
27093  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27094  if (!SWIG_IsOK(res3)) {
27095  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_apply_chain" "', argument " "3"" of type '" "float const *""'");
27096  }
27097  arg3 = reinterpret_cast< float * >(argp3);
27098  {
27099  Py_BEGIN_ALLOW_THREADS
27100  try {
27101  result = (float *)((faiss::IndexPreTransform const *)arg1)->apply_chain(arg2,(float const *)arg3);
27102  } catch(faiss::FaissException & e) {
27103  PyEval_RestoreThread(_save);
27104  PyErr_SetString(PyExc_RuntimeError, e.what());
27105  SWIG_fail;
27106  }
27107  Py_END_ALLOW_THREADS
27108  }
27109  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
27110  return resultobj;
27111 fail:
27112  return NULL;
27113 }
27114 
27115 
27116 SWIGINTERN PyObject *_wrap_IndexPreTransform_reverse_chain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27117  PyObject *resultobj = 0;
27119  faiss::Index::idx_t arg2 ;
27120  float *arg3 = (float *) 0 ;
27121  float *arg4 = (float *) 0 ;
27122  void *argp1 = 0 ;
27123  int res1 = 0 ;
27124  long val2 ;
27125  int ecode2 = 0 ;
27126  void *argp3 = 0 ;
27127  int res3 = 0 ;
27128  void *argp4 = 0 ;
27129  int res4 = 0 ;
27130  PyObject * obj0 = 0 ;
27131  PyObject * obj1 = 0 ;
27132  PyObject * obj2 = 0 ;
27133  PyObject * obj3 = 0 ;
27134 
27135  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPreTransform_reverse_chain",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
27136  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
27137  if (!SWIG_IsOK(res1)) {
27138  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reverse_chain" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
27139  }
27140  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
27141  ecode2 = SWIG_AsVal_long(obj1, &val2);
27142  if (!SWIG_IsOK(ecode2)) {
27143  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_reverse_chain" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27144  }
27145  arg2 = static_cast< faiss::Index::idx_t >(val2);
27146  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27147  if (!SWIG_IsOK(res3)) {
27148  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_reverse_chain" "', argument " "3"" of type '" "float const *""'");
27149  }
27150  arg3 = reinterpret_cast< float * >(argp3);
27151  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
27152  if (!SWIG_IsOK(res4)) {
27153  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPreTransform_reverse_chain" "', argument " "4"" of type '" "float *""'");
27154  }
27155  arg4 = reinterpret_cast< float * >(argp4);
27156  {
27157  Py_BEGIN_ALLOW_THREADS
27158  try {
27159  ((faiss::IndexPreTransform const *)arg1)->reverse_chain(arg2,(float const *)arg3,arg4);
27160  } catch(faiss::FaissException & e) {
27161  PyEval_RestoreThread(_save);
27162  PyErr_SetString(PyExc_RuntimeError, e.what());
27163  SWIG_fail;
27164  }
27165  Py_END_ALLOW_THREADS
27166  }
27167  resultobj = SWIG_Py_Void();
27168  return resultobj;
27169 fail:
27170  return NULL;
27171 }
27172 
27173 
27174 SWIGINTERN PyObject *_wrap_delete_IndexPreTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27175  PyObject *resultobj = 0;
27177  void *argp1 = 0 ;
27178  int res1 = 0 ;
27179  PyObject * obj0 = 0 ;
27180 
27181  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexPreTransform",&obj0)) SWIG_fail;
27182  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_DISOWN | 0 );
27183  if (!SWIG_IsOK(res1)) {
27184  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexPreTransform" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
27185  }
27186  arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
27187  {
27188  Py_BEGIN_ALLOW_THREADS
27189  try {
27190  delete arg1;
27191  } catch(faiss::FaissException & e) {
27192  PyEval_RestoreThread(_save);
27193  PyErr_SetString(PyExc_RuntimeError, e.what());
27194  SWIG_fail;
27195  }
27196  Py_END_ALLOW_THREADS
27197  }
27198  resultobj = SWIG_Py_Void();
27199  return resultobj;
27200 fail:
27201  return NULL;
27202 }
27203 
27204 
27205 SWIGINTERN PyObject *IndexPreTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27206  PyObject *obj;
27207  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
27208  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexPreTransform, SWIG_NewClientData(obj));
27209  return SWIG_Py_Void();
27210 }
27211 
27212 SWIGINTERN PyObject *_wrap_IndexFlat_xb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27213  PyObject *resultobj = 0;
27214  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27215  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
27216  void *argp1 = 0 ;
27217  int res1 = 0 ;
27218  void *argp2 = 0 ;
27219  int res2 = 0 ;
27220  PyObject * obj0 = 0 ;
27221  PyObject * obj1 = 0 ;
27222 
27223  if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat_xb_set",&obj0,&obj1)) SWIG_fail;
27224  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27225  if (!SWIG_IsOK(res1)) {
27226  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_xb_set" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27227  }
27228  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27229  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
27230  if (!SWIG_IsOK(res2)) {
27231  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlat_xb_set" "', argument " "2"" of type '" "std::vector< float > *""'");
27232  }
27233  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
27234  if (arg1) (arg1)->xb = *arg2;
27235  resultobj = SWIG_Py_Void();
27236  return resultobj;
27237 fail:
27238  return NULL;
27239 }
27240 
27241 
27242 SWIGINTERN PyObject *_wrap_IndexFlat_xb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27243  PyObject *resultobj = 0;
27244  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27245  void *argp1 = 0 ;
27246  int res1 = 0 ;
27247  PyObject * obj0 = 0 ;
27248  std::vector< float > *result = 0 ;
27249 
27250  if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat_xb_get",&obj0)) SWIG_fail;
27251  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27252  if (!SWIG_IsOK(res1)) {
27253  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_xb_get" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27254  }
27255  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27256  result = (std::vector< float > *)& ((arg1)->xb);
27257  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
27258  return resultobj;
27259 fail:
27260  return NULL;
27261 }
27262 
27263 
27264 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27265  PyObject *resultobj = 0;
27266  faiss::Index::idx_t arg1 ;
27267  faiss::MetricType arg2 ;
27268  long val1 ;
27269  int ecode1 = 0 ;
27270  int val2 ;
27271  int ecode2 = 0 ;
27272  PyObject * obj0 = 0 ;
27273  PyObject * obj1 = 0 ;
27274  faiss::IndexFlat *result = 0 ;
27275 
27276  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexFlat",&obj0,&obj1)) SWIG_fail;
27277  ecode1 = SWIG_AsVal_long(obj0, &val1);
27278  if (!SWIG_IsOK(ecode1)) {
27279  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlat" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
27280  }
27281  arg1 = static_cast< faiss::Index::idx_t >(val1);
27282  ecode2 = SWIG_AsVal_int(obj1, &val2);
27283  if (!SWIG_IsOK(ecode2)) {
27284  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexFlat" "', argument " "2"" of type '" "faiss::MetricType""'");
27285  }
27286  arg2 = static_cast< faiss::MetricType >(val2);
27287  {
27288  Py_BEGIN_ALLOW_THREADS
27289  try {
27290  result = (faiss::IndexFlat *)new faiss::IndexFlat(arg1,arg2);
27291  } catch(faiss::FaissException & e) {
27292  PyEval_RestoreThread(_save);
27293  PyErr_SetString(PyExc_RuntimeError, e.what());
27294  SWIG_fail;
27295  }
27296  Py_END_ALLOW_THREADS
27297  }
27298  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
27299  return resultobj;
27300 fail:
27301  return NULL;
27302 }
27303 
27304 
27305 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27306  PyObject *resultobj = 0;
27307  faiss::Index::idx_t arg1 ;
27308  long val1 ;
27309  int ecode1 = 0 ;
27310  PyObject * obj0 = 0 ;
27311  faiss::IndexFlat *result = 0 ;
27312 
27313  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlat",&obj0)) SWIG_fail;
27314  ecode1 = SWIG_AsVal_long(obj0, &val1);
27315  if (!SWIG_IsOK(ecode1)) {
27316  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlat" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
27317  }
27318  arg1 = static_cast< faiss::Index::idx_t >(val1);
27319  {
27320  Py_BEGIN_ALLOW_THREADS
27321  try {
27322  result = (faiss::IndexFlat *)new faiss::IndexFlat(arg1);
27323  } catch(faiss::FaissException & e) {
27324  PyEval_RestoreThread(_save);
27325  PyErr_SetString(PyExc_RuntimeError, e.what());
27326  SWIG_fail;
27327  }
27328  Py_END_ALLOW_THREADS
27329  }
27330  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
27331  return resultobj;
27332 fail:
27333  return NULL;
27334 }
27335 
27336 
27337 SWIGINTERN PyObject *_wrap_IndexFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27338  PyObject *resultobj = 0;
27339  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27340  faiss::Index::idx_t arg2 ;
27341  float *arg3 = (float *) 0 ;
27342  void *argp1 = 0 ;
27343  int res1 = 0 ;
27344  long val2 ;
27345  int ecode2 = 0 ;
27346  void *argp3 = 0 ;
27347  int res3 = 0 ;
27348  PyObject * obj0 = 0 ;
27349  PyObject * obj1 = 0 ;
27350  PyObject * obj2 = 0 ;
27351 
27352  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
27353  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27354  if (!SWIG_IsOK(res1)) {
27355  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_add" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27356  }
27357  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27358  ecode2 = SWIG_AsVal_long(obj1, &val2);
27359  if (!SWIG_IsOK(ecode2)) {
27360  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27361  }
27362  arg2 = static_cast< faiss::Index::idx_t >(val2);
27363  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27364  if (!SWIG_IsOK(res3)) {
27365  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_add" "', argument " "3"" of type '" "float const *""'");
27366  }
27367  arg3 = reinterpret_cast< float * >(argp3);
27368  {
27369  Py_BEGIN_ALLOW_THREADS
27370  try {
27371  (arg1)->add(arg2,(float const *)arg3);
27372  } catch(faiss::FaissException & e) {
27373  PyEval_RestoreThread(_save);
27374  PyErr_SetString(PyExc_RuntimeError, e.what());
27375  SWIG_fail;
27376  }
27377  Py_END_ALLOW_THREADS
27378  }
27379  resultobj = SWIG_Py_Void();
27380  return resultobj;
27381 fail:
27382  return NULL;
27383 }
27384 
27385 
27386 SWIGINTERN PyObject *_wrap_IndexFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27387  PyObject *resultobj = 0;
27388  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27389  void *argp1 = 0 ;
27390  int res1 = 0 ;
27391  PyObject * obj0 = 0 ;
27392 
27393  if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat_reset",&obj0)) SWIG_fail;
27394  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27395  if (!SWIG_IsOK(res1)) {
27396  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_reset" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27397  }
27398  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27399  {
27400  Py_BEGIN_ALLOW_THREADS
27401  try {
27402  (arg1)->reset();
27403  } catch(faiss::FaissException & e) {
27404  PyEval_RestoreThread(_save);
27405  PyErr_SetString(PyExc_RuntimeError, e.what());
27406  SWIG_fail;
27407  }
27408  Py_END_ALLOW_THREADS
27409  }
27410  resultobj = SWIG_Py_Void();
27411  return resultobj;
27412 fail:
27413  return NULL;
27414 }
27415 
27416 
27417 SWIGINTERN PyObject *_wrap_IndexFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27418  PyObject *resultobj = 0;
27419  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27420  faiss::Index::idx_t arg2 ;
27421  float *arg3 = (float *) 0 ;
27422  faiss::Index::idx_t arg4 ;
27423  float *arg5 = (float *) 0 ;
27425  void *argp1 = 0 ;
27426  int res1 = 0 ;
27427  long val2 ;
27428  int ecode2 = 0 ;
27429  void *argp3 = 0 ;
27430  int res3 = 0 ;
27431  long val4 ;
27432  int ecode4 = 0 ;
27433  void *argp5 = 0 ;
27434  int res5 = 0 ;
27435  void *argp6 = 0 ;
27436  int res6 = 0 ;
27437  PyObject * obj0 = 0 ;
27438  PyObject * obj1 = 0 ;
27439  PyObject * obj2 = 0 ;
27440  PyObject * obj3 = 0 ;
27441  PyObject * obj4 = 0 ;
27442  PyObject * obj5 = 0 ;
27443 
27444  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
27445  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27446  if (!SWIG_IsOK(res1)) {
27447  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_search" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
27448  }
27449  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27450  ecode2 = SWIG_AsVal_long(obj1, &val2);
27451  if (!SWIG_IsOK(ecode2)) {
27452  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27453  }
27454  arg2 = static_cast< faiss::Index::idx_t >(val2);
27455  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27456  if (!SWIG_IsOK(res3)) {
27457  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_search" "', argument " "3"" of type '" "float const *""'");
27458  }
27459  arg3 = reinterpret_cast< float * >(argp3);
27460  ecode4 = SWIG_AsVal_long(obj3, &val4);
27461  if (!SWIG_IsOK(ecode4)) {
27462  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27463  }
27464  arg4 = static_cast< faiss::Index::idx_t >(val4);
27465  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27466  if (!SWIG_IsOK(res5)) {
27467  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat_search" "', argument " "5"" of type '" "float *""'");
27468  }
27469  arg5 = reinterpret_cast< float * >(argp5);
27470  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27471  if (!SWIG_IsOK(res6)) {
27472  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlat_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
27473  }
27474  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
27475  {
27476  Py_BEGIN_ALLOW_THREADS
27477  try {
27478  ((faiss::IndexFlat const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
27479  } catch(faiss::FaissException & e) {
27480  PyEval_RestoreThread(_save);
27481  PyErr_SetString(PyExc_RuntimeError, e.what());
27482  SWIG_fail;
27483  }
27484  Py_END_ALLOW_THREADS
27485  }
27486  resultobj = SWIG_Py_Void();
27487  return resultobj;
27488 fail:
27489  return NULL;
27490 }
27491 
27492 
27493 SWIGINTERN PyObject *_wrap_IndexFlat_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27494  PyObject *resultobj = 0;
27495  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27496  faiss::Index::idx_t arg2 ;
27497  float *arg3 = (float *) 0 ;
27498  float arg4 ;
27500  void *argp1 = 0 ;
27501  int res1 = 0 ;
27502  long val2 ;
27503  int ecode2 = 0 ;
27504  void *argp3 = 0 ;
27505  int res3 = 0 ;
27506  float val4 ;
27507  int ecode4 = 0 ;
27508  void *argp5 = 0 ;
27509  int res5 = 0 ;
27510  PyObject * obj0 = 0 ;
27511  PyObject * obj1 = 0 ;
27512  PyObject * obj2 = 0 ;
27513  PyObject * obj3 = 0 ;
27514  PyObject * obj4 = 0 ;
27515 
27516  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexFlat_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
27517  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27518  if (!SWIG_IsOK(res1)) {
27519  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_range_search" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
27520  }
27521  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27522  ecode2 = SWIG_AsVal_long(obj1, &val2);
27523  if (!SWIG_IsOK(ecode2)) {
27524  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27525  }
27526  arg2 = static_cast< faiss::Index::idx_t >(val2);
27527  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27528  if (!SWIG_IsOK(res3)) {
27529  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_range_search" "', argument " "3"" of type '" "float const *""'");
27530  }
27531  arg3 = reinterpret_cast< float * >(argp3);
27532  ecode4 = SWIG_AsVal_float(obj3, &val4);
27533  if (!SWIG_IsOK(ecode4)) {
27534  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat_range_search" "', argument " "4"" of type '" "float""'");
27535  }
27536  arg4 = static_cast< float >(val4);
27537  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
27538  if (!SWIG_IsOK(res5)) {
27539  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
27540  }
27541  arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
27542  {
27543  Py_BEGIN_ALLOW_THREADS
27544  try {
27545  ((faiss::IndexFlat const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
27546  } catch(faiss::FaissException & e) {
27547  PyEval_RestoreThread(_save);
27548  PyErr_SetString(PyExc_RuntimeError, e.what());
27549  SWIG_fail;
27550  }
27551  Py_END_ALLOW_THREADS
27552  }
27553  resultobj = SWIG_Py_Void();
27554  return resultobj;
27555 fail:
27556  return NULL;
27557 }
27558 
27559 
27560 SWIGINTERN PyObject *_wrap_IndexFlat_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27561  PyObject *resultobj = 0;
27562  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27563  faiss::Index::idx_t arg2 ;
27564  float *arg3 = (float *) 0 ;
27565  void *argp1 = 0 ;
27566  int res1 = 0 ;
27567  long val2 ;
27568  int ecode2 = 0 ;
27569  void *argp3 = 0 ;
27570  int res3 = 0 ;
27571  PyObject * obj0 = 0 ;
27572  PyObject * obj1 = 0 ;
27573  PyObject * obj2 = 0 ;
27574 
27575  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexFlat_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
27576  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27577  if (!SWIG_IsOK(res1)) {
27578  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_reconstruct" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
27579  }
27580  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27581  ecode2 = SWIG_AsVal_long(obj1, &val2);
27582  if (!SWIG_IsOK(ecode2)) {
27583  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27584  }
27585  arg2 = static_cast< faiss::Index::idx_t >(val2);
27586  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27587  if (!SWIG_IsOK(res3)) {
27588  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_reconstruct" "', argument " "3"" of type '" "float *""'");
27589  }
27590  arg3 = reinterpret_cast< float * >(argp3);
27591  {
27592  Py_BEGIN_ALLOW_THREADS
27593  try {
27594  ((faiss::IndexFlat const *)arg1)->reconstruct(arg2,arg3);
27595  } catch(faiss::FaissException & e) {
27596  PyEval_RestoreThread(_save);
27597  PyErr_SetString(PyExc_RuntimeError, e.what());
27598  SWIG_fail;
27599  }
27600  Py_END_ALLOW_THREADS
27601  }
27602  resultobj = SWIG_Py_Void();
27603  return resultobj;
27604 fail:
27605  return NULL;
27606 }
27607 
27608 
27609 SWIGINTERN PyObject *_wrap_IndexFlat_compute_distance_subset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27610  PyObject *resultobj = 0;
27611  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27612  faiss::Index::idx_t arg2 ;
27613  float *arg3 = (float *) 0 ;
27614  faiss::Index::idx_t arg4 ;
27615  float *arg5 = (float *) 0 ;
27617  void *argp1 = 0 ;
27618  int res1 = 0 ;
27619  long val2 ;
27620  int ecode2 = 0 ;
27621  void *argp3 = 0 ;
27622  int res3 = 0 ;
27623  long val4 ;
27624  int ecode4 = 0 ;
27625  void *argp5 = 0 ;
27626  int res5 = 0 ;
27627  void *argp6 = 0 ;
27628  int res6 = 0 ;
27629  PyObject * obj0 = 0 ;
27630  PyObject * obj1 = 0 ;
27631  PyObject * obj2 = 0 ;
27632  PyObject * obj3 = 0 ;
27633  PyObject * obj4 = 0 ;
27634  PyObject * obj5 = 0 ;
27635 
27636  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlat_compute_distance_subset",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
27637  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27638  if (!SWIG_IsOK(res1)) {
27639  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_compute_distance_subset" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
27640  }
27641  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27642  ecode2 = SWIG_AsVal_long(obj1, &val2);
27643  if (!SWIG_IsOK(ecode2)) {
27644  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_compute_distance_subset" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27645  }
27646  arg2 = static_cast< faiss::Index::idx_t >(val2);
27647  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27648  if (!SWIG_IsOK(res3)) {
27649  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_compute_distance_subset" "', argument " "3"" of type '" "float const *""'");
27650  }
27651  arg3 = reinterpret_cast< float * >(argp3);
27652  ecode4 = SWIG_AsVal_long(obj3, &val4);
27653  if (!SWIG_IsOK(ecode4)) {
27654  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat_compute_distance_subset" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27655  }
27656  arg4 = static_cast< faiss::Index::idx_t >(val4);
27657  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27658  if (!SWIG_IsOK(res5)) {
27659  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat_compute_distance_subset" "', argument " "5"" of type '" "float *""'");
27660  }
27661  arg5 = reinterpret_cast< float * >(argp5);
27662  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27663  if (!SWIG_IsOK(res6)) {
27664  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlat_compute_distance_subset" "', argument " "6"" of type '" "faiss::Index::idx_t const *""'");
27665  }
27666  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
27667  {
27668  Py_BEGIN_ALLOW_THREADS
27669  try {
27670  ((faiss::IndexFlat const *)arg1)->compute_distance_subset(arg2,(float const *)arg3,arg4,arg5,(faiss::Index::idx_t const *)arg6);
27671  } catch(faiss::FaissException & e) {
27672  PyEval_RestoreThread(_save);
27673  PyErr_SetString(PyExc_RuntimeError, e.what());
27674  SWIG_fail;
27675  }
27676  Py_END_ALLOW_THREADS
27677  }
27678  resultobj = SWIG_Py_Void();
27679  return resultobj;
27680 fail:
27681  return NULL;
27682 }
27683 
27684 
27685 SWIGINTERN PyObject *_wrap_IndexFlat_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27686  PyObject *resultobj = 0;
27687  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27688  faiss::IDSelector *arg2 = 0 ;
27689  void *argp1 = 0 ;
27690  int res1 = 0 ;
27691  void *argp2 = 0 ;
27692  int res2 = 0 ;
27693  PyObject * obj0 = 0 ;
27694  PyObject * obj1 = 0 ;
27695  long result;
27696 
27697  if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat_remove_ids",&obj0,&obj1)) SWIG_fail;
27698  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
27699  if (!SWIG_IsOK(res1)) {
27700  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_remove_ids" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27701  }
27702  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27703  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
27704  if (!SWIG_IsOK(res2)) {
27705  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
27706  }
27707  if (!argp2) {
27708  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
27709  }
27710  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
27711  {
27712  Py_BEGIN_ALLOW_THREADS
27713  try {
27714  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
27715  } catch(faiss::FaissException & e) {
27716  PyEval_RestoreThread(_save);
27717  PyErr_SetString(PyExc_RuntimeError, e.what());
27718  SWIG_fail;
27719  }
27720  Py_END_ALLOW_THREADS
27721  }
27722  resultobj = SWIG_From_long(static_cast< long >(result));
27723  return resultobj;
27724 fail:
27725  return NULL;
27726 }
27727 
27728 
27729 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27730  PyObject *resultobj = 0;
27731  faiss::IndexFlat *result = 0 ;
27732 
27733  if (!PyArg_ParseTuple(args,(char *)":new_IndexFlat")) SWIG_fail;
27734  {
27735  Py_BEGIN_ALLOW_THREADS
27736  try {
27737  result = (faiss::IndexFlat *)new faiss::IndexFlat();
27738  } catch(faiss::FaissException & e) {
27739  PyEval_RestoreThread(_save);
27740  PyErr_SetString(PyExc_RuntimeError, e.what());
27741  SWIG_fail;
27742  }
27743  Py_END_ALLOW_THREADS
27744  }
27745  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
27746  return resultobj;
27747 fail:
27748  return NULL;
27749 }
27750 
27751 
27752 SWIGINTERN PyObject *_wrap_new_IndexFlat(PyObject *self, PyObject *args) {
27753  Py_ssize_t argc;
27754  PyObject *argv[3] = {
27755  0
27756  };
27757  Py_ssize_t ii;
27758 
27759  if (!PyTuple_Check(args)) SWIG_fail;
27760  argc = args ? PyObject_Length(args) : 0;
27761  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
27762  argv[ii] = PyTuple_GET_ITEM(args,ii);
27763  }
27764  if (argc == 0) {
27765  return _wrap_new_IndexFlat__SWIG_2(self, args);
27766  }
27767  if (argc == 1) {
27768  int _v;
27769  {
27770  int res = SWIG_AsVal_long(argv[0], NULL);
27771  _v = SWIG_CheckState(res);
27772  }
27773  if (_v) {
27774  return _wrap_new_IndexFlat__SWIG_1(self, args);
27775  }
27776  }
27777  if (argc == 2) {
27778  int _v;
27779  {
27780  int res = SWIG_AsVal_long(argv[0], NULL);
27781  _v = SWIG_CheckState(res);
27782  }
27783  if (_v) {
27784  {
27785  int res = SWIG_AsVal_int(argv[1], NULL);
27786  _v = SWIG_CheckState(res);
27787  }
27788  if (_v) {
27789  return _wrap_new_IndexFlat__SWIG_0(self, args);
27790  }
27791  }
27792  }
27793 
27794 fail:
27795  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlat'.\n"
27796  " Possible C/C++ prototypes are:\n"
27797  " faiss::IndexFlat::IndexFlat(faiss::Index::idx_t,faiss::MetricType)\n"
27798  " faiss::IndexFlat::IndexFlat(faiss::Index::idx_t)\n"
27799  " faiss::IndexFlat::IndexFlat()\n");
27800  return 0;
27801 }
27802 
27803 
27804 SWIGINTERN PyObject *_wrap_delete_IndexFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27805  PyObject *resultobj = 0;
27806  faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
27807  void *argp1 = 0 ;
27808  int res1 = 0 ;
27809  PyObject * obj0 = 0 ;
27810 
27811  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlat",&obj0)) SWIG_fail;
27812  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_DISOWN | 0 );
27813  if (!SWIG_IsOK(res1)) {
27814  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlat" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
27815  }
27816  arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
27817  delete arg1;
27818  resultobj = SWIG_Py_Void();
27819  return resultobj;
27820 fail:
27821  return NULL;
27822 }
27823 
27824 
27825 SWIGINTERN PyObject *IndexFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27826  PyObject *obj;
27827  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
27828  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlat, SWIG_NewClientData(obj));
27829  return SWIG_Py_Void();
27830 }
27831 
27832 SWIGINTERN PyObject *_wrap_new_IndexFlatIP__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27833  PyObject *resultobj = 0;
27834  faiss::Index::idx_t arg1 ;
27835  long val1 ;
27836  int ecode1 = 0 ;
27837  PyObject * obj0 = 0 ;
27838  faiss::IndexFlatIP *result = 0 ;
27839 
27840  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlatIP",&obj0)) SWIG_fail;
27841  ecode1 = SWIG_AsVal_long(obj0, &val1);
27842  if (!SWIG_IsOK(ecode1)) {
27843  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlatIP" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
27844  }
27845  arg1 = static_cast< faiss::Index::idx_t >(val1);
27846  {
27847  Py_BEGIN_ALLOW_THREADS
27848  try {
27849  result = (faiss::IndexFlatIP *)new faiss::IndexFlatIP(arg1);
27850  } catch(faiss::FaissException & e) {
27851  PyEval_RestoreThread(_save);
27852  PyErr_SetString(PyExc_RuntimeError, e.what());
27853  SWIG_fail;
27854  }
27855  Py_END_ALLOW_THREADS
27856  }
27857  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatIP, SWIG_POINTER_NEW | 0 );
27858  return resultobj;
27859 fail:
27860  return NULL;
27861 }
27862 
27863 
27864 SWIGINTERN PyObject *_wrap_new_IndexFlatIP__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27865  PyObject *resultobj = 0;
27866  faiss::IndexFlatIP *result = 0 ;
27867 
27868  if (!PyArg_ParseTuple(args,(char *)":new_IndexFlatIP")) SWIG_fail;
27869  {
27870  Py_BEGIN_ALLOW_THREADS
27871  try {
27872  result = (faiss::IndexFlatIP *)new faiss::IndexFlatIP();
27873  } catch(faiss::FaissException & e) {
27874  PyEval_RestoreThread(_save);
27875  PyErr_SetString(PyExc_RuntimeError, e.what());
27876  SWIG_fail;
27877  }
27878  Py_END_ALLOW_THREADS
27879  }
27880  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatIP, SWIG_POINTER_NEW | 0 );
27881  return resultobj;
27882 fail:
27883  return NULL;
27884 }
27885 
27886 
27887 SWIGINTERN PyObject *_wrap_new_IndexFlatIP(PyObject *self, PyObject *args) {
27888  Py_ssize_t argc;
27889  PyObject *argv[2] = {
27890  0
27891  };
27892  Py_ssize_t ii;
27893 
27894  if (!PyTuple_Check(args)) SWIG_fail;
27895  argc = args ? PyObject_Length(args) : 0;
27896  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
27897  argv[ii] = PyTuple_GET_ITEM(args,ii);
27898  }
27899  if (argc == 0) {
27900  return _wrap_new_IndexFlatIP__SWIG_1(self, args);
27901  }
27902  if (argc == 1) {
27903  int _v;
27904  {
27905  int res = SWIG_AsVal_long(argv[0], NULL);
27906  _v = SWIG_CheckState(res);
27907  }
27908  if (_v) {
27909  return _wrap_new_IndexFlatIP__SWIG_0(self, args);
27910  }
27911  }
27912 
27913 fail:
27914  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlatIP'.\n"
27915  " Possible C/C++ prototypes are:\n"
27916  " faiss::IndexFlatIP::IndexFlatIP(faiss::Index::idx_t)\n"
27917  " faiss::IndexFlatIP::IndexFlatIP()\n");
27918  return 0;
27919 }
27920 
27921 
27922 SWIGINTERN PyObject *_wrap_delete_IndexFlatIP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27923  PyObject *resultobj = 0;
27924  faiss::IndexFlatIP *arg1 = (faiss::IndexFlatIP *) 0 ;
27925  void *argp1 = 0 ;
27926  int res1 = 0 ;
27927  PyObject * obj0 = 0 ;
27928 
27929  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlatIP",&obj0)) SWIG_fail;
27930  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatIP, SWIG_POINTER_DISOWN | 0 );
27931  if (!SWIG_IsOK(res1)) {
27932  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlatIP" "', argument " "1"" of type '" "faiss::IndexFlatIP *""'");
27933  }
27934  arg1 = reinterpret_cast< faiss::IndexFlatIP * >(argp1);
27935  delete arg1;
27936  resultobj = SWIG_Py_Void();
27937  return resultobj;
27938 fail:
27939  return NULL;
27940 }
27941 
27942 
27943 SWIGINTERN PyObject *IndexFlatIP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27944  PyObject *obj;
27945  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
27946  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlatIP, SWIG_NewClientData(obj));
27947  return SWIG_Py_Void();
27948 }
27949 
27950 SWIGINTERN PyObject *_wrap_new_IndexFlatL2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27951  PyObject *resultobj = 0;
27952  faiss::Index::idx_t arg1 ;
27953  long val1 ;
27954  int ecode1 = 0 ;
27955  PyObject * obj0 = 0 ;
27956  faiss::IndexFlatL2 *result = 0 ;
27957 
27958  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlatL2",&obj0)) SWIG_fail;
27959  ecode1 = SWIG_AsVal_long(obj0, &val1);
27960  if (!SWIG_IsOK(ecode1)) {
27961  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlatL2" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
27962  }
27963  arg1 = static_cast< faiss::Index::idx_t >(val1);
27964  {
27965  Py_BEGIN_ALLOW_THREADS
27966  try {
27967  result = (faiss::IndexFlatL2 *)new faiss::IndexFlatL2(arg1);
27968  } catch(faiss::FaissException & e) {
27969  PyEval_RestoreThread(_save);
27970  PyErr_SetString(PyExc_RuntimeError, e.what());
27971  SWIG_fail;
27972  }
27973  Py_END_ALLOW_THREADS
27974  }
27975  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatL2, SWIG_POINTER_NEW | 0 );
27976  return resultobj;
27977 fail:
27978  return NULL;
27979 }
27980 
27981 
27982 SWIGINTERN PyObject *_wrap_new_IndexFlatL2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27983  PyObject *resultobj = 0;
27984  faiss::IndexFlatL2 *result = 0 ;
27985 
27986  if (!PyArg_ParseTuple(args,(char *)":new_IndexFlatL2")) SWIG_fail;
27987  {
27988  Py_BEGIN_ALLOW_THREADS
27989  try {
27990  result = (faiss::IndexFlatL2 *)new faiss::IndexFlatL2();
27991  } catch(faiss::FaissException & e) {
27992  PyEval_RestoreThread(_save);
27993  PyErr_SetString(PyExc_RuntimeError, e.what());
27994  SWIG_fail;
27995  }
27996  Py_END_ALLOW_THREADS
27997  }
27998  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatL2, SWIG_POINTER_NEW | 0 );
27999  return resultobj;
28000 fail:
28001  return NULL;
28002 }
28003 
28004 
28005 SWIGINTERN PyObject *_wrap_new_IndexFlatL2(PyObject *self, PyObject *args) {
28006  Py_ssize_t argc;
28007  PyObject *argv[2] = {
28008  0
28009  };
28010  Py_ssize_t ii;
28011 
28012  if (!PyTuple_Check(args)) SWIG_fail;
28013  argc = args ? PyObject_Length(args) : 0;
28014  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
28015  argv[ii] = PyTuple_GET_ITEM(args,ii);
28016  }
28017  if (argc == 0) {
28018  return _wrap_new_IndexFlatL2__SWIG_1(self, args);
28019  }
28020  if (argc == 1) {
28021  int _v;
28022  {
28023  int res = SWIG_AsVal_long(argv[0], NULL);
28024  _v = SWIG_CheckState(res);
28025  }
28026  if (_v) {
28027  return _wrap_new_IndexFlatL2__SWIG_0(self, args);
28028  }
28029  }
28030 
28031 fail:
28032  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlatL2'.\n"
28033  " Possible C/C++ prototypes are:\n"
28034  " faiss::IndexFlatL2::IndexFlatL2(faiss::Index::idx_t)\n"
28035  " faiss::IndexFlatL2::IndexFlatL2()\n");
28036  return 0;
28037 }
28038 
28039 
28040 SWIGINTERN PyObject *_wrap_delete_IndexFlatL2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28041  PyObject *resultobj = 0;
28042  faiss::IndexFlatL2 *arg1 = (faiss::IndexFlatL2 *) 0 ;
28043  void *argp1 = 0 ;
28044  int res1 = 0 ;
28045  PyObject * obj0 = 0 ;
28046 
28047  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlatL2",&obj0)) SWIG_fail;
28048  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2, SWIG_POINTER_DISOWN | 0 );
28049  if (!SWIG_IsOK(res1)) {
28050  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlatL2" "', argument " "1"" of type '" "faiss::IndexFlatL2 *""'");
28051  }
28052  arg1 = reinterpret_cast< faiss::IndexFlatL2 * >(argp1);
28053  delete arg1;
28054  resultobj = SWIG_Py_Void();
28055  return resultobj;
28056 fail:
28057  return NULL;
28058 }
28059 
28060 
28061 SWIGINTERN PyObject *IndexFlatL2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28062  PyObject *obj;
28063  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
28064  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlatL2, SWIG_NewClientData(obj));
28065  return SWIG_Py_Void();
28066 }
28067 
28068 SWIGINTERN PyObject *_wrap_IndexFlatL2BaseShift_shift_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28069  PyObject *resultobj = 0;
28071  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
28072  void *argp1 = 0 ;
28073  int res1 = 0 ;
28074  void *argp2 = 0 ;
28075  int res2 = 0 ;
28076  PyObject * obj0 = 0 ;
28077  PyObject * obj1 = 0 ;
28078 
28079  if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlatL2BaseShift_shift_set",&obj0,&obj1)) SWIG_fail;
28080  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, 0 | 0 );
28081  if (!SWIG_IsOK(res1)) {
28082  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlatL2BaseShift_shift_set" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift *""'");
28083  }
28084  arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
28085  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
28086  if (!SWIG_IsOK(res2)) {
28087  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlatL2BaseShift_shift_set" "', argument " "2"" of type '" "std::vector< float > *""'");
28088  }
28089  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
28090  if (arg1) (arg1)->shift = *arg2;
28091  resultobj = SWIG_Py_Void();
28092  return resultobj;
28093 fail:
28094  return NULL;
28095 }
28096 
28097 
28098 SWIGINTERN PyObject *_wrap_IndexFlatL2BaseShift_shift_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28099  PyObject *resultobj = 0;
28101  void *argp1 = 0 ;
28102  int res1 = 0 ;
28103  PyObject * obj0 = 0 ;
28104  std::vector< float > *result = 0 ;
28105 
28106  if (!PyArg_ParseTuple(args,(char *)"O:IndexFlatL2BaseShift_shift_get",&obj0)) SWIG_fail;
28107  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, 0 | 0 );
28108  if (!SWIG_IsOK(res1)) {
28109  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlatL2BaseShift_shift_get" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift *""'");
28110  }
28111  arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
28112  result = (std::vector< float > *)& ((arg1)->shift);
28113  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
28114  return resultobj;
28115 fail:
28116  return NULL;
28117 }
28118 
28119 
28120 SWIGINTERN PyObject *_wrap_new_IndexFlatL2BaseShift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28121  PyObject *resultobj = 0;
28122  faiss::Index::idx_t arg1 ;
28123  size_t arg2 ;
28124  float *arg3 = (float *) 0 ;
28125  long val1 ;
28126  int ecode1 = 0 ;
28127  size_t val2 ;
28128  int ecode2 = 0 ;
28129  void *argp3 = 0 ;
28130  int res3 = 0 ;
28131  PyObject * obj0 = 0 ;
28132  PyObject * obj1 = 0 ;
28133  PyObject * obj2 = 0 ;
28134  faiss::IndexFlatL2BaseShift *result = 0 ;
28135 
28136  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexFlatL2BaseShift",&obj0,&obj1,&obj2)) SWIG_fail;
28137  ecode1 = SWIG_AsVal_long(obj0, &val1);
28138  if (!SWIG_IsOK(ecode1)) {
28139  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlatL2BaseShift" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
28140  }
28141  arg1 = static_cast< faiss::Index::idx_t >(val1);
28142  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
28143  if (!SWIG_IsOK(ecode2)) {
28144  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexFlatL2BaseShift" "', argument " "2"" of type '" "size_t""'");
28145  }
28146  arg2 = static_cast< size_t >(val2);
28147  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28148  if (!SWIG_IsOK(res3)) {
28149  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IndexFlatL2BaseShift" "', argument " "3"" of type '" "float const *""'");
28150  }
28151  arg3 = reinterpret_cast< float * >(argp3);
28152  {
28153  Py_BEGIN_ALLOW_THREADS
28154  try {
28155  result = (faiss::IndexFlatL2BaseShift *)new faiss::IndexFlatL2BaseShift(arg1,arg2,(float const *)arg3);
28156  } catch(faiss::FaissException & e) {
28157  PyEval_RestoreThread(_save);
28158  PyErr_SetString(PyExc_RuntimeError, e.what());
28159  SWIG_fail;
28160  }
28161  Py_END_ALLOW_THREADS
28162  }
28163  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatL2BaseShift, SWIG_POINTER_NEW | 0 );
28164  return resultobj;
28165 fail:
28166  return NULL;
28167 }
28168 
28169 
28170 SWIGINTERN PyObject *_wrap_IndexFlatL2BaseShift_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28171  PyObject *resultobj = 0;
28173  faiss::Index::idx_t arg2 ;
28174  float *arg3 = (float *) 0 ;
28175  faiss::Index::idx_t arg4 ;
28176  float *arg5 = (float *) 0 ;
28178  void *argp1 = 0 ;
28179  int res1 = 0 ;
28180  long val2 ;
28181  int ecode2 = 0 ;
28182  void *argp3 = 0 ;
28183  int res3 = 0 ;
28184  long val4 ;
28185  int ecode4 = 0 ;
28186  void *argp5 = 0 ;
28187  int res5 = 0 ;
28188  void *argp6 = 0 ;
28189  int res6 = 0 ;
28190  PyObject * obj0 = 0 ;
28191  PyObject * obj1 = 0 ;
28192  PyObject * obj2 = 0 ;
28193  PyObject * obj3 = 0 ;
28194  PyObject * obj4 = 0 ;
28195  PyObject * obj5 = 0 ;
28196 
28197  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlatL2BaseShift_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
28198  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, 0 | 0 );
28199  if (!SWIG_IsOK(res1)) {
28200  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlatL2BaseShift_search" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift const *""'");
28201  }
28202  arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
28203  ecode2 = SWIG_AsVal_long(obj1, &val2);
28204  if (!SWIG_IsOK(ecode2)) {
28205  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlatL2BaseShift_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28206  }
28207  arg2 = static_cast< faiss::Index::idx_t >(val2);
28208  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28209  if (!SWIG_IsOK(res3)) {
28210  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlatL2BaseShift_search" "', argument " "3"" of type '" "float const *""'");
28211  }
28212  arg3 = reinterpret_cast< float * >(argp3);
28213  ecode4 = SWIG_AsVal_long(obj3, &val4);
28214  if (!SWIG_IsOK(ecode4)) {
28215  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlatL2BaseShift_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
28216  }
28217  arg4 = static_cast< faiss::Index::idx_t >(val4);
28218  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
28219  if (!SWIG_IsOK(res5)) {
28220  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlatL2BaseShift_search" "', argument " "5"" of type '" "float *""'");
28221  }
28222  arg5 = reinterpret_cast< float * >(argp5);
28223  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
28224  if (!SWIG_IsOK(res6)) {
28225  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlatL2BaseShift_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
28226  }
28227  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
28228  {
28229  Py_BEGIN_ALLOW_THREADS
28230  try {
28231  ((faiss::IndexFlatL2BaseShift const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
28232  } catch(faiss::FaissException & e) {
28233  PyEval_RestoreThread(_save);
28234  PyErr_SetString(PyExc_RuntimeError, e.what());
28235  SWIG_fail;
28236  }
28237  Py_END_ALLOW_THREADS
28238  }
28239  resultobj = SWIG_Py_Void();
28240  return resultobj;
28241 fail:
28242  return NULL;
28243 }
28244 
28245 
28246 SWIGINTERN PyObject *_wrap_delete_IndexFlatL2BaseShift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28247  PyObject *resultobj = 0;
28249  void *argp1 = 0 ;
28250  int res1 = 0 ;
28251  PyObject * obj0 = 0 ;
28252 
28253  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlatL2BaseShift",&obj0)) SWIG_fail;
28254  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, SWIG_POINTER_DISOWN | 0 );
28255  if (!SWIG_IsOK(res1)) {
28256  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlatL2BaseShift" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift *""'");
28257  }
28258  arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
28259  delete arg1;
28260  resultobj = SWIG_Py_Void();
28261  return resultobj;
28262 fail:
28263  return NULL;
28264 }
28265 
28266 
28267 SWIGINTERN PyObject *IndexFlatL2BaseShift_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28268  PyObject *obj;
28269  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
28270  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlatL2BaseShift, SWIG_NewClientData(obj));
28271  return SWIG_Py_Void();
28272 }
28273 
28274 SWIGINTERN PyObject *_wrap_IndexRefineFlat_refine_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28275  PyObject *resultobj = 0;
28277  faiss::IndexFlat *arg2 = (faiss::IndexFlat *) 0 ;
28278  void *argp1 = 0 ;
28279  int res1 = 0 ;
28280  void *argp2 = 0 ;
28281  int res2 = 0 ;
28282  PyObject * obj0 = 0 ;
28283  PyObject * obj1 = 0 ;
28284 
28285  if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_refine_index_set",&obj0,&obj1)) SWIG_fail;
28286  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28287  if (!SWIG_IsOK(res1)) {
28288  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_refine_index_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28289  }
28290  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28291  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
28292  if (!SWIG_IsOK(res2)) {
28293  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexRefineFlat_refine_index_set" "', argument " "2"" of type '" "faiss::IndexFlat *""'");
28294  }
28295  arg2 = reinterpret_cast< faiss::IndexFlat * >(argp2);
28296  if (arg1) (arg1)->refine_index = *arg2;
28297  resultobj = SWIG_Py_Void();
28298  return resultobj;
28299 fail:
28300  return NULL;
28301 }
28302 
28303 
28304 SWIGINTERN PyObject *_wrap_IndexRefineFlat_refine_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28305  PyObject *resultobj = 0;
28307  void *argp1 = 0 ;
28308  int res1 = 0 ;
28309  PyObject * obj0 = 0 ;
28310  faiss::IndexFlat *result = 0 ;
28311 
28312  if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_refine_index_get",&obj0)) SWIG_fail;
28313  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28314  if (!SWIG_IsOK(res1)) {
28315  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_refine_index_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28316  }
28317  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28318  result = (faiss::IndexFlat *)& ((arg1)->refine_index);
28319  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
28320  return resultobj;
28321 fail:
28322  return NULL;
28323 }
28324 
28325 
28326 SWIGINTERN PyObject *_wrap_IndexRefineFlat_base_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28327  PyObject *resultobj = 0;
28329  faiss::Index *arg2 = (faiss::Index *) 0 ;
28330  void *argp1 = 0 ;
28331  int res1 = 0 ;
28332  void *argp2 = 0 ;
28333  int res2 = 0 ;
28334  PyObject * obj0 = 0 ;
28335  PyObject * obj1 = 0 ;
28336 
28337  if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_base_index_set",&obj0,&obj1)) SWIG_fail;
28338  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28339  if (!SWIG_IsOK(res1)) {
28340  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_base_index_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28341  }
28342  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28343  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
28344  if (!SWIG_IsOK(res2)) {
28345  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexRefineFlat_base_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
28346  }
28347  arg2 = reinterpret_cast< faiss::Index * >(argp2);
28348  if (arg1) (arg1)->base_index = arg2;
28349  resultobj = SWIG_Py_Void();
28350  return resultobj;
28351 fail:
28352  return NULL;
28353 }
28354 
28355 
28356 SWIGINTERN PyObject *_wrap_IndexRefineFlat_base_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28357  PyObject *resultobj = 0;
28359  void *argp1 = 0 ;
28360  int res1 = 0 ;
28361  PyObject * obj0 = 0 ;
28362  faiss::Index *result = 0 ;
28363 
28364  if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_base_index_get",&obj0)) SWIG_fail;
28365  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28366  if (!SWIG_IsOK(res1)) {
28367  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_base_index_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28368  }
28369  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28370  result = (faiss::Index *) ((arg1)->base_index);
28371  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
28372  return resultobj;
28373 fail:
28374  return NULL;
28375 }
28376 
28377 
28378 SWIGINTERN PyObject *_wrap_IndexRefineFlat_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28379  PyObject *resultobj = 0;
28381  bool arg2 ;
28382  void *argp1 = 0 ;
28383  int res1 = 0 ;
28384  bool val2 ;
28385  int ecode2 = 0 ;
28386  PyObject * obj0 = 0 ;
28387  PyObject * obj1 = 0 ;
28388 
28389  if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_own_fields_set",&obj0,&obj1)) SWIG_fail;
28390  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28391  if (!SWIG_IsOK(res1)) {
28392  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_own_fields_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28393  }
28394  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28395  ecode2 = SWIG_AsVal_bool(obj1, &val2);
28396  if (!SWIG_IsOK(ecode2)) {
28397  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_own_fields_set" "', argument " "2"" of type '" "bool""'");
28398  }
28399  arg2 = static_cast< bool >(val2);
28400  if (arg1) (arg1)->own_fields = arg2;
28401  resultobj = SWIG_Py_Void();
28402  return resultobj;
28403 fail:
28404  return NULL;
28405 }
28406 
28407 
28408 SWIGINTERN PyObject *_wrap_IndexRefineFlat_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28409  PyObject *resultobj = 0;
28411  void *argp1 = 0 ;
28412  int res1 = 0 ;
28413  PyObject * obj0 = 0 ;
28414  bool result;
28415 
28416  if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_own_fields_get",&obj0)) SWIG_fail;
28417  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28418  if (!SWIG_IsOK(res1)) {
28419  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_own_fields_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28420  }
28421  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28422  result = (bool) ((arg1)->own_fields);
28423  resultobj = SWIG_From_bool(static_cast< bool >(result));
28424  return resultobj;
28425 fail:
28426  return NULL;
28427 }
28428 
28429 
28430 SWIGINTERN PyObject *_wrap_IndexRefineFlat_k_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28431  PyObject *resultobj = 0;
28433  float arg2 ;
28434  void *argp1 = 0 ;
28435  int res1 = 0 ;
28436  float val2 ;
28437  int ecode2 = 0 ;
28438  PyObject * obj0 = 0 ;
28439  PyObject * obj1 = 0 ;
28440 
28441  if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_k_factor_set",&obj0,&obj1)) SWIG_fail;
28442  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28443  if (!SWIG_IsOK(res1)) {
28444  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_k_factor_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28445  }
28446  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28447  ecode2 = SWIG_AsVal_float(obj1, &val2);
28448  if (!SWIG_IsOK(ecode2)) {
28449  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_k_factor_set" "', argument " "2"" of type '" "float""'");
28450  }
28451  arg2 = static_cast< float >(val2);
28452  if (arg1) (arg1)->k_factor = arg2;
28453  resultobj = SWIG_Py_Void();
28454  return resultobj;
28455 fail:
28456  return NULL;
28457 }
28458 
28459 
28460 SWIGINTERN PyObject *_wrap_IndexRefineFlat_k_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28461  PyObject *resultobj = 0;
28463  void *argp1 = 0 ;
28464  int res1 = 0 ;
28465  PyObject * obj0 = 0 ;
28466  float result;
28467 
28468  if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_k_factor_get",&obj0)) SWIG_fail;
28469  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28470  if (!SWIG_IsOK(res1)) {
28471  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_k_factor_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28472  }
28473  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28474  result = (float) ((arg1)->k_factor);
28475  resultobj = SWIG_From_float(static_cast< float >(result));
28476  return resultobj;
28477 fail:
28478  return NULL;
28479 }
28480 
28481 
28482 SWIGINTERN PyObject *_wrap_new_IndexRefineFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28483  PyObject *resultobj = 0;
28484  faiss::Index *arg1 = (faiss::Index *) 0 ;
28485  void *argp1 = 0 ;
28486  int res1 = 0 ;
28487  PyObject * obj0 = 0 ;
28488  faiss::IndexRefineFlat *result = 0 ;
28489 
28490  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexRefineFlat",&obj0)) SWIG_fail;
28491  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
28492  if (!SWIG_IsOK(res1)) {
28493  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexRefineFlat" "', argument " "1"" of type '" "faiss::Index *""'");
28494  }
28495  arg1 = reinterpret_cast< faiss::Index * >(argp1);
28496  {
28497  Py_BEGIN_ALLOW_THREADS
28498  try {
28499  result = (faiss::IndexRefineFlat *)new faiss::IndexRefineFlat(arg1);
28500  } catch(faiss::FaissException & e) {
28501  PyEval_RestoreThread(_save);
28502  PyErr_SetString(PyExc_RuntimeError, e.what());
28503  SWIG_fail;
28504  }
28505  Py_END_ALLOW_THREADS
28506  }
28507  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_POINTER_NEW | 0 );
28508  return resultobj;
28509 fail:
28510  return NULL;
28511 }
28512 
28513 
28514 SWIGINTERN PyObject *_wrap_new_IndexRefineFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28515  PyObject *resultobj = 0;
28516  faiss::IndexRefineFlat *result = 0 ;
28517 
28518  if (!PyArg_ParseTuple(args,(char *)":new_IndexRefineFlat")) SWIG_fail;
28519  {
28520  Py_BEGIN_ALLOW_THREADS
28521  try {
28523  } catch(faiss::FaissException & e) {
28524  PyEval_RestoreThread(_save);
28525  PyErr_SetString(PyExc_RuntimeError, e.what());
28526  SWIG_fail;
28527  }
28528  Py_END_ALLOW_THREADS
28529  }
28530  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_POINTER_NEW | 0 );
28531  return resultobj;
28532 fail:
28533  return NULL;
28534 }
28535 
28536 
28537 SWIGINTERN PyObject *_wrap_new_IndexRefineFlat(PyObject *self, PyObject *args) {
28538  Py_ssize_t argc;
28539  PyObject *argv[2] = {
28540  0
28541  };
28542  Py_ssize_t ii;
28543 
28544  if (!PyTuple_Check(args)) SWIG_fail;
28545  argc = args ? PyObject_Length(args) : 0;
28546  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
28547  argv[ii] = PyTuple_GET_ITEM(args,ii);
28548  }
28549  if (argc == 0) {
28550  return _wrap_new_IndexRefineFlat__SWIG_1(self, args);
28551  }
28552  if (argc == 1) {
28553  int _v;
28554  void *vptr = 0;
28555  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
28556  _v = SWIG_CheckState(res);
28557  if (_v) {
28558  return _wrap_new_IndexRefineFlat__SWIG_0(self, args);
28559  }
28560  }
28561 
28562 fail:
28563  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexRefineFlat'.\n"
28564  " Possible C/C++ prototypes are:\n"
28565  " faiss::IndexRefineFlat::IndexRefineFlat(faiss::Index *)\n"
28566  " faiss::IndexRefineFlat::IndexRefineFlat()\n");
28567  return 0;
28568 }
28569 
28570 
28571 SWIGINTERN PyObject *_wrap_IndexRefineFlat_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28572  PyObject *resultobj = 0;
28574  faiss::Index::idx_t arg2 ;
28575  float *arg3 = (float *) 0 ;
28576  void *argp1 = 0 ;
28577  int res1 = 0 ;
28578  long val2 ;
28579  int ecode2 = 0 ;
28580  void *argp3 = 0 ;
28581  int res3 = 0 ;
28582  PyObject * obj0 = 0 ;
28583  PyObject * obj1 = 0 ;
28584  PyObject * obj2 = 0 ;
28585 
28586  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexRefineFlat_train",&obj0,&obj1,&obj2)) SWIG_fail;
28587  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28588  if (!SWIG_IsOK(res1)) {
28589  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_train" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28590  }
28591  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28592  ecode2 = SWIG_AsVal_long(obj1, &val2);
28593  if (!SWIG_IsOK(ecode2)) {
28594  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28595  }
28596  arg2 = static_cast< faiss::Index::idx_t >(val2);
28597  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28598  if (!SWIG_IsOK(res3)) {
28599  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexRefineFlat_train" "', argument " "3"" of type '" "float const *""'");
28600  }
28601  arg3 = reinterpret_cast< float * >(argp3);
28602  {
28603  Py_BEGIN_ALLOW_THREADS
28604  try {
28605  (arg1)->train(arg2,(float const *)arg3);
28606  } catch(faiss::FaissException & e) {
28607  PyEval_RestoreThread(_save);
28608  PyErr_SetString(PyExc_RuntimeError, e.what());
28609  SWIG_fail;
28610  }
28611  Py_END_ALLOW_THREADS
28612  }
28613  resultobj = SWIG_Py_Void();
28614  return resultobj;
28615 fail:
28616  return NULL;
28617 }
28618 
28619 
28620 SWIGINTERN PyObject *_wrap_IndexRefineFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28621  PyObject *resultobj = 0;
28623  faiss::Index::idx_t arg2 ;
28624  float *arg3 = (float *) 0 ;
28625  void *argp1 = 0 ;
28626  int res1 = 0 ;
28627  long val2 ;
28628  int ecode2 = 0 ;
28629  void *argp3 = 0 ;
28630  int res3 = 0 ;
28631  PyObject * obj0 = 0 ;
28632  PyObject * obj1 = 0 ;
28633  PyObject * obj2 = 0 ;
28634 
28635  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexRefineFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
28636  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28637  if (!SWIG_IsOK(res1)) {
28638  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_add" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28639  }
28640  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28641  ecode2 = SWIG_AsVal_long(obj1, &val2);
28642  if (!SWIG_IsOK(ecode2)) {
28643  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28644  }
28645  arg2 = static_cast< faiss::Index::idx_t >(val2);
28646  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28647  if (!SWIG_IsOK(res3)) {
28648  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexRefineFlat_add" "', argument " "3"" of type '" "float const *""'");
28649  }
28650  arg3 = reinterpret_cast< float * >(argp3);
28651  {
28652  Py_BEGIN_ALLOW_THREADS
28653  try {
28654  (arg1)->add(arg2,(float const *)arg3);
28655  } catch(faiss::FaissException & e) {
28656  PyEval_RestoreThread(_save);
28657  PyErr_SetString(PyExc_RuntimeError, e.what());
28658  SWIG_fail;
28659  }
28660  Py_END_ALLOW_THREADS
28661  }
28662  resultobj = SWIG_Py_Void();
28663  return resultobj;
28664 fail:
28665  return NULL;
28666 }
28667 
28668 
28669 SWIGINTERN PyObject *_wrap_IndexRefineFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28670  PyObject *resultobj = 0;
28672  void *argp1 = 0 ;
28673  int res1 = 0 ;
28674  PyObject * obj0 = 0 ;
28675 
28676  if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_reset",&obj0)) SWIG_fail;
28677  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28678  if (!SWIG_IsOK(res1)) {
28679  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_reset" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28680  }
28681  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28682  {
28683  Py_BEGIN_ALLOW_THREADS
28684  try {
28685  (arg1)->reset();
28686  } catch(faiss::FaissException & e) {
28687  PyEval_RestoreThread(_save);
28688  PyErr_SetString(PyExc_RuntimeError, e.what());
28689  SWIG_fail;
28690  }
28691  Py_END_ALLOW_THREADS
28692  }
28693  resultobj = SWIG_Py_Void();
28694  return resultobj;
28695 fail:
28696  return NULL;
28697 }
28698 
28699 
28700 SWIGINTERN PyObject *_wrap_IndexRefineFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28701  PyObject *resultobj = 0;
28703  faiss::Index::idx_t arg2 ;
28704  float *arg3 = (float *) 0 ;
28705  faiss::Index::idx_t arg4 ;
28706  float *arg5 = (float *) 0 ;
28708  void *argp1 = 0 ;
28709  int res1 = 0 ;
28710  long val2 ;
28711  int ecode2 = 0 ;
28712  void *argp3 = 0 ;
28713  int res3 = 0 ;
28714  long val4 ;
28715  int ecode4 = 0 ;
28716  void *argp5 = 0 ;
28717  int res5 = 0 ;
28718  void *argp6 = 0 ;
28719  int res6 = 0 ;
28720  PyObject * obj0 = 0 ;
28721  PyObject * obj1 = 0 ;
28722  PyObject * obj2 = 0 ;
28723  PyObject * obj3 = 0 ;
28724  PyObject * obj4 = 0 ;
28725  PyObject * obj5 = 0 ;
28726 
28727  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexRefineFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
28728  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
28729  if (!SWIG_IsOK(res1)) {
28730  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_search" "', argument " "1"" of type '" "faiss::IndexRefineFlat const *""'");
28731  }
28732  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28733  ecode2 = SWIG_AsVal_long(obj1, &val2);
28734  if (!SWIG_IsOK(ecode2)) {
28735  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28736  }
28737  arg2 = static_cast< faiss::Index::idx_t >(val2);
28738  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28739  if (!SWIG_IsOK(res3)) {
28740  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexRefineFlat_search" "', argument " "3"" of type '" "float const *""'");
28741  }
28742  arg3 = reinterpret_cast< float * >(argp3);
28743  ecode4 = SWIG_AsVal_long(obj3, &val4);
28744  if (!SWIG_IsOK(ecode4)) {
28745  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexRefineFlat_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
28746  }
28747  arg4 = static_cast< faiss::Index::idx_t >(val4);
28748  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
28749  if (!SWIG_IsOK(res5)) {
28750  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexRefineFlat_search" "', argument " "5"" of type '" "float *""'");
28751  }
28752  arg5 = reinterpret_cast< float * >(argp5);
28753  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
28754  if (!SWIG_IsOK(res6)) {
28755  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexRefineFlat_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
28756  }
28757  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
28758  {
28759  Py_BEGIN_ALLOW_THREADS
28760  try {
28761  ((faiss::IndexRefineFlat const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
28762  } catch(faiss::FaissException & e) {
28763  PyEval_RestoreThread(_save);
28764  PyErr_SetString(PyExc_RuntimeError, e.what());
28765  SWIG_fail;
28766  }
28767  Py_END_ALLOW_THREADS
28768  }
28769  resultobj = SWIG_Py_Void();
28770  return resultobj;
28771 fail:
28772  return NULL;
28773 }
28774 
28775 
28776 SWIGINTERN PyObject *_wrap_delete_IndexRefineFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28777  PyObject *resultobj = 0;
28779  void *argp1 = 0 ;
28780  int res1 = 0 ;
28781  PyObject * obj0 = 0 ;
28782 
28783  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexRefineFlat",&obj0)) SWIG_fail;
28784  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_POINTER_DISOWN | 0 );
28785  if (!SWIG_IsOK(res1)) {
28786  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexRefineFlat" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
28787  }
28788  arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
28789  {
28790  Py_BEGIN_ALLOW_THREADS
28791  try {
28792  delete arg1;
28793  } catch(faiss::FaissException & e) {
28794  PyEval_RestoreThread(_save);
28795  PyErr_SetString(PyExc_RuntimeError, e.what());
28796  SWIG_fail;
28797  }
28798  Py_END_ALLOW_THREADS
28799  }
28800  resultobj = SWIG_Py_Void();
28801  return resultobj;
28802 fail:
28803  return NULL;
28804 }
28805 
28806 
28807 SWIGINTERN PyObject *IndexRefineFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28808  PyObject *obj;
28809  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
28810  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_NewClientData(obj));
28811  return SWIG_Py_Void();
28812 }
28813 
28814 SWIGINTERN PyObject *_wrap_IndexFlat1D_continuous_update_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28815  PyObject *resultobj = 0;
28816  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
28817  bool arg2 ;
28818  void *argp1 = 0 ;
28819  int res1 = 0 ;
28820  bool val2 ;
28821  int ecode2 = 0 ;
28822  PyObject * obj0 = 0 ;
28823  PyObject * obj1 = 0 ;
28824 
28825  if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat1D_continuous_update_set",&obj0,&obj1)) SWIG_fail;
28826  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
28827  if (!SWIG_IsOK(res1)) {
28828  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_continuous_update_set" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
28829  }
28830  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
28831  ecode2 = SWIG_AsVal_bool(obj1, &val2);
28832  if (!SWIG_IsOK(ecode2)) {
28833  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat1D_continuous_update_set" "', argument " "2"" of type '" "bool""'");
28834  }
28835  arg2 = static_cast< bool >(val2);
28836  if (arg1) (arg1)->continuous_update = arg2;
28837  resultobj = SWIG_Py_Void();
28838  return resultobj;
28839 fail:
28840  return NULL;
28841 }
28842 
28843 
28844 SWIGINTERN PyObject *_wrap_IndexFlat1D_continuous_update_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28845  PyObject *resultobj = 0;
28846  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
28847  void *argp1 = 0 ;
28848  int res1 = 0 ;
28849  PyObject * obj0 = 0 ;
28850  bool result;
28851 
28852  if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_continuous_update_get",&obj0)) SWIG_fail;
28853  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
28854  if (!SWIG_IsOK(res1)) {
28855  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_continuous_update_get" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
28856  }
28857  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
28858  result = (bool) ((arg1)->continuous_update);
28859  resultobj = SWIG_From_bool(static_cast< bool >(result));
28860  return resultobj;
28861 fail:
28862  return NULL;
28863 }
28864 
28865 
28866 SWIGINTERN PyObject *_wrap_IndexFlat1D_perm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28867  PyObject *resultobj = 0;
28868  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
28869  std::vector< faiss::Index::idx_t > *arg2 = (std::vector< faiss::Index::idx_t > *) 0 ;
28870  void *argp1 = 0 ;
28871  int res1 = 0 ;
28872  void *argp2 = 0 ;
28873  int res2 = 0 ;
28874  PyObject * obj0 = 0 ;
28875  PyObject * obj1 = 0 ;
28876 
28877  if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat1D_perm_set",&obj0,&obj1)) SWIG_fail;
28878  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
28879  if (!SWIG_IsOK(res1)) {
28880  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_perm_set" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
28881  }
28882  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
28883  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
28884  if (!SWIG_IsOK(res2)) {
28885  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlat1D_perm_set" "', argument " "2"" of type '" "std::vector< faiss::Index::idx_t > *""'");
28886  }
28887  arg2 = reinterpret_cast< std::vector< faiss::Index::idx_t > * >(argp2);
28888  if (arg1) (arg1)->perm = *arg2;
28889  resultobj = SWIG_Py_Void();
28890  return resultobj;
28891 fail:
28892  return NULL;
28893 }
28894 
28895 
28896 SWIGINTERN PyObject *_wrap_IndexFlat1D_perm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28897  PyObject *resultobj = 0;
28898  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
28899  void *argp1 = 0 ;
28900  int res1 = 0 ;
28901  PyObject * obj0 = 0 ;
28902  std::vector< faiss::Index::idx_t > *result = 0 ;
28903 
28904  if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_perm_get",&obj0)) SWIG_fail;
28905  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
28906  if (!SWIG_IsOK(res1)) {
28907  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_perm_get" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
28908  }
28909  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
28910  result = (std::vector< faiss::Index::idx_t > *)& ((arg1)->perm);
28911  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
28912  return resultobj;
28913 fail:
28914  return NULL;
28915 }
28916 
28917 
28918 SWIGINTERN PyObject *_wrap_new_IndexFlat1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28919  PyObject *resultobj = 0;
28920  bool arg1 ;
28921  bool val1 ;
28922  int ecode1 = 0 ;
28923  PyObject * obj0 = 0 ;
28924  faiss::IndexFlat1D *result = 0 ;
28925 
28926  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlat1D",&obj0)) SWIG_fail;
28927  ecode1 = SWIG_AsVal_bool(obj0, &val1);
28928  if (!SWIG_IsOK(ecode1)) {
28929  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlat1D" "', argument " "1"" of type '" "bool""'");
28930  }
28931  arg1 = static_cast< bool >(val1);
28932  {
28933  Py_BEGIN_ALLOW_THREADS
28934  try {
28935  result = (faiss::IndexFlat1D *)new faiss::IndexFlat1D(arg1);
28936  } catch(faiss::FaissException & e) {
28937  PyEval_RestoreThread(_save);
28938  PyErr_SetString(PyExc_RuntimeError, e.what());
28939  SWIG_fail;
28940  }
28941  Py_END_ALLOW_THREADS
28942  }
28943  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat1D, SWIG_POINTER_NEW | 0 );
28944  return resultobj;
28945 fail:
28946  return NULL;
28947 }
28948 
28949 
28950 SWIGINTERN PyObject *_wrap_new_IndexFlat1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28951  PyObject *resultobj = 0;
28952  faiss::IndexFlat1D *result = 0 ;
28953 
28954  if (!PyArg_ParseTuple(args,(char *)":new_IndexFlat1D")) SWIG_fail;
28955  {
28956  Py_BEGIN_ALLOW_THREADS
28957  try {
28958  result = (faiss::IndexFlat1D *)new faiss::IndexFlat1D();
28959  } catch(faiss::FaissException & e) {
28960  PyEval_RestoreThread(_save);
28961  PyErr_SetString(PyExc_RuntimeError, e.what());
28962  SWIG_fail;
28963  }
28964  Py_END_ALLOW_THREADS
28965  }
28966  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat1D, SWIG_POINTER_NEW | 0 );
28967  return resultobj;
28968 fail:
28969  return NULL;
28970 }
28971 
28972 
28973 SWIGINTERN PyObject *_wrap_new_IndexFlat1D(PyObject *self, PyObject *args) {
28974  Py_ssize_t argc;
28975  PyObject *argv[2] = {
28976  0
28977  };
28978  Py_ssize_t ii;
28979 
28980  if (!PyTuple_Check(args)) SWIG_fail;
28981  argc = args ? PyObject_Length(args) : 0;
28982  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
28983  argv[ii] = PyTuple_GET_ITEM(args,ii);
28984  }
28985  if (argc == 0) {
28986  return _wrap_new_IndexFlat1D__SWIG_1(self, args);
28987  }
28988  if (argc == 1) {
28989  int _v;
28990  {
28991  int res = SWIG_AsVal_bool(argv[0], NULL);
28992  _v = SWIG_CheckState(res);
28993  }
28994  if (_v) {
28995  return _wrap_new_IndexFlat1D__SWIG_0(self, args);
28996  }
28997  }
28998 
28999 fail:
29000  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlat1D'.\n"
29001  " Possible C/C++ prototypes are:\n"
29002  " faiss::IndexFlat1D::IndexFlat1D(bool)\n"
29003  " faiss::IndexFlat1D::IndexFlat1D()\n");
29004  return 0;
29005 }
29006 
29007 
29008 SWIGINTERN PyObject *_wrap_IndexFlat1D_update_permutation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29009  PyObject *resultobj = 0;
29010  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
29011  void *argp1 = 0 ;
29012  int res1 = 0 ;
29013  PyObject * obj0 = 0 ;
29014 
29015  if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_update_permutation",&obj0)) SWIG_fail;
29016  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
29017  if (!SWIG_IsOK(res1)) {
29018  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_update_permutation" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
29019  }
29020  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
29021  {
29022  Py_BEGIN_ALLOW_THREADS
29023  try {
29024  (arg1)->update_permutation();
29025  } catch(faiss::FaissException & e) {
29026  PyEval_RestoreThread(_save);
29027  PyErr_SetString(PyExc_RuntimeError, e.what());
29028  SWIG_fail;
29029  }
29030  Py_END_ALLOW_THREADS
29031  }
29032  resultobj = SWIG_Py_Void();
29033  return resultobj;
29034 fail:
29035  return NULL;
29036 }
29037 
29038 
29039 SWIGINTERN PyObject *_wrap_IndexFlat1D_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29040  PyObject *resultobj = 0;
29041  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
29042  faiss::Index::idx_t arg2 ;
29043  float *arg3 = (float *) 0 ;
29044  void *argp1 = 0 ;
29045  int res1 = 0 ;
29046  long val2 ;
29047  int ecode2 = 0 ;
29048  void *argp3 = 0 ;
29049  int res3 = 0 ;
29050  PyObject * obj0 = 0 ;
29051  PyObject * obj1 = 0 ;
29052  PyObject * obj2 = 0 ;
29053 
29054  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexFlat1D_add",&obj0,&obj1,&obj2)) SWIG_fail;
29055  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
29056  if (!SWIG_IsOK(res1)) {
29057  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_add" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
29058  }
29059  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
29060  ecode2 = SWIG_AsVal_long(obj1, &val2);
29061  if (!SWIG_IsOK(ecode2)) {
29062  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat1D_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
29063  }
29064  arg2 = static_cast< faiss::Index::idx_t >(val2);
29065  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
29066  if (!SWIG_IsOK(res3)) {
29067  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat1D_add" "', argument " "3"" of type '" "float const *""'");
29068  }
29069  arg3 = reinterpret_cast< float * >(argp3);
29070  {
29071  Py_BEGIN_ALLOW_THREADS
29072  try {
29073  (arg1)->add(arg2,(float const *)arg3);
29074  } catch(faiss::FaissException & e) {
29075  PyEval_RestoreThread(_save);
29076  PyErr_SetString(PyExc_RuntimeError, e.what());
29077  SWIG_fail;
29078  }
29079  Py_END_ALLOW_THREADS
29080  }
29081  resultobj = SWIG_Py_Void();
29082  return resultobj;
29083 fail:
29084  return NULL;
29085 }
29086 
29087 
29088 SWIGINTERN PyObject *_wrap_IndexFlat1D_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29089  PyObject *resultobj = 0;
29090  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
29091  void *argp1 = 0 ;
29092  int res1 = 0 ;
29093  PyObject * obj0 = 0 ;
29094 
29095  if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_reset",&obj0)) SWIG_fail;
29096  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
29097  if (!SWIG_IsOK(res1)) {
29098  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_reset" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
29099  }
29100  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
29101  {
29102  Py_BEGIN_ALLOW_THREADS
29103  try {
29104  (arg1)->reset();
29105  } catch(faiss::FaissException & e) {
29106  PyEval_RestoreThread(_save);
29107  PyErr_SetString(PyExc_RuntimeError, e.what());
29108  SWIG_fail;
29109  }
29110  Py_END_ALLOW_THREADS
29111  }
29112  resultobj = SWIG_Py_Void();
29113  return resultobj;
29114 fail:
29115  return NULL;
29116 }
29117 
29118 
29119 SWIGINTERN PyObject *_wrap_IndexFlat1D_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29120  PyObject *resultobj = 0;
29121  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
29122  faiss::Index::idx_t arg2 ;
29123  float *arg3 = (float *) 0 ;
29124  faiss::Index::idx_t arg4 ;
29125  float *arg5 = (float *) 0 ;
29127  void *argp1 = 0 ;
29128  int res1 = 0 ;
29129  long val2 ;
29130  int ecode2 = 0 ;
29131  void *argp3 = 0 ;
29132  int res3 = 0 ;
29133  long val4 ;
29134  int ecode4 = 0 ;
29135  void *argp5 = 0 ;
29136  int res5 = 0 ;
29137  void *argp6 = 0 ;
29138  int res6 = 0 ;
29139  PyObject * obj0 = 0 ;
29140  PyObject * obj1 = 0 ;
29141  PyObject * obj2 = 0 ;
29142  PyObject * obj3 = 0 ;
29143  PyObject * obj4 = 0 ;
29144  PyObject * obj5 = 0 ;
29145 
29146  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlat1D_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
29147  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
29148  if (!SWIG_IsOK(res1)) {
29149  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_search" "', argument " "1"" of type '" "faiss::IndexFlat1D const *""'");
29150  }
29151  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
29152  ecode2 = SWIG_AsVal_long(obj1, &val2);
29153  if (!SWIG_IsOK(ecode2)) {
29154  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat1D_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
29155  }
29156  arg2 = static_cast< faiss::Index::idx_t >(val2);
29157  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
29158  if (!SWIG_IsOK(res3)) {
29159  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat1D_search" "', argument " "3"" of type '" "float const *""'");
29160  }
29161  arg3 = reinterpret_cast< float * >(argp3);
29162  ecode4 = SWIG_AsVal_long(obj3, &val4);
29163  if (!SWIG_IsOK(ecode4)) {
29164  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat1D_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
29165  }
29166  arg4 = static_cast< faiss::Index::idx_t >(val4);
29167  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
29168  if (!SWIG_IsOK(res5)) {
29169  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat1D_search" "', argument " "5"" of type '" "float *""'");
29170  }
29171  arg5 = reinterpret_cast< float * >(argp5);
29172  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
29173  if (!SWIG_IsOK(res6)) {
29174  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlat1D_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
29175  }
29176  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
29177  {
29178  Py_BEGIN_ALLOW_THREADS
29179  try {
29180  ((faiss::IndexFlat1D const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
29181  } catch(faiss::FaissException & e) {
29182  PyEval_RestoreThread(_save);
29183  PyErr_SetString(PyExc_RuntimeError, e.what());
29184  SWIG_fail;
29185  }
29186  Py_END_ALLOW_THREADS
29187  }
29188  resultobj = SWIG_Py_Void();
29189  return resultobj;
29190 fail:
29191  return NULL;
29192 }
29193 
29194 
29195 SWIGINTERN PyObject *_wrap_delete_IndexFlat1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29196  PyObject *resultobj = 0;
29197  faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
29198  void *argp1 = 0 ;
29199  int res1 = 0 ;
29200  PyObject * obj0 = 0 ;
29201 
29202  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlat1D",&obj0)) SWIG_fail;
29203  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, SWIG_POINTER_DISOWN | 0 );
29204  if (!SWIG_IsOK(res1)) {
29205  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlat1D" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
29206  }
29207  arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
29208  delete arg1;
29209  resultobj = SWIG_Py_Void();
29210  return resultobj;
29211 fail:
29212  return NULL;
29213 }
29214 
29215 
29216 SWIGINTERN PyObject *IndexFlat1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29217  PyObject *obj;
29218  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
29219  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlat1D, SWIG_NewClientData(obj));
29220  return SWIG_Py_Void();
29221 }
29222 
29223 SWIGINTERN PyObject *_wrap_IndexLSH_nbits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29224  PyObject *resultobj = 0;
29225  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29226  int arg2 ;
29227  void *argp1 = 0 ;
29228  int res1 = 0 ;
29229  int val2 ;
29230  int ecode2 = 0 ;
29231  PyObject * obj0 = 0 ;
29232  PyObject * obj1 = 0 ;
29233 
29234  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_nbits_set",&obj0,&obj1)) SWIG_fail;
29235  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29236  if (!SWIG_IsOK(res1)) {
29237  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_nbits_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29238  }
29239  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29240  ecode2 = SWIG_AsVal_int(obj1, &val2);
29241  if (!SWIG_IsOK(ecode2)) {
29242  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_nbits_set" "', argument " "2"" of type '" "int""'");
29243  }
29244  arg2 = static_cast< int >(val2);
29245  if (arg1) (arg1)->nbits = arg2;
29246  resultobj = SWIG_Py_Void();
29247  return resultobj;
29248 fail:
29249  return NULL;
29250 }
29251 
29252 
29253 SWIGINTERN PyObject *_wrap_IndexLSH_nbits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29254  PyObject *resultobj = 0;
29255  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29256  void *argp1 = 0 ;
29257  int res1 = 0 ;
29258  PyObject * obj0 = 0 ;
29259  int result;
29260 
29261  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_nbits_get",&obj0)) SWIG_fail;
29262  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29263  if (!SWIG_IsOK(res1)) {
29264  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_nbits_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29265  }
29266  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29267  result = (int) ((arg1)->nbits);
29268  resultobj = SWIG_From_int(static_cast< int >(result));
29269  return resultobj;
29270 fail:
29271  return NULL;
29272 }
29273 
29274 
29275 SWIGINTERN PyObject *_wrap_IndexLSH_bytes_per_vec_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29276  PyObject *resultobj = 0;
29277  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29278  int arg2 ;
29279  void *argp1 = 0 ;
29280  int res1 = 0 ;
29281  int val2 ;
29282  int ecode2 = 0 ;
29283  PyObject * obj0 = 0 ;
29284  PyObject * obj1 = 0 ;
29285 
29286  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_bytes_per_vec_set",&obj0,&obj1)) SWIG_fail;
29287  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29288  if (!SWIG_IsOK(res1)) {
29289  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_bytes_per_vec_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29290  }
29291  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29292  ecode2 = SWIG_AsVal_int(obj1, &val2);
29293  if (!SWIG_IsOK(ecode2)) {
29294  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_bytes_per_vec_set" "', argument " "2"" of type '" "int""'");
29295  }
29296  arg2 = static_cast< int >(val2);
29297  if (arg1) (arg1)->bytes_per_vec = arg2;
29298  resultobj = SWIG_Py_Void();
29299  return resultobj;
29300 fail:
29301  return NULL;
29302 }
29303 
29304 
29305 SWIGINTERN PyObject *_wrap_IndexLSH_bytes_per_vec_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29306  PyObject *resultobj = 0;
29307  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29308  void *argp1 = 0 ;
29309  int res1 = 0 ;
29310  PyObject * obj0 = 0 ;
29311  int result;
29312 
29313  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_bytes_per_vec_get",&obj0)) SWIG_fail;
29314  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29315  if (!SWIG_IsOK(res1)) {
29316  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_bytes_per_vec_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29317  }
29318  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29319  result = (int) ((arg1)->bytes_per_vec);
29320  resultobj = SWIG_From_int(static_cast< int >(result));
29321  return resultobj;
29322 fail:
29323  return NULL;
29324 }
29325 
29326 
29327 SWIGINTERN PyObject *_wrap_IndexLSH_rotate_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29328  PyObject *resultobj = 0;
29329  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29330  bool arg2 ;
29331  void *argp1 = 0 ;
29332  int res1 = 0 ;
29333  bool val2 ;
29334  int ecode2 = 0 ;
29335  PyObject * obj0 = 0 ;
29336  PyObject * obj1 = 0 ;
29337 
29338  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_rotate_data_set",&obj0,&obj1)) SWIG_fail;
29339  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29340  if (!SWIG_IsOK(res1)) {
29341  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rotate_data_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29342  }
29343  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29344  ecode2 = SWIG_AsVal_bool(obj1, &val2);
29345  if (!SWIG_IsOK(ecode2)) {
29346  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_rotate_data_set" "', argument " "2"" of type '" "bool""'");
29347  }
29348  arg2 = static_cast< bool >(val2);
29349  if (arg1) (arg1)->rotate_data = arg2;
29350  resultobj = SWIG_Py_Void();
29351  return resultobj;
29352 fail:
29353  return NULL;
29354 }
29355 
29356 
29357 SWIGINTERN PyObject *_wrap_IndexLSH_rotate_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29358  PyObject *resultobj = 0;
29359  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29360  void *argp1 = 0 ;
29361  int res1 = 0 ;
29362  PyObject * obj0 = 0 ;
29363  bool result;
29364 
29365  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_rotate_data_get",&obj0)) SWIG_fail;
29366  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29367  if (!SWIG_IsOK(res1)) {
29368  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rotate_data_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29369  }
29370  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29371  result = (bool) ((arg1)->rotate_data);
29372  resultobj = SWIG_From_bool(static_cast< bool >(result));
29373  return resultobj;
29374 fail:
29375  return NULL;
29376 }
29377 
29378 
29379 SWIGINTERN PyObject *_wrap_IndexLSH_train_thresholds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29380  PyObject *resultobj = 0;
29381  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29382  bool arg2 ;
29383  void *argp1 = 0 ;
29384  int res1 = 0 ;
29385  bool val2 ;
29386  int ecode2 = 0 ;
29387  PyObject * obj0 = 0 ;
29388  PyObject * obj1 = 0 ;
29389 
29390  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_train_thresholds_set",&obj0,&obj1)) SWIG_fail;
29391  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29392  if (!SWIG_IsOK(res1)) {
29393  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_train_thresholds_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29394  }
29395  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29396  ecode2 = SWIG_AsVal_bool(obj1, &val2);
29397  if (!SWIG_IsOK(ecode2)) {
29398  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_train_thresholds_set" "', argument " "2"" of type '" "bool""'");
29399  }
29400  arg2 = static_cast< bool >(val2);
29401  if (arg1) (arg1)->train_thresholds = arg2;
29402  resultobj = SWIG_Py_Void();
29403  return resultobj;
29404 fail:
29405  return NULL;
29406 }
29407 
29408 
29409 SWIGINTERN PyObject *_wrap_IndexLSH_train_thresholds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29410  PyObject *resultobj = 0;
29411  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29412  void *argp1 = 0 ;
29413  int res1 = 0 ;
29414  PyObject * obj0 = 0 ;
29415  bool result;
29416 
29417  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_train_thresholds_get",&obj0)) SWIG_fail;
29418  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29419  if (!SWIG_IsOK(res1)) {
29420  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_train_thresholds_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29421  }
29422  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29423  result = (bool) ((arg1)->train_thresholds);
29424  resultobj = SWIG_From_bool(static_cast< bool >(result));
29425  return resultobj;
29426 fail:
29427  return NULL;
29428 }
29429 
29430 
29431 SWIGINTERN PyObject *_wrap_IndexLSH_rrot_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29432  PyObject *resultobj = 0;
29433  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29435  void *argp1 = 0 ;
29436  int res1 = 0 ;
29437  void *argp2 = 0 ;
29438  int res2 = 0 ;
29439  PyObject * obj0 = 0 ;
29440  PyObject * obj1 = 0 ;
29441 
29442  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_rrot_set",&obj0,&obj1)) SWIG_fail;
29443  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29444  if (!SWIG_IsOK(res1)) {
29445  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rrot_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29446  }
29447  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29448  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
29449  if (!SWIG_IsOK(res2)) {
29450  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_rrot_set" "', argument " "2"" of type '" "faiss::RandomRotationMatrix *""'");
29451  }
29452  arg2 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp2);
29453  if (arg1) (arg1)->rrot = *arg2;
29454  resultobj = SWIG_Py_Void();
29455  return resultobj;
29456 fail:
29457  return NULL;
29458 }
29459 
29460 
29461 SWIGINTERN PyObject *_wrap_IndexLSH_rrot_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29462  PyObject *resultobj = 0;
29463  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29464  void *argp1 = 0 ;
29465  int res1 = 0 ;
29466  PyObject * obj0 = 0 ;
29467  faiss::RandomRotationMatrix *result = 0 ;
29468 
29469  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_rrot_get",&obj0)) SWIG_fail;
29470  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29471  if (!SWIG_IsOK(res1)) {
29472  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rrot_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29473  }
29474  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29475  result = (faiss::RandomRotationMatrix *)& ((arg1)->rrot);
29476  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
29477  return resultobj;
29478 fail:
29479  return NULL;
29480 }
29481 
29482 
29483 SWIGINTERN PyObject *_wrap_IndexLSH_thresholds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29484  PyObject *resultobj = 0;
29485  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29486  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
29487  void *argp1 = 0 ;
29488  int res1 = 0 ;
29489  void *argp2 = 0 ;
29490  int res2 = 0 ;
29491  PyObject * obj0 = 0 ;
29492  PyObject * obj1 = 0 ;
29493 
29494  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_thresholds_set",&obj0,&obj1)) SWIG_fail;
29495  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29496  if (!SWIG_IsOK(res1)) {
29497  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_thresholds_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29498  }
29499  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29500  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
29501  if (!SWIG_IsOK(res2)) {
29502  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_thresholds_set" "', argument " "2"" of type '" "std::vector< float > *""'");
29503  }
29504  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
29505  if (arg1) (arg1)->thresholds = *arg2;
29506  resultobj = SWIG_Py_Void();
29507  return resultobj;
29508 fail:
29509  return NULL;
29510 }
29511 
29512 
29513 SWIGINTERN PyObject *_wrap_IndexLSH_thresholds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29514  PyObject *resultobj = 0;
29515  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29516  void *argp1 = 0 ;
29517  int res1 = 0 ;
29518  PyObject * obj0 = 0 ;
29519  std::vector< float > *result = 0 ;
29520 
29521  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_thresholds_get",&obj0)) SWIG_fail;
29522  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29523  if (!SWIG_IsOK(res1)) {
29524  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_thresholds_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29525  }
29526  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29527  result = (std::vector< float > *)& ((arg1)->thresholds);
29528  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
29529  return resultobj;
29530 fail:
29531  return NULL;
29532 }
29533 
29534 
29535 SWIGINTERN PyObject *_wrap_IndexLSH_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29536  PyObject *resultobj = 0;
29537  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29538  std::vector< faiss::IndexLSH::uint8_t > *arg2 = (std::vector< faiss::IndexLSH::uint8_t > *) 0 ;
29539  void *argp1 = 0 ;
29540  int res1 = 0 ;
29541  void *argp2 = 0 ;
29542  int res2 = 0 ;
29543  PyObject * obj0 = 0 ;
29544  PyObject * obj1 = 0 ;
29545 
29546  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_codes_set",&obj0,&obj1)) SWIG_fail;
29547  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29548  if (!SWIG_IsOK(res1)) {
29549  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_codes_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29550  }
29551  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29552  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
29553  if (!SWIG_IsOK(res2)) {
29554  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_codes_set" "', argument " "2"" of type '" "std::vector< faiss::IndexLSH::uint8_t > *""'");
29555  }
29556  arg2 = reinterpret_cast< std::vector< faiss::IndexLSH::uint8_t > * >(argp2);
29557  if (arg1) (arg1)->codes = *arg2;
29558  resultobj = SWIG_Py_Void();
29559  return resultobj;
29560 fail:
29561  return NULL;
29562 }
29563 
29564 
29565 SWIGINTERN PyObject *_wrap_IndexLSH_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29566  PyObject *resultobj = 0;
29567  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29568  void *argp1 = 0 ;
29569  int res1 = 0 ;
29570  PyObject * obj0 = 0 ;
29571  std::vector< faiss::IndexLSH::uint8_t > *result = 0 ;
29572 
29573  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_codes_get",&obj0)) SWIG_fail;
29574  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29575  if (!SWIG_IsOK(res1)) {
29576  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_codes_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29577  }
29578  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29579  result = (std::vector< faiss::IndexLSH::uint8_t > *)& ((arg1)->codes);
29580  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
29581  return resultobj;
29582 fail:
29583  return NULL;
29584 }
29585 
29586 
29587 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29588  PyObject *resultobj = 0;
29589  faiss::Index::idx_t arg1 ;
29590  int arg2 ;
29591  bool arg3 ;
29592  bool arg4 ;
29593  long val1 ;
29594  int ecode1 = 0 ;
29595  int val2 ;
29596  int ecode2 = 0 ;
29597  bool val3 ;
29598  int ecode3 = 0 ;
29599  bool val4 ;
29600  int ecode4 = 0 ;
29601  PyObject * obj0 = 0 ;
29602  PyObject * obj1 = 0 ;
29603  PyObject * obj2 = 0 ;
29604  PyObject * obj3 = 0 ;
29605  faiss::IndexLSH *result = 0 ;
29606 
29607  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexLSH",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
29608  ecode1 = SWIG_AsVal_long(obj0, &val1);
29609  if (!SWIG_IsOK(ecode1)) {
29610  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexLSH" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
29611  }
29612  arg1 = static_cast< faiss::Index::idx_t >(val1);
29613  ecode2 = SWIG_AsVal_int(obj1, &val2);
29614  if (!SWIG_IsOK(ecode2)) {
29615  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexLSH" "', argument " "2"" of type '" "int""'");
29616  }
29617  arg2 = static_cast< int >(val2);
29618  ecode3 = SWIG_AsVal_bool(obj2, &val3);
29619  if (!SWIG_IsOK(ecode3)) {
29620  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexLSH" "', argument " "3"" of type '" "bool""'");
29621  }
29622  arg3 = static_cast< bool >(val3);
29623  ecode4 = SWIG_AsVal_bool(obj3, &val4);
29624  if (!SWIG_IsOK(ecode4)) {
29625  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexLSH" "', argument " "4"" of type '" "bool""'");
29626  }
29627  arg4 = static_cast< bool >(val4);
29628  {
29629  Py_BEGIN_ALLOW_THREADS
29630  try {
29631  result = (faiss::IndexLSH *)new faiss::IndexLSH(arg1,arg2,arg3,arg4);
29632  } catch(faiss::FaissException & e) {
29633  PyEval_RestoreThread(_save);
29634  PyErr_SetString(PyExc_RuntimeError, e.what());
29635  SWIG_fail;
29636  }
29637  Py_END_ALLOW_THREADS
29638  }
29639  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
29640  return resultobj;
29641 fail:
29642  return NULL;
29643 }
29644 
29645 
29646 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29647  PyObject *resultobj = 0;
29648  faiss::Index::idx_t arg1 ;
29649  int arg2 ;
29650  bool arg3 ;
29651  long val1 ;
29652  int ecode1 = 0 ;
29653  int val2 ;
29654  int ecode2 = 0 ;
29655  bool val3 ;
29656  int ecode3 = 0 ;
29657  PyObject * obj0 = 0 ;
29658  PyObject * obj1 = 0 ;
29659  PyObject * obj2 = 0 ;
29660  faiss::IndexLSH *result = 0 ;
29661 
29662  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexLSH",&obj0,&obj1,&obj2)) SWIG_fail;
29663  ecode1 = SWIG_AsVal_long(obj0, &val1);
29664  if (!SWIG_IsOK(ecode1)) {
29665  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexLSH" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
29666  }
29667  arg1 = static_cast< faiss::Index::idx_t >(val1);
29668  ecode2 = SWIG_AsVal_int(obj1, &val2);
29669  if (!SWIG_IsOK(ecode2)) {
29670  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexLSH" "', argument " "2"" of type '" "int""'");
29671  }
29672  arg2 = static_cast< int >(val2);
29673  ecode3 = SWIG_AsVal_bool(obj2, &val3);
29674  if (!SWIG_IsOK(ecode3)) {
29675  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexLSH" "', argument " "3"" of type '" "bool""'");
29676  }
29677  arg3 = static_cast< bool >(val3);
29678  {
29679  Py_BEGIN_ALLOW_THREADS
29680  try {
29681  result = (faiss::IndexLSH *)new faiss::IndexLSH(arg1,arg2,arg3);
29682  } catch(faiss::FaissException & e) {
29683  PyEval_RestoreThread(_save);
29684  PyErr_SetString(PyExc_RuntimeError, e.what());
29685  SWIG_fail;
29686  }
29687  Py_END_ALLOW_THREADS
29688  }
29689  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
29690  return resultobj;
29691 fail:
29692  return NULL;
29693 }
29694 
29695 
29696 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29697  PyObject *resultobj = 0;
29698  faiss::Index::idx_t arg1 ;
29699  int arg2 ;
29700  long val1 ;
29701  int ecode1 = 0 ;
29702  int val2 ;
29703  int ecode2 = 0 ;
29704  PyObject * obj0 = 0 ;
29705  PyObject * obj1 = 0 ;
29706  faiss::IndexLSH *result = 0 ;
29707 
29708  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexLSH",&obj0,&obj1)) SWIG_fail;
29709  ecode1 = SWIG_AsVal_long(obj0, &val1);
29710  if (!SWIG_IsOK(ecode1)) {
29711  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexLSH" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
29712  }
29713  arg1 = static_cast< faiss::Index::idx_t >(val1);
29714  ecode2 = SWIG_AsVal_int(obj1, &val2);
29715  if (!SWIG_IsOK(ecode2)) {
29716  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexLSH" "', argument " "2"" of type '" "int""'");
29717  }
29718  arg2 = static_cast< int >(val2);
29719  {
29720  Py_BEGIN_ALLOW_THREADS
29721  try {
29722  result = (faiss::IndexLSH *)new faiss::IndexLSH(arg1,arg2);
29723  } catch(faiss::FaissException & e) {
29724  PyEval_RestoreThread(_save);
29725  PyErr_SetString(PyExc_RuntimeError, e.what());
29726  SWIG_fail;
29727  }
29728  Py_END_ALLOW_THREADS
29729  }
29730  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
29731  return resultobj;
29732 fail:
29733  return NULL;
29734 }
29735 
29736 
29737 SWIGINTERN PyObject *_wrap_IndexLSH_apply_preprocess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29738  PyObject *resultobj = 0;
29739  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29740  faiss::Index::idx_t arg2 ;
29741  float *arg3 = (float *) 0 ;
29742  void *argp1 = 0 ;
29743  int res1 = 0 ;
29744  long val2 ;
29745  int ecode2 = 0 ;
29746  void *argp3 = 0 ;
29747  int res3 = 0 ;
29748  PyObject * obj0 = 0 ;
29749  PyObject * obj1 = 0 ;
29750  PyObject * obj2 = 0 ;
29751  float *result = 0 ;
29752 
29753  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexLSH_apply_preprocess",&obj0,&obj1,&obj2)) SWIG_fail;
29754  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29755  if (!SWIG_IsOK(res1)) {
29756  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_apply_preprocess" "', argument " "1"" of type '" "faiss::IndexLSH const *""'");
29757  }
29758  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29759  ecode2 = SWIG_AsVal_long(obj1, &val2);
29760  if (!SWIG_IsOK(ecode2)) {
29761  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_apply_preprocess" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
29762  }
29763  arg2 = static_cast< faiss::Index::idx_t >(val2);
29764  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
29765  if (!SWIG_IsOK(res3)) {
29766  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_apply_preprocess" "', argument " "3"" of type '" "float const *""'");
29767  }
29768  arg3 = reinterpret_cast< float * >(argp3);
29769  {
29770  Py_BEGIN_ALLOW_THREADS
29771  try {
29772  result = (float *)((faiss::IndexLSH const *)arg1)->apply_preprocess(arg2,(float const *)arg3);
29773  } catch(faiss::FaissException & e) {
29774  PyEval_RestoreThread(_save);
29775  PyErr_SetString(PyExc_RuntimeError, e.what());
29776  SWIG_fail;
29777  }
29778  Py_END_ALLOW_THREADS
29779  }
29780  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
29781  return resultobj;
29782 fail:
29783  return NULL;
29784 }
29785 
29786 
29787 SWIGINTERN PyObject *_wrap_IndexLSH_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29788  PyObject *resultobj = 0;
29789  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29790  faiss::Index::idx_t arg2 ;
29791  float *arg3 = (float *) 0 ;
29792  void *argp1 = 0 ;
29793  int res1 = 0 ;
29794  long val2 ;
29795  int ecode2 = 0 ;
29796  void *argp3 = 0 ;
29797  int res3 = 0 ;
29798  PyObject * obj0 = 0 ;
29799  PyObject * obj1 = 0 ;
29800  PyObject * obj2 = 0 ;
29801 
29802  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexLSH_train",&obj0,&obj1,&obj2)) SWIG_fail;
29803  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29804  if (!SWIG_IsOK(res1)) {
29805  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_train" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29806  }
29807  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29808  ecode2 = SWIG_AsVal_long(obj1, &val2);
29809  if (!SWIG_IsOK(ecode2)) {
29810  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
29811  }
29812  arg2 = static_cast< faiss::Index::idx_t >(val2);
29813  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
29814  if (!SWIG_IsOK(res3)) {
29815  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_train" "', argument " "3"" of type '" "float const *""'");
29816  }
29817  arg3 = reinterpret_cast< float * >(argp3);
29818  {
29819  Py_BEGIN_ALLOW_THREADS
29820  try {
29821  (arg1)->train(arg2,(float const *)arg3);
29822  } catch(faiss::FaissException & e) {
29823  PyEval_RestoreThread(_save);
29824  PyErr_SetString(PyExc_RuntimeError, e.what());
29825  SWIG_fail;
29826  }
29827  Py_END_ALLOW_THREADS
29828  }
29829  resultobj = SWIG_Py_Void();
29830  return resultobj;
29831 fail:
29832  return NULL;
29833 }
29834 
29835 
29836 SWIGINTERN PyObject *_wrap_IndexLSH_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29837  PyObject *resultobj = 0;
29838  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29839  faiss::Index::idx_t arg2 ;
29840  float *arg3 = (float *) 0 ;
29841  void *argp1 = 0 ;
29842  int res1 = 0 ;
29843  long val2 ;
29844  int ecode2 = 0 ;
29845  void *argp3 = 0 ;
29846  int res3 = 0 ;
29847  PyObject * obj0 = 0 ;
29848  PyObject * obj1 = 0 ;
29849  PyObject * obj2 = 0 ;
29850 
29851  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexLSH_add",&obj0,&obj1,&obj2)) SWIG_fail;
29852  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29853  if (!SWIG_IsOK(res1)) {
29854  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_add" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29855  }
29856  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29857  ecode2 = SWIG_AsVal_long(obj1, &val2);
29858  if (!SWIG_IsOK(ecode2)) {
29859  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
29860  }
29861  arg2 = static_cast< faiss::Index::idx_t >(val2);
29862  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
29863  if (!SWIG_IsOK(res3)) {
29864  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_add" "', argument " "3"" of type '" "float const *""'");
29865  }
29866  arg3 = reinterpret_cast< float * >(argp3);
29867  {
29868  Py_BEGIN_ALLOW_THREADS
29869  try {
29870  (arg1)->add(arg2,(float const *)arg3);
29871  } catch(faiss::FaissException & e) {
29872  PyEval_RestoreThread(_save);
29873  PyErr_SetString(PyExc_RuntimeError, e.what());
29874  SWIG_fail;
29875  }
29876  Py_END_ALLOW_THREADS
29877  }
29878  resultobj = SWIG_Py_Void();
29879  return resultobj;
29880 fail:
29881  return NULL;
29882 }
29883 
29884 
29885 SWIGINTERN PyObject *_wrap_IndexLSH_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29886  PyObject *resultobj = 0;
29887  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29888  faiss::Index::idx_t arg2 ;
29889  float *arg3 = (float *) 0 ;
29890  faiss::Index::idx_t arg4 ;
29891  float *arg5 = (float *) 0 ;
29893  void *argp1 = 0 ;
29894  int res1 = 0 ;
29895  long val2 ;
29896  int ecode2 = 0 ;
29897  void *argp3 = 0 ;
29898  int res3 = 0 ;
29899  long val4 ;
29900  int ecode4 = 0 ;
29901  void *argp5 = 0 ;
29902  int res5 = 0 ;
29903  void *argp6 = 0 ;
29904  int res6 = 0 ;
29905  PyObject * obj0 = 0 ;
29906  PyObject * obj1 = 0 ;
29907  PyObject * obj2 = 0 ;
29908  PyObject * obj3 = 0 ;
29909  PyObject * obj4 = 0 ;
29910  PyObject * obj5 = 0 ;
29911 
29912  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexLSH_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
29913  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29914  if (!SWIG_IsOK(res1)) {
29915  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_search" "', argument " "1"" of type '" "faiss::IndexLSH const *""'");
29916  }
29917  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29918  ecode2 = SWIG_AsVal_long(obj1, &val2);
29919  if (!SWIG_IsOK(ecode2)) {
29920  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
29921  }
29922  arg2 = static_cast< faiss::Index::idx_t >(val2);
29923  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
29924  if (!SWIG_IsOK(res3)) {
29925  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_search" "', argument " "3"" of type '" "float const *""'");
29926  }
29927  arg3 = reinterpret_cast< float * >(argp3);
29928  ecode4 = SWIG_AsVal_long(obj3, &val4);
29929  if (!SWIG_IsOK(ecode4)) {
29930  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexLSH_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
29931  }
29932  arg4 = static_cast< faiss::Index::idx_t >(val4);
29933  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
29934  if (!SWIG_IsOK(res5)) {
29935  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexLSH_search" "', argument " "5"" of type '" "float *""'");
29936  }
29937  arg5 = reinterpret_cast< float * >(argp5);
29938  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
29939  if (!SWIG_IsOK(res6)) {
29940  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexLSH_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
29941  }
29942  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
29943  {
29944  Py_BEGIN_ALLOW_THREADS
29945  try {
29946  ((faiss::IndexLSH const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
29947  } catch(faiss::FaissException & e) {
29948  PyEval_RestoreThread(_save);
29949  PyErr_SetString(PyExc_RuntimeError, e.what());
29950  SWIG_fail;
29951  }
29952  Py_END_ALLOW_THREADS
29953  }
29954  resultobj = SWIG_Py_Void();
29955  return resultobj;
29956 fail:
29957  return NULL;
29958 }
29959 
29960 
29961 SWIGINTERN PyObject *_wrap_IndexLSH_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29962  PyObject *resultobj = 0;
29963  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29964  void *argp1 = 0 ;
29965  int res1 = 0 ;
29966  PyObject * obj0 = 0 ;
29967 
29968  if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_reset",&obj0)) SWIG_fail;
29969  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
29970  if (!SWIG_IsOK(res1)) {
29971  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_reset" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
29972  }
29973  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
29974  {
29975  Py_BEGIN_ALLOW_THREADS
29976  try {
29977  (arg1)->reset();
29978  } catch(faiss::FaissException & e) {
29979  PyEval_RestoreThread(_save);
29980  PyErr_SetString(PyExc_RuntimeError, e.what());
29981  SWIG_fail;
29982  }
29983  Py_END_ALLOW_THREADS
29984  }
29985  resultobj = SWIG_Py_Void();
29986  return resultobj;
29987 fail:
29988  return NULL;
29989 }
29990 
29991 
29992 SWIGINTERN PyObject *_wrap_IndexLSH_transfer_thresholds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29993  PyObject *resultobj = 0;
29994  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
29996  void *argp1 = 0 ;
29997  int res1 = 0 ;
29998  void *argp2 = 0 ;
29999  int res2 = 0 ;
30000  PyObject * obj0 = 0 ;
30001  PyObject * obj1 = 0 ;
30002 
30003  if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_transfer_thresholds",&obj0,&obj1)) SWIG_fail;
30004  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
30005  if (!SWIG_IsOK(res1)) {
30006  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_transfer_thresholds" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
30007  }
30008  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
30009  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
30010  if (!SWIG_IsOK(res2)) {
30011  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_transfer_thresholds" "', argument " "2"" of type '" "faiss::LinearTransform *""'");
30012  }
30013  arg2 = reinterpret_cast< faiss::LinearTransform * >(argp2);
30014  {
30015  Py_BEGIN_ALLOW_THREADS
30016  try {
30017  (arg1)->transfer_thresholds(arg2);
30018  } catch(faiss::FaissException & e) {
30019  PyEval_RestoreThread(_save);
30020  PyErr_SetString(PyExc_RuntimeError, e.what());
30021  SWIG_fail;
30022  }
30023  Py_END_ALLOW_THREADS
30024  }
30025  resultobj = SWIG_Py_Void();
30026  return resultobj;
30027 fail:
30028  return NULL;
30029 }
30030 
30031 
30032 SWIGINTERN PyObject *_wrap_delete_IndexLSH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30033  PyObject *resultobj = 0;
30034  faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
30035  void *argp1 = 0 ;
30036  int res1 = 0 ;
30037  PyObject * obj0 = 0 ;
30038 
30039  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexLSH",&obj0)) SWIG_fail;
30040  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_DISOWN | 0 );
30041  if (!SWIG_IsOK(res1)) {
30042  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexLSH" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
30043  }
30044  arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
30045  {
30046  Py_BEGIN_ALLOW_THREADS
30047  try {
30048  delete arg1;
30049  } catch(faiss::FaissException & e) {
30050  PyEval_RestoreThread(_save);
30051  PyErr_SetString(PyExc_RuntimeError, e.what());
30052  SWIG_fail;
30053  }
30054  Py_END_ALLOW_THREADS
30055  }
30056  resultobj = SWIG_Py_Void();
30057  return resultobj;
30058 fail:
30059  return NULL;
30060 }
30061 
30062 
30063 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30064  PyObject *resultobj = 0;
30065  faiss::IndexLSH *result = 0 ;
30066 
30067  if (!PyArg_ParseTuple(args,(char *)":new_IndexLSH")) SWIG_fail;
30068  {
30069  Py_BEGIN_ALLOW_THREADS
30070  try {
30071  result = (faiss::IndexLSH *)new faiss::IndexLSH();
30072  } catch(faiss::FaissException & e) {
30073  PyEval_RestoreThread(_save);
30074  PyErr_SetString(PyExc_RuntimeError, e.what());
30075  SWIG_fail;
30076  }
30077  Py_END_ALLOW_THREADS
30078  }
30079  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
30080  return resultobj;
30081 fail:
30082  return NULL;
30083 }
30084 
30085 
30086 SWIGINTERN PyObject *_wrap_new_IndexLSH(PyObject *self, PyObject *args) {
30087  Py_ssize_t argc;
30088  PyObject *argv[5] = {
30089  0
30090  };
30091  Py_ssize_t ii;
30092 
30093  if (!PyTuple_Check(args)) SWIG_fail;
30094  argc = args ? PyObject_Length(args) : 0;
30095  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
30096  argv[ii] = PyTuple_GET_ITEM(args,ii);
30097  }
30098  if (argc == 0) {
30099  return _wrap_new_IndexLSH__SWIG_3(self, args);
30100  }
30101  if (argc == 2) {
30102  int _v;
30103  {
30104  int res = SWIG_AsVal_long(argv[0], NULL);
30105  _v = SWIG_CheckState(res);
30106  }
30107  if (_v) {
30108  {
30109  int res = SWIG_AsVal_int(argv[1], NULL);
30110  _v = SWIG_CheckState(res);
30111  }
30112  if (_v) {
30113  return _wrap_new_IndexLSH__SWIG_2(self, args);
30114  }
30115  }
30116  }
30117  if (argc == 3) {
30118  int _v;
30119  {
30120  int res = SWIG_AsVal_long(argv[0], NULL);
30121  _v = SWIG_CheckState(res);
30122  }
30123  if (_v) {
30124  {
30125  int res = SWIG_AsVal_int(argv[1], NULL);
30126  _v = SWIG_CheckState(res);
30127  }
30128  if (_v) {
30129  {
30130  int res = SWIG_AsVal_bool(argv[2], NULL);
30131  _v = SWIG_CheckState(res);
30132  }
30133  if (_v) {
30134  return _wrap_new_IndexLSH__SWIG_1(self, args);
30135  }
30136  }
30137  }
30138  }
30139  if (argc == 4) {
30140  int _v;
30141  {
30142  int res = SWIG_AsVal_long(argv[0], NULL);
30143  _v = SWIG_CheckState(res);
30144  }
30145  if (_v) {
30146  {
30147  int res = SWIG_AsVal_int(argv[1], NULL);
30148  _v = SWIG_CheckState(res);
30149  }
30150  if (_v) {
30151  {
30152  int res = SWIG_AsVal_bool(argv[2], NULL);
30153  _v = SWIG_CheckState(res);
30154  }
30155  if (_v) {
30156  {
30157  int res = SWIG_AsVal_bool(argv[3], NULL);
30158  _v = SWIG_CheckState(res);
30159  }
30160  if (_v) {
30161  return _wrap_new_IndexLSH__SWIG_0(self, args);
30162  }
30163  }
30164  }
30165  }
30166  }
30167 
30168 fail:
30169  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexLSH'.\n"
30170  " Possible C/C++ prototypes are:\n"
30171  " faiss::IndexLSH::IndexLSH(faiss::Index::idx_t,int,bool,bool)\n"
30172  " faiss::IndexLSH::IndexLSH(faiss::Index::idx_t,int,bool)\n"
30173  " faiss::IndexLSH::IndexLSH(faiss::Index::idx_t,int)\n"
30174  " faiss::IndexLSH::IndexLSH()\n");
30175  return 0;
30176 }
30177 
30178 
30179 SWIGINTERN PyObject *IndexLSH_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30180  PyObject *obj;
30181  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
30182  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexLSH, SWIG_NewClientData(obj));
30183  return SWIG_Py_Void();
30184 }
30185 
30186 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_temperature_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30187  PyObject *resultobj = 0;
30189  double arg2 ;
30190  void *argp1 = 0 ;
30191  int res1 = 0 ;
30192  double val2 ;
30193  int ecode2 = 0 ;
30194  PyObject * obj0 = 0 ;
30195  PyObject * obj1 = 0 ;
30196 
30197  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_init_temperature_set",&obj0,&obj1)) SWIG_fail;
30198  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30199  if (!SWIG_IsOK(res1)) {
30200  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_temperature_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30201  }
30202  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30203  ecode2 = SWIG_AsVal_double(obj1, &val2);
30204  if (!SWIG_IsOK(ecode2)) {
30205  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_init_temperature_set" "', argument " "2"" of type '" "double""'");
30206  }
30207  arg2 = static_cast< double >(val2);
30208  if (arg1) (arg1)->init_temperature = arg2;
30209  resultobj = SWIG_Py_Void();
30210  return resultobj;
30211 fail:
30212  return NULL;
30213 }
30214 
30215 
30216 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_temperature_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30217  PyObject *resultobj = 0;
30219  void *argp1 = 0 ;
30220  int res1 = 0 ;
30221  PyObject * obj0 = 0 ;
30222  double result;
30223 
30224  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_init_temperature_get",&obj0)) SWIG_fail;
30225  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30226  if (!SWIG_IsOK(res1)) {
30227  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_temperature_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30228  }
30229  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30230  result = (double) ((arg1)->init_temperature);
30231  resultobj = SWIG_From_double(static_cast< double >(result));
30232  return resultobj;
30233 fail:
30234  return NULL;
30235 }
30236 
30237 
30238 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_temperature_decay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30239  PyObject *resultobj = 0;
30241  double arg2 ;
30242  void *argp1 = 0 ;
30243  int res1 = 0 ;
30244  double val2 ;
30245  int ecode2 = 0 ;
30246  PyObject * obj0 = 0 ;
30247  PyObject * obj1 = 0 ;
30248 
30249  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_temperature_decay_set",&obj0,&obj1)) SWIG_fail;
30250  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30251  if (!SWIG_IsOK(res1)) {
30252  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_temperature_decay_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30253  }
30254  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30255  ecode2 = SWIG_AsVal_double(obj1, &val2);
30256  if (!SWIG_IsOK(ecode2)) {
30257  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_temperature_decay_set" "', argument " "2"" of type '" "double""'");
30258  }
30259  arg2 = static_cast< double >(val2);
30260  if (arg1) (arg1)->temperature_decay = arg2;
30261  resultobj = SWIG_Py_Void();
30262  return resultobj;
30263 fail:
30264  return NULL;
30265 }
30266 
30267 
30268 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_temperature_decay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30269  PyObject *resultobj = 0;
30271  void *argp1 = 0 ;
30272  int res1 = 0 ;
30273  PyObject * obj0 = 0 ;
30274  double result;
30275 
30276  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_temperature_decay_get",&obj0)) SWIG_fail;
30277  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30278  if (!SWIG_IsOK(res1)) {
30279  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_temperature_decay_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30280  }
30281  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30282  result = (double) ((arg1)->temperature_decay);
30283  resultobj = SWIG_From_double(static_cast< double >(result));
30284  return resultobj;
30285 fail:
30286  return NULL;
30287 }
30288 
30289 
30290 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_iter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30291  PyObject *resultobj = 0;
30293  int arg2 ;
30294  void *argp1 = 0 ;
30295  int res1 = 0 ;
30296  int val2 ;
30297  int ecode2 = 0 ;
30298  PyObject * obj0 = 0 ;
30299  PyObject * obj1 = 0 ;
30300 
30301  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_n_iter_set",&obj0,&obj1)) SWIG_fail;
30302  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30303  if (!SWIG_IsOK(res1)) {
30304  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_iter_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30305  }
30306  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30307  ecode2 = SWIG_AsVal_int(obj1, &val2);
30308  if (!SWIG_IsOK(ecode2)) {
30309  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_n_iter_set" "', argument " "2"" of type '" "int""'");
30310  }
30311  arg2 = static_cast< int >(val2);
30312  if (arg1) (arg1)->n_iter = arg2;
30313  resultobj = SWIG_Py_Void();
30314  return resultobj;
30315 fail:
30316  return NULL;
30317 }
30318 
30319 
30320 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_iter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30321  PyObject *resultobj = 0;
30323  void *argp1 = 0 ;
30324  int res1 = 0 ;
30325  PyObject * obj0 = 0 ;
30326  int result;
30327 
30328  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_n_iter_get",&obj0)) SWIG_fail;
30329  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30330  if (!SWIG_IsOK(res1)) {
30331  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_iter_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30332  }
30333  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30334  result = (int) ((arg1)->n_iter);
30335  resultobj = SWIG_From_int(static_cast< int >(result));
30336  return resultobj;
30337 fail:
30338  return NULL;
30339 }
30340 
30341 
30342 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_redo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30343  PyObject *resultobj = 0;
30345  int arg2 ;
30346  void *argp1 = 0 ;
30347  int res1 = 0 ;
30348  int val2 ;
30349  int ecode2 = 0 ;
30350  PyObject * obj0 = 0 ;
30351  PyObject * obj1 = 0 ;
30352 
30353  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_n_redo_set",&obj0,&obj1)) SWIG_fail;
30354  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30355  if (!SWIG_IsOK(res1)) {
30356  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_redo_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30357  }
30358  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30359  ecode2 = SWIG_AsVal_int(obj1, &val2);
30360  if (!SWIG_IsOK(ecode2)) {
30361  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_n_redo_set" "', argument " "2"" of type '" "int""'");
30362  }
30363  arg2 = static_cast< int >(val2);
30364  if (arg1) (arg1)->n_redo = arg2;
30365  resultobj = SWIG_Py_Void();
30366  return resultobj;
30367 fail:
30368  return NULL;
30369 }
30370 
30371 
30372 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_redo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30373  PyObject *resultobj = 0;
30375  void *argp1 = 0 ;
30376  int res1 = 0 ;
30377  PyObject * obj0 = 0 ;
30378  int result;
30379 
30380  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_n_redo_get",&obj0)) SWIG_fail;
30381  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30382  if (!SWIG_IsOK(res1)) {
30383  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_redo_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30384  }
30385  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30386  result = (int) ((arg1)->n_redo);
30387  resultobj = SWIG_From_int(static_cast< int >(result));
30388  return resultobj;
30389 fail:
30390  return NULL;
30391 }
30392 
30393 
30394 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_seed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30395  PyObject *resultobj = 0;
30397  int arg2 ;
30398  void *argp1 = 0 ;
30399  int res1 = 0 ;
30400  int val2 ;
30401  int ecode2 = 0 ;
30402  PyObject * obj0 = 0 ;
30403  PyObject * obj1 = 0 ;
30404 
30405  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_seed_set",&obj0,&obj1)) SWIG_fail;
30406  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30407  if (!SWIG_IsOK(res1)) {
30408  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_seed_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30409  }
30410  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30411  ecode2 = SWIG_AsVal_int(obj1, &val2);
30412  if (!SWIG_IsOK(ecode2)) {
30413  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_seed_set" "', argument " "2"" of type '" "int""'");
30414  }
30415  arg2 = static_cast< int >(val2);
30416  if (arg1) (arg1)->seed = arg2;
30417  resultobj = SWIG_Py_Void();
30418  return resultobj;
30419 fail:
30420  return NULL;
30421 }
30422 
30423 
30424 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_seed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30425  PyObject *resultobj = 0;
30427  void *argp1 = 0 ;
30428  int res1 = 0 ;
30429  PyObject * obj0 = 0 ;
30430  int result;
30431 
30432  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_seed_get",&obj0)) SWIG_fail;
30433  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30434  if (!SWIG_IsOK(res1)) {
30435  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_seed_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30436  }
30437  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30438  result = (int) ((arg1)->seed);
30439  resultobj = SWIG_From_int(static_cast< int >(result));
30440  return resultobj;
30441 fail:
30442  return NULL;
30443 }
30444 
30445 
30446 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30447  PyObject *resultobj = 0;
30449  int arg2 ;
30450  void *argp1 = 0 ;
30451  int res1 = 0 ;
30452  int val2 ;
30453  int ecode2 = 0 ;
30454  PyObject * obj0 = 0 ;
30455  PyObject * obj1 = 0 ;
30456 
30457  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_verbose_set",&obj0,&obj1)) SWIG_fail;
30458  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30459  if (!SWIG_IsOK(res1)) {
30460  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_verbose_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30461  }
30462  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30463  ecode2 = SWIG_AsVal_int(obj1, &val2);
30464  if (!SWIG_IsOK(ecode2)) {
30465  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_verbose_set" "', argument " "2"" of type '" "int""'");
30466  }
30467  arg2 = static_cast< int >(val2);
30468  if (arg1) (arg1)->verbose = arg2;
30469  resultobj = SWIG_Py_Void();
30470  return resultobj;
30471 fail:
30472  return NULL;
30473 }
30474 
30475 
30476 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30477  PyObject *resultobj = 0;
30479  void *argp1 = 0 ;
30480  int res1 = 0 ;
30481  PyObject * obj0 = 0 ;
30482  int result;
30483 
30484  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_verbose_get",&obj0)) SWIG_fail;
30485  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30486  if (!SWIG_IsOK(res1)) {
30487  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_verbose_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30488  }
30489  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30490  result = (int) ((arg1)->verbose);
30491  resultobj = SWIG_From_int(static_cast< int >(result));
30492  return resultobj;
30493 fail:
30494  return NULL;
30495 }
30496 
30497 
30498 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_only_bit_flips_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30499  PyObject *resultobj = 0;
30501  bool arg2 ;
30502  void *argp1 = 0 ;
30503  int res1 = 0 ;
30504  bool val2 ;
30505  int ecode2 = 0 ;
30506  PyObject * obj0 = 0 ;
30507  PyObject * obj1 = 0 ;
30508 
30509  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_only_bit_flips_set",&obj0,&obj1)) SWIG_fail;
30510  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30511  if (!SWIG_IsOK(res1)) {
30512  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_only_bit_flips_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30513  }
30514  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30515  ecode2 = SWIG_AsVal_bool(obj1, &val2);
30516  if (!SWIG_IsOK(ecode2)) {
30517  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_only_bit_flips_set" "', argument " "2"" of type '" "bool""'");
30518  }
30519  arg2 = static_cast< bool >(val2);
30520  if (arg1) (arg1)->only_bit_flips = arg2;
30521  resultobj = SWIG_Py_Void();
30522  return resultobj;
30523 fail:
30524  return NULL;
30525 }
30526 
30527 
30528 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_only_bit_flips_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30529  PyObject *resultobj = 0;
30531  void *argp1 = 0 ;
30532  int res1 = 0 ;
30533  PyObject * obj0 = 0 ;
30534  bool result;
30535 
30536  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_only_bit_flips_get",&obj0)) SWIG_fail;
30537  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30538  if (!SWIG_IsOK(res1)) {
30539  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_only_bit_flips_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30540  }
30541  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30542  result = (bool) ((arg1)->only_bit_flips);
30543  resultobj = SWIG_From_bool(static_cast< bool >(result));
30544  return resultobj;
30545 fail:
30546  return NULL;
30547 }
30548 
30549 
30550 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_random_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30551  PyObject *resultobj = 0;
30553  bool arg2 ;
30554  void *argp1 = 0 ;
30555  int res1 = 0 ;
30556  bool val2 ;
30557  int ecode2 = 0 ;
30558  PyObject * obj0 = 0 ;
30559  PyObject * obj1 = 0 ;
30560 
30561  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_init_random_set",&obj0,&obj1)) SWIG_fail;
30562  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30563  if (!SWIG_IsOK(res1)) {
30564  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_random_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30565  }
30566  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30567  ecode2 = SWIG_AsVal_bool(obj1, &val2);
30568  if (!SWIG_IsOK(ecode2)) {
30569  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_init_random_set" "', argument " "2"" of type '" "bool""'");
30570  }
30571  arg2 = static_cast< bool >(val2);
30572  if (arg1) (arg1)->init_random = arg2;
30573  resultobj = SWIG_Py_Void();
30574  return resultobj;
30575 fail:
30576  return NULL;
30577 }
30578 
30579 
30580 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_random_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30581  PyObject *resultobj = 0;
30583  void *argp1 = 0 ;
30584  int res1 = 0 ;
30585  PyObject * obj0 = 0 ;
30586  bool result;
30587 
30588  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_init_random_get",&obj0)) SWIG_fail;
30589  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
30590  if (!SWIG_IsOK(res1)) {
30591  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_random_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30592  }
30593  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30594  result = (bool) ((arg1)->init_random);
30595  resultobj = SWIG_From_bool(static_cast< bool >(result));
30596  return resultobj;
30597 fail:
30598  return NULL;
30599 }
30600 
30601 
30602 SWIGINTERN PyObject *_wrap_new_SimulatedAnnealingParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30603  PyObject *resultobj = 0;
30605 
30606  if (!PyArg_ParseTuple(args,(char *)":new_SimulatedAnnealingParameters")) SWIG_fail;
30607  {
30608  Py_BEGIN_ALLOW_THREADS
30609  try {
30611  } catch(faiss::FaissException & e) {
30612  PyEval_RestoreThread(_save);
30613  PyErr_SetString(PyExc_RuntimeError, e.what());
30614  SWIG_fail;
30615  }
30616  Py_END_ALLOW_THREADS
30617  }
30618  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__SimulatedAnnealingParameters, SWIG_POINTER_NEW | 0 );
30619  return resultobj;
30620 fail:
30621  return NULL;
30622 }
30623 
30624 
30625 SWIGINTERN PyObject *_wrap_delete_SimulatedAnnealingParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30626  PyObject *resultobj = 0;
30628  void *argp1 = 0 ;
30629  int res1 = 0 ;
30630  PyObject * obj0 = 0 ;
30631 
30632  if (!PyArg_ParseTuple(args,(char *)"O:delete_SimulatedAnnealingParameters",&obj0)) SWIG_fail;
30633  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, SWIG_POINTER_DISOWN | 0 );
30634  if (!SWIG_IsOK(res1)) {
30635  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimulatedAnnealingParameters" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
30636  }
30637  arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
30638  delete arg1;
30639  resultobj = SWIG_Py_Void();
30640  return resultobj;
30641 fail:
30642  return NULL;
30643 }
30644 
30645 
30646 SWIGINTERN PyObject *SimulatedAnnealingParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30647  PyObject *obj;
30648  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
30649  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__SimulatedAnnealingParameters, SWIG_NewClientData(obj));
30650  return SWIG_Py_Void();
30651 }
30652 
30653 SWIGINTERN PyObject *_wrap_PermutationObjective_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30654  PyObject *resultobj = 0;
30656  int arg2 ;
30657  void *argp1 = 0 ;
30658  int res1 = 0 ;
30659  int val2 ;
30660  int ecode2 = 0 ;
30661  PyObject * obj0 = 0 ;
30662  PyObject * obj1 = 0 ;
30663 
30664  if (!PyArg_ParseTuple(args,(char *)"OO:PermutationObjective_n_set",&obj0,&obj1)) SWIG_fail;
30665  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
30666  if (!SWIG_IsOK(res1)) {
30667  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_n_set" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
30668  }
30669  arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
30670  ecode2 = SWIG_AsVal_int(obj1, &val2);
30671  if (!SWIG_IsOK(ecode2)) {
30672  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PermutationObjective_n_set" "', argument " "2"" of type '" "int""'");
30673  }
30674  arg2 = static_cast< int >(val2);
30675  if (arg1) (arg1)->n = arg2;
30676  resultobj = SWIG_Py_Void();
30677  return resultobj;
30678 fail:
30679  return NULL;
30680 }
30681 
30682 
30683 SWIGINTERN PyObject *_wrap_PermutationObjective_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30684  PyObject *resultobj = 0;
30686  void *argp1 = 0 ;
30687  int res1 = 0 ;
30688  PyObject * obj0 = 0 ;
30689  int result;
30690 
30691  if (!PyArg_ParseTuple(args,(char *)"O:PermutationObjective_n_get",&obj0)) SWIG_fail;
30692  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
30693  if (!SWIG_IsOK(res1)) {
30694  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_n_get" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
30695  }
30696  arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
30697  result = (int) ((arg1)->n);
30698  resultobj = SWIG_From_int(static_cast< int >(result));
30699  return resultobj;
30700 fail:
30701  return NULL;
30702 }
30703 
30704 
30705 SWIGINTERN PyObject *_wrap_PermutationObjective_compute_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30706  PyObject *resultobj = 0;
30708  int *arg2 = (int *) 0 ;
30709  void *argp1 = 0 ;
30710  int res1 = 0 ;
30711  void *argp2 = 0 ;
30712  int res2 = 0 ;
30713  PyObject * obj0 = 0 ;
30714  PyObject * obj1 = 0 ;
30715  double result;
30716 
30717  if (!PyArg_ParseTuple(args,(char *)"OO:PermutationObjective_compute_cost",&obj0,&obj1)) SWIG_fail;
30718  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
30719  if (!SWIG_IsOK(res1)) {
30720  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_compute_cost" "', argument " "1"" of type '" "faiss::PermutationObjective const *""'");
30721  }
30722  arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
30723  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
30724  if (!SWIG_IsOK(res2)) {
30725  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PermutationObjective_compute_cost" "', argument " "2"" of type '" "int const *""'");
30726  }
30727  arg2 = reinterpret_cast< int * >(argp2);
30728  {
30729  Py_BEGIN_ALLOW_THREADS
30730  try {
30731  result = (double)((faiss::PermutationObjective const *)arg1)->compute_cost((int const *)arg2);
30732  } catch(faiss::FaissException & e) {
30733  PyEval_RestoreThread(_save);
30734  PyErr_SetString(PyExc_RuntimeError, e.what());
30735  SWIG_fail;
30736  }
30737  Py_END_ALLOW_THREADS
30738  }
30739  resultobj = SWIG_From_double(static_cast< double >(result));
30740  return resultobj;
30741 fail:
30742  return NULL;
30743 }
30744 
30745 
30746 SWIGINTERN PyObject *_wrap_PermutationObjective_cost_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30747  PyObject *resultobj = 0;
30749  int *arg2 = (int *) 0 ;
30750  int arg3 ;
30751  int arg4 ;
30752  void *argp1 = 0 ;
30753  int res1 = 0 ;
30754  void *argp2 = 0 ;
30755  int res2 = 0 ;
30756  int val3 ;
30757  int ecode3 = 0 ;
30758  int val4 ;
30759  int ecode4 = 0 ;
30760  PyObject * obj0 = 0 ;
30761  PyObject * obj1 = 0 ;
30762  PyObject * obj2 = 0 ;
30763  PyObject * obj3 = 0 ;
30764  double result;
30765 
30766  if (!PyArg_ParseTuple(args,(char *)"OOOO:PermutationObjective_cost_update",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
30767  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
30768  if (!SWIG_IsOK(res1)) {
30769  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_cost_update" "', argument " "1"" of type '" "faiss::PermutationObjective const *""'");
30770  }
30771  arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
30772  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
30773  if (!SWIG_IsOK(res2)) {
30774  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PermutationObjective_cost_update" "', argument " "2"" of type '" "int const *""'");
30775  }
30776  arg2 = reinterpret_cast< int * >(argp2);
30777  ecode3 = SWIG_AsVal_int(obj2, &val3);
30778  if (!SWIG_IsOK(ecode3)) {
30779  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PermutationObjective_cost_update" "', argument " "3"" of type '" "int""'");
30780  }
30781  arg3 = static_cast< int >(val3);
30782  ecode4 = SWIG_AsVal_int(obj3, &val4);
30783  if (!SWIG_IsOK(ecode4)) {
30784  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PermutationObjective_cost_update" "', argument " "4"" of type '" "int""'");
30785  }
30786  arg4 = static_cast< int >(val4);
30787  {
30788  Py_BEGIN_ALLOW_THREADS
30789  try {
30790  result = (double)((faiss::PermutationObjective const *)arg1)->cost_update((int const *)arg2,arg3,arg4);
30791  } catch(faiss::FaissException & e) {
30792  PyEval_RestoreThread(_save);
30793  PyErr_SetString(PyExc_RuntimeError, e.what());
30794  SWIG_fail;
30795  }
30796  Py_END_ALLOW_THREADS
30797  }
30798  resultobj = SWIG_From_double(static_cast< double >(result));
30799  return resultobj;
30800 fail:
30801  return NULL;
30802 }
30803 
30804 
30805 SWIGINTERN PyObject *_wrap_delete_PermutationObjective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30806  PyObject *resultobj = 0;
30808  void *argp1 = 0 ;
30809  int res1 = 0 ;
30810  PyObject * obj0 = 0 ;
30811 
30812  if (!PyArg_ParseTuple(args,(char *)"O:delete_PermutationObjective",&obj0)) SWIG_fail;
30813  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, SWIG_POINTER_DISOWN | 0 );
30814  if (!SWIG_IsOK(res1)) {
30815  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PermutationObjective" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
30816  }
30817  arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
30818  {
30819  Py_BEGIN_ALLOW_THREADS
30820  try {
30821  delete arg1;
30822  } catch(faiss::FaissException & e) {
30823  PyEval_RestoreThread(_save);
30824  PyErr_SetString(PyExc_RuntimeError, e.what());
30825  SWIG_fail;
30826  }
30827  Py_END_ALLOW_THREADS
30828  }
30829  resultobj = SWIG_Py_Void();
30830  return resultobj;
30831 fail:
30832  return NULL;
30833 }
30834 
30835 
30836 SWIGINTERN PyObject *PermutationObjective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30837  PyObject *obj;
30838  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
30839  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__PermutationObjective, SWIG_NewClientData(obj));
30840  return SWIG_Py_Void();
30841 }
30842 
30843 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_dis_weight_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30844  PyObject *resultobj = 0;
30846  double arg2 ;
30847  void *argp1 = 0 ;
30848  int res1 = 0 ;
30849  double val2 ;
30850  int ecode2 = 0 ;
30851  PyObject * obj0 = 0 ;
30852  PyObject * obj1 = 0 ;
30853 
30854  if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_dis_weight_factor_set",&obj0,&obj1)) SWIG_fail;
30855  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
30856  if (!SWIG_IsOK(res1)) {
30857  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_dis_weight_factor_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
30858  }
30859  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
30860  ecode2 = SWIG_AsVal_double(obj1, &val2);
30861  if (!SWIG_IsOK(ecode2)) {
30862  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_dis_weight_factor_set" "', argument " "2"" of type '" "double""'");
30863  }
30864  arg2 = static_cast< double >(val2);
30865  if (arg1) (arg1)->dis_weight_factor = arg2;
30866  resultobj = SWIG_Py_Void();
30867  return resultobj;
30868 fail:
30869  return NULL;
30870 }
30871 
30872 
30873 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_dis_weight_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30874  PyObject *resultobj = 0;
30876  void *argp1 = 0 ;
30877  int res1 = 0 ;
30878  PyObject * obj0 = 0 ;
30879  double result;
30880 
30881  if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_dis_weight_factor_get",&obj0)) SWIG_fail;
30882  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
30883  if (!SWIG_IsOK(res1)) {
30884  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_dis_weight_factor_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
30885  }
30886  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
30887  result = (double) ((arg1)->dis_weight_factor);
30888  resultobj = SWIG_From_double(static_cast< double >(result));
30889  return resultobj;
30890 fail:
30891  return NULL;
30892 }
30893 
30894 
30895 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30896  PyObject *resultobj = 0;
30897  double arg1 ;
30898  double val1 ;
30899  int ecode1 = 0 ;
30900  PyObject * obj0 = 0 ;
30901  double result;
30902 
30903  if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_sqr",&obj0)) SWIG_fail;
30904  ecode1 = SWIG_AsVal_double(obj0, &val1);
30905  if (!SWIG_IsOK(ecode1)) {
30906  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ReproduceDistancesObjective_sqr" "', argument " "1"" of type '" "double""'");
30907  }
30908  arg1 = static_cast< double >(val1);
30909  {
30910  Py_BEGIN_ALLOW_THREADS
30911  try {
30912  result = (double)faiss::ReproduceDistancesObjective::sqr(arg1);
30913  } catch(faiss::FaissException & e) {
30914  PyEval_RestoreThread(_save);
30915  PyErr_SetString(PyExc_RuntimeError, e.what());
30916  SWIG_fail;
30917  }
30918  Py_END_ALLOW_THREADS
30919  }
30920  resultobj = SWIG_From_double(static_cast< double >(result));
30921  return resultobj;
30922 fail:
30923  return NULL;
30924 }
30925 
30926 
30927 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_dis_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30928  PyObject *resultobj = 0;
30930  double arg2 ;
30931  void *argp1 = 0 ;
30932  int res1 = 0 ;
30933  double val2 ;
30934  int ecode2 = 0 ;
30935  PyObject * obj0 = 0 ;
30936  PyObject * obj1 = 0 ;
30937  double result;
30938 
30939  if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_dis_weight",&obj0,&obj1)) SWIG_fail;
30940  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
30941  if (!SWIG_IsOK(res1)) {
30942  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_dis_weight" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
30943  }
30944  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
30945  ecode2 = SWIG_AsVal_double(obj1, &val2);
30946  if (!SWIG_IsOK(ecode2)) {
30947  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_dis_weight" "', argument " "2"" of type '" "double""'");
30948  }
30949  arg2 = static_cast< double >(val2);
30950  {
30951  Py_BEGIN_ALLOW_THREADS
30952  try {
30953  result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->dis_weight(arg2);
30954  } catch(faiss::FaissException & e) {
30955  PyEval_RestoreThread(_save);
30956  PyErr_SetString(PyExc_RuntimeError, e.what());
30957  SWIG_fail;
30958  }
30959  Py_END_ALLOW_THREADS
30960  }
30961  resultobj = SWIG_From_double(static_cast< double >(result));
30962  return resultobj;
30963 fail:
30964  return NULL;
30965 }
30966 
30967 
30968 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_source_dis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30969  PyObject *resultobj = 0;
30971  std::vector< double > *arg2 = (std::vector< double > *) 0 ;
30972  void *argp1 = 0 ;
30973  int res1 = 0 ;
30974  void *argp2 = 0 ;
30975  int res2 = 0 ;
30976  PyObject * obj0 = 0 ;
30977  PyObject * obj1 = 0 ;
30978 
30979  if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_source_dis_set",&obj0,&obj1)) SWIG_fail;
30980  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
30981  if (!SWIG_IsOK(res1)) {
30982  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_source_dis_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
30983  }
30984  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
30985  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
30986  if (!SWIG_IsOK(res2)) {
30987  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_source_dis_set" "', argument " "2"" of type '" "std::vector< double > *""'");
30988  }
30989  arg2 = reinterpret_cast< std::vector< double > * >(argp2);
30990  if (arg1) (arg1)->source_dis = *arg2;
30991  resultobj = SWIG_Py_Void();
30992  return resultobj;
30993 fail:
30994  return NULL;
30995 }
30996 
30997 
30998 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_source_dis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30999  PyObject *resultobj = 0;
31001  void *argp1 = 0 ;
31002  int res1 = 0 ;
31003  PyObject * obj0 = 0 ;
31004  std::vector< double > *result = 0 ;
31005 
31006  if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_source_dis_get",&obj0)) SWIG_fail;
31007  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31008  if (!SWIG_IsOK(res1)) {
31009  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_source_dis_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
31010  }
31011  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31012  result = (std::vector< double > *)& ((arg1)->source_dis);
31013  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
31014  return resultobj;
31015 fail:
31016  return NULL;
31017 }
31018 
31019 
31020 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_target_dis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31021  PyObject *resultobj = 0;
31023  double *arg2 = (double *) 0 ;
31024  void *argp1 = 0 ;
31025  int res1 = 0 ;
31026  void *argp2 = 0 ;
31027  int res2 = 0 ;
31028  PyObject * obj0 = 0 ;
31029  PyObject * obj1 = 0 ;
31030 
31031  if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_target_dis_set",&obj0,&obj1)) SWIG_fail;
31032  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31033  if (!SWIG_IsOK(res1)) {
31034  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_target_dis_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
31035  }
31036  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31037  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 );
31038  if (!SWIG_IsOK(res2)) {
31039  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_target_dis_set" "', argument " "2"" of type '" "double const *""'");
31040  }
31041  arg2 = reinterpret_cast< double * >(argp2);
31042  if (arg1) (arg1)->target_dis = (double const *)arg2;
31043  resultobj = SWIG_Py_Void();
31044  return resultobj;
31045 fail:
31046  return NULL;
31047 }
31048 
31049 
31050 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_target_dis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31051  PyObject *resultobj = 0;
31053  void *argp1 = 0 ;
31054  int res1 = 0 ;
31055  PyObject * obj0 = 0 ;
31056  double *result = 0 ;
31057 
31058  if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_target_dis_get",&obj0)) SWIG_fail;
31059  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31060  if (!SWIG_IsOK(res1)) {
31061  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_target_dis_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
31062  }
31063  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31064  result = (double *) ((arg1)->target_dis);
31065  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
31066  return resultobj;
31067 fail:
31068  return NULL;
31069 }
31070 
31071 
31072 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_weights_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31073  PyObject *resultobj = 0;
31075  std::vector< double > *arg2 = (std::vector< double > *) 0 ;
31076  void *argp1 = 0 ;
31077  int res1 = 0 ;
31078  void *argp2 = 0 ;
31079  int res2 = 0 ;
31080  PyObject * obj0 = 0 ;
31081  PyObject * obj1 = 0 ;
31082 
31083  if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_weights_set",&obj0,&obj1)) SWIG_fail;
31084  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31085  if (!SWIG_IsOK(res1)) {
31086  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_weights_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
31087  }
31088  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31089  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
31090  if (!SWIG_IsOK(res2)) {
31091  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_weights_set" "', argument " "2"" of type '" "std::vector< double > *""'");
31092  }
31093  arg2 = reinterpret_cast< std::vector< double > * >(argp2);
31094  if (arg1) (arg1)->weights = *arg2;
31095  resultobj = SWIG_Py_Void();
31096  return resultobj;
31097 fail:
31098  return NULL;
31099 }
31100 
31101 
31102 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_weights_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31103  PyObject *resultobj = 0;
31105  void *argp1 = 0 ;
31106  int res1 = 0 ;
31107  PyObject * obj0 = 0 ;
31108  std::vector< double > *result = 0 ;
31109 
31110  if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_weights_get",&obj0)) SWIG_fail;
31111  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31112  if (!SWIG_IsOK(res1)) {
31113  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_weights_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
31114  }
31115  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31116  result = (std::vector< double > *)& ((arg1)->weights);
31117  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
31118  return resultobj;
31119 fail:
31120  return NULL;
31121 }
31122 
31123 
31124 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_get_source_dis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31125  PyObject *resultobj = 0;
31127  int arg2 ;
31128  int arg3 ;
31129  void *argp1 = 0 ;
31130  int res1 = 0 ;
31131  int val2 ;
31132  int ecode2 = 0 ;
31133  int val3 ;
31134  int ecode3 = 0 ;
31135  PyObject * obj0 = 0 ;
31136  PyObject * obj1 = 0 ;
31137  PyObject * obj2 = 0 ;
31138  double result;
31139 
31140  if (!PyArg_ParseTuple(args,(char *)"OOO:ReproduceDistancesObjective_get_source_dis",&obj0,&obj1,&obj2)) SWIG_fail;
31141  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31142  if (!SWIG_IsOK(res1)) {
31143  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_get_source_dis" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
31144  }
31145  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31146  ecode2 = SWIG_AsVal_int(obj1, &val2);
31147  if (!SWIG_IsOK(ecode2)) {
31148  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_get_source_dis" "', argument " "2"" of type '" "int""'");
31149  }
31150  arg2 = static_cast< int >(val2);
31151  ecode3 = SWIG_AsVal_int(obj2, &val3);
31152  if (!SWIG_IsOK(ecode3)) {
31153  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReproduceDistancesObjective_get_source_dis" "', argument " "3"" of type '" "int""'");
31154  }
31155  arg3 = static_cast< int >(val3);
31156  {
31157  Py_BEGIN_ALLOW_THREADS
31158  try {
31159  result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->get_source_dis(arg2,arg3);
31160  } catch(faiss::FaissException & e) {
31161  PyEval_RestoreThread(_save);
31162  PyErr_SetString(PyExc_RuntimeError, e.what());
31163  SWIG_fail;
31164  }
31165  Py_END_ALLOW_THREADS
31166  }
31167  resultobj = SWIG_From_double(static_cast< double >(result));
31168  return resultobj;
31169 fail:
31170  return NULL;
31171 }
31172 
31173 
31174 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_compute_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31175  PyObject *resultobj = 0;
31177  int *arg2 = (int *) 0 ;
31178  void *argp1 = 0 ;
31179  int res1 = 0 ;
31180  void *argp2 = 0 ;
31181  int res2 = 0 ;
31182  PyObject * obj0 = 0 ;
31183  PyObject * obj1 = 0 ;
31184  double result;
31185 
31186  if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_compute_cost",&obj0,&obj1)) SWIG_fail;
31187  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31188  if (!SWIG_IsOK(res1)) {
31189  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_compute_cost" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
31190  }
31191  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31192  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
31193  if (!SWIG_IsOK(res2)) {
31194  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_compute_cost" "', argument " "2"" of type '" "int const *""'");
31195  }
31196  arg2 = reinterpret_cast< int * >(argp2);
31197  {
31198  Py_BEGIN_ALLOW_THREADS
31199  try {
31200  result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->compute_cost((int const *)arg2);
31201  } catch(faiss::FaissException & e) {
31202  PyEval_RestoreThread(_save);
31203  PyErr_SetString(PyExc_RuntimeError, e.what());
31204  SWIG_fail;
31205  }
31206  Py_END_ALLOW_THREADS
31207  }
31208  resultobj = SWIG_From_double(static_cast< double >(result));
31209  return resultobj;
31210 fail:
31211  return NULL;
31212 }
31213 
31214 
31215 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_cost_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31216  PyObject *resultobj = 0;
31218  int *arg2 = (int *) 0 ;
31219  int arg3 ;
31220  int arg4 ;
31221  void *argp1 = 0 ;
31222  int res1 = 0 ;
31223  void *argp2 = 0 ;
31224  int res2 = 0 ;
31225  int val3 ;
31226  int ecode3 = 0 ;
31227  int val4 ;
31228  int ecode4 = 0 ;
31229  PyObject * obj0 = 0 ;
31230  PyObject * obj1 = 0 ;
31231  PyObject * obj2 = 0 ;
31232  PyObject * obj3 = 0 ;
31233  double result;
31234 
31235  if (!PyArg_ParseTuple(args,(char *)"OOOO:ReproduceDistancesObjective_cost_update",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
31236  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31237  if (!SWIG_IsOK(res1)) {
31238  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
31239  }
31240  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31241  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
31242  if (!SWIG_IsOK(res2)) {
31243  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "2"" of type '" "int const *""'");
31244  }
31245  arg2 = reinterpret_cast< int * >(argp2);
31246  ecode3 = SWIG_AsVal_int(obj2, &val3);
31247  if (!SWIG_IsOK(ecode3)) {
31248  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "3"" of type '" "int""'");
31249  }
31250  arg3 = static_cast< int >(val3);
31251  ecode4 = SWIG_AsVal_int(obj3, &val4);
31252  if (!SWIG_IsOK(ecode4)) {
31253  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "4"" of type '" "int""'");
31254  }
31255  arg4 = static_cast< int >(val4);
31256  {
31257  Py_BEGIN_ALLOW_THREADS
31258  try {
31259  result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->cost_update((int const *)arg2,arg3,arg4);
31260  } catch(faiss::FaissException & e) {
31261  PyEval_RestoreThread(_save);
31262  PyErr_SetString(PyExc_RuntimeError, e.what());
31263  SWIG_fail;
31264  }
31265  Py_END_ALLOW_THREADS
31266  }
31267  resultobj = SWIG_From_double(static_cast< double >(result));
31268  return resultobj;
31269 fail:
31270  return NULL;
31271 }
31272 
31273 
31274 SWIGINTERN PyObject *_wrap_new_ReproduceDistancesObjective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31275  PyObject *resultobj = 0;
31276  int arg1 ;
31277  double *arg2 = (double *) 0 ;
31278  double *arg3 = (double *) 0 ;
31279  double arg4 ;
31280  int val1 ;
31281  int ecode1 = 0 ;
31282  void *argp2 = 0 ;
31283  int res2 = 0 ;
31284  void *argp3 = 0 ;
31285  int res3 = 0 ;
31286  double val4 ;
31287  int ecode4 = 0 ;
31288  PyObject * obj0 = 0 ;
31289  PyObject * obj1 = 0 ;
31290  PyObject * obj2 = 0 ;
31291  PyObject * obj3 = 0 ;
31293 
31294  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ReproduceDistancesObjective",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
31295  ecode1 = SWIG_AsVal_int(obj0, &val1);
31296  if (!SWIG_IsOK(ecode1)) {
31297  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ReproduceDistancesObjective" "', argument " "1"" of type '" "int""'");
31298  }
31299  arg1 = static_cast< int >(val1);
31300  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 );
31301  if (!SWIG_IsOK(res2)) {
31302  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ReproduceDistancesObjective" "', argument " "2"" of type '" "double const *""'");
31303  }
31304  arg2 = reinterpret_cast< double * >(argp2);
31305  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 );
31306  if (!SWIG_IsOK(res3)) {
31307  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ReproduceDistancesObjective" "', argument " "3"" of type '" "double const *""'");
31308  }
31309  arg3 = reinterpret_cast< double * >(argp3);
31310  ecode4 = SWIG_AsVal_double(obj3, &val4);
31311  if (!SWIG_IsOK(ecode4)) {
31312  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ReproduceDistancesObjective" "', argument " "4"" of type '" "double""'");
31313  }
31314  arg4 = static_cast< double >(val4);
31315  {
31316  Py_BEGIN_ALLOW_THREADS
31317  try {
31318  result = (faiss::ReproduceDistancesObjective *)new faiss::ReproduceDistancesObjective(arg1,(double const *)arg2,(double const *)arg3,arg4);
31319  } catch(faiss::FaissException & e) {
31320  PyEval_RestoreThread(_save);
31321  PyErr_SetString(PyExc_RuntimeError, e.what());
31322  SWIG_fail;
31323  }
31324  Py_END_ALLOW_THREADS
31325  }
31326  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReproduceDistancesObjective, SWIG_POINTER_NEW | 0 );
31327  return resultobj;
31328 fail:
31329  return NULL;
31330 }
31331 
31332 
31333 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_compute_mean_stdev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31334  PyObject *resultobj = 0;
31335  double *arg1 = (double *) 0 ;
31336  size_t arg2 ;
31337  double *arg3 = (double *) 0 ;
31338  double *arg4 = (double *) 0 ;
31339  void *argp1 = 0 ;
31340  int res1 = 0 ;
31341  size_t val2 ;
31342  int ecode2 = 0 ;
31343  void *argp3 = 0 ;
31344  int res3 = 0 ;
31345  void *argp4 = 0 ;
31346  int res4 = 0 ;
31347  PyObject * obj0 = 0 ;
31348  PyObject * obj1 = 0 ;
31349  PyObject * obj2 = 0 ;
31350  PyObject * obj3 = 0 ;
31351 
31352  if (!PyArg_ParseTuple(args,(char *)"OOOO:ReproduceDistancesObjective_compute_mean_stdev",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
31353  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 );
31354  if (!SWIG_IsOK(res1)) {
31355  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "1"" of type '" "double const *""'");
31356  }
31357  arg1 = reinterpret_cast< double * >(argp1);
31358  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
31359  if (!SWIG_IsOK(ecode2)) {
31360  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "2"" of type '" "size_t""'");
31361  }
31362  arg2 = static_cast< size_t >(val2);
31363  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 );
31364  if (!SWIG_IsOK(res3)) {
31365  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "3"" of type '" "double *""'");
31366  }
31367  arg3 = reinterpret_cast< double * >(argp3);
31368  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 );
31369  if (!SWIG_IsOK(res4)) {
31370  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "4"" of type '" "double *""'");
31371  }
31372  arg4 = reinterpret_cast< double * >(argp4);
31373  {
31374  Py_BEGIN_ALLOW_THREADS
31375  try {
31376  faiss::ReproduceDistancesObjective::compute_mean_stdev((double const *)arg1,arg2,arg3,arg4);
31377  } catch(faiss::FaissException & e) {
31378  PyEval_RestoreThread(_save);
31379  PyErr_SetString(PyExc_RuntimeError, e.what());
31380  SWIG_fail;
31381  }
31382  Py_END_ALLOW_THREADS
31383  }
31384  resultobj = SWIG_Py_Void();
31385  return resultobj;
31386 fail:
31387  return NULL;
31388 }
31389 
31390 
31391 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_set_affine_target_dis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31392  PyObject *resultobj = 0;
31394  double *arg2 = (double *) 0 ;
31395  void *argp1 = 0 ;
31396  int res1 = 0 ;
31397  void *argp2 = 0 ;
31398  int res2 = 0 ;
31399  PyObject * obj0 = 0 ;
31400  PyObject * obj1 = 0 ;
31401 
31402  if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_set_affine_target_dis",&obj0,&obj1)) SWIG_fail;
31403  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
31404  if (!SWIG_IsOK(res1)) {
31405  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_set_affine_target_dis" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
31406  }
31407  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31408  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 );
31409  if (!SWIG_IsOK(res2)) {
31410  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_set_affine_target_dis" "', argument " "2"" of type '" "double const *""'");
31411  }
31412  arg2 = reinterpret_cast< double * >(argp2);
31413  {
31414  Py_BEGIN_ALLOW_THREADS
31415  try {
31416  (arg1)->set_affine_target_dis((double const *)arg2);
31417  } catch(faiss::FaissException & e) {
31418  PyEval_RestoreThread(_save);
31419  PyErr_SetString(PyExc_RuntimeError, e.what());
31420  SWIG_fail;
31421  }
31422  Py_END_ALLOW_THREADS
31423  }
31424  resultobj = SWIG_Py_Void();
31425  return resultobj;
31426 fail:
31427  return NULL;
31428 }
31429 
31430 
31431 SWIGINTERN PyObject *_wrap_delete_ReproduceDistancesObjective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31432  PyObject *resultobj = 0;
31434  void *argp1 = 0 ;
31435  int res1 = 0 ;
31436  PyObject * obj0 = 0 ;
31437 
31438  if (!PyArg_ParseTuple(args,(char *)"O:delete_ReproduceDistancesObjective",&obj0)) SWIG_fail;
31439  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, SWIG_POINTER_DISOWN | 0 );
31440  if (!SWIG_IsOK(res1)) {
31441  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReproduceDistancesObjective" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
31442  }
31443  arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
31444  {
31445  Py_BEGIN_ALLOW_THREADS
31446  try {
31447  delete arg1;
31448  } catch(faiss::FaissException & e) {
31449  PyEval_RestoreThread(_save);
31450  PyErr_SetString(PyExc_RuntimeError, e.what());
31451  SWIG_fail;
31452  }
31453  Py_END_ALLOW_THREADS
31454  }
31455  resultobj = SWIG_Py_Void();
31456  return resultobj;
31457 fail:
31458  return NULL;
31459 }
31460 
31461 
31462 SWIGINTERN PyObject *ReproduceDistancesObjective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31463  PyObject *obj;
31464  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
31465  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ReproduceDistancesObjective, SWIG_NewClientData(obj));
31466  return SWIG_Py_Void();
31467 }
31468 
31469 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_obj_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31470  PyObject *resultobj = 0;
31473  void *argp1 = 0 ;
31474  int res1 = 0 ;
31475  void *argp2 = 0 ;
31476  int res2 = 0 ;
31477  PyObject * obj0 = 0 ;
31478  PyObject * obj1 = 0 ;
31479 
31480  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_obj_set",&obj0,&obj1)) SWIG_fail;
31481  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31482  if (!SWIG_IsOK(res1)) {
31483  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_obj_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31484  }
31485  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31486  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__PermutationObjective, SWIG_POINTER_DISOWN | 0 );
31487  if (!SWIG_IsOK(res2)) {
31488  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_obj_set" "', argument " "2"" of type '" "faiss::PermutationObjective *""'");
31489  }
31490  arg2 = reinterpret_cast< faiss::PermutationObjective * >(argp2);
31491  if (arg1) (arg1)->obj = arg2;
31492  resultobj = SWIG_Py_Void();
31493  return resultobj;
31494 fail:
31495  return NULL;
31496 }
31497 
31498 
31499 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_obj_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31500  PyObject *resultobj = 0;
31502  void *argp1 = 0 ;
31503  int res1 = 0 ;
31504  PyObject * obj0 = 0 ;
31505  faiss::PermutationObjective *result = 0 ;
31506 
31507  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_obj_get",&obj0)) SWIG_fail;
31508  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31509  if (!SWIG_IsOK(res1)) {
31510  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_obj_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31511  }
31512  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31513  result = (faiss::PermutationObjective *) ((arg1)->obj);
31514  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
31515  return resultobj;
31516 fail:
31517  return NULL;
31518 }
31519 
31520 
31521 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31522  PyObject *resultobj = 0;
31524  int arg2 ;
31525  void *argp1 = 0 ;
31526  int res1 = 0 ;
31527  int val2 ;
31528  int ecode2 = 0 ;
31529  PyObject * obj0 = 0 ;
31530  PyObject * obj1 = 0 ;
31531 
31532  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_n_set",&obj0,&obj1)) SWIG_fail;
31533  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31534  if (!SWIG_IsOK(res1)) {
31535  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_n_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31536  }
31537  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31538  ecode2 = SWIG_AsVal_int(obj1, &val2);
31539  if (!SWIG_IsOK(ecode2)) {
31540  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingOptimizer_n_set" "', argument " "2"" of type '" "int""'");
31541  }
31542  arg2 = static_cast< int >(val2);
31543  if (arg1) (arg1)->n = arg2;
31544  resultobj = SWIG_Py_Void();
31545  return resultobj;
31546 fail:
31547  return NULL;
31548 }
31549 
31550 
31551 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31552  PyObject *resultobj = 0;
31554  void *argp1 = 0 ;
31555  int res1 = 0 ;
31556  PyObject * obj0 = 0 ;
31557  int result;
31558 
31559  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_n_get",&obj0)) SWIG_fail;
31560  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31561  if (!SWIG_IsOK(res1)) {
31562  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_n_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31563  }
31564  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31565  result = (int) ((arg1)->n);
31566  resultobj = SWIG_From_int(static_cast< int >(result));
31567  return resultobj;
31568 fail:
31569  return NULL;
31570 }
31571 
31572 
31573 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_logfile_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31574  PyObject *resultobj = 0;
31576  FILE *arg2 = (FILE *) 0 ;
31577  void *argp1 = 0 ;
31578  int res1 = 0 ;
31579  void *argp2 = 0 ;
31580  int res2 = 0 ;
31581  PyObject * obj0 = 0 ;
31582  PyObject * obj1 = 0 ;
31583 
31584  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_logfile_set",&obj0,&obj1)) SWIG_fail;
31585  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31586  if (!SWIG_IsOK(res1)) {
31587  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_logfile_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31588  }
31589  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31590  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FILE, SWIG_POINTER_DISOWN | 0 );
31591  if (!SWIG_IsOK(res2)) {
31592  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_logfile_set" "', argument " "2"" of type '" "FILE *""'");
31593  }
31594  arg2 = reinterpret_cast< FILE * >(argp2);
31595  if (arg1) (arg1)->logfile = arg2;
31596  resultobj = SWIG_Py_Void();
31597  return resultobj;
31598 fail:
31599  return NULL;
31600 }
31601 
31602 
31603 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_logfile_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31604  PyObject *resultobj = 0;
31606  void *argp1 = 0 ;
31607  int res1 = 0 ;
31608  PyObject * obj0 = 0 ;
31609  FILE *result = 0 ;
31610 
31611  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_logfile_get",&obj0)) SWIG_fail;
31612  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31613  if (!SWIG_IsOK(res1)) {
31614  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_logfile_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31615  }
31616  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31617  result = (FILE *) ((arg1)->logfile);
31618  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 | 0 );
31619  return resultobj;
31620 fail:
31621  return NULL;
31622 }
31623 
31624 
31625 SWIGINTERN PyObject *_wrap_new_SimulatedAnnealingOptimizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31626  PyObject *resultobj = 0;
31629  void *argp1 = 0 ;
31630  int res1 = 0 ;
31631  void *argp2 = 0 ;
31632  int res2 = 0 ;
31633  PyObject * obj0 = 0 ;
31634  PyObject * obj1 = 0 ;
31636 
31637  if (!PyArg_ParseTuple(args,(char *)"OO:new_SimulatedAnnealingOptimizer",&obj0,&obj1)) SWIG_fail;
31638  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
31639  if (!SWIG_IsOK(res1)) {
31640  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulatedAnnealingOptimizer" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
31641  }
31642  arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
31643  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0);
31644  if (!SWIG_IsOK(res2)) {
31645  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulatedAnnealingOptimizer" "', argument " "2"" of type '" "faiss::SimulatedAnnealingParameters const &""'");
31646  }
31647  if (!argp2) {
31648  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulatedAnnealingOptimizer" "', argument " "2"" of type '" "faiss::SimulatedAnnealingParameters const &""'");
31649  }
31650  arg2 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp2);
31651  {
31652  Py_BEGIN_ALLOW_THREADS
31653  try {
31655  } catch(faiss::FaissException & e) {
31656  PyEval_RestoreThread(_save);
31657  PyErr_SetString(PyExc_RuntimeError, e.what());
31658  SWIG_fail;
31659  }
31660  Py_END_ALLOW_THREADS
31661  }
31662  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, SWIG_POINTER_NEW | 0 );
31663  return resultobj;
31664 fail:
31665  return NULL;
31666 }
31667 
31668 
31669 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_rnd_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31670  PyObject *resultobj = 0;
31673  void *argp1 = 0 ;
31674  int res1 = 0 ;
31675  void *argp2 = 0 ;
31676  int res2 = 0 ;
31677  PyObject * obj0 = 0 ;
31678  PyObject * obj1 = 0 ;
31679 
31680  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_rnd_set",&obj0,&obj1)) SWIG_fail;
31681  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31682  if (!SWIG_IsOK(res1)) {
31683  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_rnd_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31684  }
31685  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31686  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_DISOWN | 0 );
31687  if (!SWIG_IsOK(res2)) {
31688  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_rnd_set" "', argument " "2"" of type '" "faiss::RandomGenerator *""'");
31689  }
31690  arg2 = reinterpret_cast< faiss::RandomGenerator * >(argp2);
31691  if (arg1) (arg1)->rnd = arg2;
31692  resultobj = SWIG_Py_Void();
31693  return resultobj;
31694 fail:
31695  return NULL;
31696 }
31697 
31698 
31699 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_rnd_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31700  PyObject *resultobj = 0;
31702  void *argp1 = 0 ;
31703  int res1 = 0 ;
31704  PyObject * obj0 = 0 ;
31705  faiss::RandomGenerator *result = 0 ;
31706 
31707  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_rnd_get",&obj0)) SWIG_fail;
31708  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31709  if (!SWIG_IsOK(res1)) {
31710  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_rnd_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31711  }
31712  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31713  result = (faiss::RandomGenerator *) ((arg1)->rnd);
31714  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
31715  return resultobj;
31716 fail:
31717  return NULL;
31718 }
31719 
31720 
31721 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_init_cost_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31722  PyObject *resultobj = 0;
31724  double arg2 ;
31725  void *argp1 = 0 ;
31726  int res1 = 0 ;
31727  double val2 ;
31728  int ecode2 = 0 ;
31729  PyObject * obj0 = 0 ;
31730  PyObject * obj1 = 0 ;
31731 
31732  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_init_cost_set",&obj0,&obj1)) SWIG_fail;
31733  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31734  if (!SWIG_IsOK(res1)) {
31735  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_init_cost_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31736  }
31737  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31738  ecode2 = SWIG_AsVal_double(obj1, &val2);
31739  if (!SWIG_IsOK(ecode2)) {
31740  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingOptimizer_init_cost_set" "', argument " "2"" of type '" "double""'");
31741  }
31742  arg2 = static_cast< double >(val2);
31743  if (arg1) (arg1)->init_cost = arg2;
31744  resultobj = SWIG_Py_Void();
31745  return resultobj;
31746 fail:
31747  return NULL;
31748 }
31749 
31750 
31751 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_init_cost_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31752  PyObject *resultobj = 0;
31754  void *argp1 = 0 ;
31755  int res1 = 0 ;
31756  PyObject * obj0 = 0 ;
31757  double result;
31758 
31759  if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_init_cost_get",&obj0)) SWIG_fail;
31760  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31761  if (!SWIG_IsOK(res1)) {
31762  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_init_cost_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31763  }
31764  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31765  result = (double) ((arg1)->init_cost);
31766  resultobj = SWIG_From_double(static_cast< double >(result));
31767  return resultobj;
31768 fail:
31769  return NULL;
31770 }
31771 
31772 
31773 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_optimize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31774  PyObject *resultobj = 0;
31776  int *arg2 = (int *) 0 ;
31777  void *argp1 = 0 ;
31778  int res1 = 0 ;
31779  void *argp2 = 0 ;
31780  int res2 = 0 ;
31781  PyObject * obj0 = 0 ;
31782  PyObject * obj1 = 0 ;
31783  double result;
31784 
31785  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_optimize",&obj0,&obj1)) SWIG_fail;
31786  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31787  if (!SWIG_IsOK(res1)) {
31788  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_optimize" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31789  }
31790  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31791  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
31792  if (!SWIG_IsOK(res2)) {
31793  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_optimize" "', argument " "2"" of type '" "int *""'");
31794  }
31795  arg2 = reinterpret_cast< int * >(argp2);
31796  {
31797  Py_BEGIN_ALLOW_THREADS
31798  try {
31799  result = (double)(arg1)->optimize(arg2);
31800  } catch(faiss::FaissException & e) {
31801  PyEval_RestoreThread(_save);
31802  PyErr_SetString(PyExc_RuntimeError, e.what());
31803  SWIG_fail;
31804  }
31805  Py_END_ALLOW_THREADS
31806  }
31807  resultobj = SWIG_From_double(static_cast< double >(result));
31808  return resultobj;
31809 fail:
31810  return NULL;
31811 }
31812 
31813 
31814 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_run_optimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31815  PyObject *resultobj = 0;
31817  int *arg2 = (int *) 0 ;
31818  void *argp1 = 0 ;
31819  int res1 = 0 ;
31820  void *argp2 = 0 ;
31821  int res2 = 0 ;
31822  PyObject * obj0 = 0 ;
31823  PyObject * obj1 = 0 ;
31824  double result;
31825 
31826  if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_run_optimization",&obj0,&obj1)) SWIG_fail;
31827  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
31828  if (!SWIG_IsOK(res1)) {
31829  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_run_optimization" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31830  }
31831  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31832  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
31833  if (!SWIG_IsOK(res2)) {
31834  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_run_optimization" "', argument " "2"" of type '" "int *""'");
31835  }
31836  arg2 = reinterpret_cast< int * >(argp2);
31837  {
31838  Py_BEGIN_ALLOW_THREADS
31839  try {
31840  result = (double)(arg1)->run_optimization(arg2);
31841  } catch(faiss::FaissException & e) {
31842  PyEval_RestoreThread(_save);
31843  PyErr_SetString(PyExc_RuntimeError, e.what());
31844  SWIG_fail;
31845  }
31846  Py_END_ALLOW_THREADS
31847  }
31848  resultobj = SWIG_From_double(static_cast< double >(result));
31849  return resultobj;
31850 fail:
31851  return NULL;
31852 }
31853 
31854 
31855 SWIGINTERN PyObject *_wrap_delete_SimulatedAnnealingOptimizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31856  PyObject *resultobj = 0;
31858  void *argp1 = 0 ;
31859  int res1 = 0 ;
31860  PyObject * obj0 = 0 ;
31861 
31862  if (!PyArg_ParseTuple(args,(char *)"O:delete_SimulatedAnnealingOptimizer",&obj0)) SWIG_fail;
31863  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, SWIG_POINTER_DISOWN | 0 );
31864  if (!SWIG_IsOK(res1)) {
31865  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimulatedAnnealingOptimizer" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
31866  }
31867  arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
31868  {
31869  Py_BEGIN_ALLOW_THREADS
31870  try {
31871  delete arg1;
31872  } catch(faiss::FaissException & e) {
31873  PyEval_RestoreThread(_save);
31874  PyErr_SetString(PyExc_RuntimeError, e.what());
31875  SWIG_fail;
31876  }
31877  Py_END_ALLOW_THREADS
31878  }
31879  resultobj = SWIG_Py_Void();
31880  return resultobj;
31881 fail:
31882  return NULL;
31883 }
31884 
31885 
31886 SWIGINTERN PyObject *SimulatedAnnealingOptimizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31887  PyObject *obj;
31888  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
31889  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, SWIG_NewClientData(obj));
31890  return SWIG_Py_Void();
31891 }
31892 
31893 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimization_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31894  PyObject *resultobj = 0;
31897  void *argp1 = 0 ;
31898  int res1 = 0 ;
31899  int val2 ;
31900  int ecode2 = 0 ;
31901  PyObject * obj0 = 0 ;
31902  PyObject * obj1 = 0 ;
31903 
31904  if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_optimization_type_set",&obj0,&obj1)) SWIG_fail;
31905  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
31906  if (!SWIG_IsOK(res1)) {
31907  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimization_type_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
31908  }
31909  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
31910  ecode2 = SWIG_AsVal_int(obj1, &val2);
31911  if (!SWIG_IsOK(ecode2)) {
31912  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolysemousTraining_optimization_type_set" "', argument " "2"" of type '" "faiss::PolysemousTraining::Optimization_type_t""'");
31913  }
31914  arg2 = static_cast< faiss::PolysemousTraining::Optimization_type_t >(val2);
31915  if (arg1) (arg1)->optimization_type = arg2;
31916  resultobj = SWIG_Py_Void();
31917  return resultobj;
31918 fail:
31919  return NULL;
31920 }
31921 
31922 
31923 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimization_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31924  PyObject *resultobj = 0;
31926  void *argp1 = 0 ;
31927  int res1 = 0 ;
31928  PyObject * obj0 = 0 ;
31930 
31931  if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_optimization_type_get",&obj0)) SWIG_fail;
31932  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
31933  if (!SWIG_IsOK(res1)) {
31934  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimization_type_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
31935  }
31936  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
31937  result = (faiss::PolysemousTraining::Optimization_type_t) ((arg1)->optimization_type);
31938  resultobj = SWIG_From_int(static_cast< int >(result));
31939  return resultobj;
31940 fail:
31941  return NULL;
31942 }
31943 
31944 
31945 SWIGINTERN PyObject *_wrap_PolysemousTraining_ntrain_permutation_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31946  PyObject *resultobj = 0;
31948  int arg2 ;
31949  void *argp1 = 0 ;
31950  int res1 = 0 ;
31951  int val2 ;
31952  int ecode2 = 0 ;
31953  PyObject * obj0 = 0 ;
31954  PyObject * obj1 = 0 ;
31955 
31956  if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_ntrain_permutation_set",&obj0,&obj1)) SWIG_fail;
31957  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
31958  if (!SWIG_IsOK(res1)) {
31959  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_ntrain_permutation_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
31960  }
31961  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
31962  ecode2 = SWIG_AsVal_int(obj1, &val2);
31963  if (!SWIG_IsOK(ecode2)) {
31964  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolysemousTraining_ntrain_permutation_set" "', argument " "2"" of type '" "int""'");
31965  }
31966  arg2 = static_cast< int >(val2);
31967  if (arg1) (arg1)->ntrain_permutation = arg2;
31968  resultobj = SWIG_Py_Void();
31969  return resultobj;
31970 fail:
31971  return NULL;
31972 }
31973 
31974 
31975 SWIGINTERN PyObject *_wrap_PolysemousTraining_ntrain_permutation_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31976  PyObject *resultobj = 0;
31978  void *argp1 = 0 ;
31979  int res1 = 0 ;
31980  PyObject * obj0 = 0 ;
31981  int result;
31982 
31983  if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_ntrain_permutation_get",&obj0)) SWIG_fail;
31984  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
31985  if (!SWIG_IsOK(res1)) {
31986  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_ntrain_permutation_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
31987  }
31988  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
31989  result = (int) ((arg1)->ntrain_permutation);
31990  resultobj = SWIG_From_int(static_cast< int >(result));
31991  return resultobj;
31992 fail:
31993  return NULL;
31994 }
31995 
31996 
31997 SWIGINTERN PyObject *_wrap_PolysemousTraining_dis_weight_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31998  PyObject *resultobj = 0;
32000  double arg2 ;
32001  void *argp1 = 0 ;
32002  int res1 = 0 ;
32003  double val2 ;
32004  int ecode2 = 0 ;
32005  PyObject * obj0 = 0 ;
32006  PyObject * obj1 = 0 ;
32007 
32008  if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_dis_weight_factor_set",&obj0,&obj1)) SWIG_fail;
32009  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
32010  if (!SWIG_IsOK(res1)) {
32011  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_dis_weight_factor_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
32012  }
32013  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32014  ecode2 = SWIG_AsVal_double(obj1, &val2);
32015  if (!SWIG_IsOK(ecode2)) {
32016  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolysemousTraining_dis_weight_factor_set" "', argument " "2"" of type '" "double""'");
32017  }
32018  arg2 = static_cast< double >(val2);
32019  if (arg1) (arg1)->dis_weight_factor = arg2;
32020  resultobj = SWIG_Py_Void();
32021  return resultobj;
32022 fail:
32023  return NULL;
32024 }
32025 
32026 
32027 SWIGINTERN PyObject *_wrap_PolysemousTraining_dis_weight_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32028  PyObject *resultobj = 0;
32030  void *argp1 = 0 ;
32031  int res1 = 0 ;
32032  PyObject * obj0 = 0 ;
32033  double result;
32034 
32035  if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_dis_weight_factor_get",&obj0)) SWIG_fail;
32036  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
32037  if (!SWIG_IsOK(res1)) {
32038  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_dis_weight_factor_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
32039  }
32040  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32041  result = (double) ((arg1)->dis_weight_factor);
32042  resultobj = SWIG_From_double(static_cast< double >(result));
32043  return resultobj;
32044 fail:
32045  return NULL;
32046 }
32047 
32048 
32049 SWIGINTERN PyObject *_wrap_PolysemousTraining_log_pattern_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32050  PyObject *resultobj = 0;
32052  std::string *arg2 = 0 ;
32053  void *argp1 = 0 ;
32054  int res1 = 0 ;
32055  int res2 = SWIG_OLDOBJ ;
32056  PyObject * obj0 = 0 ;
32057  PyObject * obj1 = 0 ;
32058 
32059  if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_log_pattern_set",&obj0,&obj1)) SWIG_fail;
32060  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
32061  if (!SWIG_IsOK(res1)) {
32062  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_log_pattern_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
32063  }
32064  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32065  {
32066  std::string *ptr = (std::string *)0;
32067  res2 = SWIG_AsPtr_std_string(obj1, &ptr);
32068  if (!SWIG_IsOK(res2)) {
32069  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_log_pattern_set" "', argument " "2"" of type '" "std::string const &""'");
32070  }
32071  if (!ptr) {
32072  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_log_pattern_set" "', argument " "2"" of type '" "std::string const &""'");
32073  }
32074  arg2 = ptr;
32075  }
32076  if (arg1) (arg1)->log_pattern = *arg2;
32077  resultobj = SWIG_Py_Void();
32078  if (SWIG_IsNewObj(res2)) delete arg2;
32079  return resultobj;
32080 fail:
32081  if (SWIG_IsNewObj(res2)) delete arg2;
32082  return NULL;
32083 }
32084 
32085 
32086 SWIGINTERN PyObject *_wrap_PolysemousTraining_log_pattern_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32087  PyObject *resultobj = 0;
32089  void *argp1 = 0 ;
32090  int res1 = 0 ;
32091  PyObject * obj0 = 0 ;
32092  std::string *result = 0 ;
32093 
32094  if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_log_pattern_get",&obj0)) SWIG_fail;
32095  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
32096  if (!SWIG_IsOK(res1)) {
32097  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_log_pattern_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
32098  }
32099  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32100  result = (std::string *) & ((arg1)->log_pattern);
32101  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
32102  return resultobj;
32103 fail:
32104  return NULL;
32105 }
32106 
32107 
32108 SWIGINTERN PyObject *_wrap_new_PolysemousTraining(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32109  PyObject *resultobj = 0;
32110  faiss::PolysemousTraining *result = 0 ;
32111 
32112  if (!PyArg_ParseTuple(args,(char *)":new_PolysemousTraining")) SWIG_fail;
32113  {
32114  Py_BEGIN_ALLOW_THREADS
32115  try {
32117  } catch(faiss::FaissException & e) {
32118  PyEval_RestoreThread(_save);
32119  PyErr_SetString(PyExc_RuntimeError, e.what());
32120  SWIG_fail;
32121  }
32122  Py_END_ALLOW_THREADS
32123  }
32124  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PolysemousTraining, SWIG_POINTER_NEW | 0 );
32125  return resultobj;
32126 fail:
32127  return NULL;
32128 }
32129 
32130 
32131 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimize_pq_for_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32132  PyObject *resultobj = 0;
32134  faiss::ProductQuantizer *arg2 = 0 ;
32135  size_t arg3 ;
32136  float *arg4 = (float *) 0 ;
32137  void *argp1 = 0 ;
32138  int res1 = 0 ;
32139  void *argp2 = 0 ;
32140  int res2 = 0 ;
32141  size_t val3 ;
32142  int ecode3 = 0 ;
32143  void *argp4 = 0 ;
32144  int res4 = 0 ;
32145  PyObject * obj0 = 0 ;
32146  PyObject * obj1 = 0 ;
32147  PyObject * obj2 = 0 ;
32148  PyObject * obj3 = 0 ;
32149 
32150  if (!PyArg_ParseTuple(args,(char *)"OOOO:PolysemousTraining_optimize_pq_for_hamming",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
32151  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
32152  if (!SWIG_IsOK(res1)) {
32153  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "1"" of type '" "faiss::PolysemousTraining const *""'");
32154  }
32155  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32156  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__ProductQuantizer, 0 );
32157  if (!SWIG_IsOK(res2)) {
32158  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
32159  }
32160  if (!argp2) {
32161  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
32162  }
32163  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
32164  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
32165  if (!SWIG_IsOK(ecode3)) {
32166  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "3"" of type '" "size_t""'");
32167  }
32168  arg3 = static_cast< size_t >(val3);
32169  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
32170  if (!SWIG_IsOK(res4)) {
32171  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "4"" of type '" "float const *""'");
32172  }
32173  arg4 = reinterpret_cast< float * >(argp4);
32174  {
32175  Py_BEGIN_ALLOW_THREADS
32176  try {
32177  ((faiss::PolysemousTraining const *)arg1)->optimize_pq_for_hamming(*arg2,arg3,(float const *)arg4);
32178  } catch(faiss::FaissException & e) {
32179  PyEval_RestoreThread(_save);
32180  PyErr_SetString(PyExc_RuntimeError, e.what());
32181  SWIG_fail;
32182  }
32183  Py_END_ALLOW_THREADS
32184  }
32185  resultobj = SWIG_Py_Void();
32186  return resultobj;
32187 fail:
32188  return NULL;
32189 }
32190 
32191 
32192 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimize_ranking(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32193  PyObject *resultobj = 0;
32195  faiss::ProductQuantizer *arg2 = 0 ;
32196  size_t arg3 ;
32197  float *arg4 = (float *) 0 ;
32198  void *argp1 = 0 ;
32199  int res1 = 0 ;
32200  void *argp2 = 0 ;
32201  int res2 = 0 ;
32202  size_t val3 ;
32203  int ecode3 = 0 ;
32204  void *argp4 = 0 ;
32205  int res4 = 0 ;
32206  PyObject * obj0 = 0 ;
32207  PyObject * obj1 = 0 ;
32208  PyObject * obj2 = 0 ;
32209  PyObject * obj3 = 0 ;
32210 
32211  if (!PyArg_ParseTuple(args,(char *)"OOOO:PolysemousTraining_optimize_ranking",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
32212  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
32213  if (!SWIG_IsOK(res1)) {
32214  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "1"" of type '" "faiss::PolysemousTraining const *""'");
32215  }
32216  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32217  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__ProductQuantizer, 0 );
32218  if (!SWIG_IsOK(res2)) {
32219  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
32220  }
32221  if (!argp2) {
32222  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_optimize_ranking" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
32223  }
32224  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
32225  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
32226  if (!SWIG_IsOK(ecode3)) {
32227  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "3"" of type '" "size_t""'");
32228  }
32229  arg3 = static_cast< size_t >(val3);
32230  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
32231  if (!SWIG_IsOK(res4)) {
32232  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "4"" of type '" "float const *""'");
32233  }
32234  arg4 = reinterpret_cast< float * >(argp4);
32235  {
32236  Py_BEGIN_ALLOW_THREADS
32237  try {
32238  ((faiss::PolysemousTraining const *)arg1)->optimize_ranking(*arg2,arg3,(float const *)arg4);
32239  } catch(faiss::FaissException & e) {
32240  PyEval_RestoreThread(_save);
32241  PyErr_SetString(PyExc_RuntimeError, e.what());
32242  SWIG_fail;
32243  }
32244  Py_END_ALLOW_THREADS
32245  }
32246  resultobj = SWIG_Py_Void();
32247  return resultobj;
32248 fail:
32249  return NULL;
32250 }
32251 
32252 
32253 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimize_reproduce_distances(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32254  PyObject *resultobj = 0;
32256  faiss::ProductQuantizer *arg2 = 0 ;
32257  void *argp1 = 0 ;
32258  int res1 = 0 ;
32259  void *argp2 = 0 ;
32260  int res2 = 0 ;
32261  PyObject * obj0 = 0 ;
32262  PyObject * obj1 = 0 ;
32263 
32264  if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_optimize_reproduce_distances",&obj0,&obj1)) SWIG_fail;
32265  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
32266  if (!SWIG_IsOK(res1)) {
32267  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimize_reproduce_distances" "', argument " "1"" of type '" "faiss::PolysemousTraining const *""'");
32268  }
32269  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32270  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__ProductQuantizer, 0 );
32271  if (!SWIG_IsOK(res2)) {
32272  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_optimize_reproduce_distances" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
32273  }
32274  if (!argp2) {
32275  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_optimize_reproduce_distances" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
32276  }
32277  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
32278  {
32279  Py_BEGIN_ALLOW_THREADS
32280  try {
32281  ((faiss::PolysemousTraining const *)arg1)->optimize_reproduce_distances(*arg2);
32282  } catch(faiss::FaissException & e) {
32283  PyEval_RestoreThread(_save);
32284  PyErr_SetString(PyExc_RuntimeError, e.what());
32285  SWIG_fail;
32286  }
32287  Py_END_ALLOW_THREADS
32288  }
32289  resultobj = SWIG_Py_Void();
32290  return resultobj;
32291 fail:
32292  return NULL;
32293 }
32294 
32295 
32296 SWIGINTERN PyObject *_wrap_delete_PolysemousTraining(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32297  PyObject *resultobj = 0;
32299  void *argp1 = 0 ;
32300  int res1 = 0 ;
32301  PyObject * obj0 = 0 ;
32302 
32303  if (!PyArg_ParseTuple(args,(char *)"O:delete_PolysemousTraining",&obj0)) SWIG_fail;
32304  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, SWIG_POINTER_DISOWN | 0 );
32305  if (!SWIG_IsOK(res1)) {
32306  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PolysemousTraining" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
32307  }
32308  arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
32309  delete arg1;
32310  resultobj = SWIG_Py_Void();
32311  return resultobj;
32312 fail:
32313  return NULL;
32314 }
32315 
32316 
32317 SWIGINTERN PyObject *PolysemousTraining_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32318  PyObject *obj;
32319  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
32320  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__PolysemousTraining, SWIG_NewClientData(obj));
32321  return SWIG_Py_Void();
32322 }
32323 
32324 SWIGINTERN PyObject *_wrap_IndexPQ_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32325  PyObject *resultobj = 0;
32326  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32328  void *argp1 = 0 ;
32329  int res1 = 0 ;
32330  void *argp2 = 0 ;
32331  int res2 = 0 ;
32332  PyObject * obj0 = 0 ;
32333  PyObject * obj1 = 0 ;
32334 
32335  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_pq_set",&obj0,&obj1)) SWIG_fail;
32336  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32337  if (!SWIG_IsOK(res1)) {
32338  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_pq_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32339  }
32340  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32341  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
32342  if (!SWIG_IsOK(res2)) {
32343  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
32344  }
32345  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
32346  if (arg1) (arg1)->pq = *arg2;
32347  resultobj = SWIG_Py_Void();
32348  return resultobj;
32349 fail:
32350  return NULL;
32351 }
32352 
32353 
32354 SWIGINTERN PyObject *_wrap_IndexPQ_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32355  PyObject *resultobj = 0;
32356  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32357  void *argp1 = 0 ;
32358  int res1 = 0 ;
32359  PyObject * obj0 = 0 ;
32360  faiss::ProductQuantizer *result = 0 ;
32361 
32362  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_pq_get",&obj0)) SWIG_fail;
32363  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32364  if (!SWIG_IsOK(res1)) {
32365  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_pq_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32366  }
32367  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32368  result = (faiss::ProductQuantizer *)& ((arg1)->pq);
32369  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
32370  return resultobj;
32371 fail:
32372  return NULL;
32373 }
32374 
32375 
32376 SWIGINTERN PyObject *_wrap_IndexPQ_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32377  PyObject *resultobj = 0;
32378  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32379  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
32380  void *argp1 = 0 ;
32381  int res1 = 0 ;
32382  void *argp2 = 0 ;
32383  int res2 = 0 ;
32384  PyObject * obj0 = 0 ;
32385  PyObject * obj1 = 0 ;
32386 
32387  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_codes_set",&obj0,&obj1)) SWIG_fail;
32388  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32389  if (!SWIG_IsOK(res1)) {
32390  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_codes_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32391  }
32392  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32393  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
32394  if (!SWIG_IsOK(res2)) {
32395  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
32396  }
32397  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
32398  if (arg1) (arg1)->codes = *arg2;
32399  resultobj = SWIG_Py_Void();
32400  return resultobj;
32401 fail:
32402  return NULL;
32403 }
32404 
32405 
32406 SWIGINTERN PyObject *_wrap_IndexPQ_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32407  PyObject *resultobj = 0;
32408  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32409  void *argp1 = 0 ;
32410  int res1 = 0 ;
32411  PyObject * obj0 = 0 ;
32412  std::vector< uint8_t > *result = 0 ;
32413 
32414  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_codes_get",&obj0)) SWIG_fail;
32415  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32416  if (!SWIG_IsOK(res1)) {
32417  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_codes_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32418  }
32419  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32420  result = (std::vector< uint8_t > *)& ((arg1)->codes);
32421  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
32422  return resultobj;
32423 fail:
32424  return NULL;
32425 }
32426 
32427 
32428 SWIGINTERN PyObject *_wrap_new_IndexPQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32429  PyObject *resultobj = 0;
32430  int arg1 ;
32431  size_t arg2 ;
32432  size_t arg3 ;
32433  faiss::MetricType arg4 ;
32434  int val1 ;
32435  int ecode1 = 0 ;
32436  size_t val2 ;
32437  int ecode2 = 0 ;
32438  size_t val3 ;
32439  int ecode3 = 0 ;
32440  int val4 ;
32441  int ecode4 = 0 ;
32442  PyObject * obj0 = 0 ;
32443  PyObject * obj1 = 0 ;
32444  PyObject * obj2 = 0 ;
32445  PyObject * obj3 = 0 ;
32446  faiss::IndexPQ *result = 0 ;
32447 
32448  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexPQ",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
32449  ecode1 = SWIG_AsVal_int(obj0, &val1);
32450  if (!SWIG_IsOK(ecode1)) {
32451  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexPQ" "', argument " "1"" of type '" "int""'");
32452  }
32453  arg1 = static_cast< int >(val1);
32454  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
32455  if (!SWIG_IsOK(ecode2)) {
32456  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexPQ" "', argument " "2"" of type '" "size_t""'");
32457  }
32458  arg2 = static_cast< size_t >(val2);
32459  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
32460  if (!SWIG_IsOK(ecode3)) {
32461  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexPQ" "', argument " "3"" of type '" "size_t""'");
32462  }
32463  arg3 = static_cast< size_t >(val3);
32464  ecode4 = SWIG_AsVal_int(obj3, &val4);
32465  if (!SWIG_IsOK(ecode4)) {
32466  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexPQ" "', argument " "4"" of type '" "faiss::MetricType""'");
32467  }
32468  arg4 = static_cast< faiss::MetricType >(val4);
32469  {
32470  Py_BEGIN_ALLOW_THREADS
32471  try {
32472  result = (faiss::IndexPQ *)new faiss::IndexPQ(arg1,arg2,arg3,arg4);
32473  } catch(faiss::FaissException & e) {
32474  PyEval_RestoreThread(_save);
32475  PyErr_SetString(PyExc_RuntimeError, e.what());
32476  SWIG_fail;
32477  }
32478  Py_END_ALLOW_THREADS
32479  }
32480  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_NEW | 0 );
32481  return resultobj;
32482 fail:
32483  return NULL;
32484 }
32485 
32486 
32487 SWIGINTERN PyObject *_wrap_new_IndexPQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32488  PyObject *resultobj = 0;
32489  int arg1 ;
32490  size_t arg2 ;
32491  size_t arg3 ;
32492  int val1 ;
32493  int ecode1 = 0 ;
32494  size_t val2 ;
32495  int ecode2 = 0 ;
32496  size_t val3 ;
32497  int ecode3 = 0 ;
32498  PyObject * obj0 = 0 ;
32499  PyObject * obj1 = 0 ;
32500  PyObject * obj2 = 0 ;
32501  faiss::IndexPQ *result = 0 ;
32502 
32503  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexPQ",&obj0,&obj1,&obj2)) SWIG_fail;
32504  ecode1 = SWIG_AsVal_int(obj0, &val1);
32505  if (!SWIG_IsOK(ecode1)) {
32506  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexPQ" "', argument " "1"" of type '" "int""'");
32507  }
32508  arg1 = static_cast< int >(val1);
32509  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
32510  if (!SWIG_IsOK(ecode2)) {
32511  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexPQ" "', argument " "2"" of type '" "size_t""'");
32512  }
32513  arg2 = static_cast< size_t >(val2);
32514  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
32515  if (!SWIG_IsOK(ecode3)) {
32516  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexPQ" "', argument " "3"" of type '" "size_t""'");
32517  }
32518  arg3 = static_cast< size_t >(val3);
32519  {
32520  Py_BEGIN_ALLOW_THREADS
32521  try {
32522  result = (faiss::IndexPQ *)new faiss::IndexPQ(arg1,arg2,arg3);
32523  } catch(faiss::FaissException & e) {
32524  PyEval_RestoreThread(_save);
32525  PyErr_SetString(PyExc_RuntimeError, e.what());
32526  SWIG_fail;
32527  }
32528  Py_END_ALLOW_THREADS
32529  }
32530  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_NEW | 0 );
32531  return resultobj;
32532 fail:
32533  return NULL;
32534 }
32535 
32536 
32537 SWIGINTERN PyObject *_wrap_new_IndexPQ__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32538  PyObject *resultobj = 0;
32539  faiss::IndexPQ *result = 0 ;
32540 
32541  if (!PyArg_ParseTuple(args,(char *)":new_IndexPQ")) SWIG_fail;
32542  {
32543  Py_BEGIN_ALLOW_THREADS
32544  try {
32545  result = (faiss::IndexPQ *)new faiss::IndexPQ();
32546  } catch(faiss::FaissException & e) {
32547  PyEval_RestoreThread(_save);
32548  PyErr_SetString(PyExc_RuntimeError, e.what());
32549  SWIG_fail;
32550  }
32551  Py_END_ALLOW_THREADS
32552  }
32553  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_NEW | 0 );
32554  return resultobj;
32555 fail:
32556  return NULL;
32557 }
32558 
32559 
32560 SWIGINTERN PyObject *_wrap_new_IndexPQ(PyObject *self, PyObject *args) {
32561  Py_ssize_t argc;
32562  PyObject *argv[5] = {
32563  0
32564  };
32565  Py_ssize_t ii;
32566 
32567  if (!PyTuple_Check(args)) SWIG_fail;
32568  argc = args ? PyObject_Length(args) : 0;
32569  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
32570  argv[ii] = PyTuple_GET_ITEM(args,ii);
32571  }
32572  if (argc == 0) {
32573  return _wrap_new_IndexPQ__SWIG_2(self, args);
32574  }
32575  if (argc == 3) {
32576  int _v;
32577  {
32578  int res = SWIG_AsVal_int(argv[0], NULL);
32579  _v = SWIG_CheckState(res);
32580  }
32581  if (_v) {
32582  {
32583  int res = SWIG_AsVal_size_t(argv[1], NULL);
32584  _v = SWIG_CheckState(res);
32585  }
32586  if (_v) {
32587  {
32588  int res = SWIG_AsVal_size_t(argv[2], NULL);
32589  _v = SWIG_CheckState(res);
32590  }
32591  if (_v) {
32592  return _wrap_new_IndexPQ__SWIG_1(self, args);
32593  }
32594  }
32595  }
32596  }
32597  if (argc == 4) {
32598  int _v;
32599  {
32600  int res = SWIG_AsVal_int(argv[0], NULL);
32601  _v = SWIG_CheckState(res);
32602  }
32603  if (_v) {
32604  {
32605  int res = SWIG_AsVal_size_t(argv[1], NULL);
32606  _v = SWIG_CheckState(res);
32607  }
32608  if (_v) {
32609  {
32610  int res = SWIG_AsVal_size_t(argv[2], NULL);
32611  _v = SWIG_CheckState(res);
32612  }
32613  if (_v) {
32614  {
32615  int res = SWIG_AsVal_int(argv[3], NULL);
32616  _v = SWIG_CheckState(res);
32617  }
32618  if (_v) {
32619  return _wrap_new_IndexPQ__SWIG_0(self, args);
32620  }
32621  }
32622  }
32623  }
32624  }
32625 
32626 fail:
32627  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexPQ'.\n"
32628  " Possible C/C++ prototypes are:\n"
32629  " faiss::IndexPQ::IndexPQ(int,size_t,size_t,faiss::MetricType)\n"
32630  " faiss::IndexPQ::IndexPQ(int,size_t,size_t)\n"
32631  " faiss::IndexPQ::IndexPQ()\n");
32632  return 0;
32633 }
32634 
32635 
32636 SWIGINTERN PyObject *_wrap_IndexPQ_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32637  PyObject *resultobj = 0;
32638  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32639  faiss::Index::idx_t arg2 ;
32640  float *arg3 = (float *) 0 ;
32641  void *argp1 = 0 ;
32642  int res1 = 0 ;
32643  long val2 ;
32644  int ecode2 = 0 ;
32645  void *argp3 = 0 ;
32646  int res3 = 0 ;
32647  PyObject * obj0 = 0 ;
32648  PyObject * obj1 = 0 ;
32649  PyObject * obj2 = 0 ;
32650 
32651  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPQ_train",&obj0,&obj1,&obj2)) SWIG_fail;
32652  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32653  if (!SWIG_IsOK(res1)) {
32654  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_train" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32655  }
32656  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32657  ecode2 = SWIG_AsVal_long(obj1, &val2);
32658  if (!SWIG_IsOK(ecode2)) {
32659  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32660  }
32661  arg2 = static_cast< faiss::Index::idx_t >(val2);
32662  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32663  if (!SWIG_IsOK(res3)) {
32664  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_train" "', argument " "3"" of type '" "float const *""'");
32665  }
32666  arg3 = reinterpret_cast< float * >(argp3);
32667  {
32668  Py_BEGIN_ALLOW_THREADS
32669  try {
32670  (arg1)->train(arg2,(float const *)arg3);
32671  } catch(faiss::FaissException & e) {
32672  PyEval_RestoreThread(_save);
32673  PyErr_SetString(PyExc_RuntimeError, e.what());
32674  SWIG_fail;
32675  }
32676  Py_END_ALLOW_THREADS
32677  }
32678  resultobj = SWIG_Py_Void();
32679  return resultobj;
32680 fail:
32681  return NULL;
32682 }
32683 
32684 
32685 SWIGINTERN PyObject *_wrap_IndexPQ_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32686  PyObject *resultobj = 0;
32687  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32688  faiss::Index::idx_t arg2 ;
32689  float *arg3 = (float *) 0 ;
32690  void *argp1 = 0 ;
32691  int res1 = 0 ;
32692  long val2 ;
32693  int ecode2 = 0 ;
32694  void *argp3 = 0 ;
32695  int res3 = 0 ;
32696  PyObject * obj0 = 0 ;
32697  PyObject * obj1 = 0 ;
32698  PyObject * obj2 = 0 ;
32699 
32700  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPQ_add",&obj0,&obj1,&obj2)) SWIG_fail;
32701  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32702  if (!SWIG_IsOK(res1)) {
32703  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_add" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32704  }
32705  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32706  ecode2 = SWIG_AsVal_long(obj1, &val2);
32707  if (!SWIG_IsOK(ecode2)) {
32708  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32709  }
32710  arg2 = static_cast< faiss::Index::idx_t >(val2);
32711  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32712  if (!SWIG_IsOK(res3)) {
32713  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_add" "', argument " "3"" of type '" "float const *""'");
32714  }
32715  arg3 = reinterpret_cast< float * >(argp3);
32716  {
32717  Py_BEGIN_ALLOW_THREADS
32718  try {
32719  (arg1)->add(arg2,(float const *)arg3);
32720  } catch(faiss::FaissException & e) {
32721  PyEval_RestoreThread(_save);
32722  PyErr_SetString(PyExc_RuntimeError, e.what());
32723  SWIG_fail;
32724  }
32725  Py_END_ALLOW_THREADS
32726  }
32727  resultobj = SWIG_Py_Void();
32728  return resultobj;
32729 fail:
32730  return NULL;
32731 }
32732 
32733 
32734 SWIGINTERN PyObject *_wrap_IndexPQ_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32735  PyObject *resultobj = 0;
32736  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32737  faiss::Index::idx_t arg2 ;
32738  float *arg3 = (float *) 0 ;
32739  faiss::Index::idx_t arg4 ;
32740  float *arg5 = (float *) 0 ;
32742  void *argp1 = 0 ;
32743  int res1 = 0 ;
32744  long val2 ;
32745  int ecode2 = 0 ;
32746  void *argp3 = 0 ;
32747  int res3 = 0 ;
32748  long val4 ;
32749  int ecode4 = 0 ;
32750  void *argp5 = 0 ;
32751  int res5 = 0 ;
32752  void *argp6 = 0 ;
32753  int res6 = 0 ;
32754  PyObject * obj0 = 0 ;
32755  PyObject * obj1 = 0 ;
32756  PyObject * obj2 = 0 ;
32757  PyObject * obj3 = 0 ;
32758  PyObject * obj4 = 0 ;
32759  PyObject * obj5 = 0 ;
32760 
32761  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPQ_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
32762  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32763  if (!SWIG_IsOK(res1)) {
32764  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
32765  }
32766  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32767  ecode2 = SWIG_AsVal_long(obj1, &val2);
32768  if (!SWIG_IsOK(ecode2)) {
32769  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32770  }
32771  arg2 = static_cast< faiss::Index::idx_t >(val2);
32772  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32773  if (!SWIG_IsOK(res3)) {
32774  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_search" "', argument " "3"" of type '" "float const *""'");
32775  }
32776  arg3 = reinterpret_cast< float * >(argp3);
32777  ecode4 = SWIG_AsVal_long(obj3, &val4);
32778  if (!SWIG_IsOK(ecode4)) {
32779  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPQ_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
32780  }
32781  arg4 = static_cast< faiss::Index::idx_t >(val4);
32782  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
32783  if (!SWIG_IsOK(res5)) {
32784  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPQ_search" "', argument " "5"" of type '" "float *""'");
32785  }
32786  arg5 = reinterpret_cast< float * >(argp5);
32787  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
32788  if (!SWIG_IsOK(res6)) {
32789  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPQ_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
32790  }
32791  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
32792  {
32793  Py_BEGIN_ALLOW_THREADS
32794  try {
32795  ((faiss::IndexPQ const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
32796  } catch(faiss::FaissException & e) {
32797  PyEval_RestoreThread(_save);
32798  PyErr_SetString(PyExc_RuntimeError, e.what());
32799  SWIG_fail;
32800  }
32801  Py_END_ALLOW_THREADS
32802  }
32803  resultobj = SWIG_Py_Void();
32804  return resultobj;
32805 fail:
32806  return NULL;
32807 }
32808 
32809 
32810 SWIGINTERN PyObject *_wrap_IndexPQ_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32811  PyObject *resultobj = 0;
32812  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32813  void *argp1 = 0 ;
32814  int res1 = 0 ;
32815  PyObject * obj0 = 0 ;
32816 
32817  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_reset",&obj0)) SWIG_fail;
32818  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32819  if (!SWIG_IsOK(res1)) {
32820  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_reset" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32821  }
32822  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32823  {
32824  Py_BEGIN_ALLOW_THREADS
32825  try {
32826  (arg1)->reset();
32827  } catch(faiss::FaissException & e) {
32828  PyEval_RestoreThread(_save);
32829  PyErr_SetString(PyExc_RuntimeError, e.what());
32830  SWIG_fail;
32831  }
32832  Py_END_ALLOW_THREADS
32833  }
32834  resultobj = SWIG_Py_Void();
32835  return resultobj;
32836 fail:
32837  return NULL;
32838 }
32839 
32840 
32841 SWIGINTERN PyObject *_wrap_IndexPQ_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32842  PyObject *resultobj = 0;
32843  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32844  faiss::Index::idx_t arg2 ;
32845  faiss::Index::idx_t arg3 ;
32846  float *arg4 = (float *) 0 ;
32847  void *argp1 = 0 ;
32848  int res1 = 0 ;
32849  long val2 ;
32850  int ecode2 = 0 ;
32851  long val3 ;
32852  int ecode3 = 0 ;
32853  void *argp4 = 0 ;
32854  int res4 = 0 ;
32855  PyObject * obj0 = 0 ;
32856  PyObject * obj1 = 0 ;
32857  PyObject * obj2 = 0 ;
32858  PyObject * obj3 = 0 ;
32859 
32860  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPQ_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
32861  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32862  if (!SWIG_IsOK(res1)) {
32863  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
32864  }
32865  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32866  ecode2 = SWIG_AsVal_long(obj1, &val2);
32867  if (!SWIG_IsOK(ecode2)) {
32868  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32869  }
32870  arg2 = static_cast< faiss::Index::idx_t >(val2);
32871  ecode3 = SWIG_AsVal_long(obj2, &val3);
32872  if (!SWIG_IsOK(ecode3)) {
32873  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexPQ_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
32874  }
32875  arg3 = static_cast< faiss::Index::idx_t >(val3);
32876  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
32877  if (!SWIG_IsOK(res4)) {
32878  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPQ_reconstruct_n" "', argument " "4"" of type '" "float *""'");
32879  }
32880  arg4 = reinterpret_cast< float * >(argp4);
32881  {
32882  Py_BEGIN_ALLOW_THREADS
32883  try {
32884  ((faiss::IndexPQ const *)arg1)->reconstruct_n(arg2,arg3,arg4);
32885  } catch(faiss::FaissException & e) {
32886  PyEval_RestoreThread(_save);
32887  PyErr_SetString(PyExc_RuntimeError, e.what());
32888  SWIG_fail;
32889  }
32890  Py_END_ALLOW_THREADS
32891  }
32892  resultobj = SWIG_Py_Void();
32893  return resultobj;
32894 fail:
32895  return NULL;
32896 }
32897 
32898 
32899 SWIGINTERN PyObject *_wrap_IndexPQ_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32900  PyObject *resultobj = 0;
32901  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32902  faiss::Index::idx_t arg2 ;
32903  float *arg3 = (float *) 0 ;
32904  void *argp1 = 0 ;
32905  int res1 = 0 ;
32906  long val2 ;
32907  int ecode2 = 0 ;
32908  void *argp3 = 0 ;
32909  int res3 = 0 ;
32910  PyObject * obj0 = 0 ;
32911  PyObject * obj1 = 0 ;
32912  PyObject * obj2 = 0 ;
32913 
32914  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPQ_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
32915  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32916  if (!SWIG_IsOK(res1)) {
32917  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_reconstruct" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
32918  }
32919  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32920  ecode2 = SWIG_AsVal_long(obj1, &val2);
32921  if (!SWIG_IsOK(ecode2)) {
32922  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32923  }
32924  arg2 = static_cast< faiss::Index::idx_t >(val2);
32925  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32926  if (!SWIG_IsOK(res3)) {
32927  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_reconstruct" "', argument " "3"" of type '" "float *""'");
32928  }
32929  arg3 = reinterpret_cast< float * >(argp3);
32930  {
32931  Py_BEGIN_ALLOW_THREADS
32932  try {
32933  ((faiss::IndexPQ const *)arg1)->reconstruct(arg2,arg3);
32934  } catch(faiss::FaissException & e) {
32935  PyEval_RestoreThread(_save);
32936  PyErr_SetString(PyExc_RuntimeError, e.what());
32937  SWIG_fail;
32938  }
32939  Py_END_ALLOW_THREADS
32940  }
32941  resultobj = SWIG_Py_Void();
32942  return resultobj;
32943 fail:
32944  return NULL;
32945 }
32946 
32947 
32948 SWIGINTERN PyObject *_wrap_IndexPQ_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32949  PyObject *resultobj = 0;
32950  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32951  faiss::IDSelector *arg2 = 0 ;
32952  void *argp1 = 0 ;
32953  int res1 = 0 ;
32954  void *argp2 = 0 ;
32955  int res2 = 0 ;
32956  PyObject * obj0 = 0 ;
32957  PyObject * obj1 = 0 ;
32958  long result;
32959 
32960  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_remove_ids",&obj0,&obj1)) SWIG_fail;
32961  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32962  if (!SWIG_IsOK(res1)) {
32963  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_remove_ids" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32964  }
32965  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32966  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
32967  if (!SWIG_IsOK(res2)) {
32968  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
32969  }
32970  if (!argp2) {
32971  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexPQ_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
32972  }
32973  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
32974  {
32975  Py_BEGIN_ALLOW_THREADS
32976  try {
32977  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
32978  } catch(faiss::FaissException & e) {
32979  PyEval_RestoreThread(_save);
32980  PyErr_SetString(PyExc_RuntimeError, e.what());
32981  SWIG_fail;
32982  }
32983  Py_END_ALLOW_THREADS
32984  }
32985  resultobj = SWIG_From_long(static_cast< long >(result));
32986  return resultobj;
32987 fail:
32988  return NULL;
32989 }
32990 
32991 
32992 SWIGINTERN PyObject *_wrap_IndexPQ_do_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32993  PyObject *resultobj = 0;
32994  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32995  bool arg2 ;
32996  void *argp1 = 0 ;
32997  int res1 = 0 ;
32998  bool val2 ;
32999  int ecode2 = 0 ;
33000  PyObject * obj0 = 0 ;
33001  PyObject * obj1 = 0 ;
33002 
33003  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_do_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
33004  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33005  if (!SWIG_IsOK(res1)) {
33006  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_do_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33007  }
33008  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33009  ecode2 = SWIG_AsVal_bool(obj1, &val2);
33010  if (!SWIG_IsOK(ecode2)) {
33011  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_do_polysemous_training_set" "', argument " "2"" of type '" "bool""'");
33012  }
33013  arg2 = static_cast< bool >(val2);
33014  if (arg1) (arg1)->do_polysemous_training = arg2;
33015  resultobj = SWIG_Py_Void();
33016  return resultobj;
33017 fail:
33018  return NULL;
33019 }
33020 
33021 
33022 SWIGINTERN PyObject *_wrap_IndexPQ_do_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33023  PyObject *resultobj = 0;
33024  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33025  void *argp1 = 0 ;
33026  int res1 = 0 ;
33027  PyObject * obj0 = 0 ;
33028  bool result;
33029 
33030  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_do_polysemous_training_get",&obj0)) SWIG_fail;
33031  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33032  if (!SWIG_IsOK(res1)) {
33033  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_do_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33034  }
33035  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33036  result = (bool) ((arg1)->do_polysemous_training);
33037  resultobj = SWIG_From_bool(static_cast< bool >(result));
33038  return resultobj;
33039 fail:
33040  return NULL;
33041 }
33042 
33043 
33044 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33045  PyObject *resultobj = 0;
33046  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33048  void *argp1 = 0 ;
33049  int res1 = 0 ;
33050  void *argp2 = 0 ;
33051  int res2 = 0 ;
33052  PyObject * obj0 = 0 ;
33053  PyObject * obj1 = 0 ;
33054 
33055  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
33056  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33057  if (!SWIG_IsOK(res1)) {
33058  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33059  }
33060  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33061  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
33062  if (!SWIG_IsOK(res2)) {
33063  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_polysemous_training_set" "', argument " "2"" of type '" "faiss::PolysemousTraining *""'");
33064  }
33065  arg2 = reinterpret_cast< faiss::PolysemousTraining * >(argp2);
33066  if (arg1) (arg1)->polysemous_training = *arg2;
33067  resultobj = SWIG_Py_Void();
33068  return resultobj;
33069 fail:
33070  return NULL;
33071 }
33072 
33073 
33074 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33075  PyObject *resultobj = 0;
33076  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33077  void *argp1 = 0 ;
33078  int res1 = 0 ;
33079  PyObject * obj0 = 0 ;
33080  faiss::PolysemousTraining *result = 0 ;
33081 
33082  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_polysemous_training_get",&obj0)) SWIG_fail;
33083  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33084  if (!SWIG_IsOK(res1)) {
33085  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33086  }
33087  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33088  result = (faiss::PolysemousTraining *)& ((arg1)->polysemous_training);
33089  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
33090  return resultobj;
33091 fail:
33092  return NULL;
33093 }
33094 
33095 
33096 SWIGINTERN PyObject *_wrap_IndexPQ_search_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33097  PyObject *resultobj = 0;
33098  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33100  void *argp1 = 0 ;
33101  int res1 = 0 ;
33102  int val2 ;
33103  int ecode2 = 0 ;
33104  PyObject * obj0 = 0 ;
33105  PyObject * obj1 = 0 ;
33106 
33107  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_search_type_set",&obj0,&obj1)) SWIG_fail;
33108  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33109  if (!SWIG_IsOK(res1)) {
33110  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search_type_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33111  }
33112  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33113  ecode2 = SWIG_AsVal_int(obj1, &val2);
33114  if (!SWIG_IsOK(ecode2)) {
33115  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_search_type_set" "', argument " "2"" of type '" "faiss::IndexPQ::Search_type_t""'");
33116  }
33117  arg2 = static_cast< faiss::IndexPQ::Search_type_t >(val2);
33118  if (arg1) (arg1)->search_type = arg2;
33119  resultobj = SWIG_Py_Void();
33120  return resultobj;
33121 fail:
33122  return NULL;
33123 }
33124 
33125 
33126 SWIGINTERN PyObject *_wrap_IndexPQ_search_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33127  PyObject *resultobj = 0;
33128  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33129  void *argp1 = 0 ;
33130  int res1 = 0 ;
33131  PyObject * obj0 = 0 ;
33133 
33134  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_search_type_get",&obj0)) SWIG_fail;
33135  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33136  if (!SWIG_IsOK(res1)) {
33137  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search_type_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33138  }
33139  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33140  result = (faiss::IndexPQ::Search_type_t) ((arg1)->search_type);
33141  resultobj = SWIG_From_int(static_cast< int >(result));
33142  return resultobj;
33143 fail:
33144  return NULL;
33145 }
33146 
33147 
33148 SWIGINTERN PyObject *_wrap_IndexPQ_encode_signs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33149  PyObject *resultobj = 0;
33150  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33151  bool arg2 ;
33152  void *argp1 = 0 ;
33153  int res1 = 0 ;
33154  bool val2 ;
33155  int ecode2 = 0 ;
33156  PyObject * obj0 = 0 ;
33157  PyObject * obj1 = 0 ;
33158 
33159  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_encode_signs_set",&obj0,&obj1)) SWIG_fail;
33160  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33161  if (!SWIG_IsOK(res1)) {
33162  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_encode_signs_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33163  }
33164  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33165  ecode2 = SWIG_AsVal_bool(obj1, &val2);
33166  if (!SWIG_IsOK(ecode2)) {
33167  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_encode_signs_set" "', argument " "2"" of type '" "bool""'");
33168  }
33169  arg2 = static_cast< bool >(val2);
33170  if (arg1) (arg1)->encode_signs = arg2;
33171  resultobj = SWIG_Py_Void();
33172  return resultobj;
33173 fail:
33174  return NULL;
33175 }
33176 
33177 
33178 SWIGINTERN PyObject *_wrap_IndexPQ_encode_signs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33179  PyObject *resultobj = 0;
33180  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33181  void *argp1 = 0 ;
33182  int res1 = 0 ;
33183  PyObject * obj0 = 0 ;
33184  bool result;
33185 
33186  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_encode_signs_get",&obj0)) SWIG_fail;
33187  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33188  if (!SWIG_IsOK(res1)) {
33189  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_encode_signs_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33190  }
33191  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33192  result = (bool) ((arg1)->encode_signs);
33193  resultobj = SWIG_From_bool(static_cast< bool >(result));
33194  return resultobj;
33195 fail:
33196  return NULL;
33197 }
33198 
33199 
33200 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_ht_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33201  PyObject *resultobj = 0;
33202  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33203  int arg2 ;
33204  void *argp1 = 0 ;
33205  int res1 = 0 ;
33206  int val2 ;
33207  int ecode2 = 0 ;
33208  PyObject * obj0 = 0 ;
33209  PyObject * obj1 = 0 ;
33210 
33211  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_polysemous_ht_set",&obj0,&obj1)) SWIG_fail;
33212  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33213  if (!SWIG_IsOK(res1)) {
33214  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_ht_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33215  }
33216  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33217  ecode2 = SWIG_AsVal_int(obj1, &val2);
33218  if (!SWIG_IsOK(ecode2)) {
33219  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_polysemous_ht_set" "', argument " "2"" of type '" "int""'");
33220  }
33221  arg2 = static_cast< int >(val2);
33222  if (arg1) (arg1)->polysemous_ht = arg2;
33223  resultobj = SWIG_Py_Void();
33224  return resultobj;
33225 fail:
33226  return NULL;
33227 }
33228 
33229 
33230 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_ht_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33231  PyObject *resultobj = 0;
33232  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33233  void *argp1 = 0 ;
33234  int res1 = 0 ;
33235  PyObject * obj0 = 0 ;
33236  int result;
33237 
33238  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_polysemous_ht_get",&obj0)) SWIG_fail;
33239  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33240  if (!SWIG_IsOK(res1)) {
33241  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_ht_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33242  }
33243  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33244  result = (int) ((arg1)->polysemous_ht);
33245  resultobj = SWIG_From_int(static_cast< int >(result));
33246  return resultobj;
33247 fail:
33248  return NULL;
33249 }
33250 
33251 
33252 SWIGINTERN PyObject *_wrap_IndexPQ_search_core_polysemous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33253  PyObject *resultobj = 0;
33254  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33255  faiss::Index::idx_t arg2 ;
33256  float *arg3 = (float *) 0 ;
33257  faiss::Index::idx_t arg4 ;
33258  float *arg5 = (float *) 0 ;
33260  void *argp1 = 0 ;
33261  int res1 = 0 ;
33262  long val2 ;
33263  int ecode2 = 0 ;
33264  void *argp3 = 0 ;
33265  int res3 = 0 ;
33266  long val4 ;
33267  int ecode4 = 0 ;
33268  void *argp5 = 0 ;
33269  int res5 = 0 ;
33270  void *argp6 = 0 ;
33271  int res6 = 0 ;
33272  PyObject * obj0 = 0 ;
33273  PyObject * obj1 = 0 ;
33274  PyObject * obj2 = 0 ;
33275  PyObject * obj3 = 0 ;
33276  PyObject * obj4 = 0 ;
33277  PyObject * obj5 = 0 ;
33278 
33279  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPQ_search_core_polysemous",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
33280  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33281  if (!SWIG_IsOK(res1)) {
33282  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search_core_polysemous" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
33283  }
33284  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33285  ecode2 = SWIG_AsVal_long(obj1, &val2);
33286  if (!SWIG_IsOK(ecode2)) {
33287  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_search_core_polysemous" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
33288  }
33289  arg2 = static_cast< faiss::Index::idx_t >(val2);
33290  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
33291  if (!SWIG_IsOK(res3)) {
33292  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_search_core_polysemous" "', argument " "3"" of type '" "float const *""'");
33293  }
33294  arg3 = reinterpret_cast< float * >(argp3);
33295  ecode4 = SWIG_AsVal_long(obj3, &val4);
33296  if (!SWIG_IsOK(ecode4)) {
33297  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPQ_search_core_polysemous" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
33298  }
33299  arg4 = static_cast< faiss::Index::idx_t >(val4);
33300  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
33301  if (!SWIG_IsOK(res5)) {
33302  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPQ_search_core_polysemous" "', argument " "5"" of type '" "float *""'");
33303  }
33304  arg5 = reinterpret_cast< float * >(argp5);
33305  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
33306  if (!SWIG_IsOK(res6)) {
33307  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPQ_search_core_polysemous" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
33308  }
33309  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
33310  {
33311  Py_BEGIN_ALLOW_THREADS
33312  try {
33313  ((faiss::IndexPQ const *)arg1)->search_core_polysemous(arg2,(float const *)arg3,arg4,arg5,arg6);
33314  } catch(faiss::FaissException & e) {
33315  PyEval_RestoreThread(_save);
33316  PyErr_SetString(PyExc_RuntimeError, e.what());
33317  SWIG_fail;
33318  }
33319  Py_END_ALLOW_THREADS
33320  }
33321  resultobj = SWIG_Py_Void();
33322  return resultobj;
33323 fail:
33324  return NULL;
33325 }
33326 
33327 
33328 SWIGINTERN PyObject *_wrap_IndexPQ_hamming_distance_histogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33329  PyObject *resultobj = 0;
33330  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33331  faiss::Index::idx_t arg2 ;
33332  float *arg3 = (float *) 0 ;
33333  faiss::Index::idx_t arg4 ;
33334  float *arg5 = (float *) 0 ;
33335  long *arg6 = (long *) 0 ;
33336  void *argp1 = 0 ;
33337  int res1 = 0 ;
33338  long val2 ;
33339  int ecode2 = 0 ;
33340  void *argp3 = 0 ;
33341  int res3 = 0 ;
33342  long val4 ;
33343  int ecode4 = 0 ;
33344  void *argp5 = 0 ;
33345  int res5 = 0 ;
33346  void *argp6 = 0 ;
33347  int res6 = 0 ;
33348  PyObject * obj0 = 0 ;
33349  PyObject * obj1 = 0 ;
33350  PyObject * obj2 = 0 ;
33351  PyObject * obj3 = 0 ;
33352  PyObject * obj4 = 0 ;
33353  PyObject * obj5 = 0 ;
33354 
33355  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPQ_hamming_distance_histogram",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
33356  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33357  if (!SWIG_IsOK(res1)) {
33358  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33359  }
33360  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33361  ecode2 = SWIG_AsVal_long(obj1, &val2);
33362  if (!SWIG_IsOK(ecode2)) {
33363  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
33364  }
33365  arg2 = static_cast< faiss::Index::idx_t >(val2);
33366  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
33367  if (!SWIG_IsOK(res3)) {
33368  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "3"" of type '" "float const *""'");
33369  }
33370  arg3 = reinterpret_cast< float * >(argp3);
33371  ecode4 = SWIG_AsVal_long(obj3, &val4);
33372  if (!SWIG_IsOK(ecode4)) {
33373  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
33374  }
33375  arg4 = static_cast< faiss::Index::idx_t >(val4);
33376  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
33377  if (!SWIG_IsOK(res5)) {
33378  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "5"" of type '" "float const *""'");
33379  }
33380  arg5 = reinterpret_cast< float * >(argp5);
33381  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
33382  if (!SWIG_IsOK(res6)) {
33383  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "6"" of type '" "long *""'");
33384  }
33385  arg6 = reinterpret_cast< long * >(argp6);
33386  {
33387  Py_BEGIN_ALLOW_THREADS
33388  try {
33389  (arg1)->hamming_distance_histogram(arg2,(float const *)arg3,arg4,(float const *)arg5,arg6);
33390  } catch(faiss::FaissException & e) {
33391  PyEval_RestoreThread(_save);
33392  PyErr_SetString(PyExc_RuntimeError, e.what());
33393  SWIG_fail;
33394  }
33395  Py_END_ALLOW_THREADS
33396  }
33397  resultobj = SWIG_Py_Void();
33398  return resultobj;
33399 fail:
33400  return NULL;
33401 }
33402 
33403 
33404 SWIGINTERN PyObject *_wrap_IndexPQ_hamming_distance_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33405  PyObject *resultobj = 0;
33406  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33407  faiss::Index::idx_t arg2 ;
33408  float *arg3 = (float *) 0 ;
33409  int32_t *arg4 = (int32_t *) 0 ;
33410  void *argp1 = 0 ;
33411  int res1 = 0 ;
33412  long val2 ;
33413  int ecode2 = 0 ;
33414  void *argp3 = 0 ;
33415  int res3 = 0 ;
33416  void *argp4 = 0 ;
33417  int res4 = 0 ;
33418  PyObject * obj0 = 0 ;
33419  PyObject * obj1 = 0 ;
33420  PyObject * obj2 = 0 ;
33421  PyObject * obj3 = 0 ;
33422 
33423  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPQ_hamming_distance_table",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
33424  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
33425  if (!SWIG_IsOK(res1)) {
33426  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_hamming_distance_table" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
33427  }
33428  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33429  ecode2 = SWIG_AsVal_long(obj1, &val2);
33430  if (!SWIG_IsOK(ecode2)) {
33431  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_hamming_distance_table" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
33432  }
33433  arg2 = static_cast< faiss::Index::idx_t >(val2);
33434  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
33435  if (!SWIG_IsOK(res3)) {
33436  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_hamming_distance_table" "', argument " "3"" of type '" "float const *""'");
33437  }
33438  arg3 = reinterpret_cast< float * >(argp3);
33439  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
33440  if (!SWIG_IsOK(res4)) {
33441  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPQ_hamming_distance_table" "', argument " "4"" of type '" "int32_t *""'");
33442  }
33443  arg4 = reinterpret_cast< int32_t * >(argp4);
33444  {
33445  Py_BEGIN_ALLOW_THREADS
33446  try {
33447  ((faiss::IndexPQ const *)arg1)->hamming_distance_table(arg2,(float const *)arg3,arg4);
33448  } catch(faiss::FaissException & e) {
33449  PyEval_RestoreThread(_save);
33450  PyErr_SetString(PyExc_RuntimeError, e.what());
33451  SWIG_fail;
33452  }
33453  Py_END_ALLOW_THREADS
33454  }
33455  resultobj = SWIG_Py_Void();
33456  return resultobj;
33457 fail:
33458  return NULL;
33459 }
33460 
33461 
33462 SWIGINTERN PyObject *_wrap_delete_IndexPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33463  PyObject *resultobj = 0;
33464  faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
33465  void *argp1 = 0 ;
33466  int res1 = 0 ;
33467  PyObject * obj0 = 0 ;
33468 
33469  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexPQ",&obj0)) SWIG_fail;
33470  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_DISOWN | 0 );
33471  if (!SWIG_IsOK(res1)) {
33472  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexPQ" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
33473  }
33474  arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
33475  delete arg1;
33476  resultobj = SWIG_Py_Void();
33477  return resultobj;
33478 fail:
33479  return NULL;
33480 }
33481 
33482 
33483 SWIGINTERN PyObject *IndexPQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33484  PyObject *obj;
33485  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
33486  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexPQ, SWIG_NewClientData(obj));
33487  return SWIG_Py_Void();
33488 }
33489 
33490 SWIGINTERN PyObject *_wrap_IndexPQStats_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33491  PyObject *resultobj = 0;
33493  size_t arg2 ;
33494  void *argp1 = 0 ;
33495  int res1 = 0 ;
33496  size_t val2 ;
33497  int ecode2 = 0 ;
33498  PyObject * obj0 = 0 ;
33499  PyObject * obj1 = 0 ;
33500 
33501  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQStats_nq_set",&obj0,&obj1)) SWIG_fail;
33502  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
33503  if (!SWIG_IsOK(res1)) {
33504  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_nq_set" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33505  }
33506  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33507  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33508  if (!SWIG_IsOK(ecode2)) {
33509  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQStats_nq_set" "', argument " "2"" of type '" "size_t""'");
33510  }
33511  arg2 = static_cast< size_t >(val2);
33512  if (arg1) (arg1)->nq = arg2;
33513  resultobj = SWIG_Py_Void();
33514  return resultobj;
33515 fail:
33516  return NULL;
33517 }
33518 
33519 
33520 SWIGINTERN PyObject *_wrap_IndexPQStats_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33521  PyObject *resultobj = 0;
33523  void *argp1 = 0 ;
33524  int res1 = 0 ;
33525  PyObject * obj0 = 0 ;
33526  size_t result;
33527 
33528  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_nq_get",&obj0)) SWIG_fail;
33529  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
33530  if (!SWIG_IsOK(res1)) {
33531  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_nq_get" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33532  }
33533  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33534  result = (size_t) ((arg1)->nq);
33535  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33536  return resultobj;
33537 fail:
33538  return NULL;
33539 }
33540 
33541 
33542 SWIGINTERN PyObject *_wrap_IndexPQStats_ncode_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33543  PyObject *resultobj = 0;
33545  size_t arg2 ;
33546  void *argp1 = 0 ;
33547  int res1 = 0 ;
33548  size_t val2 ;
33549  int ecode2 = 0 ;
33550  PyObject * obj0 = 0 ;
33551  PyObject * obj1 = 0 ;
33552 
33553  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQStats_ncode_set",&obj0,&obj1)) SWIG_fail;
33554  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
33555  if (!SWIG_IsOK(res1)) {
33556  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_ncode_set" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33557  }
33558  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33559  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33560  if (!SWIG_IsOK(ecode2)) {
33561  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQStats_ncode_set" "', argument " "2"" of type '" "size_t""'");
33562  }
33563  arg2 = static_cast< size_t >(val2);
33564  if (arg1) (arg1)->ncode = arg2;
33565  resultobj = SWIG_Py_Void();
33566  return resultobj;
33567 fail:
33568  return NULL;
33569 }
33570 
33571 
33572 SWIGINTERN PyObject *_wrap_IndexPQStats_ncode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33573  PyObject *resultobj = 0;
33575  void *argp1 = 0 ;
33576  int res1 = 0 ;
33577  PyObject * obj0 = 0 ;
33578  size_t result;
33579 
33580  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_ncode_get",&obj0)) SWIG_fail;
33581  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
33582  if (!SWIG_IsOK(res1)) {
33583  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_ncode_get" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33584  }
33585  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33586  result = (size_t) ((arg1)->ncode);
33587  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33588  return resultobj;
33589 fail:
33590  return NULL;
33591 }
33592 
33593 
33594 SWIGINTERN PyObject *_wrap_IndexPQStats_n_hamming_pass_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33595  PyObject *resultobj = 0;
33597  size_t arg2 ;
33598  void *argp1 = 0 ;
33599  int res1 = 0 ;
33600  size_t val2 ;
33601  int ecode2 = 0 ;
33602  PyObject * obj0 = 0 ;
33603  PyObject * obj1 = 0 ;
33604 
33605  if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQStats_n_hamming_pass_set",&obj0,&obj1)) SWIG_fail;
33606  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
33607  if (!SWIG_IsOK(res1)) {
33608  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_n_hamming_pass_set" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33609  }
33610  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33611  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33612  if (!SWIG_IsOK(ecode2)) {
33613  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQStats_n_hamming_pass_set" "', argument " "2"" of type '" "size_t""'");
33614  }
33615  arg2 = static_cast< size_t >(val2);
33616  if (arg1) (arg1)->n_hamming_pass = arg2;
33617  resultobj = SWIG_Py_Void();
33618  return resultobj;
33619 fail:
33620  return NULL;
33621 }
33622 
33623 
33624 SWIGINTERN PyObject *_wrap_IndexPQStats_n_hamming_pass_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33625  PyObject *resultobj = 0;
33627  void *argp1 = 0 ;
33628  int res1 = 0 ;
33629  PyObject * obj0 = 0 ;
33630  size_t result;
33631 
33632  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_n_hamming_pass_get",&obj0)) SWIG_fail;
33633  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
33634  if (!SWIG_IsOK(res1)) {
33635  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_n_hamming_pass_get" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33636  }
33637  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33638  result = (size_t) ((arg1)->n_hamming_pass);
33639  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33640  return resultobj;
33641 fail:
33642  return NULL;
33643 }
33644 
33645 
33646 SWIGINTERN PyObject *_wrap_new_IndexPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33647  PyObject *resultobj = 0;
33648  faiss::IndexPQStats *result = 0 ;
33649 
33650  if (!PyArg_ParseTuple(args,(char *)":new_IndexPQStats")) SWIG_fail;
33651  {
33652  Py_BEGIN_ALLOW_THREADS
33653  try {
33654  result = (faiss::IndexPQStats *)new faiss::IndexPQStats();
33655  } catch(faiss::FaissException & e) {
33656  PyEval_RestoreThread(_save);
33657  PyErr_SetString(PyExc_RuntimeError, e.what());
33658  SWIG_fail;
33659  }
33660  Py_END_ALLOW_THREADS
33661  }
33662  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQStats, SWIG_POINTER_NEW | 0 );
33663  return resultobj;
33664 fail:
33665  return NULL;
33666 }
33667 
33668 
33669 SWIGINTERN PyObject *_wrap_IndexPQStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33670  PyObject *resultobj = 0;
33672  void *argp1 = 0 ;
33673  int res1 = 0 ;
33674  PyObject * obj0 = 0 ;
33675 
33676  if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_reset",&obj0)) SWIG_fail;
33677  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
33678  if (!SWIG_IsOK(res1)) {
33679  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_reset" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33680  }
33681  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33682  {
33683  Py_BEGIN_ALLOW_THREADS
33684  try {
33685  (arg1)->reset();
33686  } catch(faiss::FaissException & e) {
33687  PyEval_RestoreThread(_save);
33688  PyErr_SetString(PyExc_RuntimeError, e.what());
33689  SWIG_fail;
33690  }
33691  Py_END_ALLOW_THREADS
33692  }
33693  resultobj = SWIG_Py_Void();
33694  return resultobj;
33695 fail:
33696  return NULL;
33697 }
33698 
33699 
33700 SWIGINTERN PyObject *_wrap_delete_IndexPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33701  PyObject *resultobj = 0;
33703  void *argp1 = 0 ;
33704  int res1 = 0 ;
33705  PyObject * obj0 = 0 ;
33706 
33707  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexPQStats",&obj0)) SWIG_fail;
33708  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, SWIG_POINTER_DISOWN | 0 );
33709  if (!SWIG_IsOK(res1)) {
33710  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexPQStats" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
33711  }
33712  arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
33713  delete arg1;
33714  resultobj = SWIG_Py_Void();
33715  return resultobj;
33716 fail:
33717  return NULL;
33718 }
33719 
33720 
33721 SWIGINTERN PyObject *IndexPQStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33722  PyObject *obj;
33723  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
33724  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexPQStats, SWIG_NewClientData(obj));
33725  return SWIG_Py_Void();
33726 }
33727 
33728 SWIGINTERN int Swig_var_indexPQ_stats_set(PyObject *_val) {
33729  {
33730  void *argp = 0;
33731  int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__IndexPQStats, 0 | 0);
33732  if (!SWIG_IsOK(res)) {
33733  SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::indexPQ_stats""' of type '""faiss::IndexPQStats""'");
33734  }
33735  if (!argp) {
33736  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::indexPQ_stats""' of type '""faiss::IndexPQStats""'");
33737  } else {
33738  faiss::IndexPQStats * temp;
33739  temp = reinterpret_cast< faiss::IndexPQStats * >(argp);
33740  faiss::indexPQ_stats = *temp;
33741  if (SWIG_IsNewObj(res)) delete temp;
33742  }
33743  }
33744  return 0;
33745 fail:
33746  return 1;
33747 }
33748 
33749 
33750 SWIGINTERN PyObject *Swig_var_indexPQ_stats_get(void) {
33751  PyObject *pyobj = 0;
33752 
33753  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::indexPQ_stats), SWIGTYPE_p_faiss__IndexPQStats, 0 );
33754  return pyobj;
33755 }
33756 
33757 
33758 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33759  PyObject *resultobj = 0;
33762  void *argp1 = 0 ;
33763  int res1 = 0 ;
33764  void *argp2 = 0 ;
33765  int res2 = 0 ;
33766  PyObject * obj0 = 0 ;
33767  PyObject * obj1 = 0 ;
33768 
33769  if (!PyArg_ParseTuple(args,(char *)"OO:MultiIndexQuantizer_pq_set",&obj0,&obj1)) SWIG_fail;
33770  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
33771  if (!SWIG_IsOK(res1)) {
33772  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_pq_set" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
33773  }
33774  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
33775  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
33776  if (!SWIG_IsOK(res2)) {
33777  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiIndexQuantizer_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
33778  }
33779  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
33780  if (arg1) (arg1)->pq = *arg2;
33781  resultobj = SWIG_Py_Void();
33782  return resultobj;
33783 fail:
33784  return NULL;
33785 }
33786 
33787 
33788 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33789  PyObject *resultobj = 0;
33791  void *argp1 = 0 ;
33792  int res1 = 0 ;
33793  PyObject * obj0 = 0 ;
33794  faiss::ProductQuantizer *result = 0 ;
33795 
33796  if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer_pq_get",&obj0)) SWIG_fail;
33797  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
33798  if (!SWIG_IsOK(res1)) {
33799  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_pq_get" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
33800  }
33801  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
33802  result = (faiss::ProductQuantizer *)& ((arg1)->pq);
33803  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
33804  return resultobj;
33805 fail:
33806  return NULL;
33807 }
33808 
33809 
33810 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33811  PyObject *resultobj = 0;
33812  int arg1 ;
33813  size_t arg2 ;
33814  size_t arg3 ;
33815  int val1 ;
33816  int ecode1 = 0 ;
33817  size_t val2 ;
33818  int ecode2 = 0 ;
33819  size_t val3 ;
33820  int ecode3 = 0 ;
33821  PyObject * obj0 = 0 ;
33822  PyObject * obj1 = 0 ;
33823  PyObject * obj2 = 0 ;
33824  faiss::MultiIndexQuantizer *result = 0 ;
33825 
33826  if (!PyArg_ParseTuple(args,(char *)"OOO:new_MultiIndexQuantizer",&obj0,&obj1,&obj2)) SWIG_fail;
33827  ecode1 = SWIG_AsVal_int(obj0, &val1);
33828  if (!SWIG_IsOK(ecode1)) {
33829  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultiIndexQuantizer" "', argument " "1"" of type '" "int""'");
33830  }
33831  arg1 = static_cast< int >(val1);
33832  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33833  if (!SWIG_IsOK(ecode2)) {
33834  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIndexQuantizer" "', argument " "2"" of type '" "size_t""'");
33835  }
33836  arg2 = static_cast< size_t >(val2);
33837  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
33838  if (!SWIG_IsOK(ecode3)) {
33839  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MultiIndexQuantizer" "', argument " "3"" of type '" "size_t""'");
33840  }
33841  arg3 = static_cast< size_t >(val3);
33842  {
33843  Py_BEGIN_ALLOW_THREADS
33844  try {
33845  result = (faiss::MultiIndexQuantizer *)new faiss::MultiIndexQuantizer(arg1,arg2,arg3);
33846  } catch(faiss::FaissException & e) {
33847  PyEval_RestoreThread(_save);
33848  PyErr_SetString(PyExc_RuntimeError, e.what());
33849  SWIG_fail;
33850  }
33851  Py_END_ALLOW_THREADS
33852  }
33853  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_POINTER_NEW | 0 );
33854  return resultobj;
33855 fail:
33856  return NULL;
33857 }
33858 
33859 
33860 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33861  PyObject *resultobj = 0;
33863  faiss::Index::idx_t arg2 ;
33864  float *arg3 = (float *) 0 ;
33865  void *argp1 = 0 ;
33866  int res1 = 0 ;
33867  long val2 ;
33868  int ecode2 = 0 ;
33869  void *argp3 = 0 ;
33870  int res3 = 0 ;
33871  PyObject * obj0 = 0 ;
33872  PyObject * obj1 = 0 ;
33873  PyObject * obj2 = 0 ;
33874 
33875  if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
33876  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
33877  if (!SWIG_IsOK(res1)) {
33878  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_train" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
33879  }
33880  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
33881  ecode2 = SWIG_AsVal_long(obj1, &val2);
33882  if (!SWIG_IsOK(ecode2)) {
33883  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
33884  }
33885  arg2 = static_cast< faiss::Index::idx_t >(val2);
33886  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
33887  if (!SWIG_IsOK(res3)) {
33888  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_train" "', argument " "3"" of type '" "float const *""'");
33889  }
33890  arg3 = reinterpret_cast< float * >(argp3);
33891  {
33892  Py_BEGIN_ALLOW_THREADS
33893  try {
33894  (arg1)->train(arg2,(float const *)arg3);
33895  } catch(faiss::FaissException & e) {
33896  PyEval_RestoreThread(_save);
33897  PyErr_SetString(PyExc_RuntimeError, e.what());
33898  SWIG_fail;
33899  }
33900  Py_END_ALLOW_THREADS
33901  }
33902  resultobj = SWIG_Py_Void();
33903  return resultobj;
33904 fail:
33905  return NULL;
33906 }
33907 
33908 
33909 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33910  PyObject *resultobj = 0;
33912  faiss::Index::idx_t arg2 ;
33913  float *arg3 = (float *) 0 ;
33914  faiss::Index::idx_t arg4 ;
33915  float *arg5 = (float *) 0 ;
33917  void *argp1 = 0 ;
33918  int res1 = 0 ;
33919  long val2 ;
33920  int ecode2 = 0 ;
33921  void *argp3 = 0 ;
33922  int res3 = 0 ;
33923  long val4 ;
33924  int ecode4 = 0 ;
33925  void *argp5 = 0 ;
33926  int res5 = 0 ;
33927  void *argp6 = 0 ;
33928  int res6 = 0 ;
33929  PyObject * obj0 = 0 ;
33930  PyObject * obj1 = 0 ;
33931  PyObject * obj2 = 0 ;
33932  PyObject * obj3 = 0 ;
33933  PyObject * obj4 = 0 ;
33934  PyObject * obj5 = 0 ;
33935 
33936  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:MultiIndexQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
33937  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
33938  if (!SWIG_IsOK(res1)) {
33939  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_search" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer const *""'");
33940  }
33941  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
33942  ecode2 = SWIG_AsVal_long(obj1, &val2);
33943  if (!SWIG_IsOK(ecode2)) {
33944  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
33945  }
33946  arg2 = static_cast< faiss::Index::idx_t >(val2);
33947  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
33948  if (!SWIG_IsOK(res3)) {
33949  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_search" "', argument " "3"" of type '" "float const *""'");
33950  }
33951  arg3 = reinterpret_cast< float * >(argp3);
33952  ecode4 = SWIG_AsVal_long(obj3, &val4);
33953  if (!SWIG_IsOK(ecode4)) {
33954  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiIndexQuantizer_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
33955  }
33956  arg4 = static_cast< faiss::Index::idx_t >(val4);
33957  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
33958  if (!SWIG_IsOK(res5)) {
33959  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MultiIndexQuantizer_search" "', argument " "5"" of type '" "float *""'");
33960  }
33961  arg5 = reinterpret_cast< float * >(argp5);
33962  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
33963  if (!SWIG_IsOK(res6)) {
33964  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "MultiIndexQuantizer_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
33965  }
33966  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
33967  {
33968  Py_BEGIN_ALLOW_THREADS
33969  try {
33970  ((faiss::MultiIndexQuantizer const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
33971  } catch(faiss::FaissException & e) {
33972  PyEval_RestoreThread(_save);
33973  PyErr_SetString(PyExc_RuntimeError, e.what());
33974  SWIG_fail;
33975  }
33976  Py_END_ALLOW_THREADS
33977  }
33978  resultobj = SWIG_Py_Void();
33979  return resultobj;
33980 fail:
33981  return NULL;
33982 }
33983 
33984 
33985 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33986  PyObject *resultobj = 0;
33988  faiss::Index::idx_t arg2 ;
33989  float *arg3 = (float *) 0 ;
33990  void *argp1 = 0 ;
33991  int res1 = 0 ;
33992  long val2 ;
33993  int ecode2 = 0 ;
33994  void *argp3 = 0 ;
33995  int res3 = 0 ;
33996  PyObject * obj0 = 0 ;
33997  PyObject * obj1 = 0 ;
33998  PyObject * obj2 = 0 ;
33999 
34000  if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer_add",&obj0,&obj1,&obj2)) SWIG_fail;
34001  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
34002  if (!SWIG_IsOK(res1)) {
34003  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_add" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
34004  }
34005  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
34006  ecode2 = SWIG_AsVal_long(obj1, &val2);
34007  if (!SWIG_IsOK(ecode2)) {
34008  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
34009  }
34010  arg2 = static_cast< faiss::Index::idx_t >(val2);
34011  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
34012  if (!SWIG_IsOK(res3)) {
34013  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_add" "', argument " "3"" of type '" "float const *""'");
34014  }
34015  arg3 = reinterpret_cast< float * >(argp3);
34016  {
34017  Py_BEGIN_ALLOW_THREADS
34018  try {
34019  (arg1)->add(arg2,(float const *)arg3);
34020  } catch(faiss::FaissException & e) {
34021  PyEval_RestoreThread(_save);
34022  PyErr_SetString(PyExc_RuntimeError, e.what());
34023  SWIG_fail;
34024  }
34025  Py_END_ALLOW_THREADS
34026  }
34027  resultobj = SWIG_Py_Void();
34028  return resultobj;
34029 fail:
34030  return NULL;
34031 }
34032 
34033 
34034 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34035  PyObject *resultobj = 0;
34037  void *argp1 = 0 ;
34038  int res1 = 0 ;
34039  PyObject * obj0 = 0 ;
34040 
34041  if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer_reset",&obj0)) SWIG_fail;
34042  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
34043  if (!SWIG_IsOK(res1)) {
34044  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_reset" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
34045  }
34046  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
34047  {
34048  Py_BEGIN_ALLOW_THREADS
34049  try {
34050  (arg1)->reset();
34051  } catch(faiss::FaissException & e) {
34052  PyEval_RestoreThread(_save);
34053  PyErr_SetString(PyExc_RuntimeError, e.what());
34054  SWIG_fail;
34055  }
34056  Py_END_ALLOW_THREADS
34057  }
34058  resultobj = SWIG_Py_Void();
34059  return resultobj;
34060 fail:
34061  return NULL;
34062 }
34063 
34064 
34065 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34066  PyObject *resultobj = 0;
34067  faiss::MultiIndexQuantizer *result = 0 ;
34068 
34069  if (!PyArg_ParseTuple(args,(char *)":new_MultiIndexQuantizer")) SWIG_fail;
34070  {
34071  Py_BEGIN_ALLOW_THREADS
34072  try {
34074  } catch(faiss::FaissException & e) {
34075  PyEval_RestoreThread(_save);
34076  PyErr_SetString(PyExc_RuntimeError, e.what());
34077  SWIG_fail;
34078  }
34079  Py_END_ALLOW_THREADS
34080  }
34081  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_POINTER_NEW | 0 );
34082  return resultobj;
34083 fail:
34084  return NULL;
34085 }
34086 
34087 
34088 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer(PyObject *self, PyObject *args) {
34089  Py_ssize_t argc;
34090  PyObject *argv[4] = {
34091  0
34092  };
34093  Py_ssize_t ii;
34094 
34095  if (!PyTuple_Check(args)) SWIG_fail;
34096  argc = args ? PyObject_Length(args) : 0;
34097  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
34098  argv[ii] = PyTuple_GET_ITEM(args,ii);
34099  }
34100  if (argc == 0) {
34101  return _wrap_new_MultiIndexQuantizer__SWIG_1(self, args);
34102  }
34103  if (argc == 3) {
34104  int _v;
34105  {
34106  int res = SWIG_AsVal_int(argv[0], NULL);
34107  _v = SWIG_CheckState(res);
34108  }
34109  if (_v) {
34110  {
34111  int res = SWIG_AsVal_size_t(argv[1], NULL);
34112  _v = SWIG_CheckState(res);
34113  }
34114  if (_v) {
34115  {
34116  int res = SWIG_AsVal_size_t(argv[2], NULL);
34117  _v = SWIG_CheckState(res);
34118  }
34119  if (_v) {
34120  return _wrap_new_MultiIndexQuantizer__SWIG_0(self, args);
34121  }
34122  }
34123  }
34124  }
34125 
34126 fail:
34127  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MultiIndexQuantizer'.\n"
34128  " Possible C/C++ prototypes are:\n"
34129  " faiss::MultiIndexQuantizer::MultiIndexQuantizer(int,size_t,size_t)\n"
34130  " faiss::MultiIndexQuantizer::MultiIndexQuantizer()\n");
34131  return 0;
34132 }
34133 
34134 
34135 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34136  PyObject *resultobj = 0;
34138  faiss::Index::idx_t arg2 ;
34139  float *arg3 = (float *) 0 ;
34140  void *argp1 = 0 ;
34141  int res1 = 0 ;
34142  long val2 ;
34143  int ecode2 = 0 ;
34144  void *argp3 = 0 ;
34145  int res3 = 0 ;
34146  PyObject * obj0 = 0 ;
34147  PyObject * obj1 = 0 ;
34148  PyObject * obj2 = 0 ;
34149 
34150  if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
34151  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
34152  if (!SWIG_IsOK(res1)) {
34153  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_reconstruct" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer const *""'");
34154  }
34155  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
34156  ecode2 = SWIG_AsVal_long(obj1, &val2);
34157  if (!SWIG_IsOK(ecode2)) {
34158  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
34159  }
34160  arg2 = static_cast< faiss::Index::idx_t >(val2);
34161  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
34162  if (!SWIG_IsOK(res3)) {
34163  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_reconstruct" "', argument " "3"" of type '" "float *""'");
34164  }
34165  arg3 = reinterpret_cast< float * >(argp3);
34166  {
34167  Py_BEGIN_ALLOW_THREADS
34168  try {
34169  ((faiss::MultiIndexQuantizer const *)arg1)->reconstruct(arg2,arg3);
34170  } catch(faiss::FaissException & e) {
34171  PyEval_RestoreThread(_save);
34172  PyErr_SetString(PyExc_RuntimeError, e.what());
34173  SWIG_fail;
34174  }
34175  Py_END_ALLOW_THREADS
34176  }
34177  resultobj = SWIG_Py_Void();
34178  return resultobj;
34179 fail:
34180  return NULL;
34181 }
34182 
34183 
34184 SWIGINTERN PyObject *_wrap_delete_MultiIndexQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34185  PyObject *resultobj = 0;
34187  void *argp1 = 0 ;
34188  int res1 = 0 ;
34189  PyObject * obj0 = 0 ;
34190 
34191  if (!PyArg_ParseTuple(args,(char *)"O:delete_MultiIndexQuantizer",&obj0)) SWIG_fail;
34192  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_POINTER_DISOWN | 0 );
34193  if (!SWIG_IsOK(res1)) {
34194  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiIndexQuantizer" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
34195  }
34196  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
34197  delete arg1;
34198  resultobj = SWIG_Py_Void();
34199  return resultobj;
34200 fail:
34201  return NULL;
34202 }
34203 
34204 
34205 SWIGINTERN PyObject *MultiIndexQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34206  PyObject *obj;
34207  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
34208  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_NewClientData(obj));
34209  return SWIG_Py_Void();
34210 }
34211 
34212 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_assign_indexes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34213  PyObject *resultobj = 0;
34215  std::vector< faiss::Index * > *arg2 = (std::vector< faiss::Index * > *) 0 ;
34216  void *argp1 = 0 ;
34217  int res1 = 0 ;
34218  void *argp2 = 0 ;
34219  int res2 = 0 ;
34220  PyObject * obj0 = 0 ;
34221  PyObject * obj1 = 0 ;
34222 
34223  if (!PyArg_ParseTuple(args,(char *)"OO:MultiIndexQuantizer2_assign_indexes_set",&obj0,&obj1)) SWIG_fail;
34224  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
34225  if (!SWIG_IsOK(res1)) {
34226  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_assign_indexes_set" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
34227  }
34228  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
34229  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
34230  if (!SWIG_IsOK(res2)) {
34231  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiIndexQuantizer2_assign_indexes_set" "', argument " "2"" of type '" "std::vector< faiss::Index * > *""'");
34232  }
34233  arg2 = reinterpret_cast< std::vector< faiss::Index * > * >(argp2);
34234  if (arg1) (arg1)->assign_indexes = *arg2;
34235  resultobj = SWIG_Py_Void();
34236  return resultobj;
34237 fail:
34238  return NULL;
34239 }
34240 
34241 
34242 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_assign_indexes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34243  PyObject *resultobj = 0;
34245  void *argp1 = 0 ;
34246  int res1 = 0 ;
34247  PyObject * obj0 = 0 ;
34248  std::vector< faiss::Index * > *result = 0 ;
34249 
34250  if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer2_assign_indexes_get",&obj0)) SWIG_fail;
34251  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
34252  if (!SWIG_IsOK(res1)) {
34253  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_assign_indexes_get" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
34254  }
34255  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
34256  result = (std::vector< faiss::Index * > *)& ((arg1)->assign_indexes);
34257  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
34258  return resultobj;
34259 fail:
34260  return NULL;
34261 }
34262 
34263 
34264 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34265  PyObject *resultobj = 0;
34267  bool arg2 ;
34268  void *argp1 = 0 ;
34269  int res1 = 0 ;
34270  bool val2 ;
34271  int ecode2 = 0 ;
34272  PyObject * obj0 = 0 ;
34273  PyObject * obj1 = 0 ;
34274 
34275  if (!PyArg_ParseTuple(args,(char *)"OO:MultiIndexQuantizer2_own_fields_set",&obj0,&obj1)) SWIG_fail;
34276  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
34277  if (!SWIG_IsOK(res1)) {
34278  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_own_fields_set" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
34279  }
34280  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
34281  ecode2 = SWIG_AsVal_bool(obj1, &val2);
34282  if (!SWIG_IsOK(ecode2)) {
34283  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer2_own_fields_set" "', argument " "2"" of type '" "bool""'");
34284  }
34285  arg2 = static_cast< bool >(val2);
34286  if (arg1) (arg1)->own_fields = arg2;
34287  resultobj = SWIG_Py_Void();
34288  return resultobj;
34289 fail:
34290  return NULL;
34291 }
34292 
34293 
34294 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34295  PyObject *resultobj = 0;
34297  void *argp1 = 0 ;
34298  int res1 = 0 ;
34299  PyObject * obj0 = 0 ;
34300  bool result;
34301 
34302  if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer2_own_fields_get",&obj0)) SWIG_fail;
34303  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
34304  if (!SWIG_IsOK(res1)) {
34305  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_own_fields_get" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
34306  }
34307  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
34308  result = (bool) ((arg1)->own_fields);
34309  resultobj = SWIG_From_bool(static_cast< bool >(result));
34310  return resultobj;
34311 fail:
34312  return NULL;
34313 }
34314 
34315 
34316 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34317  PyObject *resultobj = 0;
34318  int arg1 ;
34319  size_t arg2 ;
34320  size_t arg3 ;
34321  faiss::Index **arg4 = (faiss::Index **) 0 ;
34322  int val1 ;
34323  int ecode1 = 0 ;
34324  size_t val2 ;
34325  int ecode2 = 0 ;
34326  size_t val3 ;
34327  int ecode3 = 0 ;
34328  void *argp4 = 0 ;
34329  int res4 = 0 ;
34330  PyObject * obj0 = 0 ;
34331  PyObject * obj1 = 0 ;
34332  PyObject * obj2 = 0 ;
34333  PyObject * obj3 = 0 ;
34334  faiss::MultiIndexQuantizer2 *result = 0 ;
34335 
34336  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_MultiIndexQuantizer2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
34337  ecode1 = SWIG_AsVal_int(obj0, &val1);
34338  if (!SWIG_IsOK(ecode1)) {
34339  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultiIndexQuantizer2" "', argument " "1"" of type '" "int""'");
34340  }
34341  arg1 = static_cast< int >(val1);
34342  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34343  if (!SWIG_IsOK(ecode2)) {
34344  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIndexQuantizer2" "', argument " "2"" of type '" "size_t""'");
34345  }
34346  arg2 = static_cast< size_t >(val2);
34347  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34348  if (!SWIG_IsOK(ecode3)) {
34349  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MultiIndexQuantizer2" "', argument " "3"" of type '" "size_t""'");
34350  }
34351  arg3 = static_cast< size_t >(val3);
34352  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_faiss__Index, 0 | 0 );
34353  if (!SWIG_IsOK(res4)) {
34354  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MultiIndexQuantizer2" "', argument " "4"" of type '" "faiss::Index **""'");
34355  }
34356  arg4 = reinterpret_cast< faiss::Index ** >(argp4);
34357  {
34358  Py_BEGIN_ALLOW_THREADS
34359  try {
34360  result = (faiss::MultiIndexQuantizer2 *)new faiss::MultiIndexQuantizer2(arg1,arg2,arg3,arg4);
34361  } catch(faiss::FaissException & e) {
34362  PyEval_RestoreThread(_save);
34363  PyErr_SetString(PyExc_RuntimeError, e.what());
34364  SWIG_fail;
34365  }
34366  Py_END_ALLOW_THREADS
34367  }
34368  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_POINTER_NEW | 0 );
34369  return resultobj;
34370 fail:
34371  return NULL;
34372 }
34373 
34374 
34375 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34376  PyObject *resultobj = 0;
34377  int arg1 ;
34378  size_t arg2 ;
34379  faiss::Index *arg3 = (faiss::Index *) 0 ;
34380  faiss::Index *arg4 = (faiss::Index *) 0 ;
34381  int val1 ;
34382  int ecode1 = 0 ;
34383  size_t val2 ;
34384  int ecode2 = 0 ;
34385  void *argp3 = 0 ;
34386  int res3 = 0 ;
34387  void *argp4 = 0 ;
34388  int res4 = 0 ;
34389  PyObject * obj0 = 0 ;
34390  PyObject * obj1 = 0 ;
34391  PyObject * obj2 = 0 ;
34392  PyObject * obj3 = 0 ;
34393  faiss::MultiIndexQuantizer2 *result = 0 ;
34394 
34395  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_MultiIndexQuantizer2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
34396  ecode1 = SWIG_AsVal_int(obj0, &val1);
34397  if (!SWIG_IsOK(ecode1)) {
34398  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultiIndexQuantizer2" "', argument " "1"" of type '" "int""'");
34399  }
34400  arg1 = static_cast< int >(val1);
34401  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34402  if (!SWIG_IsOK(ecode2)) {
34403  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIndexQuantizer2" "', argument " "2"" of type '" "size_t""'");
34404  }
34405  arg2 = static_cast< size_t >(val2);
34406  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_faiss__Index, 0 | 0 );
34407  if (!SWIG_IsOK(res3)) {
34408  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MultiIndexQuantizer2" "', argument " "3"" of type '" "faiss::Index *""'");
34409  }
34410  arg3 = reinterpret_cast< faiss::Index * >(argp3);
34411  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_faiss__Index, 0 | 0 );
34412  if (!SWIG_IsOK(res4)) {
34413  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MultiIndexQuantizer2" "', argument " "4"" of type '" "faiss::Index *""'");
34414  }
34415  arg4 = reinterpret_cast< faiss::Index * >(argp4);
34416  {
34417  Py_BEGIN_ALLOW_THREADS
34418  try {
34419  result = (faiss::MultiIndexQuantizer2 *)new faiss::MultiIndexQuantizer2(arg1,arg2,arg3,arg4);
34420  } catch(faiss::FaissException & e) {
34421  PyEval_RestoreThread(_save);
34422  PyErr_SetString(PyExc_RuntimeError, e.what());
34423  SWIG_fail;
34424  }
34425  Py_END_ALLOW_THREADS
34426  }
34427  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_POINTER_NEW | 0 );
34428  return resultobj;
34429 fail:
34430  return NULL;
34431 }
34432 
34433 
34434 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer2(PyObject *self, PyObject *args) {
34435  Py_ssize_t argc;
34436  PyObject *argv[5] = {
34437  0
34438  };
34439  Py_ssize_t ii;
34440 
34441  if (!PyTuple_Check(args)) SWIG_fail;
34442  argc = args ? PyObject_Length(args) : 0;
34443  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
34444  argv[ii] = PyTuple_GET_ITEM(args,ii);
34445  }
34446  if (argc == 4) {
34447  int _v;
34448  {
34449  int res = SWIG_AsVal_int(argv[0], NULL);
34450  _v = SWIG_CheckState(res);
34451  }
34452  if (_v) {
34453  {
34454  int res = SWIG_AsVal_size_t(argv[1], NULL);
34455  _v = SWIG_CheckState(res);
34456  }
34457  if (_v) {
34458  void *vptr = 0;
34459  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_faiss__Index, 0);
34460  _v = SWIG_CheckState(res);
34461  if (_v) {
34462  void *vptr = 0;
34463  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_faiss__Index, 0);
34464  _v = SWIG_CheckState(res);
34465  if (_v) {
34466  return _wrap_new_MultiIndexQuantizer2__SWIG_1(self, args);
34467  }
34468  }
34469  }
34470  }
34471  }
34472  if (argc == 4) {
34473  int _v;
34474  {
34475  int res = SWIG_AsVal_int(argv[0], NULL);
34476  _v = SWIG_CheckState(res);
34477  }
34478  if (_v) {
34479  {
34480  int res = SWIG_AsVal_size_t(argv[1], NULL);
34481  _v = SWIG_CheckState(res);
34482  }
34483  if (_v) {
34484  {
34485  int res = SWIG_AsVal_size_t(argv[2], NULL);
34486  _v = SWIG_CheckState(res);
34487  }
34488  if (_v) {
34489  void *vptr = 0;
34490  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_p_faiss__Index, 0);
34491  _v = SWIG_CheckState(res);
34492  if (_v) {
34493  return _wrap_new_MultiIndexQuantizer2__SWIG_0(self, args);
34494  }
34495  }
34496  }
34497  }
34498  }
34499 
34500 fail:
34501  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MultiIndexQuantizer2'.\n"
34502  " Possible C/C++ prototypes are:\n"
34503  " faiss::MultiIndexQuantizer2::MultiIndexQuantizer2(int,size_t,size_t,faiss::Index **)\n"
34504  " faiss::MultiIndexQuantizer2::MultiIndexQuantizer2(int,size_t,faiss::Index *,faiss::Index *)\n");
34505  return 0;
34506 }
34507 
34508 
34509 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34510  PyObject *resultobj = 0;
34512  faiss::Index::idx_t arg2 ;
34513  float *arg3 = (float *) 0 ;
34514  void *argp1 = 0 ;
34515  int res1 = 0 ;
34516  long val2 ;
34517  int ecode2 = 0 ;
34518  void *argp3 = 0 ;
34519  int res3 = 0 ;
34520  PyObject * obj0 = 0 ;
34521  PyObject * obj1 = 0 ;
34522  PyObject * obj2 = 0 ;
34523 
34524  if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer2_train",&obj0,&obj1,&obj2)) SWIG_fail;
34525  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
34526  if (!SWIG_IsOK(res1)) {
34527  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_train" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
34528  }
34529  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
34530  ecode2 = SWIG_AsVal_long(obj1, &val2);
34531  if (!SWIG_IsOK(ecode2)) {
34532  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer2_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
34533  }
34534  arg2 = static_cast< faiss::Index::idx_t >(val2);
34535  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
34536  if (!SWIG_IsOK(res3)) {
34537  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer2_train" "', argument " "3"" of type '" "float const *""'");
34538  }
34539  arg3 = reinterpret_cast< float * >(argp3);
34540  {
34541  Py_BEGIN_ALLOW_THREADS
34542  try {
34543  (arg1)->train(arg2,(float const *)arg3);
34544  } catch(faiss::FaissException & e) {
34545  PyEval_RestoreThread(_save);
34546  PyErr_SetString(PyExc_RuntimeError, e.what());
34547  SWIG_fail;
34548  }
34549  Py_END_ALLOW_THREADS
34550  }
34551  resultobj = SWIG_Py_Void();
34552  return resultobj;
34553 fail:
34554  return NULL;
34555 }
34556 
34557 
34558 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34559  PyObject *resultobj = 0;
34561  faiss::Index::idx_t arg2 ;
34562  float *arg3 = (float *) 0 ;
34563  faiss::Index::idx_t arg4 ;
34564  float *arg5 = (float *) 0 ;
34566  void *argp1 = 0 ;
34567  int res1 = 0 ;
34568  long val2 ;
34569  int ecode2 = 0 ;
34570  void *argp3 = 0 ;
34571  int res3 = 0 ;
34572  long val4 ;
34573  int ecode4 = 0 ;
34574  void *argp5 = 0 ;
34575  int res5 = 0 ;
34576  void *argp6 = 0 ;
34577  int res6 = 0 ;
34578  PyObject * obj0 = 0 ;
34579  PyObject * obj1 = 0 ;
34580  PyObject * obj2 = 0 ;
34581  PyObject * obj3 = 0 ;
34582  PyObject * obj4 = 0 ;
34583  PyObject * obj5 = 0 ;
34584 
34585  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:MultiIndexQuantizer2_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
34586  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
34587  if (!SWIG_IsOK(res1)) {
34588  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_search" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 const *""'");
34589  }
34590  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
34591  ecode2 = SWIG_AsVal_long(obj1, &val2);
34592  if (!SWIG_IsOK(ecode2)) {
34593  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer2_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
34594  }
34595  arg2 = static_cast< faiss::Index::idx_t >(val2);
34596  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
34597  if (!SWIG_IsOK(res3)) {
34598  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer2_search" "', argument " "3"" of type '" "float const *""'");
34599  }
34600  arg3 = reinterpret_cast< float * >(argp3);
34601  ecode4 = SWIG_AsVal_long(obj3, &val4);
34602  if (!SWIG_IsOK(ecode4)) {
34603  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiIndexQuantizer2_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
34604  }
34605  arg4 = static_cast< faiss::Index::idx_t >(val4);
34606  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
34607  if (!SWIG_IsOK(res5)) {
34608  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MultiIndexQuantizer2_search" "', argument " "5"" of type '" "float *""'");
34609  }
34610  arg5 = reinterpret_cast< float * >(argp5);
34611  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
34612  if (!SWIG_IsOK(res6)) {
34613  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "MultiIndexQuantizer2_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
34614  }
34615  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
34616  {
34617  Py_BEGIN_ALLOW_THREADS
34618  try {
34619  ((faiss::MultiIndexQuantizer2 const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
34620  } catch(faiss::FaissException & e) {
34621  PyEval_RestoreThread(_save);
34622  PyErr_SetString(PyExc_RuntimeError, e.what());
34623  SWIG_fail;
34624  }
34625  Py_END_ALLOW_THREADS
34626  }
34627  resultobj = SWIG_Py_Void();
34628  return resultobj;
34629 fail:
34630  return NULL;
34631 }
34632 
34633 
34634 SWIGINTERN PyObject *_wrap_delete_MultiIndexQuantizer2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34635  PyObject *resultobj = 0;
34637  void *argp1 = 0 ;
34638  int res1 = 0 ;
34639  PyObject * obj0 = 0 ;
34640 
34641  if (!PyArg_ParseTuple(args,(char *)"O:delete_MultiIndexQuantizer2",&obj0)) SWIG_fail;
34642  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_POINTER_DISOWN | 0 );
34643  if (!SWIG_IsOK(res1)) {
34644  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiIndexQuantizer2" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
34645  }
34646  arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
34647  delete arg1;
34648  resultobj = SWIG_Py_Void();
34649  return resultobj;
34650 fail:
34651  return NULL;
34652 }
34653 
34654 
34655 SWIGINTERN PyObject *MultiIndexQuantizer2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34656  PyObject *obj;
34657  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
34658  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_NewClientData(obj));
34659  return SWIG_Py_Void();
34660 }
34661 
34662 SWIGINTERN PyObject *_wrap_InvertedLists_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34663  PyObject *resultobj = 0;
34665  size_t arg2 ;
34666  void *argp1 = 0 ;
34667  int res1 = 0 ;
34668  size_t val2 ;
34669  int ecode2 = 0 ;
34670  PyObject * obj0 = 0 ;
34671  PyObject * obj1 = 0 ;
34672 
34673  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_nlist_set",&obj0,&obj1)) SWIG_fail;
34674  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34675  if (!SWIG_IsOK(res1)) {
34676  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_nlist_set" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34677  }
34678  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34679  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34680  if (!SWIG_IsOK(ecode2)) {
34681  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_nlist_set" "', argument " "2"" of type '" "size_t""'");
34682  }
34683  arg2 = static_cast< size_t >(val2);
34684  if (arg1) (arg1)->nlist = arg2;
34685  resultobj = SWIG_Py_Void();
34686  return resultobj;
34687 fail:
34688  return NULL;
34689 }
34690 
34691 
34692 SWIGINTERN PyObject *_wrap_InvertedLists_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34693  PyObject *resultobj = 0;
34695  void *argp1 = 0 ;
34696  int res1 = 0 ;
34697  PyObject * obj0 = 0 ;
34698  size_t result;
34699 
34700  if (!PyArg_ParseTuple(args,(char *)"O:InvertedLists_nlist_get",&obj0)) SWIG_fail;
34701  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34702  if (!SWIG_IsOK(res1)) {
34703  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_nlist_get" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34704  }
34705  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34706  result = (size_t) ((arg1)->nlist);
34707  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
34708  return resultobj;
34709 fail:
34710  return NULL;
34711 }
34712 
34713 
34714 SWIGINTERN PyObject *_wrap_InvertedLists_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34715  PyObject *resultobj = 0;
34717  size_t arg2 ;
34718  void *argp1 = 0 ;
34719  int res1 = 0 ;
34720  size_t val2 ;
34721  int ecode2 = 0 ;
34722  PyObject * obj0 = 0 ;
34723  PyObject * obj1 = 0 ;
34724 
34725  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_code_size_set",&obj0,&obj1)) SWIG_fail;
34726  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34727  if (!SWIG_IsOK(res1)) {
34728  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_code_size_set" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34729  }
34730  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34731  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34732  if (!SWIG_IsOK(ecode2)) {
34733  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_code_size_set" "', argument " "2"" of type '" "size_t""'");
34734  }
34735  arg2 = static_cast< size_t >(val2);
34736  if (arg1) (arg1)->code_size = arg2;
34737  resultobj = SWIG_Py_Void();
34738  return resultobj;
34739 fail:
34740  return NULL;
34741 }
34742 
34743 
34744 SWIGINTERN PyObject *_wrap_InvertedLists_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34745  PyObject *resultobj = 0;
34747  void *argp1 = 0 ;
34748  int res1 = 0 ;
34749  PyObject * obj0 = 0 ;
34750  size_t result;
34751 
34752  if (!PyArg_ParseTuple(args,(char *)"O:InvertedLists_code_size_get",&obj0)) SWIG_fail;
34753  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34754  if (!SWIG_IsOK(res1)) {
34755  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_code_size_get" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34756  }
34757  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34758  result = (size_t) ((arg1)->code_size);
34759  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
34760  return resultobj;
34761 fail:
34762  return NULL;
34763 }
34764 
34765 
34766 SWIGINTERN PyObject *_wrap_InvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34767  PyObject *resultobj = 0;
34769  size_t arg2 ;
34770  void *argp1 = 0 ;
34771  int res1 = 0 ;
34772  size_t val2 ;
34773  int ecode2 = 0 ;
34774  PyObject * obj0 = 0 ;
34775  PyObject * obj1 = 0 ;
34776  size_t result;
34777 
34778  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
34779  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34780  if (!SWIG_IsOK(res1)) {
34781  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_list_size" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
34782  }
34783  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34784  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34785  if (!SWIG_IsOK(ecode2)) {
34786  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
34787  }
34788  arg2 = static_cast< size_t >(val2);
34789  {
34790  Py_BEGIN_ALLOW_THREADS
34791  try {
34792  result = (size_t)((faiss::InvertedLists const *)arg1)->list_size(arg2);
34793  } catch(faiss::FaissException & e) {
34794  PyEval_RestoreThread(_save);
34795  PyErr_SetString(PyExc_RuntimeError, e.what());
34796  SWIG_fail;
34797  }
34798  Py_END_ALLOW_THREADS
34799  }
34800  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
34801  return resultobj;
34802 fail:
34803  return NULL;
34804 }
34805 
34806 
34807 SWIGINTERN PyObject *_wrap_InvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34808  PyObject *resultobj = 0;
34810  size_t arg2 ;
34811  void *argp1 = 0 ;
34812  int res1 = 0 ;
34813  size_t val2 ;
34814  int ecode2 = 0 ;
34815  PyObject * obj0 = 0 ;
34816  PyObject * obj1 = 0 ;
34817  uint8_t *result = 0 ;
34818 
34819  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
34820  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34821  if (!SWIG_IsOK(res1)) {
34822  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_codes" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
34823  }
34824  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34825  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34826  if (!SWIG_IsOK(ecode2)) {
34827  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
34828  }
34829  arg2 = static_cast< size_t >(val2);
34830  {
34831  Py_BEGIN_ALLOW_THREADS
34832  try {
34833  result = (uint8_t *)((faiss::InvertedLists const *)arg1)->get_codes(arg2);
34834  } catch(faiss::FaissException & e) {
34835  PyEval_RestoreThread(_save);
34836  PyErr_SetString(PyExc_RuntimeError, e.what());
34837  SWIG_fail;
34838  }
34839  Py_END_ALLOW_THREADS
34840  }
34841  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
34842  return resultobj;
34843 fail:
34844  return NULL;
34845 }
34846 
34847 
34848 SWIGINTERN PyObject *_wrap_InvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34849  PyObject *resultobj = 0;
34851  size_t arg2 ;
34852  void *argp1 = 0 ;
34853  int res1 = 0 ;
34854  size_t val2 ;
34855  int ecode2 = 0 ;
34856  PyObject * obj0 = 0 ;
34857  PyObject * obj1 = 0 ;
34858  faiss::InvertedLists::idx_t *result = 0 ;
34859 
34860  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
34861  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34862  if (!SWIG_IsOK(res1)) {
34863  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_ids" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
34864  }
34865  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34866  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34867  if (!SWIG_IsOK(ecode2)) {
34868  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
34869  }
34870  arg2 = static_cast< size_t >(val2);
34871  {
34872  Py_BEGIN_ALLOW_THREADS
34873  try {
34874  result = (faiss::InvertedLists::idx_t *)((faiss::InvertedLists const *)arg1)->get_ids(arg2);
34875  } catch(faiss::FaissException & e) {
34876  PyEval_RestoreThread(_save);
34877  PyErr_SetString(PyExc_RuntimeError, e.what());
34878  SWIG_fail;
34879  }
34880  Py_END_ALLOW_THREADS
34881  }
34882  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
34883  return resultobj;
34884 fail:
34885  return NULL;
34886 }
34887 
34888 
34889 SWIGINTERN PyObject *_wrap_InvertedLists_release_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34890  PyObject *resultobj = 0;
34892  uint8_t *arg2 = (uint8_t *) 0 ;
34893  void *argp1 = 0 ;
34894  int res1 = 0 ;
34895  void *argp2 = 0 ;
34896  int res2 = 0 ;
34897  PyObject * obj0 = 0 ;
34898  PyObject * obj1 = 0 ;
34899 
34900  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_release_codes",&obj0,&obj1)) SWIG_fail;
34901  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34902  if (!SWIG_IsOK(res1)) {
34903  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_release_codes" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
34904  }
34905  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34906  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
34907  if (!SWIG_IsOK(res2)) {
34908  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_release_codes" "', argument " "2"" of type '" "uint8_t const *""'");
34909  }
34910  arg2 = reinterpret_cast< uint8_t * >(argp2);
34911  {
34912  Py_BEGIN_ALLOW_THREADS
34913  try {
34914  ((faiss::InvertedLists const *)arg1)->release_codes((uint8_t const *)arg2);
34915  } catch(faiss::FaissException & e) {
34916  PyEval_RestoreThread(_save);
34917  PyErr_SetString(PyExc_RuntimeError, e.what());
34918  SWIG_fail;
34919  }
34920  Py_END_ALLOW_THREADS
34921  }
34922  resultobj = SWIG_Py_Void();
34923  return resultobj;
34924 fail:
34925  return NULL;
34926 }
34927 
34928 
34929 SWIGINTERN PyObject *_wrap_InvertedLists_release_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34930  PyObject *resultobj = 0;
34932  faiss::InvertedLists::idx_t *arg2 = (faiss::InvertedLists::idx_t *) 0 ;
34933  void *argp1 = 0 ;
34934  int res1 = 0 ;
34935  void *argp2 = 0 ;
34936  int res2 = 0 ;
34937  PyObject * obj0 = 0 ;
34938  PyObject * obj1 = 0 ;
34939 
34940  if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_release_ids",&obj0,&obj1)) SWIG_fail;
34941  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34942  if (!SWIG_IsOK(res1)) {
34943  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_release_ids" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
34944  }
34945  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34946  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
34947  if (!SWIG_IsOK(res2)) {
34948  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_release_ids" "', argument " "2"" of type '" "faiss::InvertedLists::idx_t const *""'");
34949  }
34950  arg2 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp2);
34951  {
34952  Py_BEGIN_ALLOW_THREADS
34953  try {
34954  ((faiss::InvertedLists const *)arg1)->release_ids((faiss::InvertedLists::idx_t const *)arg2);
34955  } catch(faiss::FaissException & e) {
34956  PyEval_RestoreThread(_save);
34957  PyErr_SetString(PyExc_RuntimeError, e.what());
34958  SWIG_fail;
34959  }
34960  Py_END_ALLOW_THREADS
34961  }
34962  resultobj = SWIG_Py_Void();
34963  return resultobj;
34964 fail:
34965  return NULL;
34966 }
34967 
34968 
34969 SWIGINTERN PyObject *_wrap_InvertedLists_get_single_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34970  PyObject *resultobj = 0;
34972  size_t arg2 ;
34973  size_t arg3 ;
34974  void *argp1 = 0 ;
34975  int res1 = 0 ;
34976  size_t val2 ;
34977  int ecode2 = 0 ;
34978  size_t val3 ;
34979  int ecode3 = 0 ;
34980  PyObject * obj0 = 0 ;
34981  PyObject * obj1 = 0 ;
34982  PyObject * obj2 = 0 ;
34983  faiss::InvertedLists::idx_t result;
34984 
34985  if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_get_single_id",&obj0,&obj1,&obj2)) SWIG_fail;
34986  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34987  if (!SWIG_IsOK(res1)) {
34988  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_single_id" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
34989  }
34990  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34991  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34992  if (!SWIG_IsOK(ecode2)) {
34993  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_single_id" "', argument " "2"" of type '" "size_t""'");
34994  }
34995  arg2 = static_cast< size_t >(val2);
34996  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34997  if (!SWIG_IsOK(ecode3)) {
34998  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_get_single_id" "', argument " "3"" of type '" "size_t""'");
34999  }
35000  arg3 = static_cast< size_t >(val3);
35001  {
35002  Py_BEGIN_ALLOW_THREADS
35003  try {
35004  result = (faiss::InvertedLists::idx_t)((faiss::InvertedLists const *)arg1)->get_single_id(arg2,arg3);
35005  } catch(faiss::FaissException & e) {
35006  PyEval_RestoreThread(_save);
35007  PyErr_SetString(PyExc_RuntimeError, e.what());
35008  SWIG_fail;
35009  }
35010  Py_END_ALLOW_THREADS
35011  }
35012  resultobj = SWIG_From_long(static_cast< long >(result));
35013  return resultobj;
35014 fail:
35015  return NULL;
35016 }
35017 
35018 
35019 SWIGINTERN PyObject *_wrap_InvertedLists_get_single_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35020  PyObject *resultobj = 0;
35022  size_t arg2 ;
35023  size_t arg3 ;
35024  void *argp1 = 0 ;
35025  int res1 = 0 ;
35026  size_t val2 ;
35027  int ecode2 = 0 ;
35028  size_t val3 ;
35029  int ecode3 = 0 ;
35030  PyObject * obj0 = 0 ;
35031  PyObject * obj1 = 0 ;
35032  PyObject * obj2 = 0 ;
35033  uint8_t *result = 0 ;
35034 
35035  if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_get_single_code",&obj0,&obj1,&obj2)) SWIG_fail;
35036  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35037  if (!SWIG_IsOK(res1)) {
35038  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_single_code" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
35039  }
35040  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35041  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35042  if (!SWIG_IsOK(ecode2)) {
35043  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_single_code" "', argument " "2"" of type '" "size_t""'");
35044  }
35045  arg2 = static_cast< size_t >(val2);
35046  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35047  if (!SWIG_IsOK(ecode3)) {
35048  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_get_single_code" "', argument " "3"" of type '" "size_t""'");
35049  }
35050  arg3 = static_cast< size_t >(val3);
35051  {
35052  Py_BEGIN_ALLOW_THREADS
35053  try {
35054  result = (uint8_t *)((faiss::InvertedLists const *)arg1)->get_single_code(arg2,arg3);
35055  } catch(faiss::FaissException & e) {
35056  PyEval_RestoreThread(_save);
35057  PyErr_SetString(PyExc_RuntimeError, e.what());
35058  SWIG_fail;
35059  }
35060  Py_END_ALLOW_THREADS
35061  }
35062  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
35063  return resultobj;
35064 fail:
35065  return NULL;
35066 }
35067 
35068 
35069 SWIGINTERN PyObject *_wrap_InvertedLists_prefetch_lists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35070  PyObject *resultobj = 0;
35072  long *arg2 = (long *) 0 ;
35073  int arg3 ;
35074  void *argp1 = 0 ;
35075  int res1 = 0 ;
35076  void *argp2 = 0 ;
35077  int res2 = 0 ;
35078  int val3 ;
35079  int ecode3 = 0 ;
35080  PyObject * obj0 = 0 ;
35081  PyObject * obj1 = 0 ;
35082  PyObject * obj2 = 0 ;
35083 
35084  if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_prefetch_lists",&obj0,&obj1,&obj2)) SWIG_fail;
35085  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35086  if (!SWIG_IsOK(res1)) {
35087  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_prefetch_lists" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
35088  }
35089  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35090  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
35091  if (!SWIG_IsOK(res2)) {
35092  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_prefetch_lists" "', argument " "2"" of type '" "long const *""'");
35093  }
35094  arg2 = reinterpret_cast< long * >(argp2);
35095  ecode3 = SWIG_AsVal_int(obj2, &val3);
35096  if (!SWIG_IsOK(ecode3)) {
35097  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_prefetch_lists" "', argument " "3"" of type '" "int""'");
35098  }
35099  arg3 = static_cast< int >(val3);
35100  {
35101  Py_BEGIN_ALLOW_THREADS
35102  try {
35103  ((faiss::InvertedLists const *)arg1)->prefetch_lists((long const *)arg2,arg3);
35104  } catch(faiss::FaissException & e) {
35105  PyEval_RestoreThread(_save);
35106  PyErr_SetString(PyExc_RuntimeError, e.what());
35107  SWIG_fail;
35108  }
35109  Py_END_ALLOW_THREADS
35110  }
35111  resultobj = SWIG_Py_Void();
35112  return resultobj;
35113 fail:
35114  return NULL;
35115 }
35116 
35117 
35118 SWIGINTERN PyObject *_wrap_InvertedLists_add_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35119  PyObject *resultobj = 0;
35121  size_t arg2 ;
35122  faiss::InvertedLists::idx_t arg3 ;
35123  uint8_t *arg4 = (uint8_t *) 0 ;
35124  void *argp1 = 0 ;
35125  int res1 = 0 ;
35126  size_t val2 ;
35127  int ecode2 = 0 ;
35128  long val3 ;
35129  int ecode3 = 0 ;
35130  void *argp4 = 0 ;
35131  int res4 = 0 ;
35132  PyObject * obj0 = 0 ;
35133  PyObject * obj1 = 0 ;
35134  PyObject * obj2 = 0 ;
35135  PyObject * obj3 = 0 ;
35136  size_t result;
35137 
35138  if (!PyArg_ParseTuple(args,(char *)"OOOO:InvertedLists_add_entry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
35139  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35140  if (!SWIG_IsOK(res1)) {
35141  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_add_entry" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35142  }
35143  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35144  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35145  if (!SWIG_IsOK(ecode2)) {
35146  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_add_entry" "', argument " "2"" of type '" "size_t""'");
35147  }
35148  arg2 = static_cast< size_t >(val2);
35149  ecode3 = SWIG_AsVal_long(obj2, &val3);
35150  if (!SWIG_IsOK(ecode3)) {
35151  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_add_entry" "', argument " "3"" of type '" "faiss::InvertedLists::idx_t""'");
35152  }
35153  arg3 = static_cast< faiss::InvertedLists::idx_t >(val3);
35154  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
35155  if (!SWIG_IsOK(res4)) {
35156  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InvertedLists_add_entry" "', argument " "4"" of type '" "uint8_t const *""'");
35157  }
35158  arg4 = reinterpret_cast< uint8_t * >(argp4);
35159  {
35160  Py_BEGIN_ALLOW_THREADS
35161  try {
35162  result = (size_t)(arg1)->add_entry(arg2,arg3,(uint8_t const *)arg4);
35163  } catch(faiss::FaissException & e) {
35164  PyEval_RestoreThread(_save);
35165  PyErr_SetString(PyExc_RuntimeError, e.what());
35166  SWIG_fail;
35167  }
35168  Py_END_ALLOW_THREADS
35169  }
35170  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35171  return resultobj;
35172 fail:
35173  return NULL;
35174 }
35175 
35176 
35177 SWIGINTERN PyObject *_wrap_InvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35178  PyObject *resultobj = 0;
35180  size_t arg2 ;
35181  size_t arg3 ;
35182  faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
35183  uint8_t *arg5 = (uint8_t *) 0 ;
35184  void *argp1 = 0 ;
35185  int res1 = 0 ;
35186  size_t val2 ;
35187  int ecode2 = 0 ;
35188  size_t val3 ;
35189  int ecode3 = 0 ;
35190  void *argp4 = 0 ;
35191  int res4 = 0 ;
35192  void *argp5 = 0 ;
35193  int res5 = 0 ;
35194  PyObject * obj0 = 0 ;
35195  PyObject * obj1 = 0 ;
35196  PyObject * obj2 = 0 ;
35197  PyObject * obj3 = 0 ;
35198  PyObject * obj4 = 0 ;
35199  size_t result;
35200 
35201  if (!PyArg_ParseTuple(args,(char *)"OOOOO:InvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
35202  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35203  if (!SWIG_IsOK(res1)) {
35204  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_add_entries" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35205  }
35206  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35207  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35208  if (!SWIG_IsOK(ecode2)) {
35209  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
35210  }
35211  arg2 = static_cast< size_t >(val2);
35212  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35213  if (!SWIG_IsOK(ecode3)) {
35214  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
35215  }
35216  arg3 = static_cast< size_t >(val3);
35217  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
35218  if (!SWIG_IsOK(res4)) {
35219  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
35220  }
35221  arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
35222  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
35223  if (!SWIG_IsOK(res5)) {
35224  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
35225  }
35226  arg5 = reinterpret_cast< uint8_t * >(argp5);
35227  {
35228  Py_BEGIN_ALLOW_THREADS
35229  try {
35230  result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
35231  } catch(faiss::FaissException & e) {
35232  PyEval_RestoreThread(_save);
35233  PyErr_SetString(PyExc_RuntimeError, e.what());
35234  SWIG_fail;
35235  }
35236  Py_END_ALLOW_THREADS
35237  }
35238  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35239  return resultobj;
35240 fail:
35241  return NULL;
35242 }
35243 
35244 
35245 SWIGINTERN PyObject *_wrap_InvertedLists_update_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35246  PyObject *resultobj = 0;
35248  size_t arg2 ;
35249  size_t arg3 ;
35250  faiss::InvertedLists::idx_t arg4 ;
35251  uint8_t *arg5 = (uint8_t *) 0 ;
35252  void *argp1 = 0 ;
35253  int res1 = 0 ;
35254  size_t val2 ;
35255  int ecode2 = 0 ;
35256  size_t val3 ;
35257  int ecode3 = 0 ;
35258  long val4 ;
35259  int ecode4 = 0 ;
35260  void *argp5 = 0 ;
35261  int res5 = 0 ;
35262  PyObject * obj0 = 0 ;
35263  PyObject * obj1 = 0 ;
35264  PyObject * obj2 = 0 ;
35265  PyObject * obj3 = 0 ;
35266  PyObject * obj4 = 0 ;
35267 
35268  if (!PyArg_ParseTuple(args,(char *)"OOOOO:InvertedLists_update_entry",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
35269  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35270  if (!SWIG_IsOK(res1)) {
35271  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_update_entry" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35272  }
35273  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35274  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35275  if (!SWIG_IsOK(ecode2)) {
35276  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_update_entry" "', argument " "2"" of type '" "size_t""'");
35277  }
35278  arg2 = static_cast< size_t >(val2);
35279  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35280  if (!SWIG_IsOK(ecode3)) {
35281  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_update_entry" "', argument " "3"" of type '" "size_t""'");
35282  }
35283  arg3 = static_cast< size_t >(val3);
35284  ecode4 = SWIG_AsVal_long(obj3, &val4);
35285  if (!SWIG_IsOK(ecode4)) {
35286  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InvertedLists_update_entry" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t""'");
35287  }
35288  arg4 = static_cast< faiss::InvertedLists::idx_t >(val4);
35289  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
35290  if (!SWIG_IsOK(res5)) {
35291  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InvertedLists_update_entry" "', argument " "5"" of type '" "uint8_t const *""'");
35292  }
35293  arg5 = reinterpret_cast< uint8_t * >(argp5);
35294  {
35295  Py_BEGIN_ALLOW_THREADS
35296  try {
35297  (arg1)->update_entry(arg2,arg3,arg4,(uint8_t const *)arg5);
35298  } catch(faiss::FaissException & e) {
35299  PyEval_RestoreThread(_save);
35300  PyErr_SetString(PyExc_RuntimeError, e.what());
35301  SWIG_fail;
35302  }
35303  Py_END_ALLOW_THREADS
35304  }
35305  resultobj = SWIG_Py_Void();
35306  return resultobj;
35307 fail:
35308  return NULL;
35309 }
35310 
35311 
35312 SWIGINTERN PyObject *_wrap_InvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35313  PyObject *resultobj = 0;
35315  size_t arg2 ;
35316  size_t arg3 ;
35317  size_t arg4 ;
35318  faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
35319  uint8_t *arg6 = (uint8_t *) 0 ;
35320  void *argp1 = 0 ;
35321  int res1 = 0 ;
35322  size_t val2 ;
35323  int ecode2 = 0 ;
35324  size_t val3 ;
35325  int ecode3 = 0 ;
35326  size_t val4 ;
35327  int ecode4 = 0 ;
35328  void *argp5 = 0 ;
35329  int res5 = 0 ;
35330  void *argp6 = 0 ;
35331  int res6 = 0 ;
35332  PyObject * obj0 = 0 ;
35333  PyObject * obj1 = 0 ;
35334  PyObject * obj2 = 0 ;
35335  PyObject * obj3 = 0 ;
35336  PyObject * obj4 = 0 ;
35337  PyObject * obj5 = 0 ;
35338 
35339  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:InvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
35340  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35341  if (!SWIG_IsOK(res1)) {
35342  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_update_entries" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35343  }
35344  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35345  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35346  if (!SWIG_IsOK(ecode2)) {
35347  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
35348  }
35349  arg2 = static_cast< size_t >(val2);
35350  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35351  if (!SWIG_IsOK(ecode3)) {
35352  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
35353  }
35354  arg3 = static_cast< size_t >(val3);
35355  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
35356  if (!SWIG_IsOK(ecode4)) {
35357  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
35358  }
35359  arg4 = static_cast< size_t >(val4);
35360  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
35361  if (!SWIG_IsOK(res5)) {
35362  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
35363  }
35364  arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
35365  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
35366  if (!SWIG_IsOK(res6)) {
35367  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
35368  }
35369  arg6 = reinterpret_cast< uint8_t * >(argp6);
35370  {
35371  Py_BEGIN_ALLOW_THREADS
35372  try {
35373  (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
35374  } catch(faiss::FaissException & e) {
35375  PyEval_RestoreThread(_save);
35376  PyErr_SetString(PyExc_RuntimeError, e.what());
35377  SWIG_fail;
35378  }
35379  Py_END_ALLOW_THREADS
35380  }
35381  resultobj = SWIG_Py_Void();
35382  return resultobj;
35383 fail:
35384  return NULL;
35385 }
35386 
35387 
35388 SWIGINTERN PyObject *_wrap_InvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35389  PyObject *resultobj = 0;
35391  size_t arg2 ;
35392  size_t arg3 ;
35393  void *argp1 = 0 ;
35394  int res1 = 0 ;
35395  size_t val2 ;
35396  int ecode2 = 0 ;
35397  size_t val3 ;
35398  int ecode3 = 0 ;
35399  PyObject * obj0 = 0 ;
35400  PyObject * obj1 = 0 ;
35401  PyObject * obj2 = 0 ;
35402 
35403  if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
35404  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35405  if (!SWIG_IsOK(res1)) {
35406  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_resize" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35407  }
35408  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35409  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35410  if (!SWIG_IsOK(ecode2)) {
35411  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
35412  }
35413  arg2 = static_cast< size_t >(val2);
35414  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35415  if (!SWIG_IsOK(ecode3)) {
35416  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
35417  }
35418  arg3 = static_cast< size_t >(val3);
35419  {
35420  Py_BEGIN_ALLOW_THREADS
35421  try {
35422  (arg1)->resize(arg2,arg3);
35423  } catch(faiss::FaissException & e) {
35424  PyEval_RestoreThread(_save);
35425  PyErr_SetString(PyExc_RuntimeError, e.what());
35426  SWIG_fail;
35427  }
35428  Py_END_ALLOW_THREADS
35429  }
35430  resultobj = SWIG_Py_Void();
35431  return resultobj;
35432 fail:
35433  return NULL;
35434 }
35435 
35436 
35437 SWIGINTERN PyObject *_wrap_InvertedLists_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35438  PyObject *resultobj = 0;
35440  void *argp1 = 0 ;
35441  int res1 = 0 ;
35442  PyObject * obj0 = 0 ;
35443 
35444  if (!PyArg_ParseTuple(args,(char *)"O:InvertedLists_reset",&obj0)) SWIG_fail;
35445  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35446  if (!SWIG_IsOK(res1)) {
35447  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_reset" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35448  }
35449  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35450  {
35451  Py_BEGIN_ALLOW_THREADS
35452  try {
35453  (arg1)->reset();
35454  } catch(faiss::FaissException & e) {
35455  PyEval_RestoreThread(_save);
35456  PyErr_SetString(PyExc_RuntimeError, e.what());
35457  SWIG_fail;
35458  }
35459  Py_END_ALLOW_THREADS
35460  }
35461  resultobj = SWIG_Py_Void();
35462  return resultobj;
35463 fail:
35464  return NULL;
35465 }
35466 
35467 
35468 SWIGINTERN PyObject *_wrap_InvertedLists_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35469  PyObject *resultobj = 0;
35472  size_t arg3 ;
35473  void *argp1 = 0 ;
35474  int res1 = 0 ;
35475  void *argp2 = 0 ;
35476  int res2 = 0 ;
35477  size_t val3 ;
35478  int ecode3 = 0 ;
35479  PyObject * obj0 = 0 ;
35480  PyObject * obj1 = 0 ;
35481  PyObject * obj2 = 0 ;
35482 
35483  if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
35484  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35485  if (!SWIG_IsOK(res1)) {
35486  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_merge_from" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35487  }
35488  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35489  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
35490  if (!SWIG_IsOK(res2)) {
35491  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_merge_from" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
35492  }
35493  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
35494  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35495  if (!SWIG_IsOK(ecode3)) {
35496  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_merge_from" "', argument " "3"" of type '" "size_t""'");
35497  }
35498  arg3 = static_cast< size_t >(val3);
35499  {
35500  Py_BEGIN_ALLOW_THREADS
35501  try {
35502  (arg1)->merge_from(arg2,arg3);
35503  } catch(faiss::FaissException & e) {
35504  PyEval_RestoreThread(_save);
35505  PyErr_SetString(PyExc_RuntimeError, e.what());
35506  SWIG_fail;
35507  }
35508  Py_END_ALLOW_THREADS
35509  }
35510  resultobj = SWIG_Py_Void();
35511  return resultobj;
35512 fail:
35513  return NULL;
35514 }
35515 
35516 
35517 SWIGINTERN PyObject *_wrap_delete_InvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35518  PyObject *resultobj = 0;
35520  void *argp1 = 0 ;
35521  int res1 = 0 ;
35522  PyObject * obj0 = 0 ;
35523 
35524  if (!PyArg_ParseTuple(args,(char *)"O:delete_InvertedLists",&obj0)) SWIG_fail;
35525  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, SWIG_POINTER_DISOWN | 0 );
35526  if (!SWIG_IsOK(res1)) {
35527  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvertedLists" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
35528  }
35529  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
35530  {
35531  Py_BEGIN_ALLOW_THREADS
35532  try {
35533  delete arg1;
35534  } catch(faiss::FaissException & e) {
35535  PyEval_RestoreThread(_save);
35536  PyErr_SetString(PyExc_RuntimeError, e.what());
35537  SWIG_fail;
35538  }
35539  Py_END_ALLOW_THREADS
35540  }
35541  resultobj = SWIG_Py_Void();
35542  return resultobj;
35543 fail:
35544  return NULL;
35545 }
35546 
35547 
35548 SWIGINTERN PyObject *InvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35549  PyObject *obj;
35550  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
35551  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__InvertedLists, SWIG_NewClientData(obj));
35552  return SWIG_Py_Void();
35553 }
35554 
35555 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35556  PyObject *resultobj = 0;
35558  std::vector< std::vector< uint8_t > > *arg2 = (std::vector< std::vector< uint8_t > > *) 0 ;
35559  void *argp1 = 0 ;
35560  int res1 = 0 ;
35561  void *argp2 = 0 ;
35562  int res2 = 0 ;
35563  PyObject * obj0 = 0 ;
35564  PyObject * obj1 = 0 ;
35565 
35566  if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_codes_set",&obj0,&obj1)) SWIG_fail;
35567  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35568  if (!SWIG_IsOK(res1)) {
35569  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_codes_set" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
35570  }
35571  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35572  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
35573  if (!SWIG_IsOK(res2)) {
35574  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArrayInvertedLists_codes_set" "', argument " "2"" of type '" "std::vector< std::vector< uint8_t > > *""'");
35575  }
35576  arg2 = reinterpret_cast< std::vector< std::vector< uint8_t > > * >(argp2);
35577  if (arg1) (arg1)->codes = *arg2;
35578  resultobj = SWIG_Py_Void();
35579  return resultobj;
35580 fail:
35581  return NULL;
35582 }
35583 
35584 
35585 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35586  PyObject *resultobj = 0;
35588  void *argp1 = 0 ;
35589  int res1 = 0 ;
35590  PyObject * obj0 = 0 ;
35591  std::vector< std::vector< uint8_t > > *result = 0 ;
35592 
35593  if (!PyArg_ParseTuple(args,(char *)"O:ArrayInvertedLists_codes_get",&obj0)) SWIG_fail;
35594  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35595  if (!SWIG_IsOK(res1)) {
35596  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_codes_get" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
35597  }
35598  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35599  result = (std::vector< std::vector< uint8_t > > *)& ((arg1)->codes);
35600  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
35601  return resultobj;
35602 fail:
35603  return NULL;
35604 }
35605 
35606 
35607 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35608  PyObject *resultobj = 0;
35610  std::vector< std::vector< faiss::InvertedLists::idx_t > > *arg2 = (std::vector< std::vector< faiss::InvertedLists::idx_t > > *) 0 ;
35611  void *argp1 = 0 ;
35612  int res1 = 0 ;
35613  void *argp2 = 0 ;
35614  int res2 = 0 ;
35615  PyObject * obj0 = 0 ;
35616  PyObject * obj1 = 0 ;
35617 
35618  if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_ids_set",&obj0,&obj1)) SWIG_fail;
35619  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35620  if (!SWIG_IsOK(res1)) {
35621  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_ids_set" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
35622  }
35623  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35624  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
35625  if (!SWIG_IsOK(res2)) {
35626  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArrayInvertedLists_ids_set" "', argument " "2"" of type '" "std::vector< std::vector< faiss::InvertedLists::idx_t > > *""'");
35627  }
35628  arg2 = reinterpret_cast< std::vector< std::vector< faiss::InvertedLists::idx_t > > * >(argp2);
35629  if (arg1) (arg1)->ids = *arg2;
35630  resultobj = SWIG_Py_Void();
35631  return resultobj;
35632 fail:
35633  return NULL;
35634 }
35635 
35636 
35637 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35638  PyObject *resultobj = 0;
35640  void *argp1 = 0 ;
35641  int res1 = 0 ;
35642  PyObject * obj0 = 0 ;
35643  std::vector< std::vector< faiss::InvertedLists::idx_t > > *result = 0 ;
35644 
35645  if (!PyArg_ParseTuple(args,(char *)"O:ArrayInvertedLists_ids_get",&obj0)) SWIG_fail;
35646  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35647  if (!SWIG_IsOK(res1)) {
35648  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_ids_get" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
35649  }
35650  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35651  result = (std::vector< std::vector< faiss::InvertedLists::idx_t > > *)& ((arg1)->ids);
35652  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
35653  return resultobj;
35654 fail:
35655  return NULL;
35656 }
35657 
35658 
35659 SWIGINTERN PyObject *_wrap_new_ArrayInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35660  PyObject *resultobj = 0;
35661  size_t arg1 ;
35662  size_t arg2 ;
35663  size_t val1 ;
35664  int ecode1 = 0 ;
35665  size_t val2 ;
35666  int ecode2 = 0 ;
35667  PyObject * obj0 = 0 ;
35668  PyObject * obj1 = 0 ;
35669  faiss::ArrayInvertedLists *result = 0 ;
35670 
35671  if (!PyArg_ParseTuple(args,(char *)"OO:new_ArrayInvertedLists",&obj0,&obj1)) SWIG_fail;
35672  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
35673  if (!SWIG_IsOK(ecode1)) {
35674  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ArrayInvertedLists" "', argument " "1"" of type '" "size_t""'");
35675  }
35676  arg1 = static_cast< size_t >(val1);
35677  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35678  if (!SWIG_IsOK(ecode2)) {
35679  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ArrayInvertedLists" "', argument " "2"" of type '" "size_t""'");
35680  }
35681  arg2 = static_cast< size_t >(val2);
35682  {
35683  Py_BEGIN_ALLOW_THREADS
35684  try {
35685  result = (faiss::ArrayInvertedLists *)new faiss::ArrayInvertedLists(arg1,arg2);
35686  } catch(faiss::FaissException & e) {
35687  PyEval_RestoreThread(_save);
35688  PyErr_SetString(PyExc_RuntimeError, e.what());
35689  SWIG_fail;
35690  }
35691  Py_END_ALLOW_THREADS
35692  }
35693  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_POINTER_NEW | 0 );
35694  return resultobj;
35695 fail:
35696  return NULL;
35697 }
35698 
35699 
35700 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35701  PyObject *resultobj = 0;
35703  size_t arg2 ;
35704  void *argp1 = 0 ;
35705  int res1 = 0 ;
35706  size_t val2 ;
35707  int ecode2 = 0 ;
35708  PyObject * obj0 = 0 ;
35709  PyObject * obj1 = 0 ;
35710  size_t result;
35711 
35712  if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
35713  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35714  if (!SWIG_IsOK(res1)) {
35715  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_list_size" "', argument " "1"" of type '" "faiss::ArrayInvertedLists const *""'");
35716  }
35717  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35718  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35719  if (!SWIG_IsOK(ecode2)) {
35720  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
35721  }
35722  arg2 = static_cast< size_t >(val2);
35723  {
35724  Py_BEGIN_ALLOW_THREADS
35725  try {
35726  result = (size_t)((faiss::ArrayInvertedLists const *)arg1)->list_size(arg2);
35727  } catch(faiss::FaissException & e) {
35728  PyEval_RestoreThread(_save);
35729  PyErr_SetString(PyExc_RuntimeError, e.what());
35730  SWIG_fail;
35731  }
35732  Py_END_ALLOW_THREADS
35733  }
35734  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35735  return resultobj;
35736 fail:
35737  return NULL;
35738 }
35739 
35740 
35741 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35742  PyObject *resultobj = 0;
35744  size_t arg2 ;
35745  void *argp1 = 0 ;
35746  int res1 = 0 ;
35747  size_t val2 ;
35748  int ecode2 = 0 ;
35749  PyObject * obj0 = 0 ;
35750  PyObject * obj1 = 0 ;
35751  uint8_t *result = 0 ;
35752 
35753  if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
35754  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35755  if (!SWIG_IsOK(res1)) {
35756  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_get_codes" "', argument " "1"" of type '" "faiss::ArrayInvertedLists const *""'");
35757  }
35758  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35759  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35760  if (!SWIG_IsOK(ecode2)) {
35761  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
35762  }
35763  arg2 = static_cast< size_t >(val2);
35764  {
35765  Py_BEGIN_ALLOW_THREADS
35766  try {
35767  result = (uint8_t *)((faiss::ArrayInvertedLists const *)arg1)->get_codes(arg2);
35768  } catch(faiss::FaissException & e) {
35769  PyEval_RestoreThread(_save);
35770  PyErr_SetString(PyExc_RuntimeError, e.what());
35771  SWIG_fail;
35772  }
35773  Py_END_ALLOW_THREADS
35774  }
35775  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
35776  return resultobj;
35777 fail:
35778  return NULL;
35779 }
35780 
35781 
35782 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35783  PyObject *resultobj = 0;
35785  size_t arg2 ;
35786  void *argp1 = 0 ;
35787  int res1 = 0 ;
35788  size_t val2 ;
35789  int ecode2 = 0 ;
35790  PyObject * obj0 = 0 ;
35791  PyObject * obj1 = 0 ;
35792  faiss::InvertedLists::idx_t *result = 0 ;
35793 
35794  if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
35795  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35796  if (!SWIG_IsOK(res1)) {
35797  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_get_ids" "', argument " "1"" of type '" "faiss::ArrayInvertedLists const *""'");
35798  }
35799  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35800  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35801  if (!SWIG_IsOK(ecode2)) {
35802  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
35803  }
35804  arg2 = static_cast< size_t >(val2);
35805  {
35806  Py_BEGIN_ALLOW_THREADS
35807  try {
35808  result = (faiss::InvertedLists::idx_t *)((faiss::ArrayInvertedLists const *)arg1)->get_ids(arg2);
35809  } catch(faiss::FaissException & e) {
35810  PyEval_RestoreThread(_save);
35811  PyErr_SetString(PyExc_RuntimeError, e.what());
35812  SWIG_fail;
35813  }
35814  Py_END_ALLOW_THREADS
35815  }
35816  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
35817  return resultobj;
35818 fail:
35819  return NULL;
35820 }
35821 
35822 
35823 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35824  PyObject *resultobj = 0;
35826  size_t arg2 ;
35827  size_t arg3 ;
35828  faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
35829  uint8_t *arg5 = (uint8_t *) 0 ;
35830  void *argp1 = 0 ;
35831  int res1 = 0 ;
35832  size_t val2 ;
35833  int ecode2 = 0 ;
35834  size_t val3 ;
35835  int ecode3 = 0 ;
35836  void *argp4 = 0 ;
35837  int res4 = 0 ;
35838  void *argp5 = 0 ;
35839  int res5 = 0 ;
35840  PyObject * obj0 = 0 ;
35841  PyObject * obj1 = 0 ;
35842  PyObject * obj2 = 0 ;
35843  PyObject * obj3 = 0 ;
35844  PyObject * obj4 = 0 ;
35845  size_t result;
35846 
35847  if (!PyArg_ParseTuple(args,(char *)"OOOOO:ArrayInvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
35848  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35849  if (!SWIG_IsOK(res1)) {
35850  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_add_entries" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
35851  }
35852  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35853  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35854  if (!SWIG_IsOK(ecode2)) {
35855  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
35856  }
35857  arg2 = static_cast< size_t >(val2);
35858  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35859  if (!SWIG_IsOK(ecode3)) {
35860  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ArrayInvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
35861  }
35862  arg3 = static_cast< size_t >(val3);
35863  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
35864  if (!SWIG_IsOK(res4)) {
35865  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ArrayInvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
35866  }
35867  arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
35868  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
35869  if (!SWIG_IsOK(res5)) {
35870  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ArrayInvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
35871  }
35872  arg5 = reinterpret_cast< uint8_t * >(argp5);
35873  {
35874  Py_BEGIN_ALLOW_THREADS
35875  try {
35876  result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
35877  } catch(faiss::FaissException & e) {
35878  PyEval_RestoreThread(_save);
35879  PyErr_SetString(PyExc_RuntimeError, e.what());
35880  SWIG_fail;
35881  }
35882  Py_END_ALLOW_THREADS
35883  }
35884  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35885  return resultobj;
35886 fail:
35887  return NULL;
35888 }
35889 
35890 
35891 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35892  PyObject *resultobj = 0;
35894  size_t arg2 ;
35895  size_t arg3 ;
35896  size_t arg4 ;
35897  faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
35898  uint8_t *arg6 = (uint8_t *) 0 ;
35899  void *argp1 = 0 ;
35900  int res1 = 0 ;
35901  size_t val2 ;
35902  int ecode2 = 0 ;
35903  size_t val3 ;
35904  int ecode3 = 0 ;
35905  size_t val4 ;
35906  int ecode4 = 0 ;
35907  void *argp5 = 0 ;
35908  int res5 = 0 ;
35909  void *argp6 = 0 ;
35910  int res6 = 0 ;
35911  PyObject * obj0 = 0 ;
35912  PyObject * obj1 = 0 ;
35913  PyObject * obj2 = 0 ;
35914  PyObject * obj3 = 0 ;
35915  PyObject * obj4 = 0 ;
35916  PyObject * obj5 = 0 ;
35917 
35918  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ArrayInvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
35919  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35920  if (!SWIG_IsOK(res1)) {
35921  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_update_entries" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
35922  }
35923  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35924  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35925  if (!SWIG_IsOK(ecode2)) {
35926  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
35927  }
35928  arg2 = static_cast< size_t >(val2);
35929  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35930  if (!SWIG_IsOK(ecode3)) {
35931  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ArrayInvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
35932  }
35933  arg3 = static_cast< size_t >(val3);
35934  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
35935  if (!SWIG_IsOK(ecode4)) {
35936  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ArrayInvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
35937  }
35938  arg4 = static_cast< size_t >(val4);
35939  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
35940  if (!SWIG_IsOK(res5)) {
35941  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ArrayInvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
35942  }
35943  arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
35944  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
35945  if (!SWIG_IsOK(res6)) {
35946  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ArrayInvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
35947  }
35948  arg6 = reinterpret_cast< uint8_t * >(argp6);
35949  {
35950  Py_BEGIN_ALLOW_THREADS
35951  try {
35952  (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
35953  } catch(faiss::FaissException & e) {
35954  PyEval_RestoreThread(_save);
35955  PyErr_SetString(PyExc_RuntimeError, e.what());
35956  SWIG_fail;
35957  }
35958  Py_END_ALLOW_THREADS
35959  }
35960  resultobj = SWIG_Py_Void();
35961  return resultobj;
35962 fail:
35963  return NULL;
35964 }
35965 
35966 
35967 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35968  PyObject *resultobj = 0;
35970  size_t arg2 ;
35971  size_t arg3 ;
35972  void *argp1 = 0 ;
35973  int res1 = 0 ;
35974  size_t val2 ;
35975  int ecode2 = 0 ;
35976  size_t val3 ;
35977  int ecode3 = 0 ;
35978  PyObject * obj0 = 0 ;
35979  PyObject * obj1 = 0 ;
35980  PyObject * obj2 = 0 ;
35981 
35982  if (!PyArg_ParseTuple(args,(char *)"OOO:ArrayInvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
35983  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
35984  if (!SWIG_IsOK(res1)) {
35985  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_resize" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
35986  }
35987  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
35988  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35989  if (!SWIG_IsOK(ecode2)) {
35990  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
35991  }
35992  arg2 = static_cast< size_t >(val2);
35993  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35994  if (!SWIG_IsOK(ecode3)) {
35995  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ArrayInvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
35996  }
35997  arg3 = static_cast< size_t >(val3);
35998  {
35999  Py_BEGIN_ALLOW_THREADS
36000  try {
36001  (arg1)->resize(arg2,arg3);
36002  } catch(faiss::FaissException & e) {
36003  PyEval_RestoreThread(_save);
36004  PyErr_SetString(PyExc_RuntimeError, e.what());
36005  SWIG_fail;
36006  }
36007  Py_END_ALLOW_THREADS
36008  }
36009  resultobj = SWIG_Py_Void();
36010  return resultobj;
36011 fail:
36012  return NULL;
36013 }
36014 
36015 
36016 SWIGINTERN PyObject *_wrap_delete_ArrayInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36017  PyObject *resultobj = 0;
36019  void *argp1 = 0 ;
36020  int res1 = 0 ;
36021  PyObject * obj0 = 0 ;
36022 
36023  if (!PyArg_ParseTuple(args,(char *)"O:delete_ArrayInvertedLists",&obj0)) SWIG_fail;
36024  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_POINTER_DISOWN | 0 );
36025  if (!SWIG_IsOK(res1)) {
36026  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrayInvertedLists" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
36027  }
36028  arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
36029  {
36030  Py_BEGIN_ALLOW_THREADS
36031  try {
36032  delete arg1;
36033  } catch(faiss::FaissException & e) {
36034  PyEval_RestoreThread(_save);
36035  PyErr_SetString(PyExc_RuntimeError, e.what());
36036  SWIG_fail;
36037  }
36038  Py_END_ALLOW_THREADS
36039  }
36040  resultobj = SWIG_Py_Void();
36041  return resultobj;
36042 fail:
36043  return NULL;
36044 }
36045 
36046 
36047 SWIGINTERN PyObject *ArrayInvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36048  PyObject *obj;
36049  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
36050  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_NewClientData(obj));
36051  return SWIG_Py_Void();
36052 }
36053 
36054 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_ils_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36055  PyObject *resultobj = 0;
36057  std::vector< faiss::InvertedLists const * > *arg2 = (std::vector< faiss::InvertedLists const * > *) 0 ;
36058  void *argp1 = 0 ;
36059  int res1 = 0 ;
36060  void *argp2 = 0 ;
36061  int res2 = 0 ;
36062  PyObject * obj0 = 0 ;
36063  PyObject * obj1 = 0 ;
36064 
36065  if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_ils_set",&obj0,&obj1)) SWIG_fail;
36066  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36067  if (!SWIG_IsOK(res1)) {
36068  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_ils_set" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
36069  }
36070  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36071  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t, 0 | 0 );
36072  if (!SWIG_IsOK(res2)) {
36073  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConcatenatedInvertedLists_ils_set" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists const * > *""'");
36074  }
36075  arg2 = reinterpret_cast< std::vector< faiss::InvertedLists const * > * >(argp2);
36076  if (arg1) (arg1)->ils = *arg2;
36077  resultobj = SWIG_Py_Void();
36078  return resultobj;
36079 fail:
36080  return NULL;
36081 }
36082 
36083 
36084 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_ils_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36085  PyObject *resultobj = 0;
36087  void *argp1 = 0 ;
36088  int res1 = 0 ;
36089  PyObject * obj0 = 0 ;
36090  std::vector< faiss::InvertedLists const * > *result = 0 ;
36091 
36092  if (!PyArg_ParseTuple(args,(char *)"O:ConcatenatedInvertedLists_ils_get",&obj0)) SWIG_fail;
36093  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36094  if (!SWIG_IsOK(res1)) {
36095  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_ils_get" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
36096  }
36097  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36098  result = (std::vector< faiss::InvertedLists const * > *)& ((arg1)->ils);
36099  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t, 0 | 0 );
36100  return resultobj;
36101 fail:
36102  return NULL;
36103 }
36104 
36105 
36106 SWIGINTERN PyObject *_wrap_new_ConcatenatedInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36107  PyObject *resultobj = 0;
36108  int arg1 ;
36109  faiss::InvertedLists **arg2 = (faiss::InvertedLists **) 0 ;
36110  int val1 ;
36111  int ecode1 = 0 ;
36112  void *argp2 = 0 ;
36113  int res2 = 0 ;
36114  PyObject * obj0 = 0 ;
36115  PyObject * obj1 = 0 ;
36116  faiss::ConcatenatedInvertedLists *result = 0 ;
36117 
36118  if (!PyArg_ParseTuple(args,(char *)"OO:new_ConcatenatedInvertedLists",&obj0,&obj1)) SWIG_fail;
36119  ecode1 = SWIG_AsVal_int(obj0, &val1);
36120  if (!SWIG_IsOK(ecode1)) {
36121  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConcatenatedInvertedLists" "', argument " "1"" of type '" "int""'");
36122  }
36123  arg1 = static_cast< int >(val1);
36124  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_faiss__InvertedLists, 0 | 0 );
36125  if (!SWIG_IsOK(res2)) {
36126  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConcatenatedInvertedLists" "', argument " "2"" of type '" "faiss::InvertedLists const **""'");
36127  }
36128  arg2 = reinterpret_cast< faiss::InvertedLists ** >(argp2);
36129  {
36130  Py_BEGIN_ALLOW_THREADS
36131  try {
36133  } catch(faiss::FaissException & e) {
36134  PyEval_RestoreThread(_save);
36135  PyErr_SetString(PyExc_RuntimeError, e.what());
36136  SWIG_fail;
36137  }
36138  Py_END_ALLOW_THREADS
36139  }
36140  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ConcatenatedInvertedLists, SWIG_POINTER_NEW | 0 );
36141  return resultobj;
36142 fail:
36143  return NULL;
36144 }
36145 
36146 
36147 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36148  PyObject *resultobj = 0;
36150  size_t arg2 ;
36151  void *argp1 = 0 ;
36152  int res1 = 0 ;
36153  size_t val2 ;
36154  int ecode2 = 0 ;
36155  PyObject * obj0 = 0 ;
36156  PyObject * obj1 = 0 ;
36157  size_t result;
36158 
36159  if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
36160  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36161  if (!SWIG_IsOK(res1)) {
36162  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_list_size" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
36163  }
36164  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36165  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36166  if (!SWIG_IsOK(ecode2)) {
36167  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
36168  }
36169  arg2 = static_cast< size_t >(val2);
36170  {
36171  Py_BEGIN_ALLOW_THREADS
36172  try {
36173  result = (size_t)((faiss::ConcatenatedInvertedLists const *)arg1)->list_size(arg2);
36174  } catch(faiss::FaissException & e) {
36175  PyEval_RestoreThread(_save);
36176  PyErr_SetString(PyExc_RuntimeError, e.what());
36177  SWIG_fail;
36178  }
36179  Py_END_ALLOW_THREADS
36180  }
36181  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
36182  return resultobj;
36183 fail:
36184  return NULL;
36185 }
36186 
36187 
36188 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36189  PyObject *resultobj = 0;
36191  size_t arg2 ;
36192  void *argp1 = 0 ;
36193  int res1 = 0 ;
36194  size_t val2 ;
36195  int ecode2 = 0 ;
36196  PyObject * obj0 = 0 ;
36197  PyObject * obj1 = 0 ;
36198  uint8_t *result = 0 ;
36199 
36200  if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
36201  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36202  if (!SWIG_IsOK(res1)) {
36203  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_codes" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
36204  }
36205  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36206  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36207  if (!SWIG_IsOK(ecode2)) {
36208  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
36209  }
36210  arg2 = static_cast< size_t >(val2);
36211  {
36212  Py_BEGIN_ALLOW_THREADS
36213  try {
36214  result = (uint8_t *)((faiss::ConcatenatedInvertedLists const *)arg1)->get_codes(arg2);
36215  } catch(faiss::FaissException & e) {
36216  PyEval_RestoreThread(_save);
36217  PyErr_SetString(PyExc_RuntimeError, e.what());
36218  SWIG_fail;
36219  }
36220  Py_END_ALLOW_THREADS
36221  }
36222  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
36223  return resultobj;
36224 fail:
36225  return NULL;
36226 }
36227 
36228 
36229 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36230  PyObject *resultobj = 0;
36232  size_t arg2 ;
36233  void *argp1 = 0 ;
36234  int res1 = 0 ;
36235  size_t val2 ;
36236  int ecode2 = 0 ;
36237  PyObject * obj0 = 0 ;
36238  PyObject * obj1 = 0 ;
36239  faiss::InvertedLists::idx_t *result = 0 ;
36240 
36241  if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
36242  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36243  if (!SWIG_IsOK(res1)) {
36244  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_ids" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
36245  }
36246  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36247  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36248  if (!SWIG_IsOK(ecode2)) {
36249  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
36250  }
36251  arg2 = static_cast< size_t >(val2);
36252  {
36253  Py_BEGIN_ALLOW_THREADS
36254  try {
36255  result = (faiss::InvertedLists::idx_t *)((faiss::ConcatenatedInvertedLists const *)arg1)->get_ids(arg2);
36256  } catch(faiss::FaissException & e) {
36257  PyEval_RestoreThread(_save);
36258  PyErr_SetString(PyExc_RuntimeError, e.what());
36259  SWIG_fail;
36260  }
36261  Py_END_ALLOW_THREADS
36262  }
36263  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
36264  return resultobj;
36265 fail:
36266  return NULL;
36267 }
36268 
36269 
36270 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_release_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36271  PyObject *resultobj = 0;
36273  uint8_t *arg2 = (uint8_t *) 0 ;
36274  void *argp1 = 0 ;
36275  int res1 = 0 ;
36276  void *argp2 = 0 ;
36277  int res2 = 0 ;
36278  PyObject * obj0 = 0 ;
36279  PyObject * obj1 = 0 ;
36280 
36281  if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_release_codes",&obj0,&obj1)) SWIG_fail;
36282  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36283  if (!SWIG_IsOK(res1)) {
36284  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_release_codes" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
36285  }
36286  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36287  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
36288  if (!SWIG_IsOK(res2)) {
36289  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConcatenatedInvertedLists_release_codes" "', argument " "2"" of type '" "uint8_t const *""'");
36290  }
36291  arg2 = reinterpret_cast< uint8_t * >(argp2);
36292  {
36293  Py_BEGIN_ALLOW_THREADS
36294  try {
36295  ((faiss::ConcatenatedInvertedLists const *)arg1)->release_codes((uint8_t const *)arg2);
36296  } catch(faiss::FaissException & e) {
36297  PyEval_RestoreThread(_save);
36298  PyErr_SetString(PyExc_RuntimeError, e.what());
36299  SWIG_fail;
36300  }
36301  Py_END_ALLOW_THREADS
36302  }
36303  resultobj = SWIG_Py_Void();
36304  return resultobj;
36305 fail:
36306  return NULL;
36307 }
36308 
36309 
36310 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_release_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36311  PyObject *resultobj = 0;
36313  faiss::InvertedLists::idx_t *arg2 = (faiss::InvertedLists::idx_t *) 0 ;
36314  void *argp1 = 0 ;
36315  int res1 = 0 ;
36316  void *argp2 = 0 ;
36317  int res2 = 0 ;
36318  PyObject * obj0 = 0 ;
36319  PyObject * obj1 = 0 ;
36320 
36321  if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_release_ids",&obj0,&obj1)) SWIG_fail;
36322  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36323  if (!SWIG_IsOK(res1)) {
36324  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_release_ids" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
36325  }
36326  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36327  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
36328  if (!SWIG_IsOK(res2)) {
36329  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConcatenatedInvertedLists_release_ids" "', argument " "2"" of type '" "faiss::InvertedLists::idx_t const *""'");
36330  }
36331  arg2 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp2);
36332  {
36333  Py_BEGIN_ALLOW_THREADS
36334  try {
36335  ((faiss::ConcatenatedInvertedLists const *)arg1)->release_ids((faiss::InvertedLists::idx_t const *)arg2);
36336  } catch(faiss::FaissException & e) {
36337  PyEval_RestoreThread(_save);
36338  PyErr_SetString(PyExc_RuntimeError, e.what());
36339  SWIG_fail;
36340  }
36341  Py_END_ALLOW_THREADS
36342  }
36343  resultobj = SWIG_Py_Void();
36344  return resultobj;
36345 fail:
36346  return NULL;
36347 }
36348 
36349 
36350 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_single_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36351  PyObject *resultobj = 0;
36353  size_t arg2 ;
36354  size_t arg3 ;
36355  void *argp1 = 0 ;
36356  int res1 = 0 ;
36357  size_t val2 ;
36358  int ecode2 = 0 ;
36359  size_t val3 ;
36360  int ecode3 = 0 ;
36361  PyObject * obj0 = 0 ;
36362  PyObject * obj1 = 0 ;
36363  PyObject * obj2 = 0 ;
36364  faiss::InvertedLists::idx_t result;
36365 
36366  if (!PyArg_ParseTuple(args,(char *)"OOO:ConcatenatedInvertedLists_get_single_id",&obj0,&obj1,&obj2)) SWIG_fail;
36367  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36368  if (!SWIG_IsOK(res1)) {
36369  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_single_id" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
36370  }
36371  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36372  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36373  if (!SWIG_IsOK(ecode2)) {
36374  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_single_id" "', argument " "2"" of type '" "size_t""'");
36375  }
36376  arg2 = static_cast< size_t >(val2);
36377  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
36378  if (!SWIG_IsOK(ecode3)) {
36379  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_get_single_id" "', argument " "3"" of type '" "size_t""'");
36380  }
36381  arg3 = static_cast< size_t >(val3);
36382  {
36383  Py_BEGIN_ALLOW_THREADS
36384  try {
36385  result = (faiss::InvertedLists::idx_t)((faiss::ConcatenatedInvertedLists const *)arg1)->get_single_id(arg2,arg3);
36386  } catch(faiss::FaissException & e) {
36387  PyEval_RestoreThread(_save);
36388  PyErr_SetString(PyExc_RuntimeError, e.what());
36389  SWIG_fail;
36390  }
36391  Py_END_ALLOW_THREADS
36392  }
36393  resultobj = SWIG_From_long(static_cast< long >(result));
36394  return resultobj;
36395 fail:
36396  return NULL;
36397 }
36398 
36399 
36400 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_single_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36401  PyObject *resultobj = 0;
36403  size_t arg2 ;
36404  size_t arg3 ;
36405  void *argp1 = 0 ;
36406  int res1 = 0 ;
36407  size_t val2 ;
36408  int ecode2 = 0 ;
36409  size_t val3 ;
36410  int ecode3 = 0 ;
36411  PyObject * obj0 = 0 ;
36412  PyObject * obj1 = 0 ;
36413  PyObject * obj2 = 0 ;
36414  uint8_t *result = 0 ;
36415 
36416  if (!PyArg_ParseTuple(args,(char *)"OOO:ConcatenatedInvertedLists_get_single_code",&obj0,&obj1,&obj2)) SWIG_fail;
36417  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36418  if (!SWIG_IsOK(res1)) {
36419  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_single_code" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
36420  }
36421  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36422  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36423  if (!SWIG_IsOK(ecode2)) {
36424  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_single_code" "', argument " "2"" of type '" "size_t""'");
36425  }
36426  arg2 = static_cast< size_t >(val2);
36427  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
36428  if (!SWIG_IsOK(ecode3)) {
36429  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_get_single_code" "', argument " "3"" of type '" "size_t""'");
36430  }
36431  arg3 = static_cast< size_t >(val3);
36432  {
36433  Py_BEGIN_ALLOW_THREADS
36434  try {
36435  result = (uint8_t *)((faiss::ConcatenatedInvertedLists const *)arg1)->get_single_code(arg2,arg3);
36436  } catch(faiss::FaissException & e) {
36437  PyEval_RestoreThread(_save);
36438  PyErr_SetString(PyExc_RuntimeError, e.what());
36439  SWIG_fail;
36440  }
36441  Py_END_ALLOW_THREADS
36442  }
36443  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
36444  return resultobj;
36445 fail:
36446  return NULL;
36447 }
36448 
36449 
36450 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36451  PyObject *resultobj = 0;
36453  size_t arg2 ;
36454  size_t arg3 ;
36455  faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
36456  uint8_t *arg5 = (uint8_t *) 0 ;
36457  void *argp1 = 0 ;
36458  int res1 = 0 ;
36459  size_t val2 ;
36460  int ecode2 = 0 ;
36461  size_t val3 ;
36462  int ecode3 = 0 ;
36463  void *argp4 = 0 ;
36464  int res4 = 0 ;
36465  void *argp5 = 0 ;
36466  int res5 = 0 ;
36467  PyObject * obj0 = 0 ;
36468  PyObject * obj1 = 0 ;
36469  PyObject * obj2 = 0 ;
36470  PyObject * obj3 = 0 ;
36471  PyObject * obj4 = 0 ;
36472  size_t result;
36473 
36474  if (!PyArg_ParseTuple(args,(char *)"OOOOO:ConcatenatedInvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
36475  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36476  if (!SWIG_IsOK(res1)) {
36477  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
36478  }
36479  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36480  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36481  if (!SWIG_IsOK(ecode2)) {
36482  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
36483  }
36484  arg2 = static_cast< size_t >(val2);
36485  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
36486  if (!SWIG_IsOK(ecode3)) {
36487  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
36488  }
36489  arg3 = static_cast< size_t >(val3);
36490  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
36491  if (!SWIG_IsOK(res4)) {
36492  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
36493  }
36494  arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
36495  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
36496  if (!SWIG_IsOK(res5)) {
36497  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
36498  }
36499  arg5 = reinterpret_cast< uint8_t * >(argp5);
36500  {
36501  Py_BEGIN_ALLOW_THREADS
36502  try {
36503  result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
36504  } catch(faiss::FaissException & e) {
36505  PyEval_RestoreThread(_save);
36506  PyErr_SetString(PyExc_RuntimeError, e.what());
36507  SWIG_fail;
36508  }
36509  Py_END_ALLOW_THREADS
36510  }
36511  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
36512  return resultobj;
36513 fail:
36514  return NULL;
36515 }
36516 
36517 
36518 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36519  PyObject *resultobj = 0;
36521  size_t arg2 ;
36522  size_t arg3 ;
36523  size_t arg4 ;
36524  faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
36525  uint8_t *arg6 = (uint8_t *) 0 ;
36526  void *argp1 = 0 ;
36527  int res1 = 0 ;
36528  size_t val2 ;
36529  int ecode2 = 0 ;
36530  size_t val3 ;
36531  int ecode3 = 0 ;
36532  size_t val4 ;
36533  int ecode4 = 0 ;
36534  void *argp5 = 0 ;
36535  int res5 = 0 ;
36536  void *argp6 = 0 ;
36537  int res6 = 0 ;
36538  PyObject * obj0 = 0 ;
36539  PyObject * obj1 = 0 ;
36540  PyObject * obj2 = 0 ;
36541  PyObject * obj3 = 0 ;
36542  PyObject * obj4 = 0 ;
36543  PyObject * obj5 = 0 ;
36544 
36545  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ConcatenatedInvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
36546  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36547  if (!SWIG_IsOK(res1)) {
36548  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
36549  }
36550  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36551  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36552  if (!SWIG_IsOK(ecode2)) {
36553  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
36554  }
36555  arg2 = static_cast< size_t >(val2);
36556  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
36557  if (!SWIG_IsOK(ecode3)) {
36558  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
36559  }
36560  arg3 = static_cast< size_t >(val3);
36561  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
36562  if (!SWIG_IsOK(ecode4)) {
36563  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
36564  }
36565  arg4 = static_cast< size_t >(val4);
36566  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
36567  if (!SWIG_IsOK(res5)) {
36568  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
36569  }
36570  arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
36571  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
36572  if (!SWIG_IsOK(res6)) {
36573  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
36574  }
36575  arg6 = reinterpret_cast< uint8_t * >(argp6);
36576  {
36577  Py_BEGIN_ALLOW_THREADS
36578  try {
36579  (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
36580  } catch(faiss::FaissException & e) {
36581  PyEval_RestoreThread(_save);
36582  PyErr_SetString(PyExc_RuntimeError, e.what());
36583  SWIG_fail;
36584  }
36585  Py_END_ALLOW_THREADS
36586  }
36587  resultobj = SWIG_Py_Void();
36588  return resultobj;
36589 fail:
36590  return NULL;
36591 }
36592 
36593 
36594 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36595  PyObject *resultobj = 0;
36597  size_t arg2 ;
36598  size_t arg3 ;
36599  void *argp1 = 0 ;
36600  int res1 = 0 ;
36601  size_t val2 ;
36602  int ecode2 = 0 ;
36603  size_t val3 ;
36604  int ecode3 = 0 ;
36605  PyObject * obj0 = 0 ;
36606  PyObject * obj1 = 0 ;
36607  PyObject * obj2 = 0 ;
36608 
36609  if (!PyArg_ParseTuple(args,(char *)"OOO:ConcatenatedInvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
36610  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
36611  if (!SWIG_IsOK(res1)) {
36612  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_resize" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
36613  }
36614  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36615  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36616  if (!SWIG_IsOK(ecode2)) {
36617  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
36618  }
36619  arg2 = static_cast< size_t >(val2);
36620  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
36621  if (!SWIG_IsOK(ecode3)) {
36622  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
36623  }
36624  arg3 = static_cast< size_t >(val3);
36625  {
36626  Py_BEGIN_ALLOW_THREADS
36627  try {
36628  (arg1)->resize(arg2,arg3);
36629  } catch(faiss::FaissException & e) {
36630  PyEval_RestoreThread(_save);
36631  PyErr_SetString(PyExc_RuntimeError, e.what());
36632  SWIG_fail;
36633  }
36634  Py_END_ALLOW_THREADS
36635  }
36636  resultobj = SWIG_Py_Void();
36637  return resultobj;
36638 fail:
36639  return NULL;
36640 }
36641 
36642 
36643 SWIGINTERN PyObject *_wrap_delete_ConcatenatedInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36644  PyObject *resultobj = 0;
36646  void *argp1 = 0 ;
36647  int res1 = 0 ;
36648  PyObject * obj0 = 0 ;
36649 
36650  if (!PyArg_ParseTuple(args,(char *)"O:delete_ConcatenatedInvertedLists",&obj0)) SWIG_fail;
36651  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, SWIG_POINTER_DISOWN | 0 );
36652  if (!SWIG_IsOK(res1)) {
36653  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConcatenatedInvertedLists" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
36654  }
36655  arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
36656  delete arg1;
36657  resultobj = SWIG_Py_Void();
36658  return resultobj;
36659 fail:
36660  return NULL;
36661 }
36662 
36663 
36664 SWIGINTERN PyObject *ConcatenatedInvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36665  PyObject *obj;
36666  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
36667  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ConcatenatedInvertedLists, SWIG_NewClientData(obj));
36668  return SWIG_Py_Void();
36669 }
36670 
36671 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36672  PyObject *resultobj = 0;
36674  faiss::Index *arg2 = (faiss::Index *) 0 ;
36675  void *argp1 = 0 ;
36676  int res1 = 0 ;
36677  void *argp2 = 0 ;
36678  int res2 = 0 ;
36679  PyObject * obj0 = 0 ;
36680  PyObject * obj1 = 0 ;
36681 
36682  if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_quantizer_set",&obj0,&obj1)) SWIG_fail;
36683  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36684  if (!SWIG_IsOK(res1)) {
36685  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36686  }
36687  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36688  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
36689  if (!SWIG_IsOK(res2)) {
36690  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Level1Quantizer_quantizer_set" "', argument " "2"" of type '" "faiss::Index *""'");
36691  }
36692  arg2 = reinterpret_cast< faiss::Index * >(argp2);
36693  if (arg1) (arg1)->quantizer = arg2;
36694  resultobj = SWIG_Py_Void();
36695  return resultobj;
36696 fail:
36697  return NULL;
36698 }
36699 
36700 
36701 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36702  PyObject *resultobj = 0;
36704  void *argp1 = 0 ;
36705  int res1 = 0 ;
36706  PyObject * obj0 = 0 ;
36707  faiss::Index *result = 0 ;
36708 
36709  if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_quantizer_get",&obj0)) SWIG_fail;
36710  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36711  if (!SWIG_IsOK(res1)) {
36712  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36713  }
36714  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36715  result = (faiss::Index *) ((arg1)->quantizer);
36716  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
36717  return resultobj;
36718 fail:
36719  return NULL;
36720 }
36721 
36722 
36723 SWIGINTERN PyObject *_wrap_Level1Quantizer_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36724  PyObject *resultobj = 0;
36726  size_t arg2 ;
36727  void *argp1 = 0 ;
36728  int res1 = 0 ;
36729  size_t val2 ;
36730  int ecode2 = 0 ;
36731  PyObject * obj0 = 0 ;
36732  PyObject * obj1 = 0 ;
36733 
36734  if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_nlist_set",&obj0,&obj1)) SWIG_fail;
36735  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36736  if (!SWIG_IsOK(res1)) {
36737  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_nlist_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36738  }
36739  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36740  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36741  if (!SWIG_IsOK(ecode2)) {
36742  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_nlist_set" "', argument " "2"" of type '" "size_t""'");
36743  }
36744  arg2 = static_cast< size_t >(val2);
36745  if (arg1) (arg1)->nlist = arg2;
36746  resultobj = SWIG_Py_Void();
36747  return resultobj;
36748 fail:
36749  return NULL;
36750 }
36751 
36752 
36753 SWIGINTERN PyObject *_wrap_Level1Quantizer_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36754  PyObject *resultobj = 0;
36756  void *argp1 = 0 ;
36757  int res1 = 0 ;
36758  PyObject * obj0 = 0 ;
36759  size_t result;
36760 
36761  if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_nlist_get",&obj0)) SWIG_fail;
36762  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36763  if (!SWIG_IsOK(res1)) {
36764  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_nlist_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36765  }
36766  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36767  result = (size_t) ((arg1)->nlist);
36768  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
36769  return resultobj;
36770 fail:
36771  return NULL;
36772 }
36773 
36774 
36775 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_trains_alone_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36776  PyObject *resultobj = 0;
36778  char arg2 ;
36779  void *argp1 = 0 ;
36780  int res1 = 0 ;
36781  char val2 ;
36782  int ecode2 = 0 ;
36783  PyObject * obj0 = 0 ;
36784  PyObject * obj1 = 0 ;
36785 
36786  if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_quantizer_trains_alone_set",&obj0,&obj1)) SWIG_fail;
36787  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36788  if (!SWIG_IsOK(res1)) {
36789  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_trains_alone_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36790  }
36791  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36792  ecode2 = SWIG_AsVal_char(obj1, &val2);
36793  if (!SWIG_IsOK(ecode2)) {
36794  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_quantizer_trains_alone_set" "', argument " "2"" of type '" "char""'");
36795  }
36796  arg2 = static_cast< char >(val2);
36797  if (arg1) (arg1)->quantizer_trains_alone = arg2;
36798  resultobj = SWIG_Py_Void();
36799  return resultobj;
36800 fail:
36801  return NULL;
36802 }
36803 
36804 
36805 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_trains_alone_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36806  PyObject *resultobj = 0;
36808  void *argp1 = 0 ;
36809  int res1 = 0 ;
36810  PyObject * obj0 = 0 ;
36811  char result;
36812 
36813  if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_quantizer_trains_alone_get",&obj0)) SWIG_fail;
36814  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36815  if (!SWIG_IsOK(res1)) {
36816  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_trains_alone_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36817  }
36818  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36819  result = (char) ((arg1)->quantizer_trains_alone);
36820  resultobj = SWIG_From_char(static_cast< char >(result));
36821  return resultobj;
36822 fail:
36823  return NULL;
36824 }
36825 
36826 
36827 SWIGINTERN PyObject *_wrap_Level1Quantizer_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36828  PyObject *resultobj = 0;
36830  bool arg2 ;
36831  void *argp1 = 0 ;
36832  int res1 = 0 ;
36833  bool val2 ;
36834  int ecode2 = 0 ;
36835  PyObject * obj0 = 0 ;
36836  PyObject * obj1 = 0 ;
36837 
36838  if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_own_fields_set",&obj0,&obj1)) SWIG_fail;
36839  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36840  if (!SWIG_IsOK(res1)) {
36841  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_own_fields_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36842  }
36843  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36844  ecode2 = SWIG_AsVal_bool(obj1, &val2);
36845  if (!SWIG_IsOK(ecode2)) {
36846  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_own_fields_set" "', argument " "2"" of type '" "bool""'");
36847  }
36848  arg2 = static_cast< bool >(val2);
36849  if (arg1) (arg1)->own_fields = arg2;
36850  resultobj = SWIG_Py_Void();
36851  return resultobj;
36852 fail:
36853  return NULL;
36854 }
36855 
36856 
36857 SWIGINTERN PyObject *_wrap_Level1Quantizer_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36858  PyObject *resultobj = 0;
36860  void *argp1 = 0 ;
36861  int res1 = 0 ;
36862  PyObject * obj0 = 0 ;
36863  bool result;
36864 
36865  if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_own_fields_get",&obj0)) SWIG_fail;
36866  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36867  if (!SWIG_IsOK(res1)) {
36868  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_own_fields_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36869  }
36870  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36871  result = (bool) ((arg1)->own_fields);
36872  resultobj = SWIG_From_bool(static_cast< bool >(result));
36873  return resultobj;
36874 fail:
36875  return NULL;
36876 }
36877 
36878 
36879 SWIGINTERN PyObject *_wrap_Level1Quantizer_cp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36880  PyObject *resultobj = 0;
36883  void *argp1 = 0 ;
36884  int res1 = 0 ;
36885  void *argp2 = 0 ;
36886  int res2 = 0 ;
36887  PyObject * obj0 = 0 ;
36888  PyObject * obj1 = 0 ;
36889 
36890  if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_cp_set",&obj0,&obj1)) SWIG_fail;
36891  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36892  if (!SWIG_IsOK(res1)) {
36893  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_cp_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36894  }
36895  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36896  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
36897  if (!SWIG_IsOK(res2)) {
36898  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Level1Quantizer_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
36899  }
36900  arg2 = reinterpret_cast< faiss::ClusteringParameters * >(argp2);
36901  if (arg1) (arg1)->cp = *arg2;
36902  resultobj = SWIG_Py_Void();
36903  return resultobj;
36904 fail:
36905  return NULL;
36906 }
36907 
36908 
36909 SWIGINTERN PyObject *_wrap_Level1Quantizer_cp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36910  PyObject *resultobj = 0;
36912  void *argp1 = 0 ;
36913  int res1 = 0 ;
36914  PyObject * obj0 = 0 ;
36915  faiss::ClusteringParameters *result = 0 ;
36916 
36917  if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_cp_get",&obj0)) SWIG_fail;
36918  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36919  if (!SWIG_IsOK(res1)) {
36920  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_cp_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36921  }
36922  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36923  result = (faiss::ClusteringParameters *)& ((arg1)->cp);
36924  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
36925  return resultobj;
36926 fail:
36927  return NULL;
36928 }
36929 
36930 
36931 SWIGINTERN PyObject *_wrap_Level1Quantizer_clustering_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36932  PyObject *resultobj = 0;
36934  faiss::Index *arg2 = (faiss::Index *) 0 ;
36935  void *argp1 = 0 ;
36936  int res1 = 0 ;
36937  void *argp2 = 0 ;
36938  int res2 = 0 ;
36939  PyObject * obj0 = 0 ;
36940  PyObject * obj1 = 0 ;
36941 
36942  if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_clustering_index_set",&obj0,&obj1)) SWIG_fail;
36943  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36944  if (!SWIG_IsOK(res1)) {
36945  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_clustering_index_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36946  }
36947  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36948  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
36949  if (!SWIG_IsOK(res2)) {
36950  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Level1Quantizer_clustering_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
36951  }
36952  arg2 = reinterpret_cast< faiss::Index * >(argp2);
36953  if (arg1) (arg1)->clustering_index = arg2;
36954  resultobj = SWIG_Py_Void();
36955  return resultobj;
36956 fail:
36957  return NULL;
36958 }
36959 
36960 
36961 SWIGINTERN PyObject *_wrap_Level1Quantizer_clustering_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36962  PyObject *resultobj = 0;
36964  void *argp1 = 0 ;
36965  int res1 = 0 ;
36966  PyObject * obj0 = 0 ;
36967  faiss::Index *result = 0 ;
36968 
36969  if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_clustering_index_get",&obj0)) SWIG_fail;
36970  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
36971  if (!SWIG_IsOK(res1)) {
36972  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_clustering_index_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
36973  }
36974  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
36975  result = (faiss::Index *) ((arg1)->clustering_index);
36976  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
36977  return resultobj;
36978 fail:
36979  return NULL;
36980 }
36981 
36982 
36983 SWIGINTERN PyObject *_wrap_Level1Quantizer_train_q1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36984  PyObject *resultobj = 0;
36986  size_t arg2 ;
36987  float *arg3 = (float *) 0 ;
36988  bool arg4 ;
36989  faiss::MetricType arg5 ;
36990  void *argp1 = 0 ;
36991  int res1 = 0 ;
36992  size_t val2 ;
36993  int ecode2 = 0 ;
36994  void *argp3 = 0 ;
36995  int res3 = 0 ;
36996  bool val4 ;
36997  int ecode4 = 0 ;
36998  int val5 ;
36999  int ecode5 = 0 ;
37000  PyObject * obj0 = 0 ;
37001  PyObject * obj1 = 0 ;
37002  PyObject * obj2 = 0 ;
37003  PyObject * obj3 = 0 ;
37004  PyObject * obj4 = 0 ;
37005 
37006  if (!PyArg_ParseTuple(args,(char *)"OOOOO:Level1Quantizer_train_q1",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
37007  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
37008  if (!SWIG_IsOK(res1)) {
37009  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_train_q1" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
37010  }
37011  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
37012  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37013  if (!SWIG_IsOK(ecode2)) {
37014  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_train_q1" "', argument " "2"" of type '" "size_t""'");
37015  }
37016  arg2 = static_cast< size_t >(val2);
37017  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37018  if (!SWIG_IsOK(res3)) {
37019  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Level1Quantizer_train_q1" "', argument " "3"" of type '" "float const *""'");
37020  }
37021  arg3 = reinterpret_cast< float * >(argp3);
37022  ecode4 = SWIG_AsVal_bool(obj3, &val4);
37023  if (!SWIG_IsOK(ecode4)) {
37024  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Level1Quantizer_train_q1" "', argument " "4"" of type '" "bool""'");
37025  }
37026  arg4 = static_cast< bool >(val4);
37027  ecode5 = SWIG_AsVal_int(obj4, &val5);
37028  if (!SWIG_IsOK(ecode5)) {
37029  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Level1Quantizer_train_q1" "', argument " "5"" of type '" "faiss::MetricType""'");
37030  }
37031  arg5 = static_cast< faiss::MetricType >(val5);
37032  {
37033  Py_BEGIN_ALLOW_THREADS
37034  try {
37035  (arg1)->train_q1(arg2,(float const *)arg3,arg4,arg5);
37036  } catch(faiss::FaissException & e) {
37037  PyEval_RestoreThread(_save);
37038  PyErr_SetString(PyExc_RuntimeError, e.what());
37039  SWIG_fail;
37040  }
37041  Py_END_ALLOW_THREADS
37042  }
37043  resultobj = SWIG_Py_Void();
37044  return resultobj;
37045 fail:
37046  return NULL;
37047 }
37048 
37049 
37050 SWIGINTERN PyObject *_wrap_new_Level1Quantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37051  PyObject *resultobj = 0;
37052  faiss::Index *arg1 = (faiss::Index *) 0 ;
37053  size_t arg2 ;
37054  void *argp1 = 0 ;
37055  int res1 = 0 ;
37056  size_t val2 ;
37057  int ecode2 = 0 ;
37058  PyObject * obj0 = 0 ;
37059  PyObject * obj1 = 0 ;
37060  faiss::Level1Quantizer *result = 0 ;
37061 
37062  if (!PyArg_ParseTuple(args,(char *)"OO:new_Level1Quantizer",&obj0,&obj1)) SWIG_fail;
37063  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
37064  if (!SWIG_IsOK(res1)) {
37065  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Level1Quantizer" "', argument " "1"" of type '" "faiss::Index *""'");
37066  }
37067  arg1 = reinterpret_cast< faiss::Index * >(argp1);
37068  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37069  if (!SWIG_IsOK(ecode2)) {
37070  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Level1Quantizer" "', argument " "2"" of type '" "size_t""'");
37071  }
37072  arg2 = static_cast< size_t >(val2);
37073  {
37074  Py_BEGIN_ALLOW_THREADS
37075  try {
37076  result = (faiss::Level1Quantizer *)new faiss::Level1Quantizer(arg1,arg2);
37077  } catch(faiss::FaissException & e) {
37078  PyEval_RestoreThread(_save);
37079  PyErr_SetString(PyExc_RuntimeError, e.what());
37080  SWIG_fail;
37081  }
37082  Py_END_ALLOW_THREADS
37083  }
37084  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Level1Quantizer, SWIG_POINTER_NEW | 0 );
37085  return resultobj;
37086 fail:
37087  return NULL;
37088 }
37089 
37090 
37091 SWIGINTERN PyObject *_wrap_new_Level1Quantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37092  PyObject *resultobj = 0;
37093  faiss::Level1Quantizer *result = 0 ;
37094 
37095  if (!PyArg_ParseTuple(args,(char *)":new_Level1Quantizer")) SWIG_fail;
37096  {
37097  Py_BEGIN_ALLOW_THREADS
37098  try {
37100  } catch(faiss::FaissException & e) {
37101  PyEval_RestoreThread(_save);
37102  PyErr_SetString(PyExc_RuntimeError, e.what());
37103  SWIG_fail;
37104  }
37105  Py_END_ALLOW_THREADS
37106  }
37107  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Level1Quantizer, SWIG_POINTER_NEW | 0 );
37108  return resultobj;
37109 fail:
37110  return NULL;
37111 }
37112 
37113 
37114 SWIGINTERN PyObject *_wrap_new_Level1Quantizer(PyObject *self, PyObject *args) {
37115  Py_ssize_t argc;
37116  PyObject *argv[3] = {
37117  0
37118  };
37119  Py_ssize_t ii;
37120 
37121  if (!PyTuple_Check(args)) SWIG_fail;
37122  argc = args ? PyObject_Length(args) : 0;
37123  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
37124  argv[ii] = PyTuple_GET_ITEM(args,ii);
37125  }
37126  if (argc == 0) {
37127  return _wrap_new_Level1Quantizer__SWIG_1(self, args);
37128  }
37129  if (argc == 2) {
37130  int _v;
37131  void *vptr = 0;
37132  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
37133  _v = SWIG_CheckState(res);
37134  if (_v) {
37135  {
37136  int res = SWIG_AsVal_size_t(argv[1], NULL);
37137  _v = SWIG_CheckState(res);
37138  }
37139  if (_v) {
37140  return _wrap_new_Level1Quantizer__SWIG_0(self, args);
37141  }
37142  }
37143  }
37144 
37145 fail:
37146  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Level1Quantizer'.\n"
37147  " Possible C/C++ prototypes are:\n"
37148  " faiss::Level1Quantizer::Level1Quantizer(faiss::Index *,size_t)\n"
37149  " faiss::Level1Quantizer::Level1Quantizer()\n");
37150  return 0;
37151 }
37152 
37153 
37154 SWIGINTERN PyObject *_wrap_delete_Level1Quantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37155  PyObject *resultobj = 0;
37157  void *argp1 = 0 ;
37158  int res1 = 0 ;
37159  PyObject * obj0 = 0 ;
37160 
37161  if (!PyArg_ParseTuple(args,(char *)"O:delete_Level1Quantizer",&obj0)) SWIG_fail;
37162  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, SWIG_POINTER_DISOWN | 0 );
37163  if (!SWIG_IsOK(res1)) {
37164  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Level1Quantizer" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
37165  }
37166  arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
37167  {
37168  Py_BEGIN_ALLOW_THREADS
37169  try {
37170  delete arg1;
37171  } catch(faiss::FaissException & e) {
37172  PyEval_RestoreThread(_save);
37173  PyErr_SetString(PyExc_RuntimeError, e.what());
37174  SWIG_fail;
37175  }
37176  Py_END_ALLOW_THREADS
37177  }
37178  resultobj = SWIG_Py_Void();
37179  return resultobj;
37180 fail:
37181  return NULL;
37182 }
37183 
37184 
37185 SWIGINTERN PyObject *Level1Quantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37186  PyObject *obj;
37187  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
37188  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Level1Quantizer, SWIG_NewClientData(obj));
37189  return SWIG_Py_Void();
37190 }
37191 
37192 SWIGINTERN PyObject *_wrap_IVFSearchParameters_nprobe_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37193  PyObject *resultobj = 0;
37195  size_t arg2 ;
37196  void *argp1 = 0 ;
37197  int res1 = 0 ;
37198  size_t val2 ;
37199  int ecode2 = 0 ;
37200  PyObject * obj0 = 0 ;
37201  PyObject * obj1 = 0 ;
37202 
37203  if (!PyArg_ParseTuple(args,(char *)"OO:IVFSearchParameters_nprobe_set",&obj0,&obj1)) SWIG_fail;
37204  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
37205  if (!SWIG_IsOK(res1)) {
37206  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_nprobe_set" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
37207  }
37208  arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
37209  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37210  if (!SWIG_IsOK(ecode2)) {
37211  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFSearchParameters_nprobe_set" "', argument " "2"" of type '" "size_t""'");
37212  }
37213  arg2 = static_cast< size_t >(val2);
37214  if (arg1) (arg1)->nprobe = arg2;
37215  resultobj = SWIG_Py_Void();
37216  return resultobj;
37217 fail:
37218  return NULL;
37219 }
37220 
37221 
37222 SWIGINTERN PyObject *_wrap_IVFSearchParameters_nprobe_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37223  PyObject *resultobj = 0;
37225  void *argp1 = 0 ;
37226  int res1 = 0 ;
37227  PyObject * obj0 = 0 ;
37228  size_t result;
37229 
37230  if (!PyArg_ParseTuple(args,(char *)"O:IVFSearchParameters_nprobe_get",&obj0)) SWIG_fail;
37231  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
37232  if (!SWIG_IsOK(res1)) {
37233  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_nprobe_get" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
37234  }
37235  arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
37236  result = (size_t) ((arg1)->nprobe);
37237  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
37238  return resultobj;
37239 fail:
37240  return NULL;
37241 }
37242 
37243 
37244 SWIGINTERN PyObject *_wrap_IVFSearchParameters_max_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37245  PyObject *resultobj = 0;
37247  size_t arg2 ;
37248  void *argp1 = 0 ;
37249  int res1 = 0 ;
37250  size_t val2 ;
37251  int ecode2 = 0 ;
37252  PyObject * obj0 = 0 ;
37253  PyObject * obj1 = 0 ;
37254 
37255  if (!PyArg_ParseTuple(args,(char *)"OO:IVFSearchParameters_max_codes_set",&obj0,&obj1)) SWIG_fail;
37256  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
37257  if (!SWIG_IsOK(res1)) {
37258  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_max_codes_set" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
37259  }
37260  arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
37261  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37262  if (!SWIG_IsOK(ecode2)) {
37263  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFSearchParameters_max_codes_set" "', argument " "2"" of type '" "size_t""'");
37264  }
37265  arg2 = static_cast< size_t >(val2);
37266  if (arg1) (arg1)->max_codes = arg2;
37267  resultobj = SWIG_Py_Void();
37268  return resultobj;
37269 fail:
37270  return NULL;
37271 }
37272 
37273 
37274 SWIGINTERN PyObject *_wrap_IVFSearchParameters_max_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37275  PyObject *resultobj = 0;
37277  void *argp1 = 0 ;
37278  int res1 = 0 ;
37279  PyObject * obj0 = 0 ;
37280  size_t result;
37281 
37282  if (!PyArg_ParseTuple(args,(char *)"O:IVFSearchParameters_max_codes_get",&obj0)) SWIG_fail;
37283  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
37284  if (!SWIG_IsOK(res1)) {
37285  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_max_codes_get" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
37286  }
37287  arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
37288  result = (size_t) ((arg1)->max_codes);
37289  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
37290  return resultobj;
37291 fail:
37292  return NULL;
37293 }
37294 
37295 
37296 SWIGINTERN PyObject *_wrap_delete_IVFSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37297  PyObject *resultobj = 0;
37299  void *argp1 = 0 ;
37300  int res1 = 0 ;
37301  PyObject * obj0 = 0 ;
37302 
37303  if (!PyArg_ParseTuple(args,(char *)"O:delete_IVFSearchParameters",&obj0)) SWIG_fail;
37304  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, SWIG_POINTER_DISOWN | 0 );
37305  if (!SWIG_IsOK(res1)) {
37306  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVFSearchParameters" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
37307  }
37308  arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
37309  {
37310  Py_BEGIN_ALLOW_THREADS
37311  try {
37312  delete arg1;
37313  } catch(faiss::FaissException & e) {
37314  PyEval_RestoreThread(_save);
37315  PyErr_SetString(PyExc_RuntimeError, e.what());
37316  SWIG_fail;
37317  }
37318  Py_END_ALLOW_THREADS
37319  }
37320  resultobj = SWIG_Py_Void();
37321  return resultobj;
37322 fail:
37323  return NULL;
37324 }
37325 
37326 
37327 SWIGINTERN PyObject *_wrap_new_IVFSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37328  PyObject *resultobj = 0;
37329  faiss::IVFSearchParameters *result = 0 ;
37330 
37331  if (!PyArg_ParseTuple(args,(char *)":new_IVFSearchParameters")) SWIG_fail;
37333  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IVFSearchParameters, SWIG_POINTER_NEW | 0 );
37334  return resultobj;
37335 fail:
37336  return NULL;
37337 }
37338 
37339 
37340 SWIGINTERN PyObject *IVFSearchParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37341  PyObject *obj;
37342  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
37343  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IVFSearchParameters, SWIG_NewClientData(obj));
37344  return SWIG_Py_Void();
37345 }
37346 
37347 SWIGINTERN PyObject *_wrap_IndexIVF_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37348  PyObject *resultobj = 0;
37349  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37351  void *argp1 = 0 ;
37352  int res1 = 0 ;
37353  void *argp2 = 0 ;
37354  int res2 = 0 ;
37355  PyObject * obj0 = 0 ;
37356  PyObject * obj1 = 0 ;
37357 
37358  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_invlists_set",&obj0,&obj1)) SWIG_fail;
37359  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37360  if (!SWIG_IsOK(res1)) {
37361  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_invlists_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37362  }
37363  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37364  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, SWIG_POINTER_DISOWN | 0 );
37365  if (!SWIG_IsOK(res2)) {
37366  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_invlists_set" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
37367  }
37368  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
37369  if (arg1) (arg1)->invlists = arg2;
37370  resultobj = SWIG_Py_Void();
37371  return resultobj;
37372 fail:
37373  return NULL;
37374 }
37375 
37376 
37377 SWIGINTERN PyObject *_wrap_IndexIVF_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37378  PyObject *resultobj = 0;
37379  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37380  void *argp1 = 0 ;
37381  int res1 = 0 ;
37382  PyObject * obj0 = 0 ;
37383  faiss::InvertedLists *result = 0 ;
37384 
37385  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_invlists_get",&obj0)) SWIG_fail;
37386  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37387  if (!SWIG_IsOK(res1)) {
37388  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_invlists_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37389  }
37390  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37391  result = (faiss::InvertedLists *) ((arg1)->invlists);
37392  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
37393  return resultobj;
37394 fail:
37395  return NULL;
37396 }
37397 
37398 
37399 SWIGINTERN PyObject *_wrap_IndexIVF_own_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37400  PyObject *resultobj = 0;
37401  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37402  bool arg2 ;
37403  void *argp1 = 0 ;
37404  int res1 = 0 ;
37405  bool val2 ;
37406  int ecode2 = 0 ;
37407  PyObject * obj0 = 0 ;
37408  PyObject * obj1 = 0 ;
37409 
37410  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_own_invlists_set",&obj0,&obj1)) SWIG_fail;
37411  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37412  if (!SWIG_IsOK(res1)) {
37413  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_own_invlists_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37414  }
37415  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37416  ecode2 = SWIG_AsVal_bool(obj1, &val2);
37417  if (!SWIG_IsOK(ecode2)) {
37418  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_own_invlists_set" "', argument " "2"" of type '" "bool""'");
37419  }
37420  arg2 = static_cast< bool >(val2);
37421  if (arg1) (arg1)->own_invlists = arg2;
37422  resultobj = SWIG_Py_Void();
37423  return resultobj;
37424 fail:
37425  return NULL;
37426 }
37427 
37428 
37429 SWIGINTERN PyObject *_wrap_IndexIVF_own_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37430  PyObject *resultobj = 0;
37431  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37432  void *argp1 = 0 ;
37433  int res1 = 0 ;
37434  PyObject * obj0 = 0 ;
37435  bool result;
37436 
37437  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_own_invlists_get",&obj0)) SWIG_fail;
37438  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37439  if (!SWIG_IsOK(res1)) {
37440  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_own_invlists_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37441  }
37442  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37443  result = (bool) ((arg1)->own_invlists);
37444  resultobj = SWIG_From_bool(static_cast< bool >(result));
37445  return resultobj;
37446 fail:
37447  return NULL;
37448 }
37449 
37450 
37451 SWIGINTERN PyObject *_wrap_IndexIVF_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37452  PyObject *resultobj = 0;
37453  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37454  size_t arg2 ;
37455  void *argp1 = 0 ;
37456  int res1 = 0 ;
37457  size_t val2 ;
37458  int ecode2 = 0 ;
37459  PyObject * obj0 = 0 ;
37460  PyObject * obj1 = 0 ;
37461 
37462  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_code_size_set",&obj0,&obj1)) SWIG_fail;
37463  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37464  if (!SWIG_IsOK(res1)) {
37465  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_code_size_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37466  }
37467  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37468  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37469  if (!SWIG_IsOK(ecode2)) {
37470  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_code_size_set" "', argument " "2"" of type '" "size_t""'");
37471  }
37472  arg2 = static_cast< size_t >(val2);
37473  if (arg1) (arg1)->code_size = arg2;
37474  resultobj = SWIG_Py_Void();
37475  return resultobj;
37476 fail:
37477  return NULL;
37478 }
37479 
37480 
37481 SWIGINTERN PyObject *_wrap_IndexIVF_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37482  PyObject *resultobj = 0;
37483  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37484  void *argp1 = 0 ;
37485  int res1 = 0 ;
37486  PyObject * obj0 = 0 ;
37487  size_t result;
37488 
37489  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_code_size_get",&obj0)) SWIG_fail;
37490  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37491  if (!SWIG_IsOK(res1)) {
37492  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_code_size_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37493  }
37494  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37495  result = (size_t) ((arg1)->code_size);
37496  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
37497  return resultobj;
37498 fail:
37499  return NULL;
37500 }
37501 
37502 
37503 SWIGINTERN PyObject *_wrap_IndexIVF_nprobe_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37504  PyObject *resultobj = 0;
37505  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37506  size_t arg2 ;
37507  void *argp1 = 0 ;
37508  int res1 = 0 ;
37509  size_t val2 ;
37510  int ecode2 = 0 ;
37511  PyObject * obj0 = 0 ;
37512  PyObject * obj1 = 0 ;
37513 
37514  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_nprobe_set",&obj0,&obj1)) SWIG_fail;
37515  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37516  if (!SWIG_IsOK(res1)) {
37517  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_nprobe_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37518  }
37519  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37520  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37521  if (!SWIG_IsOK(ecode2)) {
37522  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_nprobe_set" "', argument " "2"" of type '" "size_t""'");
37523  }
37524  arg2 = static_cast< size_t >(val2);
37525  if (arg1) (arg1)->nprobe = arg2;
37526  resultobj = SWIG_Py_Void();
37527  return resultobj;
37528 fail:
37529  return NULL;
37530 }
37531 
37532 
37533 SWIGINTERN PyObject *_wrap_IndexIVF_nprobe_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37534  PyObject *resultobj = 0;
37535  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37536  void *argp1 = 0 ;
37537  int res1 = 0 ;
37538  PyObject * obj0 = 0 ;
37539  size_t result;
37540 
37541  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_nprobe_get",&obj0)) SWIG_fail;
37542  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37543  if (!SWIG_IsOK(res1)) {
37544  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_nprobe_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37545  }
37546  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37547  result = (size_t) ((arg1)->nprobe);
37548  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
37549  return resultobj;
37550 fail:
37551  return NULL;
37552 }
37553 
37554 
37555 SWIGINTERN PyObject *_wrap_IndexIVF_max_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37556  PyObject *resultobj = 0;
37557  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37558  size_t arg2 ;
37559  void *argp1 = 0 ;
37560  int res1 = 0 ;
37561  size_t val2 ;
37562  int ecode2 = 0 ;
37563  PyObject * obj0 = 0 ;
37564  PyObject * obj1 = 0 ;
37565 
37566  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_max_codes_set",&obj0,&obj1)) SWIG_fail;
37567  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37568  if (!SWIG_IsOK(res1)) {
37569  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_max_codes_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37570  }
37571  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37572  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37573  if (!SWIG_IsOK(ecode2)) {
37574  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_max_codes_set" "', argument " "2"" of type '" "size_t""'");
37575  }
37576  arg2 = static_cast< size_t >(val2);
37577  if (arg1) (arg1)->max_codes = arg2;
37578  resultobj = SWIG_Py_Void();
37579  return resultobj;
37580 fail:
37581  return NULL;
37582 }
37583 
37584 
37585 SWIGINTERN PyObject *_wrap_IndexIVF_max_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37586  PyObject *resultobj = 0;
37587  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37588  void *argp1 = 0 ;
37589  int res1 = 0 ;
37590  PyObject * obj0 = 0 ;
37591  size_t result;
37592 
37593  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_max_codes_get",&obj0)) SWIG_fail;
37594  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37595  if (!SWIG_IsOK(res1)) {
37596  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_max_codes_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37597  }
37598  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37599  result = (size_t) ((arg1)->max_codes);
37600  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
37601  return resultobj;
37602 fail:
37603  return NULL;
37604 }
37605 
37606 
37607 SWIGINTERN PyObject *_wrap_IndexIVF_maintain_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37608  PyObject *resultobj = 0;
37609  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37610  bool arg2 ;
37611  void *argp1 = 0 ;
37612  int res1 = 0 ;
37613  bool val2 ;
37614  int ecode2 = 0 ;
37615  PyObject * obj0 = 0 ;
37616  PyObject * obj1 = 0 ;
37617 
37618  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_maintain_direct_map_set",&obj0,&obj1)) SWIG_fail;
37619  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37620  if (!SWIG_IsOK(res1)) {
37621  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_maintain_direct_map_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37622  }
37623  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37624  ecode2 = SWIG_AsVal_bool(obj1, &val2);
37625  if (!SWIG_IsOK(ecode2)) {
37626  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_maintain_direct_map_set" "', argument " "2"" of type '" "bool""'");
37627  }
37628  arg2 = static_cast< bool >(val2);
37629  if (arg1) (arg1)->maintain_direct_map = arg2;
37630  resultobj = SWIG_Py_Void();
37631  return resultobj;
37632 fail:
37633  return NULL;
37634 }
37635 
37636 
37637 SWIGINTERN PyObject *_wrap_IndexIVF_maintain_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37638  PyObject *resultobj = 0;
37639  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37640  void *argp1 = 0 ;
37641  int res1 = 0 ;
37642  PyObject * obj0 = 0 ;
37643  bool result;
37644 
37645  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_maintain_direct_map_get",&obj0)) SWIG_fail;
37646  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37647  if (!SWIG_IsOK(res1)) {
37648  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_maintain_direct_map_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37649  }
37650  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37651  result = (bool) ((arg1)->maintain_direct_map);
37652  resultobj = SWIG_From_bool(static_cast< bool >(result));
37653  return resultobj;
37654 fail:
37655  return NULL;
37656 }
37657 
37658 
37659 SWIGINTERN PyObject *_wrap_IndexIVF_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37660  PyObject *resultobj = 0;
37661  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37662  std::vector< long > *arg2 = (std::vector< long > *) 0 ;
37663  void *argp1 = 0 ;
37664  int res1 = 0 ;
37665  void *argp2 = 0 ;
37666  int res2 = 0 ;
37667  PyObject * obj0 = 0 ;
37668  PyObject * obj1 = 0 ;
37669 
37670  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_direct_map_set",&obj0,&obj1)) SWIG_fail;
37671  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37672  if (!SWIG_IsOK(res1)) {
37673  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_direct_map_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37674  }
37675  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37676  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
37677  if (!SWIG_IsOK(res2)) {
37678  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_direct_map_set" "', argument " "2"" of type '" "std::vector< long > *""'");
37679  }
37680  arg2 = reinterpret_cast< std::vector< long > * >(argp2);
37681  if (arg1) (arg1)->direct_map = *arg2;
37682  resultobj = SWIG_Py_Void();
37683  return resultobj;
37684 fail:
37685  return NULL;
37686 }
37687 
37688 
37689 SWIGINTERN PyObject *_wrap_IndexIVF_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37690  PyObject *resultobj = 0;
37691  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37692  void *argp1 = 0 ;
37693  int res1 = 0 ;
37694  PyObject * obj0 = 0 ;
37695  std::vector< long > *result = 0 ;
37696 
37697  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_direct_map_get",&obj0)) SWIG_fail;
37698  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37699  if (!SWIG_IsOK(res1)) {
37700  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_direct_map_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37701  }
37702  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37703  result = (std::vector< long > *)& ((arg1)->direct_map);
37704  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
37705  return resultobj;
37706 fail:
37707  return NULL;
37708 }
37709 
37710 
37711 SWIGINTERN PyObject *_wrap_IndexIVF_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37712  PyObject *resultobj = 0;
37713  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37714  void *argp1 = 0 ;
37715  int res1 = 0 ;
37716  PyObject * obj0 = 0 ;
37717 
37718  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_reset",&obj0)) SWIG_fail;
37719  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37720  if (!SWIG_IsOK(res1)) {
37721  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reset" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37722  }
37723  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37724  {
37725  Py_BEGIN_ALLOW_THREADS
37726  try {
37727  (arg1)->reset();
37728  } catch(faiss::FaissException & e) {
37729  PyEval_RestoreThread(_save);
37730  PyErr_SetString(PyExc_RuntimeError, e.what());
37731  SWIG_fail;
37732  }
37733  Py_END_ALLOW_THREADS
37734  }
37735  resultobj = SWIG_Py_Void();
37736  return resultobj;
37737 fail:
37738  return NULL;
37739 }
37740 
37741 
37742 SWIGINTERN PyObject *_wrap_IndexIVF_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37743  PyObject *resultobj = 0;
37744  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37745  faiss::Index::idx_t arg2 ;
37746  float *arg3 = (float *) 0 ;
37747  void *argp1 = 0 ;
37748  int res1 = 0 ;
37749  long val2 ;
37750  int ecode2 = 0 ;
37751  void *argp3 = 0 ;
37752  int res3 = 0 ;
37753  PyObject * obj0 = 0 ;
37754  PyObject * obj1 = 0 ;
37755  PyObject * obj2 = 0 ;
37756 
37757  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_train",&obj0,&obj1,&obj2)) SWIG_fail;
37758  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37759  if (!SWIG_IsOK(res1)) {
37760  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_train" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37761  }
37762  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37763  ecode2 = SWIG_AsVal_long(obj1, &val2);
37764  if (!SWIG_IsOK(ecode2)) {
37765  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37766  }
37767  arg2 = static_cast< faiss::Index::idx_t >(val2);
37768  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37769  if (!SWIG_IsOK(res3)) {
37770  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_train" "', argument " "3"" of type '" "float const *""'");
37771  }
37772  arg3 = reinterpret_cast< float * >(argp3);
37773  {
37774  Py_BEGIN_ALLOW_THREADS
37775  try {
37776  (arg1)->train(arg2,(float const *)arg3);
37777  } catch(faiss::FaissException & e) {
37778  PyEval_RestoreThread(_save);
37779  PyErr_SetString(PyExc_RuntimeError, e.what());
37780  SWIG_fail;
37781  }
37782  Py_END_ALLOW_THREADS
37783  }
37784  resultobj = SWIG_Py_Void();
37785  return resultobj;
37786 fail:
37787  return NULL;
37788 }
37789 
37790 
37791 SWIGINTERN PyObject *_wrap_IndexIVF_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37792  PyObject *resultobj = 0;
37793  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37794  faiss::Index::idx_t arg2 ;
37795  float *arg3 = (float *) 0 ;
37796  void *argp1 = 0 ;
37797  int res1 = 0 ;
37798  long val2 ;
37799  int ecode2 = 0 ;
37800  void *argp3 = 0 ;
37801  int res3 = 0 ;
37802  PyObject * obj0 = 0 ;
37803  PyObject * obj1 = 0 ;
37804  PyObject * obj2 = 0 ;
37805 
37806  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_add",&obj0,&obj1,&obj2)) SWIG_fail;
37807  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37808  if (!SWIG_IsOK(res1)) {
37809  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_add" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37810  }
37811  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37812  ecode2 = SWIG_AsVal_long(obj1, &val2);
37813  if (!SWIG_IsOK(ecode2)) {
37814  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37815  }
37816  arg2 = static_cast< faiss::Index::idx_t >(val2);
37817  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37818  if (!SWIG_IsOK(res3)) {
37819  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_add" "', argument " "3"" of type '" "float const *""'");
37820  }
37821  arg3 = reinterpret_cast< float * >(argp3);
37822  {
37823  Py_BEGIN_ALLOW_THREADS
37824  try {
37825  (arg1)->add(arg2,(float const *)arg3);
37826  } catch(faiss::FaissException & e) {
37827  PyEval_RestoreThread(_save);
37828  PyErr_SetString(PyExc_RuntimeError, e.what());
37829  SWIG_fail;
37830  }
37831  Py_END_ALLOW_THREADS
37832  }
37833  resultobj = SWIG_Py_Void();
37834  return resultobj;
37835 fail:
37836  return NULL;
37837 }
37838 
37839 
37840 SWIGINTERN PyObject *_wrap_IndexIVF_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37841  PyObject *resultobj = 0;
37842  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37843  faiss::Index::idx_t arg2 ;
37844  float *arg3 = (float *) 0 ;
37846  uint8_t *arg5 = (uint8_t *) 0 ;
37847  void *argp1 = 0 ;
37848  int res1 = 0 ;
37849  long val2 ;
37850  int ecode2 = 0 ;
37851  void *argp3 = 0 ;
37852  int res3 = 0 ;
37853  void *argp4 = 0 ;
37854  int res4 = 0 ;
37855  void *argp5 = 0 ;
37856  int res5 = 0 ;
37857  PyObject * obj0 = 0 ;
37858  PyObject * obj1 = 0 ;
37859  PyObject * obj2 = 0 ;
37860  PyObject * obj3 = 0 ;
37861  PyObject * obj4 = 0 ;
37862 
37863  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVF_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
37864  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37865  if (!SWIG_IsOK(res1)) {
37866  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37867  }
37868  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37869  ecode2 = SWIG_AsVal_long(obj1, &val2);
37870  if (!SWIG_IsOK(ecode2)) {
37871  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37872  }
37873  arg2 = static_cast< faiss::Index::idx_t >(val2);
37874  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37875  if (!SWIG_IsOK(res3)) {
37876  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_encode_vectors" "', argument " "3"" of type '" "float const *""'");
37877  }
37878  arg3 = reinterpret_cast< float * >(argp3);
37879  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
37880  if (!SWIG_IsOK(res4)) {
37881  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVF_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
37882  }
37883  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
37884  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
37885  if (!SWIG_IsOK(res5)) {
37886  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
37887  }
37888  arg5 = reinterpret_cast< uint8_t * >(argp5);
37889  {
37890  Py_BEGIN_ALLOW_THREADS
37891  try {
37892  ((faiss::IndexIVF const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
37893  } catch(faiss::FaissException & e) {
37894  PyEval_RestoreThread(_save);
37895  PyErr_SetString(PyExc_RuntimeError, e.what());
37896  SWIG_fail;
37897  }
37898  Py_END_ALLOW_THREADS
37899  }
37900  resultobj = SWIG_Py_Void();
37901  return resultobj;
37902 fail:
37903  return NULL;
37904 }
37905 
37906 
37907 SWIGINTERN PyObject *_wrap_IndexIVF_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37908  PyObject *resultobj = 0;
37909  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37910  faiss::Index::idx_t arg2 ;
37911  float *arg3 = (float *) 0 ;
37912  void *argp1 = 0 ;
37913  int res1 = 0 ;
37914  long val2 ;
37915  int ecode2 = 0 ;
37916  void *argp3 = 0 ;
37917  int res3 = 0 ;
37918  PyObject * obj0 = 0 ;
37919  PyObject * obj1 = 0 ;
37920  PyObject * obj2 = 0 ;
37921 
37922  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
37923  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37924  if (!SWIG_IsOK(res1)) {
37925  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_train_residual" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37926  }
37927  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37928  ecode2 = SWIG_AsVal_long(obj1, &val2);
37929  if (!SWIG_IsOK(ecode2)) {
37930  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37931  }
37932  arg2 = static_cast< faiss::Index::idx_t >(val2);
37933  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37934  if (!SWIG_IsOK(res3)) {
37935  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_train_residual" "', argument " "3"" of type '" "float const *""'");
37936  }
37937  arg3 = reinterpret_cast< float * >(argp3);
37938  {
37939  Py_BEGIN_ALLOW_THREADS
37940  try {
37941  (arg1)->train_residual(arg2,(float const *)arg3);
37942  } catch(faiss::FaissException & e) {
37943  PyEval_RestoreThread(_save);
37944  PyErr_SetString(PyExc_RuntimeError, e.what());
37945  SWIG_fail;
37946  }
37947  Py_END_ALLOW_THREADS
37948  }
37949  resultobj = SWIG_Py_Void();
37950  return resultobj;
37951 fail:
37952  return NULL;
37953 }
37954 
37955 
37956 SWIGINTERN PyObject *_wrap_IndexIVF_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37957  PyObject *resultobj = 0;
37958  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37959  faiss::Index::idx_t arg2 ;
37960  float *arg3 = (float *) 0 ;
37961  faiss::Index::idx_t arg4 ;
37963  float *arg6 = (float *) 0 ;
37964  float *arg7 = (float *) 0 ;
37966  bool arg9 ;
37968  void *argp1 = 0 ;
37969  int res1 = 0 ;
37970  long val2 ;
37971  int ecode2 = 0 ;
37972  void *argp3 = 0 ;
37973  int res3 = 0 ;
37974  long val4 ;
37975  int ecode4 = 0 ;
37976  void *argp5 = 0 ;
37977  int res5 = 0 ;
37978  void *argp6 = 0 ;
37979  int res6 = 0 ;
37980  void *argp7 = 0 ;
37981  int res7 = 0 ;
37982  void *argp8 = 0 ;
37983  int res8 = 0 ;
37984  bool val9 ;
37985  int ecode9 = 0 ;
37986  void *argp10 = 0 ;
37987  int res10 = 0 ;
37988  PyObject * obj0 = 0 ;
37989  PyObject * obj1 = 0 ;
37990  PyObject * obj2 = 0 ;
37991  PyObject * obj3 = 0 ;
37992  PyObject * obj4 = 0 ;
37993  PyObject * obj5 = 0 ;
37994  PyObject * obj6 = 0 ;
37995  PyObject * obj7 = 0 ;
37996  PyObject * obj8 = 0 ;
37997  PyObject * obj9 = 0 ;
37998 
37999  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
38000  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38001  if (!SWIG_IsOK(res1)) {
38002  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38003  }
38004  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38005  ecode2 = SWIG_AsVal_long(obj1, &val2);
38006  if (!SWIG_IsOK(ecode2)) {
38007  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
38008  }
38009  arg2 = static_cast< faiss::Index::idx_t >(val2);
38010  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
38011  if (!SWIG_IsOK(res3)) {
38012  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search_preassigned" "', argument " "3"" of type '" "float const *""'");
38013  }
38014  arg3 = reinterpret_cast< float * >(argp3);
38015  ecode4 = SWIG_AsVal_long(obj3, &val4);
38016  if (!SWIG_IsOK(ecode4)) {
38017  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
38018  }
38019  arg4 = static_cast< faiss::Index::idx_t >(val4);
38020  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
38021  if (!SWIG_IsOK(res5)) {
38022  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
38023  }
38024  arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
38025  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
38026  if (!SWIG_IsOK(res6)) {
38027  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search_preassigned" "', argument " "6"" of type '" "float const *""'");
38028  }
38029  arg6 = reinterpret_cast< float * >(argp6);
38030  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
38031  if (!SWIG_IsOK(res7)) {
38032  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVF_search_preassigned" "', argument " "7"" of type '" "float *""'");
38033  }
38034  arg7 = reinterpret_cast< float * >(argp7);
38035  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
38036  if (!SWIG_IsOK(res8)) {
38037  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVF_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
38038  }
38039  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
38040  ecode9 = SWIG_AsVal_bool(obj8, &val9);
38041  if (!SWIG_IsOK(ecode9)) {
38042  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
38043  }
38044  arg9 = static_cast< bool >(val9);
38045  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
38046  if (!SWIG_IsOK(res10)) {
38047  SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexIVF_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
38048  }
38049  arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
38050  {
38051  Py_BEGIN_ALLOW_THREADS
38052  try {
38053  ((faiss::IndexIVF const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
38054  } catch(faiss::FaissException & e) {
38055  PyEval_RestoreThread(_save);
38056  PyErr_SetString(PyExc_RuntimeError, e.what());
38057  SWIG_fail;
38058  }
38059  Py_END_ALLOW_THREADS
38060  }
38061  resultobj = SWIG_Py_Void();
38062  return resultobj;
38063 fail:
38064  return NULL;
38065 }
38066 
38067 
38068 SWIGINTERN PyObject *_wrap_IndexIVF_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38069  PyObject *resultobj = 0;
38070  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38071  faiss::Index::idx_t arg2 ;
38072  float *arg3 = (float *) 0 ;
38073  faiss::Index::idx_t arg4 ;
38075  float *arg6 = (float *) 0 ;
38076  float *arg7 = (float *) 0 ;
38078  bool arg9 ;
38079  void *argp1 = 0 ;
38080  int res1 = 0 ;
38081  long val2 ;
38082  int ecode2 = 0 ;
38083  void *argp3 = 0 ;
38084  int res3 = 0 ;
38085  long val4 ;
38086  int ecode4 = 0 ;
38087  void *argp5 = 0 ;
38088  int res5 = 0 ;
38089  void *argp6 = 0 ;
38090  int res6 = 0 ;
38091  void *argp7 = 0 ;
38092  int res7 = 0 ;
38093  void *argp8 = 0 ;
38094  int res8 = 0 ;
38095  bool val9 ;
38096  int ecode9 = 0 ;
38097  PyObject * obj0 = 0 ;
38098  PyObject * obj1 = 0 ;
38099  PyObject * obj2 = 0 ;
38100  PyObject * obj3 = 0 ;
38101  PyObject * obj4 = 0 ;
38102  PyObject * obj5 = 0 ;
38103  PyObject * obj6 = 0 ;
38104  PyObject * obj7 = 0 ;
38105  PyObject * obj8 = 0 ;
38106 
38107  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
38108  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38109  if (!SWIG_IsOK(res1)) {
38110  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38111  }
38112  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38113  ecode2 = SWIG_AsVal_long(obj1, &val2);
38114  if (!SWIG_IsOK(ecode2)) {
38115  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
38116  }
38117  arg2 = static_cast< faiss::Index::idx_t >(val2);
38118  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
38119  if (!SWIG_IsOK(res3)) {
38120  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search_preassigned" "', argument " "3"" of type '" "float const *""'");
38121  }
38122  arg3 = reinterpret_cast< float * >(argp3);
38123  ecode4 = SWIG_AsVal_long(obj3, &val4);
38124  if (!SWIG_IsOK(ecode4)) {
38125  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
38126  }
38127  arg4 = static_cast< faiss::Index::idx_t >(val4);
38128  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
38129  if (!SWIG_IsOK(res5)) {
38130  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
38131  }
38132  arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
38133  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
38134  if (!SWIG_IsOK(res6)) {
38135  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search_preassigned" "', argument " "6"" of type '" "float const *""'");
38136  }
38137  arg6 = reinterpret_cast< float * >(argp6);
38138  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
38139  if (!SWIG_IsOK(res7)) {
38140  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVF_search_preassigned" "', argument " "7"" of type '" "float *""'");
38141  }
38142  arg7 = reinterpret_cast< float * >(argp7);
38143  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
38144  if (!SWIG_IsOK(res8)) {
38145  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVF_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
38146  }
38147  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
38148  ecode9 = SWIG_AsVal_bool(obj8, &val9);
38149  if (!SWIG_IsOK(ecode9)) {
38150  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
38151  }
38152  arg9 = static_cast< bool >(val9);
38153  {
38154  Py_BEGIN_ALLOW_THREADS
38155  try {
38156  ((faiss::IndexIVF const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
38157  } catch(faiss::FaissException & e) {
38158  PyEval_RestoreThread(_save);
38159  PyErr_SetString(PyExc_RuntimeError, e.what());
38160  SWIG_fail;
38161  }
38162  Py_END_ALLOW_THREADS
38163  }
38164  resultobj = SWIG_Py_Void();
38165  return resultobj;
38166 fail:
38167  return NULL;
38168 }
38169 
38170 
38171 SWIGINTERN PyObject *_wrap_IndexIVF_search_preassigned(PyObject *self, PyObject *args) {
38172  Py_ssize_t argc;
38173  PyObject *argv[11] = {
38174  0
38175  };
38176  Py_ssize_t ii;
38177 
38178  if (!PyTuple_Check(args)) SWIG_fail;
38179  argc = args ? PyObject_Length(args) : 0;
38180  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
38181  argv[ii] = PyTuple_GET_ITEM(args,ii);
38182  }
38183  if (argc == 9) {
38184  int _v;
38185  void *vptr = 0;
38186  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
38187  _v = SWIG_CheckState(res);
38188  if (_v) {
38189  {
38190  int res = SWIG_AsVal_long(argv[1], NULL);
38191  _v = SWIG_CheckState(res);
38192  }
38193  if (_v) {
38194  void *vptr = 0;
38195  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
38196  _v = SWIG_CheckState(res);
38197  if (_v) {
38198  {
38199  int res = SWIG_AsVal_long(argv[3], NULL);
38200  _v = SWIG_CheckState(res);
38201  }
38202  if (_v) {
38203  void *vptr = 0;
38204  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
38205  _v = SWIG_CheckState(res);
38206  if (_v) {
38207  void *vptr = 0;
38208  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
38209  _v = SWIG_CheckState(res);
38210  if (_v) {
38211  void *vptr = 0;
38212  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
38213  _v = SWIG_CheckState(res);
38214  if (_v) {
38215  void *vptr = 0;
38216  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
38217  _v = SWIG_CheckState(res);
38218  if (_v) {
38219  {
38220  int res = SWIG_AsVal_bool(argv[8], NULL);
38221  _v = SWIG_CheckState(res);
38222  }
38223  if (_v) {
38224  return _wrap_IndexIVF_search_preassigned__SWIG_1(self, args);
38225  }
38226  }
38227  }
38228  }
38229  }
38230  }
38231  }
38232  }
38233  }
38234  }
38235  if (argc == 10) {
38236  int _v;
38237  void *vptr = 0;
38238  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
38239  _v = SWIG_CheckState(res);
38240  if (_v) {
38241  {
38242  int res = SWIG_AsVal_long(argv[1], NULL);
38243  _v = SWIG_CheckState(res);
38244  }
38245  if (_v) {
38246  void *vptr = 0;
38247  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
38248  _v = SWIG_CheckState(res);
38249  if (_v) {
38250  {
38251  int res = SWIG_AsVal_long(argv[3], NULL);
38252  _v = SWIG_CheckState(res);
38253  }
38254  if (_v) {
38255  void *vptr = 0;
38256  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
38257  _v = SWIG_CheckState(res);
38258  if (_v) {
38259  void *vptr = 0;
38260  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
38261  _v = SWIG_CheckState(res);
38262  if (_v) {
38263  void *vptr = 0;
38264  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
38265  _v = SWIG_CheckState(res);
38266  if (_v) {
38267  void *vptr = 0;
38268  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
38269  _v = SWIG_CheckState(res);
38270  if (_v) {
38271  {
38272  int res = SWIG_AsVal_bool(argv[8], NULL);
38273  _v = SWIG_CheckState(res);
38274  }
38275  if (_v) {
38276  void *vptr = 0;
38277  int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
38278  _v = SWIG_CheckState(res);
38279  if (_v) {
38280  return _wrap_IndexIVF_search_preassigned__SWIG_0(self, args);
38281  }
38282  }
38283  }
38284  }
38285  }
38286  }
38287  }
38288  }
38289  }
38290  }
38291  }
38292 
38293 fail:
38294  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_search_preassigned'.\n"
38295  " Possible C/C++ prototypes are:\n"
38296  " faiss::IndexIVF::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
38297  " faiss::IndexIVF::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool) const\n");
38298  return 0;
38299 }
38300 
38301 
38302 SWIGINTERN PyObject *_wrap_IndexIVF_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38303  PyObject *resultobj = 0;
38304  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38305  faiss::Index::idx_t arg2 ;
38306  float *arg3 = (float *) 0 ;
38307  faiss::Index::idx_t arg4 ;
38308  float *arg5 = (float *) 0 ;
38310  void *argp1 = 0 ;
38311  int res1 = 0 ;
38312  long val2 ;
38313  int ecode2 = 0 ;
38314  void *argp3 = 0 ;
38315  int res3 = 0 ;
38316  long val4 ;
38317  int ecode4 = 0 ;
38318  void *argp5 = 0 ;
38319  int res5 = 0 ;
38320  void *argp6 = 0 ;
38321  int res6 = 0 ;
38322  PyObject * obj0 = 0 ;
38323  PyObject * obj1 = 0 ;
38324  PyObject * obj2 = 0 ;
38325  PyObject * obj3 = 0 ;
38326  PyObject * obj4 = 0 ;
38327  PyObject * obj5 = 0 ;
38328 
38329  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIVF_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
38330  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38331  if (!SWIG_IsOK(res1)) {
38332  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38333  }
38334  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38335  ecode2 = SWIG_AsVal_long(obj1, &val2);
38336  if (!SWIG_IsOK(ecode2)) {
38337  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
38338  }
38339  arg2 = static_cast< faiss::Index::idx_t >(val2);
38340  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
38341  if (!SWIG_IsOK(res3)) {
38342  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search" "', argument " "3"" of type '" "float const *""'");
38343  }
38344  arg3 = reinterpret_cast< float * >(argp3);
38345  ecode4 = SWIG_AsVal_long(obj3, &val4);
38346  if (!SWIG_IsOK(ecode4)) {
38347  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
38348  }
38349  arg4 = static_cast< faiss::Index::idx_t >(val4);
38350  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
38351  if (!SWIG_IsOK(res5)) {
38352  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search" "', argument " "5"" of type '" "float *""'");
38353  }
38354  arg5 = reinterpret_cast< float * >(argp5);
38355  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
38356  if (!SWIG_IsOK(res6)) {
38357  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
38358  }
38359  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
38360  {
38361  Py_BEGIN_ALLOW_THREADS
38362  try {
38363  ((faiss::IndexIVF const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
38364  } catch(faiss::FaissException & e) {
38365  PyEval_RestoreThread(_save);
38366  PyErr_SetString(PyExc_RuntimeError, e.what());
38367  SWIG_fail;
38368  }
38369  Py_END_ALLOW_THREADS
38370  }
38371  resultobj = SWIG_Py_Void();
38372  return resultobj;
38373 fail:
38374  return NULL;
38375 }
38376 
38377 
38378 SWIGINTERN PyObject *_wrap_IndexIVF_get_InvertedListScanner__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38379  PyObject *resultobj = 0;
38380  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38381  bool arg2 ;
38382  void *argp1 = 0 ;
38383  int res1 = 0 ;
38384  bool val2 ;
38385  int ecode2 = 0 ;
38386  PyObject * obj0 = 0 ;
38387  PyObject * obj1 = 0 ;
38388  faiss::InvertedListScanner *result = 0 ;
38389 
38390  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
38391  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38392  if (!SWIG_IsOK(res1)) {
38393  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38394  }
38395  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38396  ecode2 = SWIG_AsVal_bool(obj1, &val2);
38397  if (!SWIG_IsOK(ecode2)) {
38398  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
38399  }
38400  arg2 = static_cast< bool >(val2);
38401  {
38402  Py_BEGIN_ALLOW_THREADS
38403  try {
38404  result = (faiss::InvertedListScanner *)((faiss::IndexIVF const *)arg1)->get_InvertedListScanner(arg2);
38405  } catch(faiss::FaissException & e) {
38406  PyEval_RestoreThread(_save);
38407  PyErr_SetString(PyExc_RuntimeError, e.what());
38408  SWIG_fail;
38409  }
38410  Py_END_ALLOW_THREADS
38411  }
38412  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
38413  return resultobj;
38414 fail:
38415  return NULL;
38416 }
38417 
38418 
38419 SWIGINTERN PyObject *_wrap_IndexIVF_get_InvertedListScanner__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38420  PyObject *resultobj = 0;
38421  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38422  void *argp1 = 0 ;
38423  int res1 = 0 ;
38424  PyObject * obj0 = 0 ;
38425  faiss::InvertedListScanner *result = 0 ;
38426 
38427  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_get_InvertedListScanner",&obj0)) SWIG_fail;
38428  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38429  if (!SWIG_IsOK(res1)) {
38430  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38431  }
38432  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38433  {
38434  Py_BEGIN_ALLOW_THREADS
38435  try {
38436  result = (faiss::InvertedListScanner *)((faiss::IndexIVF const *)arg1)->get_InvertedListScanner();
38437  } catch(faiss::FaissException & e) {
38438  PyEval_RestoreThread(_save);
38439  PyErr_SetString(PyExc_RuntimeError, e.what());
38440  SWIG_fail;
38441  }
38442  Py_END_ALLOW_THREADS
38443  }
38444  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
38445  return resultobj;
38446 fail:
38447  return NULL;
38448 }
38449 
38450 
38451 SWIGINTERN PyObject *_wrap_IndexIVF_get_InvertedListScanner(PyObject *self, PyObject *args) {
38452  Py_ssize_t argc;
38453  PyObject *argv[3] = {
38454  0
38455  };
38456  Py_ssize_t ii;
38457 
38458  if (!PyTuple_Check(args)) SWIG_fail;
38459  argc = args ? PyObject_Length(args) : 0;
38460  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
38461  argv[ii] = PyTuple_GET_ITEM(args,ii);
38462  }
38463  if (argc == 1) {
38464  int _v;
38465  void *vptr = 0;
38466  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
38467  _v = SWIG_CheckState(res);
38468  if (_v) {
38469  return _wrap_IndexIVF_get_InvertedListScanner__SWIG_1(self, args);
38470  }
38471  }
38472  if (argc == 2) {
38473  int _v;
38474  void *vptr = 0;
38475  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
38476  _v = SWIG_CheckState(res);
38477  if (_v) {
38478  {
38479  int res = SWIG_AsVal_bool(argv[1], NULL);
38480  _v = SWIG_CheckState(res);
38481  }
38482  if (_v) {
38483  return _wrap_IndexIVF_get_InvertedListScanner__SWIG_0(self, args);
38484  }
38485  }
38486  }
38487 
38488 fail:
38489  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_get_InvertedListScanner'.\n"
38490  " Possible C/C++ prototypes are:\n"
38491  " faiss::IndexIVF::get_InvertedListScanner(bool) const\n"
38492  " faiss::IndexIVF::get_InvertedListScanner() const\n");
38493  return 0;
38494 }
38495 
38496 
38497 SWIGINTERN PyObject *_wrap_IndexIVF_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38498  PyObject *resultobj = 0;
38499  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38500  faiss::Index::idx_t arg2 ;
38501  float *arg3 = (float *) 0 ;
38502  void *argp1 = 0 ;
38503  int res1 = 0 ;
38504  long val2 ;
38505  int ecode2 = 0 ;
38506  void *argp3 = 0 ;
38507  int res3 = 0 ;
38508  PyObject * obj0 = 0 ;
38509  PyObject * obj1 = 0 ;
38510  PyObject * obj2 = 0 ;
38511 
38512  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
38513  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38514  if (!SWIG_IsOK(res1)) {
38515  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reconstruct" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38516  }
38517  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38518  ecode2 = SWIG_AsVal_long(obj1, &val2);
38519  if (!SWIG_IsOK(ecode2)) {
38520  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
38521  }
38522  arg2 = static_cast< faiss::Index::idx_t >(val2);
38523  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
38524  if (!SWIG_IsOK(res3)) {
38525  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_reconstruct" "', argument " "3"" of type '" "float *""'");
38526  }
38527  arg3 = reinterpret_cast< float * >(argp3);
38528  {
38529  Py_BEGIN_ALLOW_THREADS
38530  try {
38531  ((faiss::IndexIVF const *)arg1)->reconstruct(arg2,arg3);
38532  } catch(faiss::FaissException & e) {
38533  PyEval_RestoreThread(_save);
38534  PyErr_SetString(PyExc_RuntimeError, e.what());
38535  SWIG_fail;
38536  }
38537  Py_END_ALLOW_THREADS
38538  }
38539  resultobj = SWIG_Py_Void();
38540  return resultobj;
38541 fail:
38542  return NULL;
38543 }
38544 
38545 
38546 SWIGINTERN PyObject *_wrap_IndexIVF_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38547  PyObject *resultobj = 0;
38548  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38549  faiss::Index::idx_t arg2 ;
38550  faiss::Index::idx_t arg3 ;
38551  float *arg4 = (float *) 0 ;
38552  void *argp1 = 0 ;
38553  int res1 = 0 ;
38554  long val2 ;
38555  int ecode2 = 0 ;
38556  long val3 ;
38557  int ecode3 = 0 ;
38558  void *argp4 = 0 ;
38559  int res4 = 0 ;
38560  PyObject * obj0 = 0 ;
38561  PyObject * obj1 = 0 ;
38562  PyObject * obj2 = 0 ;
38563  PyObject * obj3 = 0 ;
38564 
38565  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVF_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
38566  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38567  if (!SWIG_IsOK(res1)) {
38568  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38569  }
38570  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38571  ecode2 = SWIG_AsVal_long(obj1, &val2);
38572  if (!SWIG_IsOK(ecode2)) {
38573  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
38574  }
38575  arg2 = static_cast< faiss::Index::idx_t >(val2);
38576  ecode3 = SWIG_AsVal_long(obj2, &val3);
38577  if (!SWIG_IsOK(ecode3)) {
38578  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
38579  }
38580  arg3 = static_cast< faiss::Index::idx_t >(val3);
38581  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
38582  if (!SWIG_IsOK(res4)) {
38583  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVF_reconstruct_n" "', argument " "4"" of type '" "float *""'");
38584  }
38585  arg4 = reinterpret_cast< float * >(argp4);
38586  {
38587  Py_BEGIN_ALLOW_THREADS
38588  try {
38589  ((faiss::IndexIVF const *)arg1)->reconstruct_n(arg2,arg3,arg4);
38590  } catch(faiss::FaissException & e) {
38591  PyEval_RestoreThread(_save);
38592  PyErr_SetString(PyExc_RuntimeError, e.what());
38593  SWIG_fail;
38594  }
38595  Py_END_ALLOW_THREADS
38596  }
38597  resultobj = SWIG_Py_Void();
38598  return resultobj;
38599 fail:
38600  return NULL;
38601 }
38602 
38603 
38604 SWIGINTERN PyObject *_wrap_IndexIVF_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38605  PyObject *resultobj = 0;
38606  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38607  faiss::Index::idx_t arg2 ;
38608  float *arg3 = (float *) 0 ;
38609  faiss::Index::idx_t arg4 ;
38610  float *arg5 = (float *) 0 ;
38612  float *arg7 = (float *) 0 ;
38613  void *argp1 = 0 ;
38614  int res1 = 0 ;
38615  long val2 ;
38616  int ecode2 = 0 ;
38617  void *argp3 = 0 ;
38618  int res3 = 0 ;
38619  long val4 ;
38620  int ecode4 = 0 ;
38621  void *argp5 = 0 ;
38622  int res5 = 0 ;
38623  void *argp6 = 0 ;
38624  int res6 = 0 ;
38625  void *argp7 = 0 ;
38626  int res7 = 0 ;
38627  PyObject * obj0 = 0 ;
38628  PyObject * obj1 = 0 ;
38629  PyObject * obj2 = 0 ;
38630  PyObject * obj3 = 0 ;
38631  PyObject * obj4 = 0 ;
38632  PyObject * obj5 = 0 ;
38633  PyObject * obj6 = 0 ;
38634 
38635  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexIVF_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
38636  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38637  if (!SWIG_IsOK(res1)) {
38638  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38639  }
38640  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38641  ecode2 = SWIG_AsVal_long(obj1, &val2);
38642  if (!SWIG_IsOK(ecode2)) {
38643  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
38644  }
38645  arg2 = static_cast< faiss::Index::idx_t >(val2);
38646  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
38647  if (!SWIG_IsOK(res3)) {
38648  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
38649  }
38650  arg3 = reinterpret_cast< float * >(argp3);
38651  ecode4 = SWIG_AsVal_long(obj3, &val4);
38652  if (!SWIG_IsOK(ecode4)) {
38653  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
38654  }
38655  arg4 = static_cast< faiss::Index::idx_t >(val4);
38656  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
38657  if (!SWIG_IsOK(res5)) {
38658  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
38659  }
38660  arg5 = reinterpret_cast< float * >(argp5);
38661  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
38662  if (!SWIG_IsOK(res6)) {
38663  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
38664  }
38665  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
38666  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
38667  if (!SWIG_IsOK(res7)) {
38668  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
38669  }
38670  arg7 = reinterpret_cast< float * >(argp7);
38671  {
38672  Py_BEGIN_ALLOW_THREADS
38673  try {
38674  ((faiss::IndexIVF const *)arg1)->search_and_reconstruct(arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
38675  } catch(faiss::FaissException & e) {
38676  PyEval_RestoreThread(_save);
38677  PyErr_SetString(PyExc_RuntimeError, e.what());
38678  SWIG_fail;
38679  }
38680  Py_END_ALLOW_THREADS
38681  }
38682  resultobj = SWIG_Py_Void();
38683  return resultobj;
38684 fail:
38685  return NULL;
38686 }
38687 
38688 
38689 SWIGINTERN PyObject *_wrap_IndexIVF_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38690  PyObject *resultobj = 0;
38691  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38692  long arg2 ;
38693  long arg3 ;
38694  float *arg4 = (float *) 0 ;
38695  void *argp1 = 0 ;
38696  int res1 = 0 ;
38697  long val2 ;
38698  int ecode2 = 0 ;
38699  long val3 ;
38700  int ecode3 = 0 ;
38701  void *argp4 = 0 ;
38702  int res4 = 0 ;
38703  PyObject * obj0 = 0 ;
38704  PyObject * obj1 = 0 ;
38705  PyObject * obj2 = 0 ;
38706  PyObject * obj3 = 0 ;
38707 
38708  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVF_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
38709  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38710  if (!SWIG_IsOK(res1)) {
38711  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38712  }
38713  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38714  ecode2 = SWIG_AsVal_long(obj1, &val2);
38715  if (!SWIG_IsOK(ecode2)) {
38716  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
38717  }
38718  arg2 = static_cast< long >(val2);
38719  ecode3 = SWIG_AsVal_long(obj2, &val3);
38720  if (!SWIG_IsOK(ecode3)) {
38721  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
38722  }
38723  arg3 = static_cast< long >(val3);
38724  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
38725  if (!SWIG_IsOK(res4)) {
38726  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
38727  }
38728  arg4 = reinterpret_cast< float * >(argp4);
38729  {
38730  Py_BEGIN_ALLOW_THREADS
38731  try {
38732  ((faiss::IndexIVF const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
38733  } catch(faiss::FaissException & e) {
38734  PyEval_RestoreThread(_save);
38735  PyErr_SetString(PyExc_RuntimeError, e.what());
38736  SWIG_fail;
38737  }
38738  Py_END_ALLOW_THREADS
38739  }
38740  resultobj = SWIG_Py_Void();
38741  return resultobj;
38742 fail:
38743  return NULL;
38744 }
38745 
38746 
38747 SWIGINTERN PyObject *_wrap_IndexIVF_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38748  PyObject *resultobj = 0;
38749  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38750  faiss::IDSelector *arg2 = 0 ;
38751  void *argp1 = 0 ;
38752  int res1 = 0 ;
38753  void *argp2 = 0 ;
38754  int res2 = 0 ;
38755  PyObject * obj0 = 0 ;
38756  PyObject * obj1 = 0 ;
38757  long result;
38758 
38759  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_remove_ids",&obj0,&obj1)) SWIG_fail;
38760  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38761  if (!SWIG_IsOK(res1)) {
38762  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_remove_ids" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
38763  }
38764  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38765  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
38766  if (!SWIG_IsOK(res2)) {
38767  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
38768  }
38769  if (!argp2) {
38770  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
38771  }
38772  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
38773  {
38774  Py_BEGIN_ALLOW_THREADS
38775  try {
38776  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
38777  } catch(faiss::FaissException & e) {
38778  PyEval_RestoreThread(_save);
38779  PyErr_SetString(PyExc_RuntimeError, e.what());
38780  SWIG_fail;
38781  }
38782  Py_END_ALLOW_THREADS
38783  }
38784  resultobj = SWIG_From_long(static_cast< long >(result));
38785  return resultobj;
38786 fail:
38787  return NULL;
38788 }
38789 
38790 
38791 SWIGINTERN PyObject *_wrap_IndexIVF_check_compatible_for_merge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38792  PyObject *resultobj = 0;
38793  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38794  faiss::IndexIVF *arg2 = 0 ;
38795  void *argp1 = 0 ;
38796  int res1 = 0 ;
38797  void *argp2 = 0 ;
38798  int res2 = 0 ;
38799  PyObject * obj0 = 0 ;
38800  PyObject * obj1 = 0 ;
38801 
38802  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_check_compatible_for_merge",&obj0,&obj1)) SWIG_fail;
38803  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38804  if (!SWIG_IsOK(res1)) {
38805  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_check_compatible_for_merge" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38806  }
38807  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38808  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 | 0);
38809  if (!SWIG_IsOK(res2)) {
38810  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_check_compatible_for_merge" "', argument " "2"" of type '" "faiss::IndexIVF const &""'");
38811  }
38812  if (!argp2) {
38813  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_check_compatible_for_merge" "', argument " "2"" of type '" "faiss::IndexIVF const &""'");
38814  }
38815  arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
38816  {
38817  Py_BEGIN_ALLOW_THREADS
38818  try {
38819  ((faiss::IndexIVF const *)arg1)->check_compatible_for_merge((faiss::IndexIVF const &)*arg2);
38820  } catch(faiss::FaissException & e) {
38821  PyEval_RestoreThread(_save);
38822  PyErr_SetString(PyExc_RuntimeError, e.what());
38823  SWIG_fail;
38824  }
38825  Py_END_ALLOW_THREADS
38826  }
38827  resultobj = SWIG_Py_Void();
38828  return resultobj;
38829 fail:
38830  return NULL;
38831 }
38832 
38833 
38834 SWIGINTERN PyObject *_wrap_IndexIVF_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38835  PyObject *resultobj = 0;
38836  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38837  faiss::IndexIVF *arg2 = 0 ;
38838  faiss::Index::idx_t arg3 ;
38839  void *argp1 = 0 ;
38840  int res1 = 0 ;
38841  void *argp2 = 0 ;
38842  int res2 = 0 ;
38843  long val3 ;
38844  int ecode3 = 0 ;
38845  PyObject * obj0 = 0 ;
38846  PyObject * obj1 = 0 ;
38847  PyObject * obj2 = 0 ;
38848 
38849  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
38850  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38851  if (!SWIG_IsOK(res1)) {
38852  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_merge_from" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
38853  }
38854  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38855  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 );
38856  if (!SWIG_IsOK(res2)) {
38857  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
38858  }
38859  if (!argp2) {
38860  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
38861  }
38862  arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
38863  ecode3 = SWIG_AsVal_long(obj2, &val3);
38864  if (!SWIG_IsOK(ecode3)) {
38865  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_merge_from" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
38866  }
38867  arg3 = static_cast< faiss::Index::idx_t >(val3);
38868  {
38869  Py_BEGIN_ALLOW_THREADS
38870  try {
38871  (arg1)->merge_from(*arg2,arg3);
38872  } catch(faiss::FaissException & e) {
38873  PyEval_RestoreThread(_save);
38874  PyErr_SetString(PyExc_RuntimeError, e.what());
38875  SWIG_fail;
38876  }
38877  Py_END_ALLOW_THREADS
38878  }
38879  resultobj = SWIG_Py_Void();
38880  return resultobj;
38881 fail:
38882  return NULL;
38883 }
38884 
38885 
38886 SWIGINTERN PyObject *_wrap_IndexIVF_copy_subset_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38887  PyObject *resultobj = 0;
38888  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38889  faiss::IndexIVF *arg2 = 0 ;
38890  int arg3 ;
38891  long arg4 ;
38892  long arg5 ;
38893  void *argp1 = 0 ;
38894  int res1 = 0 ;
38895  void *argp2 = 0 ;
38896  int res2 = 0 ;
38897  int val3 ;
38898  int ecode3 = 0 ;
38899  long val4 ;
38900  int ecode4 = 0 ;
38901  long val5 ;
38902  int ecode5 = 0 ;
38903  PyObject * obj0 = 0 ;
38904  PyObject * obj1 = 0 ;
38905  PyObject * obj2 = 0 ;
38906  PyObject * obj3 = 0 ;
38907  PyObject * obj4 = 0 ;
38908 
38909  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVF_copy_subset_to",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
38910  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38911  if (!SWIG_IsOK(res1)) {
38912  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_copy_subset_to" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
38913  }
38914  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38915  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 );
38916  if (!SWIG_IsOK(res2)) {
38917  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_copy_subset_to" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
38918  }
38919  if (!argp2) {
38920  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_copy_subset_to" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
38921  }
38922  arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
38923  ecode3 = SWIG_AsVal_int(obj2, &val3);
38924  if (!SWIG_IsOK(ecode3)) {
38925  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_copy_subset_to" "', argument " "3"" of type '" "int""'");
38926  }
38927  arg3 = static_cast< int >(val3);
38928  ecode4 = SWIG_AsVal_long(obj3, &val4);
38929  if (!SWIG_IsOK(ecode4)) {
38930  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_copy_subset_to" "', argument " "4"" of type '" "long""'");
38931  }
38932  arg4 = static_cast< long >(val4);
38933  ecode5 = SWIG_AsVal_long(obj4, &val5);
38934  if (!SWIG_IsOK(ecode5)) {
38935  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IndexIVF_copy_subset_to" "', argument " "5"" of type '" "long""'");
38936  }
38937  arg5 = static_cast< long >(val5);
38938  {
38939  Py_BEGIN_ALLOW_THREADS
38940  try {
38941  ((faiss::IndexIVF const *)arg1)->copy_subset_to(*arg2,arg3,arg4,arg5);
38942  } catch(faiss::FaissException & e) {
38943  PyEval_RestoreThread(_save);
38944  PyErr_SetString(PyExc_RuntimeError, e.what());
38945  SWIG_fail;
38946  }
38947  Py_END_ALLOW_THREADS
38948  }
38949  resultobj = SWIG_Py_Void();
38950  return resultobj;
38951 fail:
38952  return NULL;
38953 }
38954 
38955 
38956 SWIGINTERN PyObject *_wrap_delete_IndexIVF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38957  PyObject *resultobj = 0;
38958  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38959  void *argp1 = 0 ;
38960  int res1 = 0 ;
38961  PyObject * obj0 = 0 ;
38962 
38963  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVF",&obj0)) SWIG_fail;
38964  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, SWIG_POINTER_DISOWN | 0 );
38965  if (!SWIG_IsOK(res1)) {
38966  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVF" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
38967  }
38968  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
38969  {
38970  Py_BEGIN_ALLOW_THREADS
38971  try {
38972  delete arg1;
38973  } catch(faiss::FaissException & e) {
38974  PyEval_RestoreThread(_save);
38975  PyErr_SetString(PyExc_RuntimeError, e.what());
38976  SWIG_fail;
38977  }
38978  Py_END_ALLOW_THREADS
38979  }
38980  resultobj = SWIG_Py_Void();
38981  return resultobj;
38982 fail:
38983  return NULL;
38984 }
38985 
38986 
38987 SWIGINTERN PyObject *_wrap_IndexIVF_get_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38988  PyObject *resultobj = 0;
38989  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
38990  size_t arg2 ;
38991  void *argp1 = 0 ;
38992  int res1 = 0 ;
38993  size_t val2 ;
38994  int ecode2 = 0 ;
38995  PyObject * obj0 = 0 ;
38996  PyObject * obj1 = 0 ;
38997  size_t result;
38998 
38999  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_get_list_size",&obj0,&obj1)) SWIG_fail;
39000  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39001  if (!SWIG_IsOK(res1)) {
39002  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_get_list_size" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
39003  }
39004  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
39005  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39006  if (!SWIG_IsOK(ecode2)) {
39007  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_get_list_size" "', argument " "2"" of type '" "size_t""'");
39008  }
39009  arg2 = static_cast< size_t >(val2);
39010  {
39011  Py_BEGIN_ALLOW_THREADS
39012  try {
39013  result = (size_t)((faiss::IndexIVF const *)arg1)->get_list_size(arg2);
39014  } catch(faiss::FaissException & e) {
39015  PyEval_RestoreThread(_save);
39016  PyErr_SetString(PyExc_RuntimeError, e.what());
39017  SWIG_fail;
39018  }
39019  Py_END_ALLOW_THREADS
39020  }
39021  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
39022  return resultobj;
39023 fail:
39024  return NULL;
39025 }
39026 
39027 
39028 SWIGINTERN PyObject *_wrap_IndexIVF_make_direct_map__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39029  PyObject *resultobj = 0;
39030  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
39031  bool arg2 ;
39032  void *argp1 = 0 ;
39033  int res1 = 0 ;
39034  bool val2 ;
39035  int ecode2 = 0 ;
39036  PyObject * obj0 = 0 ;
39037  PyObject * obj1 = 0 ;
39038 
39039  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_make_direct_map",&obj0,&obj1)) SWIG_fail;
39040  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39041  if (!SWIG_IsOK(res1)) {
39042  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
39043  }
39044  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
39045  ecode2 = SWIG_AsVal_bool(obj1, &val2);
39046  if (!SWIG_IsOK(ecode2)) {
39047  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_make_direct_map" "', argument " "2"" of type '" "bool""'");
39048  }
39049  arg2 = static_cast< bool >(val2);
39050  {
39051  Py_BEGIN_ALLOW_THREADS
39052  try {
39053  (arg1)->make_direct_map(arg2);
39054  } catch(faiss::FaissException & e) {
39055  PyEval_RestoreThread(_save);
39056  PyErr_SetString(PyExc_RuntimeError, e.what());
39057  SWIG_fail;
39058  }
39059  Py_END_ALLOW_THREADS
39060  }
39061  resultobj = SWIG_Py_Void();
39062  return resultobj;
39063 fail:
39064  return NULL;
39065 }
39066 
39067 
39068 SWIGINTERN PyObject *_wrap_IndexIVF_make_direct_map__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39069  PyObject *resultobj = 0;
39070  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
39071  void *argp1 = 0 ;
39072  int res1 = 0 ;
39073  PyObject * obj0 = 0 ;
39074 
39075  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_make_direct_map",&obj0)) SWIG_fail;
39076  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39077  if (!SWIG_IsOK(res1)) {
39078  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
39079  }
39080  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
39081  {
39082  Py_BEGIN_ALLOW_THREADS
39083  try {
39084  (arg1)->make_direct_map();
39085  } catch(faiss::FaissException & e) {
39086  PyEval_RestoreThread(_save);
39087  PyErr_SetString(PyExc_RuntimeError, e.what());
39088  SWIG_fail;
39089  }
39090  Py_END_ALLOW_THREADS
39091  }
39092  resultobj = SWIG_Py_Void();
39093  return resultobj;
39094 fail:
39095  return NULL;
39096 }
39097 
39098 
39099 SWIGINTERN PyObject *_wrap_IndexIVF_make_direct_map(PyObject *self, PyObject *args) {
39100  Py_ssize_t argc;
39101  PyObject *argv[3] = {
39102  0
39103  };
39104  Py_ssize_t ii;
39105 
39106  if (!PyTuple_Check(args)) SWIG_fail;
39107  argc = args ? PyObject_Length(args) : 0;
39108  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
39109  argv[ii] = PyTuple_GET_ITEM(args,ii);
39110  }
39111  if (argc == 1) {
39112  int _v;
39113  void *vptr = 0;
39114  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
39115  _v = SWIG_CheckState(res);
39116  if (_v) {
39117  return _wrap_IndexIVF_make_direct_map__SWIG_1(self, args);
39118  }
39119  }
39120  if (argc == 2) {
39121  int _v;
39122  void *vptr = 0;
39123  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
39124  _v = SWIG_CheckState(res);
39125  if (_v) {
39126  {
39127  int res = SWIG_AsVal_bool(argv[1], NULL);
39128  _v = SWIG_CheckState(res);
39129  }
39130  if (_v) {
39131  return _wrap_IndexIVF_make_direct_map__SWIG_0(self, args);
39132  }
39133  }
39134  }
39135 
39136 fail:
39137  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_make_direct_map'.\n"
39138  " Possible C/C++ prototypes are:\n"
39139  " faiss::IndexIVF::make_direct_map(bool)\n"
39140  " faiss::IndexIVF::make_direct_map()\n");
39141  return 0;
39142 }
39143 
39144 
39145 SWIGINTERN PyObject *_wrap_IndexIVF_imbalance_factor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39146  PyObject *resultobj = 0;
39147  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
39148  void *argp1 = 0 ;
39149  int res1 = 0 ;
39150  PyObject * obj0 = 0 ;
39151  double result;
39152 
39153  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_imbalance_factor",&obj0)) SWIG_fail;
39154  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39155  if (!SWIG_IsOK(res1)) {
39156  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_imbalance_factor" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
39157  }
39158  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
39159  {
39160  Py_BEGIN_ALLOW_THREADS
39161  try {
39162  result = (double)((faiss::IndexIVF const *)arg1)->imbalance_factor();
39163  } catch(faiss::FaissException & e) {
39164  PyEval_RestoreThread(_save);
39165  PyErr_SetString(PyExc_RuntimeError, e.what());
39166  SWIG_fail;
39167  }
39168  Py_END_ALLOW_THREADS
39169  }
39170  resultobj = SWIG_From_double(static_cast< double >(result));
39171  return resultobj;
39172 fail:
39173  return NULL;
39174 }
39175 
39176 
39177 SWIGINTERN PyObject *_wrap_IndexIVF_print_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39178  PyObject *resultobj = 0;
39179  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
39180  void *argp1 = 0 ;
39181  int res1 = 0 ;
39182  PyObject * obj0 = 0 ;
39183 
39184  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_print_stats",&obj0)) SWIG_fail;
39185  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39186  if (!SWIG_IsOK(res1)) {
39187  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_print_stats" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
39188  }
39189  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
39190  {
39191  Py_BEGIN_ALLOW_THREADS
39192  try {
39193  ((faiss::IndexIVF const *)arg1)->print_stats();
39194  } catch(faiss::FaissException & e) {
39195  PyEval_RestoreThread(_save);
39196  PyErr_SetString(PyExc_RuntimeError, e.what());
39197  SWIG_fail;
39198  }
39199  Py_END_ALLOW_THREADS
39200  }
39201  resultobj = SWIG_Py_Void();
39202  return resultobj;
39203 fail:
39204  return NULL;
39205 }
39206 
39207 
39208 SWIGINTERN PyObject *_wrap_IndexIVF_replace_invlists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39209  PyObject *resultobj = 0;
39210  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
39212  bool arg3 ;
39213  void *argp1 = 0 ;
39214  int res1 = 0 ;
39215  void *argp2 = 0 ;
39216  int res2 = 0 ;
39217  bool val3 ;
39218  int ecode3 = 0 ;
39219  PyObject * obj0 = 0 ;
39220  PyObject * obj1 = 0 ;
39221  PyObject * obj2 = 0 ;
39222 
39223  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_replace_invlists",&obj0,&obj1,&obj2)) SWIG_fail;
39224  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39225  if (!SWIG_IsOK(res1)) {
39226  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
39227  }
39228  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
39229  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
39230  if (!SWIG_IsOK(res2)) {
39231  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
39232  }
39233  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
39234  ecode3 = SWIG_AsVal_bool(obj2, &val3);
39235  if (!SWIG_IsOK(ecode3)) {
39236  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_replace_invlists" "', argument " "3"" of type '" "bool""'");
39237  }
39238  arg3 = static_cast< bool >(val3);
39239  {
39240  Py_BEGIN_ALLOW_THREADS
39241  try {
39242  (arg1)->replace_invlists(arg2,arg3);
39243  } catch(faiss::FaissException & e) {
39244  PyEval_RestoreThread(_save);
39245  PyErr_SetString(PyExc_RuntimeError, e.what());
39246  SWIG_fail;
39247  }
39248  Py_END_ALLOW_THREADS
39249  }
39250  resultobj = SWIG_Py_Void();
39251  return resultobj;
39252 fail:
39253  return NULL;
39254 }
39255 
39256 
39257 SWIGINTERN PyObject *_wrap_IndexIVF_replace_invlists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39258  PyObject *resultobj = 0;
39259  faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
39261  void *argp1 = 0 ;
39262  int res1 = 0 ;
39263  void *argp2 = 0 ;
39264  int res2 = 0 ;
39265  PyObject * obj0 = 0 ;
39266  PyObject * obj1 = 0 ;
39267 
39268  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_replace_invlists",&obj0,&obj1)) SWIG_fail;
39269  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39270  if (!SWIG_IsOK(res1)) {
39271  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
39272  }
39273  arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
39274  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
39275  if (!SWIG_IsOK(res2)) {
39276  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
39277  }
39278  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
39279  {
39280  Py_BEGIN_ALLOW_THREADS
39281  try {
39282  (arg1)->replace_invlists(arg2);
39283  } catch(faiss::FaissException & e) {
39284  PyEval_RestoreThread(_save);
39285  PyErr_SetString(PyExc_RuntimeError, e.what());
39286  SWIG_fail;
39287  }
39288  Py_END_ALLOW_THREADS
39289  }
39290  resultobj = SWIG_Py_Void();
39291  return resultobj;
39292 fail:
39293  return NULL;
39294 }
39295 
39296 
39297 SWIGINTERN PyObject *_wrap_IndexIVF_replace_invlists(PyObject *self, PyObject *args) {
39298  Py_ssize_t argc;
39299  PyObject *argv[4] = {
39300  0
39301  };
39302  Py_ssize_t ii;
39303 
39304  if (!PyTuple_Check(args)) SWIG_fail;
39305  argc = args ? PyObject_Length(args) : 0;
39306  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
39307  argv[ii] = PyTuple_GET_ITEM(args,ii);
39308  }
39309  if (argc == 2) {
39310  int _v;
39311  void *vptr = 0;
39312  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
39313  _v = SWIG_CheckState(res);
39314  if (_v) {
39315  void *vptr = 0;
39316  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
39317  _v = SWIG_CheckState(res);
39318  if (_v) {
39319  return _wrap_IndexIVF_replace_invlists__SWIG_1(self, args);
39320  }
39321  }
39322  }
39323  if (argc == 3) {
39324  int _v;
39325  void *vptr = 0;
39326  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
39327  _v = SWIG_CheckState(res);
39328  if (_v) {
39329  void *vptr = 0;
39330  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
39331  _v = SWIG_CheckState(res);
39332  if (_v) {
39333  {
39334  int res = SWIG_AsVal_bool(argv[2], NULL);
39335  _v = SWIG_CheckState(res);
39336  }
39337  if (_v) {
39338  return _wrap_IndexIVF_replace_invlists__SWIG_0(self, args);
39339  }
39340  }
39341  }
39342  }
39343 
39344 fail:
39345  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_replace_invlists'.\n"
39346  " Possible C/C++ prototypes are:\n"
39347  " faiss::IndexIVF::replace_invlists(faiss::InvertedLists *,bool)\n"
39348  " faiss::IndexIVF::replace_invlists(faiss::InvertedLists *)\n");
39349  return 0;
39350 }
39351 
39352 
39353 SWIGINTERN PyObject *IndexIVF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39354  PyObject *obj;
39355  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
39356  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVF, SWIG_NewClientData(obj));
39357  return SWIG_Py_Void();
39358 }
39359 
39360 SWIGINTERN PyObject *_wrap_IndexIVFStats_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39361  PyObject *resultobj = 0;
39363  size_t arg2 ;
39364  void *argp1 = 0 ;
39365  int res1 = 0 ;
39366  size_t val2 ;
39367  int ecode2 = 0 ;
39368  PyObject * obj0 = 0 ;
39369  PyObject * obj1 = 0 ;
39370 
39371  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_nq_set",&obj0,&obj1)) SWIG_fail;
39372  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39373  if (!SWIG_IsOK(res1)) {
39374  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nq_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39375  }
39376  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39377  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39378  if (!SWIG_IsOK(ecode2)) {
39379  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_nq_set" "', argument " "2"" of type '" "size_t""'");
39380  }
39381  arg2 = static_cast< size_t >(val2);
39382  if (arg1) (arg1)->nq = arg2;
39383  resultobj = SWIG_Py_Void();
39384  return resultobj;
39385 fail:
39386  return NULL;
39387 }
39388 
39389 
39390 SWIGINTERN PyObject *_wrap_IndexIVFStats_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39391  PyObject *resultobj = 0;
39393  void *argp1 = 0 ;
39394  int res1 = 0 ;
39395  PyObject * obj0 = 0 ;
39396  size_t result;
39397 
39398  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_nq_get",&obj0)) SWIG_fail;
39399  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39400  if (!SWIG_IsOK(res1)) {
39401  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nq_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39402  }
39403  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39404  result = (size_t) ((arg1)->nq);
39405  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
39406  return resultobj;
39407 fail:
39408  return NULL;
39409 }
39410 
39411 
39412 SWIGINTERN PyObject *_wrap_IndexIVFStats_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39413  PyObject *resultobj = 0;
39415  size_t arg2 ;
39416  void *argp1 = 0 ;
39417  int res1 = 0 ;
39418  size_t val2 ;
39419  int ecode2 = 0 ;
39420  PyObject * obj0 = 0 ;
39421  PyObject * obj1 = 0 ;
39422 
39423  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_nlist_set",&obj0,&obj1)) SWIG_fail;
39424  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39425  if (!SWIG_IsOK(res1)) {
39426  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nlist_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39427  }
39428  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39429  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39430  if (!SWIG_IsOK(ecode2)) {
39431  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_nlist_set" "', argument " "2"" of type '" "size_t""'");
39432  }
39433  arg2 = static_cast< size_t >(val2);
39434  if (arg1) (arg1)->nlist = arg2;
39435  resultobj = SWIG_Py_Void();
39436  return resultobj;
39437 fail:
39438  return NULL;
39439 }
39440 
39441 
39442 SWIGINTERN PyObject *_wrap_IndexIVFStats_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39443  PyObject *resultobj = 0;
39445  void *argp1 = 0 ;
39446  int res1 = 0 ;
39447  PyObject * obj0 = 0 ;
39448  size_t result;
39449 
39450  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_nlist_get",&obj0)) SWIG_fail;
39451  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39452  if (!SWIG_IsOK(res1)) {
39453  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nlist_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39454  }
39455  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39456  result = (size_t) ((arg1)->nlist);
39457  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
39458  return resultobj;
39459 fail:
39460  return NULL;
39461 }
39462 
39463 
39464 SWIGINTERN PyObject *_wrap_IndexIVFStats_ndis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39465  PyObject *resultobj = 0;
39467  size_t arg2 ;
39468  void *argp1 = 0 ;
39469  int res1 = 0 ;
39470  size_t val2 ;
39471  int ecode2 = 0 ;
39472  PyObject * obj0 = 0 ;
39473  PyObject * obj1 = 0 ;
39474 
39475  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_ndis_set",&obj0,&obj1)) SWIG_fail;
39476  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39477  if (!SWIG_IsOK(res1)) {
39478  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_ndis_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39479  }
39480  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39481  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39482  if (!SWIG_IsOK(ecode2)) {
39483  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_ndis_set" "', argument " "2"" of type '" "size_t""'");
39484  }
39485  arg2 = static_cast< size_t >(val2);
39486  if (arg1) (arg1)->ndis = arg2;
39487  resultobj = SWIG_Py_Void();
39488  return resultobj;
39489 fail:
39490  return NULL;
39491 }
39492 
39493 
39494 SWIGINTERN PyObject *_wrap_IndexIVFStats_ndis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39495  PyObject *resultobj = 0;
39497  void *argp1 = 0 ;
39498  int res1 = 0 ;
39499  PyObject * obj0 = 0 ;
39500  size_t result;
39501 
39502  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_ndis_get",&obj0)) SWIG_fail;
39503  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39504  if (!SWIG_IsOK(res1)) {
39505  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_ndis_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39506  }
39507  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39508  result = (size_t) ((arg1)->ndis);
39509  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
39510  return resultobj;
39511 fail:
39512  return NULL;
39513 }
39514 
39515 
39516 SWIGINTERN PyObject *_wrap_IndexIVFStats_nheap_updates_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39517  PyObject *resultobj = 0;
39519  size_t arg2 ;
39520  void *argp1 = 0 ;
39521  int res1 = 0 ;
39522  size_t val2 ;
39523  int ecode2 = 0 ;
39524  PyObject * obj0 = 0 ;
39525  PyObject * obj1 = 0 ;
39526 
39527  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_nheap_updates_set",&obj0,&obj1)) SWIG_fail;
39528  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39529  if (!SWIG_IsOK(res1)) {
39530  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nheap_updates_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39531  }
39532  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39533  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39534  if (!SWIG_IsOK(ecode2)) {
39535  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_nheap_updates_set" "', argument " "2"" of type '" "size_t""'");
39536  }
39537  arg2 = static_cast< size_t >(val2);
39538  if (arg1) (arg1)->nheap_updates = arg2;
39539  resultobj = SWIG_Py_Void();
39540  return resultobj;
39541 fail:
39542  return NULL;
39543 }
39544 
39545 
39546 SWIGINTERN PyObject *_wrap_IndexIVFStats_nheap_updates_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39547  PyObject *resultobj = 0;
39549  void *argp1 = 0 ;
39550  int res1 = 0 ;
39551  PyObject * obj0 = 0 ;
39552  size_t result;
39553 
39554  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_nheap_updates_get",&obj0)) SWIG_fail;
39555  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39556  if (!SWIG_IsOK(res1)) {
39557  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nheap_updates_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39558  }
39559  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39560  result = (size_t) ((arg1)->nheap_updates);
39561  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
39562  return resultobj;
39563 fail:
39564  return NULL;
39565 }
39566 
39567 
39568 SWIGINTERN PyObject *_wrap_new_IndexIVFStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39569  PyObject *resultobj = 0;
39570  faiss::IndexIVFStats *result = 0 ;
39571 
39572  if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFStats")) SWIG_fail;
39573  {
39574  Py_BEGIN_ALLOW_THREADS
39575  try {
39576  result = (faiss::IndexIVFStats *)new faiss::IndexIVFStats();
39577  } catch(faiss::FaissException & e) {
39578  PyEval_RestoreThread(_save);
39579  PyErr_SetString(PyExc_RuntimeError, e.what());
39580  SWIG_fail;
39581  }
39582  Py_END_ALLOW_THREADS
39583  }
39584  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFStats, SWIG_POINTER_NEW | 0 );
39585  return resultobj;
39586 fail:
39587  return NULL;
39588 }
39589 
39590 
39591 SWIGINTERN PyObject *_wrap_IndexIVFStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39592  PyObject *resultobj = 0;
39594  void *argp1 = 0 ;
39595  int res1 = 0 ;
39596  PyObject * obj0 = 0 ;
39597 
39598  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_reset",&obj0)) SWIG_fail;
39599  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
39600  if (!SWIG_IsOK(res1)) {
39601  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_reset" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39602  }
39603  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39604  {
39605  Py_BEGIN_ALLOW_THREADS
39606  try {
39607  (arg1)->reset();
39608  } catch(faiss::FaissException & e) {
39609  PyEval_RestoreThread(_save);
39610  PyErr_SetString(PyExc_RuntimeError, e.what());
39611  SWIG_fail;
39612  }
39613  Py_END_ALLOW_THREADS
39614  }
39615  resultobj = SWIG_Py_Void();
39616  return resultobj;
39617 fail:
39618  return NULL;
39619 }
39620 
39621 
39622 SWIGINTERN PyObject *_wrap_delete_IndexIVFStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39623  PyObject *resultobj = 0;
39625  void *argp1 = 0 ;
39626  int res1 = 0 ;
39627  PyObject * obj0 = 0 ;
39628 
39629  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFStats",&obj0)) SWIG_fail;
39630  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, SWIG_POINTER_DISOWN | 0 );
39631  if (!SWIG_IsOK(res1)) {
39632  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFStats" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
39633  }
39634  arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
39635  delete arg1;
39636  resultobj = SWIG_Py_Void();
39637  return resultobj;
39638 fail:
39639  return NULL;
39640 }
39641 
39642 
39643 SWIGINTERN PyObject *IndexIVFStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39644  PyObject *obj;
39645  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
39646  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFStats, SWIG_NewClientData(obj));
39647  return SWIG_Py_Void();
39648 }
39649 
39650 SWIGINTERN int Swig_var_indexIVF_stats_set(PyObject *_val) {
39651  {
39652  void *argp = 0;
39653  int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0);
39654  if (!SWIG_IsOK(res)) {
39655  SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::indexIVF_stats""' of type '""faiss::IndexIVFStats""'");
39656  }
39657  if (!argp) {
39658  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::indexIVF_stats""' of type '""faiss::IndexIVFStats""'");
39659  } else {
39660  faiss::IndexIVFStats * temp;
39661  temp = reinterpret_cast< faiss::IndexIVFStats * >(argp);
39662  faiss::indexIVF_stats = *temp;
39663  if (SWIG_IsNewObj(res)) delete temp;
39664  }
39665  }
39666  return 0;
39667 fail:
39668  return 1;
39669 }
39670 
39671 
39672 SWIGINTERN PyObject *Swig_var_indexIVF_stats_get(void) {
39673  PyObject *pyobj = 0;
39674 
39675  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::indexIVF_stats), SWIGTYPE_p_faiss__IndexIVFStats, 0 );
39676  return pyobj;
39677 }
39678 
39679 
39680 SWIGINTERN PyObject *_wrap_check_compatible_for_merge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39681  PyObject *resultobj = 0;
39682  faiss::Index *arg1 = (faiss::Index *) 0 ;
39683  faiss::Index *arg2 = (faiss::Index *) 0 ;
39684  void *argp1 = 0 ;
39685  int res1 = 0 ;
39686  void *argp2 = 0 ;
39687  int res2 = 0 ;
39688  PyObject * obj0 = 0 ;
39689  PyObject * obj1 = 0 ;
39690 
39691  if (!PyArg_ParseTuple(args,(char *)"OO:check_compatible_for_merge",&obj0,&obj1)) SWIG_fail;
39692  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39693  if (!SWIG_IsOK(res1)) {
39694  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "check_compatible_for_merge" "', argument " "1"" of type '" "faiss::Index const *""'");
39695  }
39696  arg1 = reinterpret_cast< faiss::Index * >(argp1);
39697  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
39698  if (!SWIG_IsOK(res2)) {
39699  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "check_compatible_for_merge" "', argument " "2"" of type '" "faiss::Index const *""'");
39700  }
39701  arg2 = reinterpret_cast< faiss::Index * >(argp2);
39702  {
39703  Py_BEGIN_ALLOW_THREADS
39704  try {
39705  faiss::ivflib::check_compatible_for_merge((faiss::Index const *)arg1,(faiss::Index const *)arg2);
39706  } catch(faiss::FaissException & e) {
39707  PyEval_RestoreThread(_save);
39708  PyErr_SetString(PyExc_RuntimeError, e.what());
39709  SWIG_fail;
39710  }
39711  Py_END_ALLOW_THREADS
39712  }
39713  resultobj = SWIG_Py_Void();
39714  return resultobj;
39715 fail:
39716  return NULL;
39717 }
39718 
39719 
39720 SWIGINTERN PyObject *_wrap_extract_index_ivf__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39721  PyObject *resultobj = 0;
39722  faiss::Index *arg1 = (faiss::Index *) 0 ;
39723  void *argp1 = 0 ;
39724  int res1 = 0 ;
39725  PyObject * obj0 = 0 ;
39726  faiss::IndexIVF *result = 0 ;
39727 
39728  if (!PyArg_ParseTuple(args,(char *)"O:extract_index_ivf",&obj0)) SWIG_fail;
39729  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39730  if (!SWIG_IsOK(res1)) {
39731  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "extract_index_ivf" "', argument " "1"" of type '" "faiss::Index const *""'");
39732  }
39733  arg1 = reinterpret_cast< faiss::Index * >(argp1);
39734  {
39735  Py_BEGIN_ALLOW_THREADS
39736  try {
39737  result = (faiss::IndexIVF *)faiss::ivflib::extract_index_ivf((faiss::Index const *)arg1);
39738  } catch(faiss::FaissException & e) {
39739  PyEval_RestoreThread(_save);
39740  PyErr_SetString(PyExc_RuntimeError, e.what());
39741  SWIG_fail;
39742  }
39743  Py_END_ALLOW_THREADS
39744  }
39745  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39746  return resultobj;
39747 fail:
39748  return NULL;
39749 }
39750 
39751 
39752 SWIGINTERN PyObject *_wrap_extract_index_ivf__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39753  PyObject *resultobj = 0;
39754  faiss::Index *arg1 = (faiss::Index *) 0 ;
39755  void *argp1 = 0 ;
39756  int res1 = 0 ;
39757  PyObject * obj0 = 0 ;
39758  faiss::IndexIVF *result = 0 ;
39759 
39760  if (!PyArg_ParseTuple(args,(char *)"O:extract_index_ivf",&obj0)) SWIG_fail;
39761  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39762  if (!SWIG_IsOK(res1)) {
39763  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "extract_index_ivf" "', argument " "1"" of type '" "faiss::Index *""'");
39764  }
39765  arg1 = reinterpret_cast< faiss::Index * >(argp1);
39766  {
39767  Py_BEGIN_ALLOW_THREADS
39768  try {
39769  result = (faiss::IndexIVF *)faiss::ivflib::extract_index_ivf(arg1);
39770  } catch(faiss::FaissException & e) {
39771  PyEval_RestoreThread(_save);
39772  PyErr_SetString(PyExc_RuntimeError, e.what());
39773  SWIG_fail;
39774  }
39775  Py_END_ALLOW_THREADS
39776  }
39777  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
39778  return resultobj;
39779 fail:
39780  return NULL;
39781 }
39782 
39783 
39784 SWIGINTERN PyObject *_wrap_extract_index_ivf(PyObject *self, PyObject *args) {
39785  Py_ssize_t argc;
39786  PyObject *argv[2] = {
39787  0
39788  };
39789  Py_ssize_t ii;
39790 
39791  if (!PyTuple_Check(args)) SWIG_fail;
39792  argc = args ? PyObject_Length(args) : 0;
39793  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
39794  argv[ii] = PyTuple_GET_ITEM(args,ii);
39795  }
39796  if (argc == 1) {
39797  int _v;
39798  void *vptr = 0;
39799  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
39800  _v = SWIG_CheckState(res);
39801  if (_v) {
39802  return _wrap_extract_index_ivf__SWIG_0(self, args);
39803  }
39804  }
39805  if (argc == 1) {
39806  int _v;
39807  void *vptr = 0;
39808  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
39809  _v = SWIG_CheckState(res);
39810  if (_v) {
39811  return _wrap_extract_index_ivf__SWIG_1(self, args);
39812  }
39813  }
39814 
39815 fail:
39816  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'extract_index_ivf'.\n"
39817  " Possible C/C++ prototypes are:\n"
39818  " faiss::ivflib::extract_index_ivf(faiss::Index const *)\n"
39819  " faiss::ivflib::extract_index_ivf(faiss::Index *)\n");
39820  return 0;
39821 }
39822 
39823 
39824 SWIGINTERN PyObject *_wrap_merge_into(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39825  PyObject *resultobj = 0;
39826  faiss::Index *arg1 = (faiss::Index *) 0 ;
39827  faiss::Index *arg2 = (faiss::Index *) 0 ;
39828  bool arg3 ;
39829  void *argp1 = 0 ;
39830  int res1 = 0 ;
39831  void *argp2 = 0 ;
39832  int res2 = 0 ;
39833  bool val3 ;
39834  int ecode3 = 0 ;
39835  PyObject * obj0 = 0 ;
39836  PyObject * obj1 = 0 ;
39837  PyObject * obj2 = 0 ;
39838 
39839  if (!PyArg_ParseTuple(args,(char *)"OOO:merge_into",&obj0,&obj1,&obj2)) SWIG_fail;
39840  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39841  if (!SWIG_IsOK(res1)) {
39842  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "merge_into" "', argument " "1"" of type '" "faiss::Index *""'");
39843  }
39844  arg1 = reinterpret_cast< faiss::Index * >(argp1);
39845  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
39846  if (!SWIG_IsOK(res2)) {
39847  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "merge_into" "', argument " "2"" of type '" "faiss::Index *""'");
39848  }
39849  arg2 = reinterpret_cast< faiss::Index * >(argp2);
39850  ecode3 = SWIG_AsVal_bool(obj2, &val3);
39851  if (!SWIG_IsOK(ecode3)) {
39852  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "merge_into" "', argument " "3"" of type '" "bool""'");
39853  }
39854  arg3 = static_cast< bool >(val3);
39855  {
39856  Py_BEGIN_ALLOW_THREADS
39857  try {
39858  faiss::ivflib::merge_into(arg1,arg2,arg3);
39859  } catch(faiss::FaissException & e) {
39860  PyEval_RestoreThread(_save);
39861  PyErr_SetString(PyExc_RuntimeError, e.what());
39862  SWIG_fail;
39863  }
39864  Py_END_ALLOW_THREADS
39865  }
39866  resultobj = SWIG_Py_Void();
39867  return resultobj;
39868 fail:
39869  return NULL;
39870 }
39871 
39872 
39873 SWIGINTERN PyObject *_wrap_search_centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39874  PyObject *resultobj = 0;
39875  faiss::Index *arg1 = (faiss::Index *) 0 ;
39876  float *arg2 = (float *) 0 ;
39877  int arg3 ;
39878  faiss::ivflib::idx_t *arg4 = (faiss::ivflib::idx_t *) 0 ;
39879  void *argp1 = 0 ;
39880  int res1 = 0 ;
39881  void *argp2 = 0 ;
39882  int res2 = 0 ;
39883  int val3 ;
39884  int ecode3 = 0 ;
39885  void *argp4 = 0 ;
39886  int res4 = 0 ;
39887  PyObject * obj0 = 0 ;
39888  PyObject * obj1 = 0 ;
39889  PyObject * obj2 = 0 ;
39890  PyObject * obj3 = 0 ;
39891 
39892  if (!PyArg_ParseTuple(args,(char *)"OOOO:search_centroid",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
39893  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39894  if (!SWIG_IsOK(res1)) {
39895  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "search_centroid" "', argument " "1"" of type '" "faiss::Index *""'");
39896  }
39897  arg1 = reinterpret_cast< faiss::Index * >(argp1);
39898  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
39899  if (!SWIG_IsOK(res2)) {
39900  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "search_centroid" "', argument " "2"" of type '" "float const *""'");
39901  }
39902  arg2 = reinterpret_cast< float * >(argp2);
39903  ecode3 = SWIG_AsVal_int(obj2, &val3);
39904  if (!SWIG_IsOK(ecode3)) {
39905  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "search_centroid" "', argument " "3"" of type '" "int""'");
39906  }
39907  arg3 = static_cast< int >(val3);
39908  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
39909  if (!SWIG_IsOK(res4)) {
39910  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "search_centroid" "', argument " "4"" of type '" "faiss::ivflib::idx_t *""'");
39911  }
39912  arg4 = reinterpret_cast< faiss::ivflib::idx_t * >(argp4);
39913  {
39914  Py_BEGIN_ALLOW_THREADS
39915  try {
39916  faiss::ivflib::search_centroid(arg1,(float const *)arg2,arg3,arg4);
39917  } catch(faiss::FaissException & e) {
39918  PyEval_RestoreThread(_save);
39919  PyErr_SetString(PyExc_RuntimeError, e.what());
39920  SWIG_fail;
39921  }
39922  Py_END_ALLOW_THREADS
39923  }
39924  resultobj = SWIG_Py_Void();
39925  return resultobj;
39926 fail:
39927  return NULL;
39928 }
39929 
39930 
39931 SWIGINTERN PyObject *_wrap_search_and_return_centroids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39932  PyObject *resultobj = 0;
39933  faiss::Index *arg1 = (faiss::Index *) 0 ;
39934  size_t arg2 ;
39935  float *arg3 = (float *) 0 ;
39936  long arg4 ;
39937  float *arg5 = (float *) 0 ;
39938  faiss::ivflib::idx_t *arg6 = (faiss::ivflib::idx_t *) 0 ;
39939  faiss::ivflib::idx_t *arg7 = (faiss::ivflib::idx_t *) 0 ;
39940  faiss::ivflib::idx_t *arg8 = (faiss::ivflib::idx_t *) 0 ;
39941  void *argp1 = 0 ;
39942  int res1 = 0 ;
39943  size_t val2 ;
39944  int ecode2 = 0 ;
39945  void *argp3 = 0 ;
39946  int res3 = 0 ;
39947  long val4 ;
39948  int ecode4 = 0 ;
39949  void *argp5 = 0 ;
39950  int res5 = 0 ;
39951  void *argp6 = 0 ;
39952  int res6 = 0 ;
39953  void *argp7 = 0 ;
39954  int res7 = 0 ;
39955  void *argp8 = 0 ;
39956  int res8 = 0 ;
39957  PyObject * obj0 = 0 ;
39958  PyObject * obj1 = 0 ;
39959  PyObject * obj2 = 0 ;
39960  PyObject * obj3 = 0 ;
39961  PyObject * obj4 = 0 ;
39962  PyObject * obj5 = 0 ;
39963  PyObject * obj6 = 0 ;
39964  PyObject * obj7 = 0 ;
39965 
39966  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:search_and_return_centroids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
39967  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39968  if (!SWIG_IsOK(res1)) {
39969  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "search_and_return_centroids" "', argument " "1"" of type '" "faiss::Index *""'");
39970  }
39971  arg1 = reinterpret_cast< faiss::Index * >(argp1);
39972  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39973  if (!SWIG_IsOK(ecode2)) {
39974  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "search_and_return_centroids" "', argument " "2"" of type '" "size_t""'");
39975  }
39976  arg2 = static_cast< size_t >(val2);
39977  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
39978  if (!SWIG_IsOK(res3)) {
39979  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "search_and_return_centroids" "', argument " "3"" of type '" "float const *""'");
39980  }
39981  arg3 = reinterpret_cast< float * >(argp3);
39982  ecode4 = SWIG_AsVal_long(obj3, &val4);
39983  if (!SWIG_IsOK(ecode4)) {
39984  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "search_and_return_centroids" "', argument " "4"" of type '" "long""'");
39985  }
39986  arg4 = static_cast< long >(val4);
39987  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
39988  if (!SWIG_IsOK(res5)) {
39989  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "search_and_return_centroids" "', argument " "5"" of type '" "float *""'");
39990  }
39991  arg5 = reinterpret_cast< float * >(argp5);
39992  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
39993  if (!SWIG_IsOK(res6)) {
39994  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "search_and_return_centroids" "', argument " "6"" of type '" "faiss::ivflib::idx_t *""'");
39995  }
39996  arg6 = reinterpret_cast< faiss::ivflib::idx_t * >(argp6);
39997  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_long, 0 | 0 );
39998  if (!SWIG_IsOK(res7)) {
39999  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "search_and_return_centroids" "', argument " "7"" of type '" "faiss::ivflib::idx_t *""'");
40000  }
40001  arg7 = reinterpret_cast< faiss::ivflib::idx_t * >(argp7);
40002  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
40003  if (!SWIG_IsOK(res8)) {
40004  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "search_and_return_centroids" "', argument " "8"" of type '" "faiss::ivflib::idx_t *""'");
40005  }
40006  arg8 = reinterpret_cast< faiss::ivflib::idx_t * >(argp8);
40007  {
40008  Py_BEGIN_ALLOW_THREADS
40009  try {
40010  faiss::ivflib::search_and_return_centroids(arg1,arg2,(float const *)arg3,arg4,arg5,arg6,arg7,arg8);
40011  } catch(faiss::FaissException & e) {
40012  PyEval_RestoreThread(_save);
40013  PyErr_SetString(PyExc_RuntimeError, e.what());
40014  SWIG_fail;
40015  }
40016  Py_END_ALLOW_THREADS
40017  }
40018  resultobj = SWIG_Py_Void();
40019  return resultobj;
40020 fail:
40021  return NULL;
40022 }
40023 
40024 
40025 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40026  PyObject *resultobj = 0;
40028  faiss::Index *arg2 = (faiss::Index *) 0 ;
40029  void *argp1 = 0 ;
40030  int res1 = 0 ;
40031  void *argp2 = 0 ;
40032  int res2 = 0 ;
40033  PyObject * obj0 = 0 ;
40034  PyObject * obj1 = 0 ;
40035 
40036  if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_index_set",&obj0,&obj1)) SWIG_fail;
40037  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40038  if (!SWIG_IsOK(res1)) {
40039  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_index_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40040  }
40041  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40042  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
40043  if (!SWIG_IsOK(res2)) {
40044  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
40045  }
40046  arg2 = reinterpret_cast< faiss::Index * >(argp2);
40047  if (arg1) (arg1)->index = arg2;
40048  resultobj = SWIG_Py_Void();
40049  return resultobj;
40050 fail:
40051  return NULL;
40052 }
40053 
40054 
40055 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40056  PyObject *resultobj = 0;
40058  void *argp1 = 0 ;
40059  int res1 = 0 ;
40060  PyObject * obj0 = 0 ;
40061  faiss::Index *result = 0 ;
40062 
40063  if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_index_get",&obj0)) SWIG_fail;
40064  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40065  if (!SWIG_IsOK(res1)) {
40066  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_index_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40067  }
40068  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40069  result = (faiss::Index *) ((arg1)->index);
40070  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
40071  return resultobj;
40072 fail:
40073  return NULL;
40074 }
40075 
40076 
40077 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_ils_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40078  PyObject *resultobj = 0;
40081  void *argp1 = 0 ;
40082  int res1 = 0 ;
40083  void *argp2 = 0 ;
40084  int res2 = 0 ;
40085  PyObject * obj0 = 0 ;
40086  PyObject * obj1 = 0 ;
40087 
40088  if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_ils_set",&obj0,&obj1)) SWIG_fail;
40089  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40090  if (!SWIG_IsOK(res1)) {
40091  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_ils_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40092  }
40093  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40094  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_POINTER_DISOWN | 0 );
40095  if (!SWIG_IsOK(res2)) {
40096  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_ils_set" "', argument " "2"" of type '" "faiss::ArrayInvertedLists *""'");
40097  }
40098  arg2 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp2);
40099  if (arg1) (arg1)->ils = arg2;
40100  resultobj = SWIG_Py_Void();
40101  return resultobj;
40102 fail:
40103  return NULL;
40104 }
40105 
40106 
40107 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_ils_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40108  PyObject *resultobj = 0;
40110  void *argp1 = 0 ;
40111  int res1 = 0 ;
40112  PyObject * obj0 = 0 ;
40113  faiss::ArrayInvertedLists *result = 0 ;
40114 
40115  if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_ils_get",&obj0)) SWIG_fail;
40116  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40117  if (!SWIG_IsOK(res1)) {
40118  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_ils_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40119  }
40120  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40121  result = (faiss::ArrayInvertedLists *) ((arg1)->ils);
40122  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
40123  return resultobj;
40124 fail:
40125  return NULL;
40126 }
40127 
40128 
40129 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_n_slice_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40130  PyObject *resultobj = 0;
40132  int arg2 ;
40133  void *argp1 = 0 ;
40134  int res1 = 0 ;
40135  int val2 ;
40136  int ecode2 = 0 ;
40137  PyObject * obj0 = 0 ;
40138  PyObject * obj1 = 0 ;
40139 
40140  if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_n_slice_set",&obj0,&obj1)) SWIG_fail;
40141  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40142  if (!SWIG_IsOK(res1)) {
40143  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_n_slice_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40144  }
40145  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40146  ecode2 = SWIG_AsVal_int(obj1, &val2);
40147  if (!SWIG_IsOK(ecode2)) {
40148  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SlidingIndexWindow_n_slice_set" "', argument " "2"" of type '" "int""'");
40149  }
40150  arg2 = static_cast< int >(val2);
40151  if (arg1) (arg1)->n_slice = arg2;
40152  resultobj = SWIG_Py_Void();
40153  return resultobj;
40154 fail:
40155  return NULL;
40156 }
40157 
40158 
40159 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_n_slice_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40160  PyObject *resultobj = 0;
40162  void *argp1 = 0 ;
40163  int res1 = 0 ;
40164  PyObject * obj0 = 0 ;
40165  int result;
40166 
40167  if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_n_slice_get",&obj0)) SWIG_fail;
40168  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40169  if (!SWIG_IsOK(res1)) {
40170  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_n_slice_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40171  }
40172  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40173  result = (int) ((arg1)->n_slice);
40174  resultobj = SWIG_From_int(static_cast< int >(result));
40175  return resultobj;
40176 fail:
40177  return NULL;
40178 }
40179 
40180 
40181 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40182  PyObject *resultobj = 0;
40184  size_t arg2 ;
40185  void *argp1 = 0 ;
40186  int res1 = 0 ;
40187  size_t val2 ;
40188  int ecode2 = 0 ;
40189  PyObject * obj0 = 0 ;
40190  PyObject * obj1 = 0 ;
40191 
40192  if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_nlist_set",&obj0,&obj1)) SWIG_fail;
40193  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40194  if (!SWIG_IsOK(res1)) {
40195  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_nlist_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40196  }
40197  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40198  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
40199  if (!SWIG_IsOK(ecode2)) {
40200  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SlidingIndexWindow_nlist_set" "', argument " "2"" of type '" "size_t""'");
40201  }
40202  arg2 = static_cast< size_t >(val2);
40203  if (arg1) (arg1)->nlist = arg2;
40204  resultobj = SWIG_Py_Void();
40205  return resultobj;
40206 fail:
40207  return NULL;
40208 }
40209 
40210 
40211 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40212  PyObject *resultobj = 0;
40214  void *argp1 = 0 ;
40215  int res1 = 0 ;
40216  PyObject * obj0 = 0 ;
40217  size_t result;
40218 
40219  if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_nlist_get",&obj0)) SWIG_fail;
40220  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40221  if (!SWIG_IsOK(res1)) {
40222  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_nlist_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40223  }
40224  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40225  result = (size_t) ((arg1)->nlist);
40226  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
40227  return resultobj;
40228 fail:
40229  return NULL;
40230 }
40231 
40232 
40233 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_sizes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40234  PyObject *resultobj = 0;
40236  std::vector< std::vector< size_t > > *arg2 = (std::vector< std::vector< size_t > > *) 0 ;
40237  void *argp1 = 0 ;
40238  int res1 = 0 ;
40239  void *argp2 = 0 ;
40240  int res2 = 0 ;
40241  PyObject * obj0 = 0 ;
40242  PyObject * obj1 = 0 ;
40243 
40244  if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_sizes_set",&obj0,&obj1)) SWIG_fail;
40245  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40246  if (!SWIG_IsOK(res1)) {
40247  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_sizes_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40248  }
40249  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40250  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_long_t_t, 0 | 0 );
40251  if (!SWIG_IsOK(res2)) {
40252  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_sizes_set" "', argument " "2"" of type '" "std::vector< std::vector< size_t > > *""'");
40253  }
40254  arg2 = reinterpret_cast< std::vector< std::vector< size_t > > * >(argp2);
40255  if (arg1) (arg1)->sizes = *arg2;
40256  resultobj = SWIG_Py_Void();
40257  return resultobj;
40258 fail:
40259  return NULL;
40260 }
40261 
40262 
40263 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_sizes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40264  PyObject *resultobj = 0;
40266  void *argp1 = 0 ;
40267  int res1 = 0 ;
40268  PyObject * obj0 = 0 ;
40269  std::vector< std::vector< size_t > > *result = 0 ;
40270 
40271  if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_sizes_get",&obj0)) SWIG_fail;
40272  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40273  if (!SWIG_IsOK(res1)) {
40274  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_sizes_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40275  }
40276  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40277  result = (std::vector< std::vector< size_t > > *)& ((arg1)->sizes);
40278  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_long_t_t, 0 | 0 );
40279  return resultobj;
40280 fail:
40281  return NULL;
40282 }
40283 
40284 
40285 SWIGINTERN PyObject *_wrap_new_SlidingIndexWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40286  PyObject *resultobj = 0;
40287  faiss::Index *arg1 = (faiss::Index *) 0 ;
40288  void *argp1 = 0 ;
40289  int res1 = 0 ;
40290  PyObject * obj0 = 0 ;
40291  faiss::ivflib::SlidingIndexWindow *result = 0 ;
40292 
40293  if (!PyArg_ParseTuple(args,(char *)"O:new_SlidingIndexWindow",&obj0)) SWIG_fail;
40294  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
40295  if (!SWIG_IsOK(res1)) {
40296  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SlidingIndexWindow" "', argument " "1"" of type '" "faiss::Index *""'");
40297  }
40298  arg1 = reinterpret_cast< faiss::Index * >(argp1);
40299  {
40300  Py_BEGIN_ALLOW_THREADS
40301  try {
40303  } catch(faiss::FaissException & e) {
40304  PyEval_RestoreThread(_save);
40305  PyErr_SetString(PyExc_RuntimeError, e.what());
40306  SWIG_fail;
40307  }
40308  Py_END_ALLOW_THREADS
40309  }
40310  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, SWIG_POINTER_NEW | 0 );
40311  return resultobj;
40312 fail:
40313  return NULL;
40314 }
40315 
40316 
40317 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_step(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40318  PyObject *resultobj = 0;
40320  faiss::Index *arg2 = (faiss::Index *) 0 ;
40321  bool arg3 ;
40322  void *argp1 = 0 ;
40323  int res1 = 0 ;
40324  void *argp2 = 0 ;
40325  int res2 = 0 ;
40326  bool val3 ;
40327  int ecode3 = 0 ;
40328  PyObject * obj0 = 0 ;
40329  PyObject * obj1 = 0 ;
40330  PyObject * obj2 = 0 ;
40331 
40332  if (!PyArg_ParseTuple(args,(char *)"OOO:SlidingIndexWindow_step",&obj0,&obj1,&obj2)) SWIG_fail;
40333  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
40334  if (!SWIG_IsOK(res1)) {
40335  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_step" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40336  }
40337  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40338  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
40339  if (!SWIG_IsOK(res2)) {
40340  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_step" "', argument " "2"" of type '" "faiss::Index const *""'");
40341  }
40342  arg2 = reinterpret_cast< faiss::Index * >(argp2);
40343  ecode3 = SWIG_AsVal_bool(obj2, &val3);
40344  if (!SWIG_IsOK(ecode3)) {
40345  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SlidingIndexWindow_step" "', argument " "3"" of type '" "bool""'");
40346  }
40347  arg3 = static_cast< bool >(val3);
40348  {
40349  Py_BEGIN_ALLOW_THREADS
40350  try {
40351  (arg1)->step((faiss::Index const *)arg2,arg3);
40352  } catch(faiss::FaissException & e) {
40353  PyEval_RestoreThread(_save);
40354  PyErr_SetString(PyExc_RuntimeError, e.what());
40355  SWIG_fail;
40356  }
40357  Py_END_ALLOW_THREADS
40358  }
40359  resultobj = SWIG_Py_Void();
40360  return resultobj;
40361 fail:
40362  return NULL;
40363 }
40364 
40365 
40366 SWIGINTERN PyObject *_wrap_delete_SlidingIndexWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40367  PyObject *resultobj = 0;
40369  void *argp1 = 0 ;
40370  int res1 = 0 ;
40371  PyObject * obj0 = 0 ;
40372 
40373  if (!PyArg_ParseTuple(args,(char *)"O:delete_SlidingIndexWindow",&obj0)) SWIG_fail;
40374  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, SWIG_POINTER_DISOWN | 0 );
40375  if (!SWIG_IsOK(res1)) {
40376  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SlidingIndexWindow" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
40377  }
40378  arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
40379  delete arg1;
40380  resultobj = SWIG_Py_Void();
40381  return resultobj;
40382 fail:
40383  return NULL;
40384 }
40385 
40386 
40387 SWIGINTERN PyObject *SlidingIndexWindow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40388  PyObject *obj;
40389  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
40390  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, SWIG_NewClientData(obj));
40391  return SWIG_Py_Void();
40392 }
40393 
40394 SWIGINTERN PyObject *_wrap_get_invlist_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40395  PyObject *resultobj = 0;
40396  faiss::Index *arg1 = (faiss::Index *) 0 ;
40397  long arg2 ;
40398  long arg3 ;
40399  void *argp1 = 0 ;
40400  int res1 = 0 ;
40401  long val2 ;
40402  int ecode2 = 0 ;
40403  long val3 ;
40404  int ecode3 = 0 ;
40405  PyObject * obj0 = 0 ;
40406  PyObject * obj1 = 0 ;
40407  PyObject * obj2 = 0 ;
40408  faiss::ArrayInvertedLists *result = 0 ;
40409 
40410  if (!PyArg_ParseTuple(args,(char *)"OOO:get_invlist_range",&obj0,&obj1,&obj2)) SWIG_fail;
40411  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
40412  if (!SWIG_IsOK(res1)) {
40413  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_invlist_range" "', argument " "1"" of type '" "faiss::Index const *""'");
40414  }
40415  arg1 = reinterpret_cast< faiss::Index * >(argp1);
40416  ecode2 = SWIG_AsVal_long(obj1, &val2);
40417  if (!SWIG_IsOK(ecode2)) {
40418  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_invlist_range" "', argument " "2"" of type '" "long""'");
40419  }
40420  arg2 = static_cast< long >(val2);
40421  ecode3 = SWIG_AsVal_long(obj2, &val3);
40422  if (!SWIG_IsOK(ecode3)) {
40423  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_invlist_range" "', argument " "3"" of type '" "long""'");
40424  }
40425  arg3 = static_cast< long >(val3);
40426  {
40427  Py_BEGIN_ALLOW_THREADS
40428  try {
40429  result = (faiss::ArrayInvertedLists *)faiss::ivflib::get_invlist_range((faiss::Index const *)arg1,arg2,arg3);
40430  } catch(faiss::FaissException & e) {
40431  PyEval_RestoreThread(_save);
40432  PyErr_SetString(PyExc_RuntimeError, e.what());
40433  SWIG_fail;
40434  }
40435  Py_END_ALLOW_THREADS
40436  }
40437  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
40438  return resultobj;
40439 fail:
40440  return NULL;
40441 }
40442 
40443 
40444 SWIGINTERN PyObject *_wrap_set_invlist_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40445  PyObject *resultobj = 0;
40446  faiss::Index *arg1 = (faiss::Index *) 0 ;
40447  long arg2 ;
40448  long arg3 ;
40450  void *argp1 = 0 ;
40451  int res1 = 0 ;
40452  long val2 ;
40453  int ecode2 = 0 ;
40454  long val3 ;
40455  int ecode3 = 0 ;
40456  void *argp4 = 0 ;
40457  int res4 = 0 ;
40458  PyObject * obj0 = 0 ;
40459  PyObject * obj1 = 0 ;
40460  PyObject * obj2 = 0 ;
40461  PyObject * obj3 = 0 ;
40462 
40463  if (!PyArg_ParseTuple(args,(char *)"OOOO:set_invlist_range",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
40464  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
40465  if (!SWIG_IsOK(res1)) {
40466  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_invlist_range" "', argument " "1"" of type '" "faiss::Index *""'");
40467  }
40468  arg1 = reinterpret_cast< faiss::Index * >(argp1);
40469  ecode2 = SWIG_AsVal_long(obj1, &val2);
40470  if (!SWIG_IsOK(ecode2)) {
40471  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "set_invlist_range" "', argument " "2"" of type '" "long""'");
40472  }
40473  arg2 = static_cast< long >(val2);
40474  ecode3 = SWIG_AsVal_long(obj2, &val3);
40475  if (!SWIG_IsOK(ecode3)) {
40476  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "set_invlist_range" "', argument " "3"" of type '" "long""'");
40477  }
40478  arg3 = static_cast< long >(val3);
40479  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
40480  if (!SWIG_IsOK(res4)) {
40481  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "set_invlist_range" "', argument " "4"" of type '" "faiss::ArrayInvertedLists *""'");
40482  }
40483  arg4 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp4);
40484  {
40485  Py_BEGIN_ALLOW_THREADS
40486  try {
40487  faiss::ivflib::set_invlist_range(arg1,arg2,arg3,arg4);
40488  } catch(faiss::FaissException & e) {
40489  PyEval_RestoreThread(_save);
40490  PyErr_SetString(PyExc_RuntimeError, e.what());
40491  SWIG_fail;
40492  }
40493  Py_END_ALLOW_THREADS
40494  }
40495  resultobj = SWIG_Py_Void();
40496  return resultobj;
40497 fail:
40498  return NULL;
40499 }
40500 
40501 
40502 SWIGINTERN PyObject *_wrap_search_with_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40503  PyObject *resultobj = 0;
40504  faiss::Index *arg1 = (faiss::Index *) 0 ;
40505  faiss::ivflib::idx_t arg2 ;
40506  float *arg3 = (float *) 0 ;
40507  faiss::ivflib::idx_t arg4 ;
40508  float *arg5 = (float *) 0 ;
40509  faiss::ivflib::idx_t *arg6 = (faiss::ivflib::idx_t *) 0 ;
40511  void *argp1 = 0 ;
40512  int res1 = 0 ;
40513  long val2 ;
40514  int ecode2 = 0 ;
40515  void *argp3 = 0 ;
40516  int res3 = 0 ;
40517  long val4 ;
40518  int ecode4 = 0 ;
40519  void *argp5 = 0 ;
40520  int res5 = 0 ;
40521  void *argp6 = 0 ;
40522  int res6 = 0 ;
40523  void *argp7 = 0 ;
40524  int res7 = 0 ;
40525  PyObject * obj0 = 0 ;
40526  PyObject * obj1 = 0 ;
40527  PyObject * obj2 = 0 ;
40528  PyObject * obj3 = 0 ;
40529  PyObject * obj4 = 0 ;
40530  PyObject * obj5 = 0 ;
40531  PyObject * obj6 = 0 ;
40532 
40533  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:search_with_parameters",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
40534  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
40535  if (!SWIG_IsOK(res1)) {
40536  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "search_with_parameters" "', argument " "1"" of type '" "faiss::Index const *""'");
40537  }
40538  arg1 = reinterpret_cast< faiss::Index * >(argp1);
40539  ecode2 = SWIG_AsVal_long(obj1, &val2);
40540  if (!SWIG_IsOK(ecode2)) {
40541  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "search_with_parameters" "', argument " "2"" of type '" "faiss::ivflib::idx_t""'");
40542  }
40543  arg2 = static_cast< faiss::ivflib::idx_t >(val2);
40544  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
40545  if (!SWIG_IsOK(res3)) {
40546  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "search_with_parameters" "', argument " "3"" of type '" "float const *""'");
40547  }
40548  arg3 = reinterpret_cast< float * >(argp3);
40549  ecode4 = SWIG_AsVal_long(obj3, &val4);
40550  if (!SWIG_IsOK(ecode4)) {
40551  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "search_with_parameters" "', argument " "4"" of type '" "faiss::ivflib::idx_t""'");
40552  }
40553  arg4 = static_cast< faiss::ivflib::idx_t >(val4);
40554  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
40555  if (!SWIG_IsOK(res5)) {
40556  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "search_with_parameters" "', argument " "5"" of type '" "float *""'");
40557  }
40558  arg5 = reinterpret_cast< float * >(argp5);
40559  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
40560  if (!SWIG_IsOK(res6)) {
40561  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "search_with_parameters" "', argument " "6"" of type '" "faiss::ivflib::idx_t *""'");
40562  }
40563  arg6 = reinterpret_cast< faiss::ivflib::idx_t * >(argp6);
40564  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
40565  if (!SWIG_IsOK(res7)) {
40566  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "search_with_parameters" "', argument " "7"" of type '" "faiss::IVFSearchParameters *""'");
40567  }
40568  arg7 = reinterpret_cast< faiss::IVFSearchParameters * >(argp7);
40569  {
40570  Py_BEGIN_ALLOW_THREADS
40571  try {
40572  faiss::ivflib::search_with_parameters((faiss::Index const *)arg1,arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
40573  } catch(faiss::FaissException & e) {
40574  PyEval_RestoreThread(_save);
40575  PyErr_SetString(PyExc_RuntimeError, e.what());
40576  SWIG_fail;
40577  }
40578  Py_END_ALLOW_THREADS
40579  }
40580  resultobj = SWIG_Py_Void();
40581  return resultobj;
40582 fail:
40583  return NULL;
40584 }
40585 
40586 
40587 SWIGINTERN PyObject *_wrap_ScalarQuantizer_qtype_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40588  PyObject *resultobj = 0;
40591  void *argp1 = 0 ;
40592  int res1 = 0 ;
40593  int val2 ;
40594  int ecode2 = 0 ;
40595  PyObject * obj0 = 0 ;
40596  PyObject * obj1 = 0 ;
40597 
40598  if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_qtype_set",&obj0,&obj1)) SWIG_fail;
40599  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40600  if (!SWIG_IsOK(res1)) {
40601  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_qtype_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40602  }
40603  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40604  ecode2 = SWIG_AsVal_int(obj1, &val2);
40605  if (!SWIG_IsOK(ecode2)) {
40606  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_qtype_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
40607  }
40608  arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
40609  if (arg1) (arg1)->qtype = arg2;
40610  resultobj = SWIG_Py_Void();
40611  return resultobj;
40612 fail:
40613  return NULL;
40614 }
40615 
40616 
40617 SWIGINTERN PyObject *_wrap_ScalarQuantizer_qtype_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40618  PyObject *resultobj = 0;
40620  void *argp1 = 0 ;
40621  int res1 = 0 ;
40622  PyObject * obj0 = 0 ;
40624 
40625  if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_qtype_get",&obj0)) SWIG_fail;
40626  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40627  if (!SWIG_IsOK(res1)) {
40628  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_qtype_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40629  }
40630  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40631  result = (faiss::ScalarQuantizer::QuantizerType) ((arg1)->qtype);
40632  resultobj = SWIG_From_int(static_cast< int >(result));
40633  return resultobj;
40634 fail:
40635  return NULL;
40636 }
40637 
40638 
40639 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40640  PyObject *resultobj = 0;
40643  void *argp1 = 0 ;
40644  int res1 = 0 ;
40645  int val2 ;
40646  int ecode2 = 0 ;
40647  PyObject * obj0 = 0 ;
40648  PyObject * obj1 = 0 ;
40649 
40650  if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_rangestat_set",&obj0,&obj1)) SWIG_fail;
40651  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40652  if (!SWIG_IsOK(res1)) {
40653  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40654  }
40655  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40656  ecode2 = SWIG_AsVal_int(obj1, &val2);
40657  if (!SWIG_IsOK(ecode2)) {
40658  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_rangestat_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer::RangeStat""'");
40659  }
40660  arg2 = static_cast< faiss::ScalarQuantizer::RangeStat >(val2);
40661  if (arg1) (arg1)->rangestat = arg2;
40662  resultobj = SWIG_Py_Void();
40663  return resultobj;
40664 fail:
40665  return NULL;
40666 }
40667 
40668 
40669 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40670  PyObject *resultobj = 0;
40672  void *argp1 = 0 ;
40673  int res1 = 0 ;
40674  PyObject * obj0 = 0 ;
40676 
40677  if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_rangestat_get",&obj0)) SWIG_fail;
40678  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40679  if (!SWIG_IsOK(res1)) {
40680  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40681  }
40682  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40683  result = (faiss::ScalarQuantizer::RangeStat) ((arg1)->rangestat);
40684  resultobj = SWIG_From_int(static_cast< int >(result));
40685  return resultobj;
40686 fail:
40687  return NULL;
40688 }
40689 
40690 
40691 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_arg_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40692  PyObject *resultobj = 0;
40694  float arg2 ;
40695  void *argp1 = 0 ;
40696  int res1 = 0 ;
40697  float val2 ;
40698  int ecode2 = 0 ;
40699  PyObject * obj0 = 0 ;
40700  PyObject * obj1 = 0 ;
40701 
40702  if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_rangestat_arg_set",&obj0,&obj1)) SWIG_fail;
40703  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40704  if (!SWIG_IsOK(res1)) {
40705  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_arg_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40706  }
40707  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40708  ecode2 = SWIG_AsVal_float(obj1, &val2);
40709  if (!SWIG_IsOK(ecode2)) {
40710  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_rangestat_arg_set" "', argument " "2"" of type '" "float""'");
40711  }
40712  arg2 = static_cast< float >(val2);
40713  if (arg1) (arg1)->rangestat_arg = arg2;
40714  resultobj = SWIG_Py_Void();
40715  return resultobj;
40716 fail:
40717  return NULL;
40718 }
40719 
40720 
40721 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_arg_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40722  PyObject *resultobj = 0;
40724  void *argp1 = 0 ;
40725  int res1 = 0 ;
40726  PyObject * obj0 = 0 ;
40727  float result;
40728 
40729  if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_rangestat_arg_get",&obj0)) SWIG_fail;
40730  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40731  if (!SWIG_IsOK(res1)) {
40732  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_arg_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40733  }
40734  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40735  result = (float) ((arg1)->rangestat_arg);
40736  resultobj = SWIG_From_float(static_cast< float >(result));
40737  return resultobj;
40738 fail:
40739  return NULL;
40740 }
40741 
40742 
40743 SWIGINTERN PyObject *_wrap_ScalarQuantizer_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40744  PyObject *resultobj = 0;
40746  size_t arg2 ;
40747  void *argp1 = 0 ;
40748  int res1 = 0 ;
40749  size_t val2 ;
40750  int ecode2 = 0 ;
40751  PyObject * obj0 = 0 ;
40752  PyObject * obj1 = 0 ;
40753 
40754  if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_d_set",&obj0,&obj1)) SWIG_fail;
40755  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40756  if (!SWIG_IsOK(res1)) {
40757  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_d_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40758  }
40759  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40760  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
40761  if (!SWIG_IsOK(ecode2)) {
40762  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_d_set" "', argument " "2"" of type '" "size_t""'");
40763  }
40764  arg2 = static_cast< size_t >(val2);
40765  if (arg1) (arg1)->d = arg2;
40766  resultobj = SWIG_Py_Void();
40767  return resultobj;
40768 fail:
40769  return NULL;
40770 }
40771 
40772 
40773 SWIGINTERN PyObject *_wrap_ScalarQuantizer_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40774  PyObject *resultobj = 0;
40776  void *argp1 = 0 ;
40777  int res1 = 0 ;
40778  PyObject * obj0 = 0 ;
40779  size_t result;
40780 
40781  if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_d_get",&obj0)) SWIG_fail;
40782  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40783  if (!SWIG_IsOK(res1)) {
40784  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_d_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40785  }
40786  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40787  result = (size_t) ((arg1)->d);
40788  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
40789  return resultobj;
40790 fail:
40791  return NULL;
40792 }
40793 
40794 
40795 SWIGINTERN PyObject *_wrap_ScalarQuantizer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40796  PyObject *resultobj = 0;
40798  size_t arg2 ;
40799  void *argp1 = 0 ;
40800  int res1 = 0 ;
40801  size_t val2 ;
40802  int ecode2 = 0 ;
40803  PyObject * obj0 = 0 ;
40804  PyObject * obj1 = 0 ;
40805 
40806  if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_code_size_set",&obj0,&obj1)) SWIG_fail;
40807  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40808  if (!SWIG_IsOK(res1)) {
40809  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_code_size_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40810  }
40811  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40812  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
40813  if (!SWIG_IsOK(ecode2)) {
40814  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_code_size_set" "', argument " "2"" of type '" "size_t""'");
40815  }
40816  arg2 = static_cast< size_t >(val2);
40817  if (arg1) (arg1)->code_size = arg2;
40818  resultobj = SWIG_Py_Void();
40819  return resultobj;
40820 fail:
40821  return NULL;
40822 }
40823 
40824 
40825 SWIGINTERN PyObject *_wrap_ScalarQuantizer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40826  PyObject *resultobj = 0;
40828  void *argp1 = 0 ;
40829  int res1 = 0 ;
40830  PyObject * obj0 = 0 ;
40831  size_t result;
40832 
40833  if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_code_size_get",&obj0)) SWIG_fail;
40834  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40835  if (!SWIG_IsOK(res1)) {
40836  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_code_size_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40837  }
40838  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40839  result = (size_t) ((arg1)->code_size);
40840  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
40841  return resultobj;
40842 fail:
40843  return NULL;
40844 }
40845 
40846 
40847 SWIGINTERN PyObject *_wrap_ScalarQuantizer_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40848  PyObject *resultobj = 0;
40850  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
40851  void *argp1 = 0 ;
40852  int res1 = 0 ;
40853  void *argp2 = 0 ;
40854  int res2 = 0 ;
40855  PyObject * obj0 = 0 ;
40856  PyObject * obj1 = 0 ;
40857 
40858  if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_trained_set",&obj0,&obj1)) SWIG_fail;
40859  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40860  if (!SWIG_IsOK(res1)) {
40861  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_trained_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40862  }
40863  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40864  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
40865  if (!SWIG_IsOK(res2)) {
40866  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ScalarQuantizer_trained_set" "', argument " "2"" of type '" "std::vector< float > *""'");
40867  }
40868  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
40869  if (arg1) (arg1)->trained = *arg2;
40870  resultobj = SWIG_Py_Void();
40871  return resultobj;
40872 fail:
40873  return NULL;
40874 }
40875 
40876 
40877 SWIGINTERN PyObject *_wrap_ScalarQuantizer_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40878  PyObject *resultobj = 0;
40880  void *argp1 = 0 ;
40881  int res1 = 0 ;
40882  PyObject * obj0 = 0 ;
40883  std::vector< float > *result = 0 ;
40884 
40885  if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_trained_get",&obj0)) SWIG_fail;
40886  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40887  if (!SWIG_IsOK(res1)) {
40888  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_trained_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
40889  }
40890  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
40891  result = (std::vector< float > *)& ((arg1)->trained);
40892  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
40893  return resultobj;
40894 fail:
40895  return NULL;
40896 }
40897 
40898 
40899 SWIGINTERN PyObject *_wrap_new_ScalarQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40900  PyObject *resultobj = 0;
40901  size_t arg1 ;
40903  size_t val1 ;
40904  int ecode1 = 0 ;
40905  int val2 ;
40906  int ecode2 = 0 ;
40907  PyObject * obj0 = 0 ;
40908  PyObject * obj1 = 0 ;
40909  faiss::ScalarQuantizer *result = 0 ;
40910 
40911  if (!PyArg_ParseTuple(args,(char *)"OO:new_ScalarQuantizer",&obj0,&obj1)) SWIG_fail;
40912  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
40913  if (!SWIG_IsOK(ecode1)) {
40914  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ScalarQuantizer" "', argument " "1"" of type '" "size_t""'");
40915  }
40916  arg1 = static_cast< size_t >(val1);
40917  ecode2 = SWIG_AsVal_int(obj1, &val2);
40918  if (!SWIG_IsOK(ecode2)) {
40919  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ScalarQuantizer" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
40920  }
40921  arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
40922  {
40923  Py_BEGIN_ALLOW_THREADS
40924  try {
40925  result = (faiss::ScalarQuantizer *)new faiss::ScalarQuantizer(arg1,arg2);
40926  } catch(faiss::FaissException & e) {
40927  PyEval_RestoreThread(_save);
40928  PyErr_SetString(PyExc_RuntimeError, e.what());
40929  SWIG_fail;
40930  }
40931  Py_END_ALLOW_THREADS
40932  }
40933  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_POINTER_NEW | 0 );
40934  return resultobj;
40935 fail:
40936  return NULL;
40937 }
40938 
40939 
40940 SWIGINTERN PyObject *_wrap_new_ScalarQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40941  PyObject *resultobj = 0;
40942  faiss::ScalarQuantizer *result = 0 ;
40943 
40944  if (!PyArg_ParseTuple(args,(char *)":new_ScalarQuantizer")) SWIG_fail;
40945  {
40946  Py_BEGIN_ALLOW_THREADS
40947  try {
40949  } catch(faiss::FaissException & e) {
40950  PyEval_RestoreThread(_save);
40951  PyErr_SetString(PyExc_RuntimeError, e.what());
40952  SWIG_fail;
40953  }
40954  Py_END_ALLOW_THREADS
40955  }
40956  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_POINTER_NEW | 0 );
40957  return resultobj;
40958 fail:
40959  return NULL;
40960 }
40961 
40962 
40963 SWIGINTERN PyObject *_wrap_new_ScalarQuantizer(PyObject *self, PyObject *args) {
40964  Py_ssize_t argc;
40965  PyObject *argv[3] = {
40966  0
40967  };
40968  Py_ssize_t ii;
40969 
40970  if (!PyTuple_Check(args)) SWIG_fail;
40971  argc = args ? PyObject_Length(args) : 0;
40972  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
40973  argv[ii] = PyTuple_GET_ITEM(args,ii);
40974  }
40975  if (argc == 0) {
40976  return _wrap_new_ScalarQuantizer__SWIG_1(self, args);
40977  }
40978  if (argc == 2) {
40979  int _v;
40980  {
40981  int res = SWIG_AsVal_size_t(argv[0], NULL);
40982  _v = SWIG_CheckState(res);
40983  }
40984  if (_v) {
40985  {
40986  int res = SWIG_AsVal_int(argv[1], NULL);
40987  _v = SWIG_CheckState(res);
40988  }
40989  if (_v) {
40990  return _wrap_new_ScalarQuantizer__SWIG_0(self, args);
40991  }
40992  }
40993  }
40994 
40995 fail:
40996  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ScalarQuantizer'.\n"
40997  " Possible C/C++ prototypes are:\n"
40998  " faiss::ScalarQuantizer::ScalarQuantizer(size_t,faiss::ScalarQuantizer::QuantizerType)\n"
40999  " faiss::ScalarQuantizer::ScalarQuantizer()\n");
41000  return 0;
41001 }
41002 
41003 
41004 SWIGINTERN PyObject *_wrap_ScalarQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41005  PyObject *resultobj = 0;
41007  size_t arg2 ;
41008  float *arg3 = (float *) 0 ;
41009  void *argp1 = 0 ;
41010  int res1 = 0 ;
41011  size_t val2 ;
41012  int ecode2 = 0 ;
41013  void *argp3 = 0 ;
41014  int res3 = 0 ;
41015  PyObject * obj0 = 0 ;
41016  PyObject * obj1 = 0 ;
41017  PyObject * obj2 = 0 ;
41018 
41019  if (!PyArg_ParseTuple(args,(char *)"OOO:ScalarQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
41020  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
41021  if (!SWIG_IsOK(res1)) {
41022  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_train" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
41023  }
41024  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
41025  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
41026  if (!SWIG_IsOK(ecode2)) {
41027  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_train" "', argument " "2"" of type '" "size_t""'");
41028  }
41029  arg2 = static_cast< size_t >(val2);
41030  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41031  if (!SWIG_IsOK(res3)) {
41032  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ScalarQuantizer_train" "', argument " "3"" of type '" "float const *""'");
41033  }
41034  arg3 = reinterpret_cast< float * >(argp3);
41035  {
41036  Py_BEGIN_ALLOW_THREADS
41037  try {
41038  (arg1)->train(arg2,(float const *)arg3);
41039  } catch(faiss::FaissException & e) {
41040  PyEval_RestoreThread(_save);
41041  PyErr_SetString(PyExc_RuntimeError, e.what());
41042  SWIG_fail;
41043  }
41044  Py_END_ALLOW_THREADS
41045  }
41046  resultobj = SWIG_Py_Void();
41047  return resultobj;
41048 fail:
41049  return NULL;
41050 }
41051 
41052 
41053 SWIGINTERN PyObject *_wrap_ScalarQuantizer_compute_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41054  PyObject *resultobj = 0;
41056  float *arg2 = (float *) 0 ;
41057  uint8_t *arg3 = (uint8_t *) 0 ;
41058  size_t arg4 ;
41059  void *argp1 = 0 ;
41060  int res1 = 0 ;
41061  void *argp2 = 0 ;
41062  int res2 = 0 ;
41063  void *argp3 = 0 ;
41064  int res3 = 0 ;
41065  size_t val4 ;
41066  int ecode4 = 0 ;
41067  PyObject * obj0 = 0 ;
41068  PyObject * obj1 = 0 ;
41069  PyObject * obj2 = 0 ;
41070  PyObject * obj3 = 0 ;
41071 
41072  if (!PyArg_ParseTuple(args,(char *)"OOOO:ScalarQuantizer_compute_codes",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
41073  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
41074  if (!SWIG_IsOK(res1)) {
41075  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_compute_codes" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
41076  }
41077  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
41078  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
41079  if (!SWIG_IsOK(res2)) {
41080  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ScalarQuantizer_compute_codes" "', argument " "2"" of type '" "float const *""'");
41081  }
41082  arg2 = reinterpret_cast< float * >(argp2);
41083  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
41084  if (!SWIG_IsOK(res3)) {
41085  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ScalarQuantizer_compute_codes" "', argument " "3"" of type '" "uint8_t *""'");
41086  }
41087  arg3 = reinterpret_cast< uint8_t * >(argp3);
41088  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
41089  if (!SWIG_IsOK(ecode4)) {
41090  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ScalarQuantizer_compute_codes" "', argument " "4"" of type '" "size_t""'");
41091  }
41092  arg4 = static_cast< size_t >(val4);
41093  {
41094  Py_BEGIN_ALLOW_THREADS
41095  try {
41096  ((faiss::ScalarQuantizer const *)arg1)->compute_codes((float const *)arg2,arg3,arg4);
41097  } catch(faiss::FaissException & e) {
41098  PyEval_RestoreThread(_save);
41099  PyErr_SetString(PyExc_RuntimeError, e.what());
41100  SWIG_fail;
41101  }
41102  Py_END_ALLOW_THREADS
41103  }
41104  resultobj = SWIG_Py_Void();
41105  return resultobj;
41106 fail:
41107  return NULL;
41108 }
41109 
41110 
41111 SWIGINTERN PyObject *_wrap_ScalarQuantizer_decode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41112  PyObject *resultobj = 0;
41114  uint8_t *arg2 = (uint8_t *) 0 ;
41115  float *arg3 = (float *) 0 ;
41116  size_t arg4 ;
41117  void *argp1 = 0 ;
41118  int res1 = 0 ;
41119  void *argp2 = 0 ;
41120  int res2 = 0 ;
41121  void *argp3 = 0 ;
41122  int res3 = 0 ;
41123  size_t val4 ;
41124  int ecode4 = 0 ;
41125  PyObject * obj0 = 0 ;
41126  PyObject * obj1 = 0 ;
41127  PyObject * obj2 = 0 ;
41128  PyObject * obj3 = 0 ;
41129 
41130  if (!PyArg_ParseTuple(args,(char *)"OOOO:ScalarQuantizer_decode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
41131  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
41132  if (!SWIG_IsOK(res1)) {
41133  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_decode" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
41134  }
41135  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
41136  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
41137  if (!SWIG_IsOK(res2)) {
41138  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ScalarQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
41139  }
41140  arg2 = reinterpret_cast< uint8_t * >(argp2);
41141  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41142  if (!SWIG_IsOK(res3)) {
41143  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ScalarQuantizer_decode" "', argument " "3"" of type '" "float *""'");
41144  }
41145  arg3 = reinterpret_cast< float * >(argp3);
41146  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
41147  if (!SWIG_IsOK(ecode4)) {
41148  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ScalarQuantizer_decode" "', argument " "4"" of type '" "size_t""'");
41149  }
41150  arg4 = static_cast< size_t >(val4);
41151  {
41152  Py_BEGIN_ALLOW_THREADS
41153  try {
41154  ((faiss::ScalarQuantizer const *)arg1)->decode((uint8_t const *)arg2,arg3,arg4);
41155  } catch(faiss::FaissException & e) {
41156  PyEval_RestoreThread(_save);
41157  PyErr_SetString(PyExc_RuntimeError, e.what());
41158  SWIG_fail;
41159  }
41160  Py_END_ALLOW_THREADS
41161  }
41162  resultobj = SWIG_Py_Void();
41163  return resultobj;
41164 fail:
41165  return NULL;
41166 }
41167 
41168 
41169 SWIGINTERN PyObject *_wrap_ScalarQuantizer_get_distance_computer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41170  PyObject *resultobj = 0;
41172  faiss::MetricType arg2 ;
41173  void *argp1 = 0 ;
41174  int res1 = 0 ;
41175  int val2 ;
41176  int ecode2 = 0 ;
41177  PyObject * obj0 = 0 ;
41178  PyObject * obj1 = 0 ;
41180 
41181  if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_get_distance_computer",&obj0,&obj1)) SWIG_fail;
41182  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
41183  if (!SWIG_IsOK(res1)) {
41184  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_get_distance_computer" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
41185  }
41186  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
41187  ecode2 = SWIG_AsVal_int(obj1, &val2);
41188  if (!SWIG_IsOK(ecode2)) {
41189  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_get_distance_computer" "', argument " "2"" of type '" "faiss::MetricType""'");
41190  }
41191  arg2 = static_cast< faiss::MetricType >(val2);
41192  {
41193  Py_BEGIN_ALLOW_THREADS
41194  try {
41195  result = (faiss::ScalarQuantizer::DistanceComputer *)((faiss::ScalarQuantizer const *)arg1)->get_distance_computer(arg2);
41196  } catch(faiss::FaissException & e) {
41197  PyEval_RestoreThread(_save);
41198  PyErr_SetString(PyExc_RuntimeError, e.what());
41199  SWIG_fail;
41200  }
41201  Py_END_ALLOW_THREADS
41202  }
41203  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer__DistanceComputer, 0 | 0 );
41204  return resultobj;
41205 fail:
41206  return NULL;
41207 }
41208 
41209 
41210 SWIGINTERN PyObject *_wrap_ScalarQuantizer_get_distance_computer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41211  PyObject *resultobj = 0;
41213  void *argp1 = 0 ;
41214  int res1 = 0 ;
41215  PyObject * obj0 = 0 ;
41217 
41218  if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_get_distance_computer",&obj0)) SWIG_fail;
41219  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
41220  if (!SWIG_IsOK(res1)) {
41221  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_get_distance_computer" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
41222  }
41223  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
41224  {
41225  Py_BEGIN_ALLOW_THREADS
41226  try {
41227  result = (faiss::ScalarQuantizer::DistanceComputer *)((faiss::ScalarQuantizer const *)arg1)->get_distance_computer();
41228  } catch(faiss::FaissException & e) {
41229  PyEval_RestoreThread(_save);
41230  PyErr_SetString(PyExc_RuntimeError, e.what());
41231  SWIG_fail;
41232  }
41233  Py_END_ALLOW_THREADS
41234  }
41235  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer__DistanceComputer, 0 | 0 );
41236  return resultobj;
41237 fail:
41238  return NULL;
41239 }
41240 
41241 
41242 SWIGINTERN PyObject *_wrap_ScalarQuantizer_get_distance_computer(PyObject *self, PyObject *args) {
41243  Py_ssize_t argc;
41244  PyObject *argv[3] = {
41245  0
41246  };
41247  Py_ssize_t ii;
41248 
41249  if (!PyTuple_Check(args)) SWIG_fail;
41250  argc = args ? PyObject_Length(args) : 0;
41251  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
41252  argv[ii] = PyTuple_GET_ITEM(args,ii);
41253  }
41254  if (argc == 1) {
41255  int _v;
41256  void *vptr = 0;
41257  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ScalarQuantizer, 0);
41258  _v = SWIG_CheckState(res);
41259  if (_v) {
41260  return _wrap_ScalarQuantizer_get_distance_computer__SWIG_1(self, args);
41261  }
41262  }
41263  if (argc == 2) {
41264  int _v;
41265  void *vptr = 0;
41266  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ScalarQuantizer, 0);
41267  _v = SWIG_CheckState(res);
41268  if (_v) {
41269  {
41270  int res = SWIG_AsVal_int(argv[1], NULL);
41271  _v = SWIG_CheckState(res);
41272  }
41273  if (_v) {
41274  return _wrap_ScalarQuantizer_get_distance_computer__SWIG_0(self, args);
41275  }
41276  }
41277  }
41278 
41279 fail:
41280  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ScalarQuantizer_get_distance_computer'.\n"
41281  " Possible C/C++ prototypes are:\n"
41282  " faiss::ScalarQuantizer::get_distance_computer(faiss::MetricType) const\n"
41283  " faiss::ScalarQuantizer::get_distance_computer() const\n");
41284  return 0;
41285 }
41286 
41287 
41288 SWIGINTERN PyObject *_wrap_delete_ScalarQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41289  PyObject *resultobj = 0;
41291  void *argp1 = 0 ;
41292  int res1 = 0 ;
41293  PyObject * obj0 = 0 ;
41294 
41295  if (!PyArg_ParseTuple(args,(char *)"O:delete_ScalarQuantizer",&obj0)) SWIG_fail;
41296  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_POINTER_DISOWN | 0 );
41297  if (!SWIG_IsOK(res1)) {
41298  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ScalarQuantizer" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
41299  }
41300  arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
41301  delete arg1;
41302  resultobj = SWIG_Py_Void();
41303  return resultobj;
41304 fail:
41305  return NULL;
41306 }
41307 
41308 
41309 SWIGINTERN PyObject *ScalarQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41310  PyObject *obj;
41311  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
41312  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_NewClientData(obj));
41313  return SWIG_Py_Void();
41314 }
41315 
41316 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_sq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41317  PyObject *resultobj = 0;
41320  void *argp1 = 0 ;
41321  int res1 = 0 ;
41322  void *argp2 = 0 ;
41323  int res2 = 0 ;
41324  PyObject * obj0 = 0 ;
41325  PyObject * obj1 = 0 ;
41326 
41327  if (!PyArg_ParseTuple(args,(char *)"OO:IndexScalarQuantizer_sq_set",&obj0,&obj1)) SWIG_fail;
41328  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41329  if (!SWIG_IsOK(res1)) {
41330  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_sq_set" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41331  }
41332  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41333  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
41334  if (!SWIG_IsOK(res2)) {
41335  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexScalarQuantizer_sq_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer *""'");
41336  }
41337  arg2 = reinterpret_cast< faiss::ScalarQuantizer * >(argp2);
41338  if (arg1) (arg1)->sq = *arg2;
41339  resultobj = SWIG_Py_Void();
41340  return resultobj;
41341 fail:
41342  return NULL;
41343 }
41344 
41345 
41346 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_sq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41347  PyObject *resultobj = 0;
41349  void *argp1 = 0 ;
41350  int res1 = 0 ;
41351  PyObject * obj0 = 0 ;
41352  faiss::ScalarQuantizer *result = 0 ;
41353 
41354  if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_sq_get",&obj0)) SWIG_fail;
41355  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41356  if (!SWIG_IsOK(res1)) {
41357  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_sq_get" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41358  }
41359  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41360  result = (faiss::ScalarQuantizer *)& ((arg1)->sq);
41361  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
41362  return resultobj;
41363 fail:
41364  return NULL;
41365 }
41366 
41367 
41368 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41369  PyObject *resultobj = 0;
41371  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
41372  void *argp1 = 0 ;
41373  int res1 = 0 ;
41374  void *argp2 = 0 ;
41375  int res2 = 0 ;
41376  PyObject * obj0 = 0 ;
41377  PyObject * obj1 = 0 ;
41378 
41379  if (!PyArg_ParseTuple(args,(char *)"OO:IndexScalarQuantizer_codes_set",&obj0,&obj1)) SWIG_fail;
41380  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41381  if (!SWIG_IsOK(res1)) {
41382  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_codes_set" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41383  }
41384  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41385  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
41386  if (!SWIG_IsOK(res2)) {
41387  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexScalarQuantizer_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
41388  }
41389  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
41390  if (arg1) (arg1)->codes = *arg2;
41391  resultobj = SWIG_Py_Void();
41392  return resultobj;
41393 fail:
41394  return NULL;
41395 }
41396 
41397 
41398 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41399  PyObject *resultobj = 0;
41401  void *argp1 = 0 ;
41402  int res1 = 0 ;
41403  PyObject * obj0 = 0 ;
41404  std::vector< uint8_t > *result = 0 ;
41405 
41406  if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_codes_get",&obj0)) SWIG_fail;
41407  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41408  if (!SWIG_IsOK(res1)) {
41409  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_codes_get" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41410  }
41411  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41412  result = (std::vector< uint8_t > *)& ((arg1)->codes);
41413  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
41414  return resultobj;
41415 fail:
41416  return NULL;
41417 }
41418 
41419 
41420 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41421  PyObject *resultobj = 0;
41423  size_t arg2 ;
41424  void *argp1 = 0 ;
41425  int res1 = 0 ;
41426  size_t val2 ;
41427  int ecode2 = 0 ;
41428  PyObject * obj0 = 0 ;
41429  PyObject * obj1 = 0 ;
41430 
41431  if (!PyArg_ParseTuple(args,(char *)"OO:IndexScalarQuantizer_code_size_set",&obj0,&obj1)) SWIG_fail;
41432  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41433  if (!SWIG_IsOK(res1)) {
41434  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_code_size_set" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41435  }
41436  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41437  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
41438  if (!SWIG_IsOK(ecode2)) {
41439  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_code_size_set" "', argument " "2"" of type '" "size_t""'");
41440  }
41441  arg2 = static_cast< size_t >(val2);
41442  if (arg1) (arg1)->code_size = arg2;
41443  resultobj = SWIG_Py_Void();
41444  return resultobj;
41445 fail:
41446  return NULL;
41447 }
41448 
41449 
41450 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41451  PyObject *resultobj = 0;
41453  void *argp1 = 0 ;
41454  int res1 = 0 ;
41455  PyObject * obj0 = 0 ;
41456  size_t result;
41457 
41458  if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_code_size_get",&obj0)) SWIG_fail;
41459  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41460  if (!SWIG_IsOK(res1)) {
41461  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_code_size_get" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41462  }
41463  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41464  result = (size_t) ((arg1)->code_size);
41465  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
41466  return resultobj;
41467 fail:
41468  return NULL;
41469 }
41470 
41471 
41472 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41473  PyObject *resultobj = 0;
41474  int arg1 ;
41476  faiss::MetricType arg3 ;
41477  int val1 ;
41478  int ecode1 = 0 ;
41479  int val2 ;
41480  int ecode2 = 0 ;
41481  int val3 ;
41482  int ecode3 = 0 ;
41483  PyObject * obj0 = 0 ;
41484  PyObject * obj1 = 0 ;
41485  PyObject * obj2 = 0 ;
41486  faiss::IndexScalarQuantizer *result = 0 ;
41487 
41488  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexScalarQuantizer",&obj0,&obj1,&obj2)) SWIG_fail;
41489  ecode1 = SWIG_AsVal_int(obj0, &val1);
41490  if (!SWIG_IsOK(ecode1)) {
41491  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexScalarQuantizer" "', argument " "1"" of type '" "int""'");
41492  }
41493  arg1 = static_cast< int >(val1);
41494  ecode2 = SWIG_AsVal_int(obj1, &val2);
41495  if (!SWIG_IsOK(ecode2)) {
41496  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexScalarQuantizer" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
41497  }
41498  arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
41499  ecode3 = SWIG_AsVal_int(obj2, &val3);
41500  if (!SWIG_IsOK(ecode3)) {
41501  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexScalarQuantizer" "', argument " "3"" of type '" "faiss::MetricType""'");
41502  }
41503  arg3 = static_cast< faiss::MetricType >(val3);
41504  {
41505  Py_BEGIN_ALLOW_THREADS
41506  try {
41507  result = (faiss::IndexScalarQuantizer *)new faiss::IndexScalarQuantizer(arg1,arg2,arg3);
41508  } catch(faiss::FaissException & e) {
41509  PyEval_RestoreThread(_save);
41510  PyErr_SetString(PyExc_RuntimeError, e.what());
41511  SWIG_fail;
41512  }
41513  Py_END_ALLOW_THREADS
41514  }
41515  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_NEW | 0 );
41516  return resultobj;
41517 fail:
41518  return NULL;
41519 }
41520 
41521 
41522 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41523  PyObject *resultobj = 0;
41524  int arg1 ;
41526  int val1 ;
41527  int ecode1 = 0 ;
41528  int val2 ;
41529  int ecode2 = 0 ;
41530  PyObject * obj0 = 0 ;
41531  PyObject * obj1 = 0 ;
41532  faiss::IndexScalarQuantizer *result = 0 ;
41533 
41534  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexScalarQuantizer",&obj0,&obj1)) SWIG_fail;
41535  ecode1 = SWIG_AsVal_int(obj0, &val1);
41536  if (!SWIG_IsOK(ecode1)) {
41537  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexScalarQuantizer" "', argument " "1"" of type '" "int""'");
41538  }
41539  arg1 = static_cast< int >(val1);
41540  ecode2 = SWIG_AsVal_int(obj1, &val2);
41541  if (!SWIG_IsOK(ecode2)) {
41542  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexScalarQuantizer" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
41543  }
41544  arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
41545  {
41546  Py_BEGIN_ALLOW_THREADS
41547  try {
41548  result = (faiss::IndexScalarQuantizer *)new faiss::IndexScalarQuantizer(arg1,arg2);
41549  } catch(faiss::FaissException & e) {
41550  PyEval_RestoreThread(_save);
41551  PyErr_SetString(PyExc_RuntimeError, e.what());
41552  SWIG_fail;
41553  }
41554  Py_END_ALLOW_THREADS
41555  }
41556  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_NEW | 0 );
41557  return resultobj;
41558 fail:
41559  return NULL;
41560 }
41561 
41562 
41563 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41564  PyObject *resultobj = 0;
41565  faiss::IndexScalarQuantizer *result = 0 ;
41566 
41567  if (!PyArg_ParseTuple(args,(char *)":new_IndexScalarQuantizer")) SWIG_fail;
41568  {
41569  Py_BEGIN_ALLOW_THREADS
41570  try {
41572  } catch(faiss::FaissException & e) {
41573  PyEval_RestoreThread(_save);
41574  PyErr_SetString(PyExc_RuntimeError, e.what());
41575  SWIG_fail;
41576  }
41577  Py_END_ALLOW_THREADS
41578  }
41579  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_NEW | 0 );
41580  return resultobj;
41581 fail:
41582  return NULL;
41583 }
41584 
41585 
41586 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer(PyObject *self, PyObject *args) {
41587  Py_ssize_t argc;
41588  PyObject *argv[4] = {
41589  0
41590  };
41591  Py_ssize_t ii;
41592 
41593  if (!PyTuple_Check(args)) SWIG_fail;
41594  argc = args ? PyObject_Length(args) : 0;
41595  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
41596  argv[ii] = PyTuple_GET_ITEM(args,ii);
41597  }
41598  if (argc == 0) {
41599  return _wrap_new_IndexScalarQuantizer__SWIG_2(self, args);
41600  }
41601  if (argc == 2) {
41602  int _v;
41603  {
41604  int res = SWIG_AsVal_int(argv[0], NULL);
41605  _v = SWIG_CheckState(res);
41606  }
41607  if (_v) {
41608  {
41609  int res = SWIG_AsVal_int(argv[1], NULL);
41610  _v = SWIG_CheckState(res);
41611  }
41612  if (_v) {
41613  return _wrap_new_IndexScalarQuantizer__SWIG_1(self, args);
41614  }
41615  }
41616  }
41617  if (argc == 3) {
41618  int _v;
41619  {
41620  int res = SWIG_AsVal_int(argv[0], NULL);
41621  _v = SWIG_CheckState(res);
41622  }
41623  if (_v) {
41624  {
41625  int res = SWIG_AsVal_int(argv[1], NULL);
41626  _v = SWIG_CheckState(res);
41627  }
41628  if (_v) {
41629  {
41630  int res = SWIG_AsVal_int(argv[2], NULL);
41631  _v = SWIG_CheckState(res);
41632  }
41633  if (_v) {
41634  return _wrap_new_IndexScalarQuantizer__SWIG_0(self, args);
41635  }
41636  }
41637  }
41638  }
41639 
41640 fail:
41641  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexScalarQuantizer'.\n"
41642  " Possible C/C++ prototypes are:\n"
41643  " faiss::IndexScalarQuantizer::IndexScalarQuantizer(int,faiss::ScalarQuantizer::QuantizerType,faiss::MetricType)\n"
41644  " faiss::IndexScalarQuantizer::IndexScalarQuantizer(int,faiss::ScalarQuantizer::QuantizerType)\n"
41645  " faiss::IndexScalarQuantizer::IndexScalarQuantizer()\n");
41646  return 0;
41647 }
41648 
41649 
41650 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41651  PyObject *resultobj = 0;
41653  faiss::Index::idx_t arg2 ;
41654  float *arg3 = (float *) 0 ;
41655  void *argp1 = 0 ;
41656  int res1 = 0 ;
41657  long val2 ;
41658  int ecode2 = 0 ;
41659  void *argp3 = 0 ;
41660  int res3 = 0 ;
41661  PyObject * obj0 = 0 ;
41662  PyObject * obj1 = 0 ;
41663  PyObject * obj2 = 0 ;
41664 
41665  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexScalarQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
41666  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41667  if (!SWIG_IsOK(res1)) {
41668  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_train" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41669  }
41670  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41671  ecode2 = SWIG_AsVal_long(obj1, &val2);
41672  if (!SWIG_IsOK(ecode2)) {
41673  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
41674  }
41675  arg2 = static_cast< faiss::Index::idx_t >(val2);
41676  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41677  if (!SWIG_IsOK(res3)) {
41678  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_train" "', argument " "3"" of type '" "float const *""'");
41679  }
41680  arg3 = reinterpret_cast< float * >(argp3);
41681  {
41682  Py_BEGIN_ALLOW_THREADS
41683  try {
41684  (arg1)->train(arg2,(float const *)arg3);
41685  } catch(faiss::FaissException & e) {
41686  PyEval_RestoreThread(_save);
41687  PyErr_SetString(PyExc_RuntimeError, e.what());
41688  SWIG_fail;
41689  }
41690  Py_END_ALLOW_THREADS
41691  }
41692  resultobj = SWIG_Py_Void();
41693  return resultobj;
41694 fail:
41695  return NULL;
41696 }
41697 
41698 
41699 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41700  PyObject *resultobj = 0;
41702  faiss::Index::idx_t arg2 ;
41703  float *arg3 = (float *) 0 ;
41704  void *argp1 = 0 ;
41705  int res1 = 0 ;
41706  long val2 ;
41707  int ecode2 = 0 ;
41708  void *argp3 = 0 ;
41709  int res3 = 0 ;
41710  PyObject * obj0 = 0 ;
41711  PyObject * obj1 = 0 ;
41712  PyObject * obj2 = 0 ;
41713 
41714  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexScalarQuantizer_add",&obj0,&obj1,&obj2)) SWIG_fail;
41715  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41716  if (!SWIG_IsOK(res1)) {
41717  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_add" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41718  }
41719  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41720  ecode2 = SWIG_AsVal_long(obj1, &val2);
41721  if (!SWIG_IsOK(ecode2)) {
41722  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
41723  }
41724  arg2 = static_cast< faiss::Index::idx_t >(val2);
41725  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41726  if (!SWIG_IsOK(res3)) {
41727  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_add" "', argument " "3"" of type '" "float const *""'");
41728  }
41729  arg3 = reinterpret_cast< float * >(argp3);
41730  {
41731  Py_BEGIN_ALLOW_THREADS
41732  try {
41733  (arg1)->add(arg2,(float const *)arg3);
41734  } catch(faiss::FaissException & e) {
41735  PyEval_RestoreThread(_save);
41736  PyErr_SetString(PyExc_RuntimeError, e.what());
41737  SWIG_fail;
41738  }
41739  Py_END_ALLOW_THREADS
41740  }
41741  resultobj = SWIG_Py_Void();
41742  return resultobj;
41743 fail:
41744  return NULL;
41745 }
41746 
41747 
41748 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41749  PyObject *resultobj = 0;
41751  faiss::Index::idx_t arg2 ;
41752  float *arg3 = (float *) 0 ;
41753  faiss::Index::idx_t arg4 ;
41754  float *arg5 = (float *) 0 ;
41756  void *argp1 = 0 ;
41757  int res1 = 0 ;
41758  long val2 ;
41759  int ecode2 = 0 ;
41760  void *argp3 = 0 ;
41761  int res3 = 0 ;
41762  long val4 ;
41763  int ecode4 = 0 ;
41764  void *argp5 = 0 ;
41765  int res5 = 0 ;
41766  void *argp6 = 0 ;
41767  int res6 = 0 ;
41768  PyObject * obj0 = 0 ;
41769  PyObject * obj1 = 0 ;
41770  PyObject * obj2 = 0 ;
41771  PyObject * obj3 = 0 ;
41772  PyObject * obj4 = 0 ;
41773  PyObject * obj5 = 0 ;
41774 
41775  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexScalarQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
41776  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41777  if (!SWIG_IsOK(res1)) {
41778  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_search" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer const *""'");
41779  }
41780  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41781  ecode2 = SWIG_AsVal_long(obj1, &val2);
41782  if (!SWIG_IsOK(ecode2)) {
41783  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
41784  }
41785  arg2 = static_cast< faiss::Index::idx_t >(val2);
41786  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41787  if (!SWIG_IsOK(res3)) {
41788  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_search" "', argument " "3"" of type '" "float const *""'");
41789  }
41790  arg3 = reinterpret_cast< float * >(argp3);
41791  ecode4 = SWIG_AsVal_long(obj3, &val4);
41792  if (!SWIG_IsOK(ecode4)) {
41793  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexScalarQuantizer_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
41794  }
41795  arg4 = static_cast< faiss::Index::idx_t >(val4);
41796  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
41797  if (!SWIG_IsOK(res5)) {
41798  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexScalarQuantizer_search" "', argument " "5"" of type '" "float *""'");
41799  }
41800  arg5 = reinterpret_cast< float * >(argp5);
41801  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
41802  if (!SWIG_IsOK(res6)) {
41803  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexScalarQuantizer_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
41804  }
41805  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
41806  {
41807  Py_BEGIN_ALLOW_THREADS
41808  try {
41809  ((faiss::IndexScalarQuantizer const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
41810  } catch(faiss::FaissException & e) {
41811  PyEval_RestoreThread(_save);
41812  PyErr_SetString(PyExc_RuntimeError, e.what());
41813  SWIG_fail;
41814  }
41815  Py_END_ALLOW_THREADS
41816  }
41817  resultobj = SWIG_Py_Void();
41818  return resultobj;
41819 fail:
41820  return NULL;
41821 }
41822 
41823 
41824 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41825  PyObject *resultobj = 0;
41827  void *argp1 = 0 ;
41828  int res1 = 0 ;
41829  PyObject * obj0 = 0 ;
41830 
41831  if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_reset",&obj0)) SWIG_fail;
41832  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41833  if (!SWIG_IsOK(res1)) {
41834  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_reset" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41835  }
41836  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41837  {
41838  Py_BEGIN_ALLOW_THREADS
41839  try {
41840  (arg1)->reset();
41841  } catch(faiss::FaissException & e) {
41842  PyEval_RestoreThread(_save);
41843  PyErr_SetString(PyExc_RuntimeError, e.what());
41844  SWIG_fail;
41845  }
41846  Py_END_ALLOW_THREADS
41847  }
41848  resultobj = SWIG_Py_Void();
41849  return resultobj;
41850 fail:
41851  return NULL;
41852 }
41853 
41854 
41855 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41856  PyObject *resultobj = 0;
41858  faiss::Index::idx_t arg2 ;
41859  faiss::Index::idx_t arg3 ;
41860  float *arg4 = (float *) 0 ;
41861  void *argp1 = 0 ;
41862  int res1 = 0 ;
41863  long val2 ;
41864  int ecode2 = 0 ;
41865  long val3 ;
41866  int ecode3 = 0 ;
41867  void *argp4 = 0 ;
41868  int res4 = 0 ;
41869  PyObject * obj0 = 0 ;
41870  PyObject * obj1 = 0 ;
41871  PyObject * obj2 = 0 ;
41872  PyObject * obj3 = 0 ;
41873 
41874  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexScalarQuantizer_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
41875  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41876  if (!SWIG_IsOK(res1)) {
41877  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer const *""'");
41878  }
41879  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41880  ecode2 = SWIG_AsVal_long(obj1, &val2);
41881  if (!SWIG_IsOK(ecode2)) {
41882  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
41883  }
41884  arg2 = static_cast< faiss::Index::idx_t >(val2);
41885  ecode3 = SWIG_AsVal_long(obj2, &val3);
41886  if (!SWIG_IsOK(ecode3)) {
41887  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
41888  }
41889  arg3 = static_cast< faiss::Index::idx_t >(val3);
41890  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
41891  if (!SWIG_IsOK(res4)) {
41892  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "4"" of type '" "float *""'");
41893  }
41894  arg4 = reinterpret_cast< float * >(argp4);
41895  {
41896  Py_BEGIN_ALLOW_THREADS
41897  try {
41898  ((faiss::IndexScalarQuantizer const *)arg1)->reconstruct_n(arg2,arg3,arg4);
41899  } catch(faiss::FaissException & e) {
41900  PyEval_RestoreThread(_save);
41901  PyErr_SetString(PyExc_RuntimeError, e.what());
41902  SWIG_fail;
41903  }
41904  Py_END_ALLOW_THREADS
41905  }
41906  resultobj = SWIG_Py_Void();
41907  return resultobj;
41908 fail:
41909  return NULL;
41910 }
41911 
41912 
41913 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41914  PyObject *resultobj = 0;
41916  faiss::Index::idx_t arg2 ;
41917  float *arg3 = (float *) 0 ;
41918  void *argp1 = 0 ;
41919  int res1 = 0 ;
41920  long val2 ;
41921  int ecode2 = 0 ;
41922  void *argp3 = 0 ;
41923  int res3 = 0 ;
41924  PyObject * obj0 = 0 ;
41925  PyObject * obj1 = 0 ;
41926  PyObject * obj2 = 0 ;
41927 
41928  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexScalarQuantizer_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
41929  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
41930  if (!SWIG_IsOK(res1)) {
41931  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_reconstruct" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer const *""'");
41932  }
41933  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41934  ecode2 = SWIG_AsVal_long(obj1, &val2);
41935  if (!SWIG_IsOK(ecode2)) {
41936  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
41937  }
41938  arg2 = static_cast< faiss::Index::idx_t >(val2);
41939  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41940  if (!SWIG_IsOK(res3)) {
41941  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_reconstruct" "', argument " "3"" of type '" "float *""'");
41942  }
41943  arg3 = reinterpret_cast< float * >(argp3);
41944  {
41945  Py_BEGIN_ALLOW_THREADS
41946  try {
41947  ((faiss::IndexScalarQuantizer const *)arg1)->reconstruct(arg2,arg3);
41948  } catch(faiss::FaissException & e) {
41949  PyEval_RestoreThread(_save);
41950  PyErr_SetString(PyExc_RuntimeError, e.what());
41951  SWIG_fail;
41952  }
41953  Py_END_ALLOW_THREADS
41954  }
41955  resultobj = SWIG_Py_Void();
41956  return resultobj;
41957 fail:
41958  return NULL;
41959 }
41960 
41961 
41962 SWIGINTERN PyObject *_wrap_delete_IndexScalarQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41963  PyObject *resultobj = 0;
41965  void *argp1 = 0 ;
41966  int res1 = 0 ;
41967  PyObject * obj0 = 0 ;
41968 
41969  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexScalarQuantizer",&obj0)) SWIG_fail;
41970  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_DISOWN | 0 );
41971  if (!SWIG_IsOK(res1)) {
41972  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexScalarQuantizer" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
41973  }
41974  arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
41975  delete arg1;
41976  resultobj = SWIG_Py_Void();
41977  return resultobj;
41978 fail:
41979  return NULL;
41980 }
41981 
41982 
41983 SWIGINTERN PyObject *IndexScalarQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41984  PyObject *obj;
41985  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
41986  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_NewClientData(obj));
41987  return SWIG_Py_Void();
41988 }
41989 
41990 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_sq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41991  PyObject *resultobj = 0;
41994  void *argp1 = 0 ;
41995  int res1 = 0 ;
41996  void *argp2 = 0 ;
41997  int res2 = 0 ;
41998  PyObject * obj0 = 0 ;
41999  PyObject * obj1 = 0 ;
42000 
42001  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFScalarQuantizer_sq_set",&obj0,&obj1)) SWIG_fail;
42002  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
42003  if (!SWIG_IsOK(res1)) {
42004  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_sq_set" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
42005  }
42006  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42007  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
42008  if (!SWIG_IsOK(res2)) {
42009  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFScalarQuantizer_sq_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer *""'");
42010  }
42011  arg2 = reinterpret_cast< faiss::ScalarQuantizer * >(argp2);
42012  if (arg1) (arg1)->sq = *arg2;
42013  resultobj = SWIG_Py_Void();
42014  return resultobj;
42015 fail:
42016  return NULL;
42017 }
42018 
42019 
42020 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_sq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42021  PyObject *resultobj = 0;
42023  void *argp1 = 0 ;
42024  int res1 = 0 ;
42025  PyObject * obj0 = 0 ;
42026  faiss::ScalarQuantizer *result = 0 ;
42027 
42028  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFScalarQuantizer_sq_get",&obj0)) SWIG_fail;
42029  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
42030  if (!SWIG_IsOK(res1)) {
42031  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_sq_get" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
42032  }
42033  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42034  result = (faiss::ScalarQuantizer *)& ((arg1)->sq);
42035  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
42036  return resultobj;
42037 fail:
42038  return NULL;
42039 }
42040 
42041 
42042 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42043  PyObject *resultobj = 0;
42044  faiss::Index *arg1 = (faiss::Index *) 0 ;
42045  size_t arg2 ;
42046  size_t arg3 ;
42048  faiss::MetricType arg5 ;
42049  void *argp1 = 0 ;
42050  int res1 = 0 ;
42051  size_t val2 ;
42052  int ecode2 = 0 ;
42053  size_t val3 ;
42054  int ecode3 = 0 ;
42055  int val4 ;
42056  int ecode4 = 0 ;
42057  int val5 ;
42058  int ecode5 = 0 ;
42059  PyObject * obj0 = 0 ;
42060  PyObject * obj1 = 0 ;
42061  PyObject * obj2 = 0 ;
42062  PyObject * obj3 = 0 ;
42063  PyObject * obj4 = 0 ;
42064  faiss::IndexIVFScalarQuantizer *result = 0 ;
42065 
42066  if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_IndexIVFScalarQuantizer",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
42067  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
42068  if (!SWIG_IsOK(res1)) {
42069  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "1"" of type '" "faiss::Index *""'");
42070  }
42071  arg1 = reinterpret_cast< faiss::Index * >(argp1);
42072  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
42073  if (!SWIG_IsOK(ecode2)) {
42074  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "2"" of type '" "size_t""'");
42075  }
42076  arg2 = static_cast< size_t >(val2);
42077  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
42078  if (!SWIG_IsOK(ecode3)) {
42079  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "3"" of type '" "size_t""'");
42080  }
42081  arg3 = static_cast< size_t >(val3);
42082  ecode4 = SWIG_AsVal_int(obj3, &val4);
42083  if (!SWIG_IsOK(ecode4)) {
42084  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "4"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
42085  }
42086  arg4 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val4);
42087  ecode5 = SWIG_AsVal_int(obj4, &val5);
42088  if (!SWIG_IsOK(ecode5)) {
42089  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "5"" of type '" "faiss::MetricType""'");
42090  }
42091  arg5 = static_cast< faiss::MetricType >(val5);
42092  {
42093  Py_BEGIN_ALLOW_THREADS
42094  try {
42095  result = (faiss::IndexIVFScalarQuantizer *)new faiss::IndexIVFScalarQuantizer(arg1,arg2,arg3,arg4,arg5);
42096  } catch(faiss::FaissException & e) {
42097  PyEval_RestoreThread(_save);
42098  PyErr_SetString(PyExc_RuntimeError, e.what());
42099  SWIG_fail;
42100  }
42101  Py_END_ALLOW_THREADS
42102  }
42103  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_NEW | 0 );
42104  return resultobj;
42105 fail:
42106  return NULL;
42107 }
42108 
42109 
42110 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42111  PyObject *resultobj = 0;
42112  faiss::Index *arg1 = (faiss::Index *) 0 ;
42113  size_t arg2 ;
42114  size_t arg3 ;
42116  void *argp1 = 0 ;
42117  int res1 = 0 ;
42118  size_t val2 ;
42119  int ecode2 = 0 ;
42120  size_t val3 ;
42121  int ecode3 = 0 ;
42122  int val4 ;
42123  int ecode4 = 0 ;
42124  PyObject * obj0 = 0 ;
42125  PyObject * obj1 = 0 ;
42126  PyObject * obj2 = 0 ;
42127  PyObject * obj3 = 0 ;
42128  faiss::IndexIVFScalarQuantizer *result = 0 ;
42129 
42130  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexIVFScalarQuantizer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
42131  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
42132  if (!SWIG_IsOK(res1)) {
42133  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "1"" of type '" "faiss::Index *""'");
42134  }
42135  arg1 = reinterpret_cast< faiss::Index * >(argp1);
42136  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
42137  if (!SWIG_IsOK(ecode2)) {
42138  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "2"" of type '" "size_t""'");
42139  }
42140  arg2 = static_cast< size_t >(val2);
42141  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
42142  if (!SWIG_IsOK(ecode3)) {
42143  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "3"" of type '" "size_t""'");
42144  }
42145  arg3 = static_cast< size_t >(val3);
42146  ecode4 = SWIG_AsVal_int(obj3, &val4);
42147  if (!SWIG_IsOK(ecode4)) {
42148  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "4"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
42149  }
42150  arg4 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val4);
42151  {
42152  Py_BEGIN_ALLOW_THREADS
42153  try {
42154  result = (faiss::IndexIVFScalarQuantizer *)new faiss::IndexIVFScalarQuantizer(arg1,arg2,arg3,arg4);
42155  } catch(faiss::FaissException & e) {
42156  PyEval_RestoreThread(_save);
42157  PyErr_SetString(PyExc_RuntimeError, e.what());
42158  SWIG_fail;
42159  }
42160  Py_END_ALLOW_THREADS
42161  }
42162  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_NEW | 0 );
42163  return resultobj;
42164 fail:
42165  return NULL;
42166 }
42167 
42168 
42169 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42170  PyObject *resultobj = 0;
42171  faiss::IndexIVFScalarQuantizer *result = 0 ;
42172 
42173  if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFScalarQuantizer")) SWIG_fail;
42174  {
42175  Py_BEGIN_ALLOW_THREADS
42176  try {
42178  } catch(faiss::FaissException & e) {
42179  PyEval_RestoreThread(_save);
42180  PyErr_SetString(PyExc_RuntimeError, e.what());
42181  SWIG_fail;
42182  }
42183  Py_END_ALLOW_THREADS
42184  }
42185  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_NEW | 0 );
42186  return resultobj;
42187 fail:
42188  return NULL;
42189 }
42190 
42191 
42192 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer(PyObject *self, PyObject *args) {
42193  Py_ssize_t argc;
42194  PyObject *argv[6] = {
42195  0
42196  };
42197  Py_ssize_t ii;
42198 
42199  if (!PyTuple_Check(args)) SWIG_fail;
42200  argc = args ? PyObject_Length(args) : 0;
42201  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
42202  argv[ii] = PyTuple_GET_ITEM(args,ii);
42203  }
42204  if (argc == 0) {
42205  return _wrap_new_IndexIVFScalarQuantizer__SWIG_2(self, args);
42206  }
42207  if (argc == 4) {
42208  int _v;
42209  void *vptr = 0;
42210  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
42211  _v = SWIG_CheckState(res);
42212  if (_v) {
42213  {
42214  int res = SWIG_AsVal_size_t(argv[1], NULL);
42215  _v = SWIG_CheckState(res);
42216  }
42217  if (_v) {
42218  {
42219  int res = SWIG_AsVal_size_t(argv[2], NULL);
42220  _v = SWIG_CheckState(res);
42221  }
42222  if (_v) {
42223  {
42224  int res = SWIG_AsVal_int(argv[3], NULL);
42225  _v = SWIG_CheckState(res);
42226  }
42227  if (_v) {
42228  return _wrap_new_IndexIVFScalarQuantizer__SWIG_1(self, args);
42229  }
42230  }
42231  }
42232  }
42233  }
42234  if (argc == 5) {
42235  int _v;
42236  void *vptr = 0;
42237  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
42238  _v = SWIG_CheckState(res);
42239  if (_v) {
42240  {
42241  int res = SWIG_AsVal_size_t(argv[1], NULL);
42242  _v = SWIG_CheckState(res);
42243  }
42244  if (_v) {
42245  {
42246  int res = SWIG_AsVal_size_t(argv[2], NULL);
42247  _v = SWIG_CheckState(res);
42248  }
42249  if (_v) {
42250  {
42251  int res = SWIG_AsVal_int(argv[3], NULL);
42252  _v = SWIG_CheckState(res);
42253  }
42254  if (_v) {
42255  {
42256  int res = SWIG_AsVal_int(argv[4], NULL);
42257  _v = SWIG_CheckState(res);
42258  }
42259  if (_v) {
42260  return _wrap_new_IndexIVFScalarQuantizer__SWIG_0(self, args);
42261  }
42262  }
42263  }
42264  }
42265  }
42266  }
42267 
42268 fail:
42269  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFScalarQuantizer'.\n"
42270  " Possible C/C++ prototypes are:\n"
42271  " faiss::IndexIVFScalarQuantizer::IndexIVFScalarQuantizer(faiss::Index *,size_t,size_t,faiss::ScalarQuantizer::QuantizerType,faiss::MetricType)\n"
42272  " faiss::IndexIVFScalarQuantizer::IndexIVFScalarQuantizer(faiss::Index *,size_t,size_t,faiss::ScalarQuantizer::QuantizerType)\n"
42273  " faiss::IndexIVFScalarQuantizer::IndexIVFScalarQuantizer()\n");
42274  return 0;
42275 }
42276 
42277 
42278 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42279  PyObject *resultobj = 0;
42281  faiss::Index::idx_t arg2 ;
42282  float *arg3 = (float *) 0 ;
42283  void *argp1 = 0 ;
42284  int res1 = 0 ;
42285  long val2 ;
42286  int ecode2 = 0 ;
42287  void *argp3 = 0 ;
42288  int res3 = 0 ;
42289  PyObject * obj0 = 0 ;
42290  PyObject * obj1 = 0 ;
42291  PyObject * obj2 = 0 ;
42292 
42293  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFScalarQuantizer_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
42294  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
42295  if (!SWIG_IsOK(res1)) {
42296  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_train_residual" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
42297  }
42298  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42299  ecode2 = SWIG_AsVal_long(obj1, &val2);
42300  if (!SWIG_IsOK(ecode2)) {
42301  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
42302  }
42303  arg2 = static_cast< faiss::Index::idx_t >(val2);
42304  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
42305  if (!SWIG_IsOK(res3)) {
42306  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFScalarQuantizer_train_residual" "', argument " "3"" of type '" "float const *""'");
42307  }
42308  arg3 = reinterpret_cast< float * >(argp3);
42309  {
42310  Py_BEGIN_ALLOW_THREADS
42311  try {
42312  (arg1)->train_residual(arg2,(float const *)arg3);
42313  } catch(faiss::FaissException & e) {
42314  PyEval_RestoreThread(_save);
42315  PyErr_SetString(PyExc_RuntimeError, e.what());
42316  SWIG_fail;
42317  }
42318  Py_END_ALLOW_THREADS
42319  }
42320  resultobj = SWIG_Py_Void();
42321  return resultobj;
42322 fail:
42323  return NULL;
42324 }
42325 
42326 
42327 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42328  PyObject *resultobj = 0;
42330  faiss::Index::idx_t arg2 ;
42331  float *arg3 = (float *) 0 ;
42333  uint8_t *arg5 = (uint8_t *) 0 ;
42334  void *argp1 = 0 ;
42335  int res1 = 0 ;
42336  long val2 ;
42337  int ecode2 = 0 ;
42338  void *argp3 = 0 ;
42339  int res3 = 0 ;
42340  void *argp4 = 0 ;
42341  int res4 = 0 ;
42342  void *argp5 = 0 ;
42343  int res5 = 0 ;
42344  PyObject * obj0 = 0 ;
42345  PyObject * obj1 = 0 ;
42346  PyObject * obj2 = 0 ;
42347  PyObject * obj3 = 0 ;
42348  PyObject * obj4 = 0 ;
42349 
42350  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFScalarQuantizer_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
42351  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
42352  if (!SWIG_IsOK(res1)) {
42353  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer const *""'");
42354  }
42355  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42356  ecode2 = SWIG_AsVal_long(obj1, &val2);
42357  if (!SWIG_IsOK(ecode2)) {
42358  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
42359  }
42360  arg2 = static_cast< faiss::Index::idx_t >(val2);
42361  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
42362  if (!SWIG_IsOK(res3)) {
42363  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "3"" of type '" "float const *""'");
42364  }
42365  arg3 = reinterpret_cast< float * >(argp3);
42366  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
42367  if (!SWIG_IsOK(res4)) {
42368  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
42369  }
42370  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
42371  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
42372  if (!SWIG_IsOK(res5)) {
42373  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
42374  }
42375  arg5 = reinterpret_cast< uint8_t * >(argp5);
42376  {
42377  Py_BEGIN_ALLOW_THREADS
42378  try {
42379  ((faiss::IndexIVFScalarQuantizer const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
42380  } catch(faiss::FaissException & e) {
42381  PyEval_RestoreThread(_save);
42382  PyErr_SetString(PyExc_RuntimeError, e.what());
42383  SWIG_fail;
42384  }
42385  Py_END_ALLOW_THREADS
42386  }
42387  resultobj = SWIG_Py_Void();
42388  return resultobj;
42389 fail:
42390  return NULL;
42391 }
42392 
42393 
42394 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42395  PyObject *resultobj = 0;
42397  faiss::Index::idx_t arg2 ;
42398  float *arg3 = (float *) 0 ;
42399  long *arg4 = (long *) 0 ;
42400  void *argp1 = 0 ;
42401  int res1 = 0 ;
42402  long val2 ;
42403  int ecode2 = 0 ;
42404  void *argp3 = 0 ;
42405  int res3 = 0 ;
42406  void *argp4 = 0 ;
42407  int res4 = 0 ;
42408  PyObject * obj0 = 0 ;
42409  PyObject * obj1 = 0 ;
42410  PyObject * obj2 = 0 ;
42411  PyObject * obj3 = 0 ;
42412 
42413  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFScalarQuantizer_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
42414  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
42415  if (!SWIG_IsOK(res1)) {
42416  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
42417  }
42418  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42419  ecode2 = SWIG_AsVal_long(obj1, &val2);
42420  if (!SWIG_IsOK(ecode2)) {
42421  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
42422  }
42423  arg2 = static_cast< faiss::Index::idx_t >(val2);
42424  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
42425  if (!SWIG_IsOK(res3)) {
42426  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "3"" of type '" "float const *""'");
42427  }
42428  arg3 = reinterpret_cast< float * >(argp3);
42429  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
42430  if (!SWIG_IsOK(res4)) {
42431  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "4"" of type '" "long const *""'");
42432  }
42433  arg4 = reinterpret_cast< long * >(argp4);
42434  {
42435  Py_BEGIN_ALLOW_THREADS
42436  try {
42437  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
42438  } catch(faiss::FaissException & e) {
42439  PyEval_RestoreThread(_save);
42440  PyErr_SetString(PyExc_RuntimeError, e.what());
42441  SWIG_fail;
42442  }
42443  Py_END_ALLOW_THREADS
42444  }
42445  resultobj = SWIG_Py_Void();
42446  return resultobj;
42447 fail:
42448  return NULL;
42449 }
42450 
42451 
42452 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_get_InvertedListScanner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42453  PyObject *resultobj = 0;
42455  bool arg2 ;
42456  void *argp1 = 0 ;
42457  int res1 = 0 ;
42458  bool val2 ;
42459  int ecode2 = 0 ;
42460  PyObject * obj0 = 0 ;
42461  PyObject * obj1 = 0 ;
42462  faiss::InvertedListScanner *result = 0 ;
42463 
42464  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFScalarQuantizer_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
42465  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
42466  if (!SWIG_IsOK(res1)) {
42467  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer const *""'");
42468  }
42469  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42470  ecode2 = SWIG_AsVal_bool(obj1, &val2);
42471  if (!SWIG_IsOK(ecode2)) {
42472  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
42473  }
42474  arg2 = static_cast< bool >(val2);
42475  {
42476  Py_BEGIN_ALLOW_THREADS
42477  try {
42478  result = (faiss::InvertedListScanner *)((faiss::IndexIVFScalarQuantizer const *)arg1)->get_InvertedListScanner(arg2);
42479  } catch(faiss::FaissException & e) {
42480  PyEval_RestoreThread(_save);
42481  PyErr_SetString(PyExc_RuntimeError, e.what());
42482  SWIG_fail;
42483  }
42484  Py_END_ALLOW_THREADS
42485  }
42486  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
42487  return resultobj;
42488 fail:
42489  return NULL;
42490 }
42491 
42492 
42493 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42494  PyObject *resultobj = 0;
42496  long arg2 ;
42497  long arg3 ;
42498  float *arg4 = (float *) 0 ;
42499  void *argp1 = 0 ;
42500  int res1 = 0 ;
42501  long val2 ;
42502  int ecode2 = 0 ;
42503  long val3 ;
42504  int ecode3 = 0 ;
42505  void *argp4 = 0 ;
42506  int res4 = 0 ;
42507  PyObject * obj0 = 0 ;
42508  PyObject * obj1 = 0 ;
42509  PyObject * obj2 = 0 ;
42510  PyObject * obj3 = 0 ;
42511 
42512  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFScalarQuantizer_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
42513  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
42514  if (!SWIG_IsOK(res1)) {
42515  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer const *""'");
42516  }
42517  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42518  ecode2 = SWIG_AsVal_long(obj1, &val2);
42519  if (!SWIG_IsOK(ecode2)) {
42520  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
42521  }
42522  arg2 = static_cast< long >(val2);
42523  ecode3 = SWIG_AsVal_long(obj2, &val3);
42524  if (!SWIG_IsOK(ecode3)) {
42525  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
42526  }
42527  arg3 = static_cast< long >(val3);
42528  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
42529  if (!SWIG_IsOK(res4)) {
42530  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
42531  }
42532  arg4 = reinterpret_cast< float * >(argp4);
42533  {
42534  Py_BEGIN_ALLOW_THREADS
42535  try {
42536  ((faiss::IndexIVFScalarQuantizer const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
42537  } catch(faiss::FaissException & e) {
42538  PyEval_RestoreThread(_save);
42539  PyErr_SetString(PyExc_RuntimeError, e.what());
42540  SWIG_fail;
42541  }
42542  Py_END_ALLOW_THREADS
42543  }
42544  resultobj = SWIG_Py_Void();
42545  return resultobj;
42546 fail:
42547  return NULL;
42548 }
42549 
42550 
42551 SWIGINTERN PyObject *_wrap_delete_IndexIVFScalarQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42552  PyObject *resultobj = 0;
42554  void *argp1 = 0 ;
42555  int res1 = 0 ;
42556  PyObject * obj0 = 0 ;
42557 
42558  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFScalarQuantizer",&obj0)) SWIG_fail;
42559  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_DISOWN | 0 );
42560  if (!SWIG_IsOK(res1)) {
42561  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFScalarQuantizer" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
42562  }
42563  arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
42564  delete arg1;
42565  resultobj = SWIG_Py_Void();
42566  return resultobj;
42567 fail:
42568  return NULL;
42569 }
42570 
42571 
42572 SWIGINTERN PyObject *IndexIVFScalarQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42573  PyObject *obj;
42574  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
42575  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_NewClientData(obj));
42576  return SWIG_Py_Void();
42577 }
42578 
42579 SWIGINTERN PyObject *_wrap_HNSW_assign_probas_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42580  PyObject *resultobj = 0;
42581  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42582  std::vector< double > *arg2 = (std::vector< double > *) 0 ;
42583  void *argp1 = 0 ;
42584  int res1 = 0 ;
42585  void *argp2 = 0 ;
42586  int res2 = 0 ;
42587  PyObject * obj0 = 0 ;
42588  PyObject * obj1 = 0 ;
42589 
42590  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_assign_probas_set",&obj0,&obj1)) SWIG_fail;
42591  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42592  if (!SWIG_IsOK(res1)) {
42593  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_assign_probas_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42594  }
42595  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42596  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
42597  if (!SWIG_IsOK(res2)) {
42598  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_assign_probas_set" "', argument " "2"" of type '" "std::vector< double > *""'");
42599  }
42600  arg2 = reinterpret_cast< std::vector< double > * >(argp2);
42601  if (arg1) (arg1)->assign_probas = *arg2;
42602  resultobj = SWIG_Py_Void();
42603  return resultobj;
42604 fail:
42605  return NULL;
42606 }
42607 
42608 
42609 SWIGINTERN PyObject *_wrap_HNSW_assign_probas_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42610  PyObject *resultobj = 0;
42611  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42612  void *argp1 = 0 ;
42613  int res1 = 0 ;
42614  PyObject * obj0 = 0 ;
42615  std::vector< double > *result = 0 ;
42616 
42617  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_assign_probas_get",&obj0)) SWIG_fail;
42618  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42619  if (!SWIG_IsOK(res1)) {
42620  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_assign_probas_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42621  }
42622  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42623  result = (std::vector< double > *)& ((arg1)->assign_probas);
42624  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
42625  return resultobj;
42626 fail:
42627  return NULL;
42628 }
42629 
42630 
42631 SWIGINTERN PyObject *_wrap_HNSW_cum_nneighbor_per_level_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42632  PyObject *resultobj = 0;
42633  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42634  std::vector< int > *arg2 = (std::vector< int > *) 0 ;
42635  void *argp1 = 0 ;
42636  int res1 = 0 ;
42637  void *argp2 = 0 ;
42638  int res2 = 0 ;
42639  PyObject * obj0 = 0 ;
42640  PyObject * obj1 = 0 ;
42641 
42642  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_cum_nneighbor_per_level_set",&obj0,&obj1)) SWIG_fail;
42643  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42644  if (!SWIG_IsOK(res1)) {
42645  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_cum_nneighbor_per_level_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42646  }
42647  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42648  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
42649  if (!SWIG_IsOK(res2)) {
42650  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_cum_nneighbor_per_level_set" "', argument " "2"" of type '" "std::vector< int > *""'");
42651  }
42652  arg2 = reinterpret_cast< std::vector< int > * >(argp2);
42653  if (arg1) (arg1)->cum_nneighbor_per_level = *arg2;
42654  resultobj = SWIG_Py_Void();
42655  return resultobj;
42656 fail:
42657  return NULL;
42658 }
42659 
42660 
42661 SWIGINTERN PyObject *_wrap_HNSW_cum_nneighbor_per_level_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42662  PyObject *resultobj = 0;
42663  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42664  void *argp1 = 0 ;
42665  int res1 = 0 ;
42666  PyObject * obj0 = 0 ;
42667  std::vector< int > *result = 0 ;
42668 
42669  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_cum_nneighbor_per_level_get",&obj0)) SWIG_fail;
42670  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42671  if (!SWIG_IsOK(res1)) {
42672  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_cum_nneighbor_per_level_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42673  }
42674  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42675  result = (std::vector< int > *)& ((arg1)->cum_nneighbor_per_level);
42676  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
42677  return resultobj;
42678 fail:
42679  return NULL;
42680 }
42681 
42682 
42683 SWIGINTERN PyObject *_wrap_HNSW_levels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42684  PyObject *resultobj = 0;
42685  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42686  std::vector< int > *arg2 = (std::vector< int > *) 0 ;
42687  void *argp1 = 0 ;
42688  int res1 = 0 ;
42689  void *argp2 = 0 ;
42690  int res2 = 0 ;
42691  PyObject * obj0 = 0 ;
42692  PyObject * obj1 = 0 ;
42693 
42694  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_levels_set",&obj0,&obj1)) SWIG_fail;
42695  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42696  if (!SWIG_IsOK(res1)) {
42697  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_levels_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42698  }
42699  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42700  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
42701  if (!SWIG_IsOK(res2)) {
42702  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_levels_set" "', argument " "2"" of type '" "std::vector< int > *""'");
42703  }
42704  arg2 = reinterpret_cast< std::vector< int > * >(argp2);
42705  if (arg1) (arg1)->levels = *arg2;
42706  resultobj = SWIG_Py_Void();
42707  return resultobj;
42708 fail:
42709  return NULL;
42710 }
42711 
42712 
42713 SWIGINTERN PyObject *_wrap_HNSW_levels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42714  PyObject *resultobj = 0;
42715  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42716  void *argp1 = 0 ;
42717  int res1 = 0 ;
42718  PyObject * obj0 = 0 ;
42719  std::vector< int > *result = 0 ;
42720 
42721  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_levels_get",&obj0)) SWIG_fail;
42722  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42723  if (!SWIG_IsOK(res1)) {
42724  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_levels_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42725  }
42726  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42727  result = (std::vector< int > *)& ((arg1)->levels);
42728  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
42729  return resultobj;
42730 fail:
42731  return NULL;
42732 }
42733 
42734 
42735 SWIGINTERN PyObject *_wrap_HNSW_offsets_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42736  PyObject *resultobj = 0;
42737  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42738  std::vector< size_t > *arg2 = (std::vector< size_t > *) 0 ;
42739  void *argp1 = 0 ;
42740  int res1 = 0 ;
42741  void *argp2 = 0 ;
42742  int res2 = 0 ;
42743  PyObject * obj0 = 0 ;
42744  PyObject * obj1 = 0 ;
42745 
42746  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_offsets_set",&obj0,&obj1)) SWIG_fail;
42747  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42748  if (!SWIG_IsOK(res1)) {
42749  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_offsets_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42750  }
42751  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42752  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
42753  if (!SWIG_IsOK(res2)) {
42754  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_offsets_set" "', argument " "2"" of type '" "std::vector< size_t > *""'");
42755  }
42756  arg2 = reinterpret_cast< std::vector< size_t > * >(argp2);
42757  if (arg1) (arg1)->offsets = *arg2;
42758  resultobj = SWIG_Py_Void();
42759  return resultobj;
42760 fail:
42761  return NULL;
42762 }
42763 
42764 
42765 SWIGINTERN PyObject *_wrap_HNSW_offsets_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42766  PyObject *resultobj = 0;
42767  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42768  void *argp1 = 0 ;
42769  int res1 = 0 ;
42770  PyObject * obj0 = 0 ;
42771  std::vector< size_t > *result = 0 ;
42772 
42773  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_offsets_get",&obj0)) SWIG_fail;
42774  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42775  if (!SWIG_IsOK(res1)) {
42776  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_offsets_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42777  }
42778  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42779  result = (std::vector< size_t > *)& ((arg1)->offsets);
42780  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
42781  return resultobj;
42782 fail:
42783  return NULL;
42784 }
42785 
42786 
42787 SWIGINTERN PyObject *_wrap_HNSW_neighbors_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42788  PyObject *resultobj = 0;
42789  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42790  std::vector< faiss::HNSW::storage_idx_t > *arg2 = (std::vector< faiss::HNSW::storage_idx_t > *) 0 ;
42791  void *argp1 = 0 ;
42792  int res1 = 0 ;
42793  void *argp2 = 0 ;
42794  int res2 = 0 ;
42795  PyObject * obj0 = 0 ;
42796  PyObject * obj1 = 0 ;
42797 
42798  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_neighbors_set",&obj0,&obj1)) SWIG_fail;
42799  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42800  if (!SWIG_IsOK(res1)) {
42801  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_neighbors_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42802  }
42803  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42804  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
42805  if (!SWIG_IsOK(res2)) {
42806  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_neighbors_set" "', argument " "2"" of type '" "std::vector< faiss::HNSW::storage_idx_t > *""'");
42807  }
42808  arg2 = reinterpret_cast< std::vector< faiss::HNSW::storage_idx_t > * >(argp2);
42809  if (arg1) (arg1)->neighbors = *arg2;
42810  resultobj = SWIG_Py_Void();
42811  return resultobj;
42812 fail:
42813  return NULL;
42814 }
42815 
42816 
42817 SWIGINTERN PyObject *_wrap_HNSW_neighbors_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42818  PyObject *resultobj = 0;
42819  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42820  void *argp1 = 0 ;
42821  int res1 = 0 ;
42822  PyObject * obj0 = 0 ;
42823  std::vector< faiss::HNSW::storage_idx_t > *result = 0 ;
42824 
42825  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_neighbors_get",&obj0)) SWIG_fail;
42826  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42827  if (!SWIG_IsOK(res1)) {
42828  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_neighbors_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42829  }
42830  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42831  result = (std::vector< faiss::HNSW::storage_idx_t > *)& ((arg1)->neighbors);
42832  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
42833  return resultobj;
42834 fail:
42835  return NULL;
42836 }
42837 
42838 
42839 SWIGINTERN PyObject *_wrap_HNSW_entry_point_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42840  PyObject *resultobj = 0;
42841  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42843  void *argp1 = 0 ;
42844  int res1 = 0 ;
42845  int val2 ;
42846  int ecode2 = 0 ;
42847  PyObject * obj0 = 0 ;
42848  PyObject * obj1 = 0 ;
42849 
42850  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_entry_point_set",&obj0,&obj1)) SWIG_fail;
42851  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42852  if (!SWIG_IsOK(res1)) {
42853  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_entry_point_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42854  }
42855  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42856  ecode2 = SWIG_AsVal_int(obj1, &val2);
42857  if (!SWIG_IsOK(ecode2)) {
42858  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_entry_point_set" "', argument " "2"" of type '" "faiss::HNSW::storage_idx_t""'");
42859  }
42860  arg2 = static_cast< faiss::HNSW::storage_idx_t >(val2);
42861  if (arg1) (arg1)->entry_point = arg2;
42862  resultobj = SWIG_Py_Void();
42863  return resultobj;
42864 fail:
42865  return NULL;
42866 }
42867 
42868 
42869 SWIGINTERN PyObject *_wrap_HNSW_entry_point_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42870  PyObject *resultobj = 0;
42871  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42872  void *argp1 = 0 ;
42873  int res1 = 0 ;
42874  PyObject * obj0 = 0 ;
42876 
42877  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_entry_point_get",&obj0)) SWIG_fail;
42878  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42879  if (!SWIG_IsOK(res1)) {
42880  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_entry_point_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42881  }
42882  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42883  result = (faiss::HNSW::storage_idx_t) ((arg1)->entry_point);
42884  resultobj = SWIG_From_int(static_cast< int >(result));
42885  return resultobj;
42886 fail:
42887  return NULL;
42888 }
42889 
42890 
42891 SWIGINTERN PyObject *_wrap_HNSW_rng_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42892  PyObject *resultobj = 0;
42893  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42895  void *argp1 = 0 ;
42896  int res1 = 0 ;
42897  void *argp2 = 0 ;
42898  int res2 = 0 ;
42899  PyObject * obj0 = 0 ;
42900  PyObject * obj1 = 0 ;
42901 
42902  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_rng_set",&obj0,&obj1)) SWIG_fail;
42903  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42904  if (!SWIG_IsOK(res1)) {
42905  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_rng_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42906  }
42907  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42908  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
42909  if (!SWIG_IsOK(res2)) {
42910  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_rng_set" "', argument " "2"" of type '" "faiss::RandomGenerator *""'");
42911  }
42912  arg2 = reinterpret_cast< faiss::RandomGenerator * >(argp2);
42913  if (arg1) (arg1)->rng = *arg2;
42914  resultobj = SWIG_Py_Void();
42915  return resultobj;
42916 fail:
42917  return NULL;
42918 }
42919 
42920 
42921 SWIGINTERN PyObject *_wrap_HNSW_rng_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42922  PyObject *resultobj = 0;
42923  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42924  void *argp1 = 0 ;
42925  int res1 = 0 ;
42926  PyObject * obj0 = 0 ;
42927  faiss::RandomGenerator *result = 0 ;
42928 
42929  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_rng_get",&obj0)) SWIG_fail;
42930  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42931  if (!SWIG_IsOK(res1)) {
42932  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_rng_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42933  }
42934  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42935  result = (faiss::RandomGenerator *)& ((arg1)->rng);
42936  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
42937  return resultobj;
42938 fail:
42939  return NULL;
42940 }
42941 
42942 
42943 SWIGINTERN PyObject *_wrap_HNSW_max_level_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42944  PyObject *resultobj = 0;
42945  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42946  int arg2 ;
42947  void *argp1 = 0 ;
42948  int res1 = 0 ;
42949  int val2 ;
42950  int ecode2 = 0 ;
42951  PyObject * obj0 = 0 ;
42952  PyObject * obj1 = 0 ;
42953 
42954  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_max_level_set",&obj0,&obj1)) SWIG_fail;
42955  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42956  if (!SWIG_IsOK(res1)) {
42957  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_max_level_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
42958  }
42959  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42960  ecode2 = SWIG_AsVal_int(obj1, &val2);
42961  if (!SWIG_IsOK(ecode2)) {
42962  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_max_level_set" "', argument " "2"" of type '" "int""'");
42963  }
42964  arg2 = static_cast< int >(val2);
42965  if (arg1) (arg1)->max_level = arg2;
42966  resultobj = SWIG_Py_Void();
42967  return resultobj;
42968 fail:
42969  return NULL;
42970 }
42971 
42972 
42973 SWIGINTERN PyObject *_wrap_HNSW_max_level_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42974  PyObject *resultobj = 0;
42975  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42976  void *argp1 = 0 ;
42977  int res1 = 0 ;
42978  PyObject * obj0 = 0 ;
42979  int result;
42980 
42981  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_max_level_get",&obj0)) SWIG_fail;
42982  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42983  if (!SWIG_IsOK(res1)) {
42984  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_max_level_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
42985  }
42986  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42987  result = (int) ((arg1)->max_level);
42988  resultobj = SWIG_From_int(static_cast< int >(result));
42989  return resultobj;
42990 fail:
42991  return NULL;
42992 }
42993 
42994 
42995 SWIGINTERN PyObject *_wrap_HNSW_efConstruction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42996  PyObject *resultobj = 0;
42997  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42998  int arg2 ;
42999  void *argp1 = 0 ;
43000  int res1 = 0 ;
43001  int val2 ;
43002  int ecode2 = 0 ;
43003  PyObject * obj0 = 0 ;
43004  PyObject * obj1 = 0 ;
43005 
43006  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_efConstruction_set",&obj0,&obj1)) SWIG_fail;
43007  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43008  if (!SWIG_IsOK(res1)) {
43009  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efConstruction_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
43010  }
43011  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43012  ecode2 = SWIG_AsVal_int(obj1, &val2);
43013  if (!SWIG_IsOK(ecode2)) {
43014  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_efConstruction_set" "', argument " "2"" of type '" "int""'");
43015  }
43016  arg2 = static_cast< int >(val2);
43017  if (arg1) (arg1)->efConstruction = arg2;
43018  resultobj = SWIG_Py_Void();
43019  return resultobj;
43020 fail:
43021  return NULL;
43022 }
43023 
43024 
43025 SWIGINTERN PyObject *_wrap_HNSW_efConstruction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43026  PyObject *resultobj = 0;
43027  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43028  void *argp1 = 0 ;
43029  int res1 = 0 ;
43030  PyObject * obj0 = 0 ;
43031  int result;
43032 
43033  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_efConstruction_get",&obj0)) SWIG_fail;
43034  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43035  if (!SWIG_IsOK(res1)) {
43036  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efConstruction_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
43037  }
43038  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43039  result = (int) ((arg1)->efConstruction);
43040  resultobj = SWIG_From_int(static_cast< int >(result));
43041  return resultobj;
43042 fail:
43043  return NULL;
43044 }
43045 
43046 
43047 SWIGINTERN PyObject *_wrap_HNSW_efSearch_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43048  PyObject *resultobj = 0;
43049  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43050  int arg2 ;
43051  void *argp1 = 0 ;
43052  int res1 = 0 ;
43053  int val2 ;
43054  int ecode2 = 0 ;
43055  PyObject * obj0 = 0 ;
43056  PyObject * obj1 = 0 ;
43057 
43058  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_efSearch_set",&obj0,&obj1)) SWIG_fail;
43059  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43060  if (!SWIG_IsOK(res1)) {
43061  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efSearch_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
43062  }
43063  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43064  ecode2 = SWIG_AsVal_int(obj1, &val2);
43065  if (!SWIG_IsOK(ecode2)) {
43066  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_efSearch_set" "', argument " "2"" of type '" "int""'");
43067  }
43068  arg2 = static_cast< int >(val2);
43069  if (arg1) (arg1)->efSearch = arg2;
43070  resultobj = SWIG_Py_Void();
43071  return resultobj;
43072 fail:
43073  return NULL;
43074 }
43075 
43076 
43077 SWIGINTERN PyObject *_wrap_HNSW_efSearch_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43078  PyObject *resultobj = 0;
43079  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43080  void *argp1 = 0 ;
43081  int res1 = 0 ;
43082  PyObject * obj0 = 0 ;
43083  int result;
43084 
43085  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_efSearch_get",&obj0)) SWIG_fail;
43086  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43087  if (!SWIG_IsOK(res1)) {
43088  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efSearch_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
43089  }
43090  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43091  result = (int) ((arg1)->efSearch);
43092  resultobj = SWIG_From_int(static_cast< int >(result));
43093  return resultobj;
43094 fail:
43095  return NULL;
43096 }
43097 
43098 
43099 SWIGINTERN PyObject *_wrap_HNSW_upper_beam_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43100  PyObject *resultobj = 0;
43101  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43102  int arg2 ;
43103  void *argp1 = 0 ;
43104  int res1 = 0 ;
43105  int val2 ;
43106  int ecode2 = 0 ;
43107  PyObject * obj0 = 0 ;
43108  PyObject * obj1 = 0 ;
43109 
43110  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_upper_beam_set",&obj0,&obj1)) SWIG_fail;
43111  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43112  if (!SWIG_IsOK(res1)) {
43113  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_upper_beam_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
43114  }
43115  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43116  ecode2 = SWIG_AsVal_int(obj1, &val2);
43117  if (!SWIG_IsOK(ecode2)) {
43118  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_upper_beam_set" "', argument " "2"" of type '" "int""'");
43119  }
43120  arg2 = static_cast< int >(val2);
43121  if (arg1) (arg1)->upper_beam = arg2;
43122  resultobj = SWIG_Py_Void();
43123  return resultobj;
43124 fail:
43125  return NULL;
43126 }
43127 
43128 
43129 SWIGINTERN PyObject *_wrap_HNSW_upper_beam_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43130  PyObject *resultobj = 0;
43131  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43132  void *argp1 = 0 ;
43133  int res1 = 0 ;
43134  PyObject * obj0 = 0 ;
43135  int result;
43136 
43137  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_upper_beam_get",&obj0)) SWIG_fail;
43138  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43139  if (!SWIG_IsOK(res1)) {
43140  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_upper_beam_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
43141  }
43142  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43143  result = (int) ((arg1)->upper_beam);
43144  resultobj = SWIG_From_int(static_cast< int >(result));
43145  return resultobj;
43146 fail:
43147  return NULL;
43148 }
43149 
43150 
43151 SWIGINTERN PyObject *_wrap_HNSW_set_default_probas(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43152  PyObject *resultobj = 0;
43153  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43154  int arg2 ;
43155  float arg3 ;
43156  void *argp1 = 0 ;
43157  int res1 = 0 ;
43158  int val2 ;
43159  int ecode2 = 0 ;
43160  float val3 ;
43161  int ecode3 = 0 ;
43162  PyObject * obj0 = 0 ;
43163  PyObject * obj1 = 0 ;
43164  PyObject * obj2 = 0 ;
43165 
43166  if (!PyArg_ParseTuple(args,(char *)"OOO:HNSW_set_default_probas",&obj0,&obj1,&obj2)) SWIG_fail;
43167  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43168  if (!SWIG_IsOK(res1)) {
43169  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_set_default_probas" "', argument " "1"" of type '" "faiss::HNSW *""'");
43170  }
43171  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43172  ecode2 = SWIG_AsVal_int(obj1, &val2);
43173  if (!SWIG_IsOK(ecode2)) {
43174  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_set_default_probas" "', argument " "2"" of type '" "int""'");
43175  }
43176  arg2 = static_cast< int >(val2);
43177  ecode3 = SWIG_AsVal_float(obj2, &val3);
43178  if (!SWIG_IsOK(ecode3)) {
43179  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_set_default_probas" "', argument " "3"" of type '" "float""'");
43180  }
43181  arg3 = static_cast< float >(val3);
43182  {
43183  Py_BEGIN_ALLOW_THREADS
43184  try {
43185  (arg1)->set_default_probas(arg2,arg3);
43186  } catch(faiss::FaissException & e) {
43187  PyEval_RestoreThread(_save);
43188  PyErr_SetString(PyExc_RuntimeError, e.what());
43189  SWIG_fail;
43190  }
43191  Py_END_ALLOW_THREADS
43192  }
43193  resultobj = SWIG_Py_Void();
43194  return resultobj;
43195 fail:
43196  return NULL;
43197 }
43198 
43199 
43200 SWIGINTERN PyObject *_wrap_HNSW_set_nb_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43201  PyObject *resultobj = 0;
43202  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43203  int arg2 ;
43204  int arg3 ;
43205  void *argp1 = 0 ;
43206  int res1 = 0 ;
43207  int val2 ;
43208  int ecode2 = 0 ;
43209  int val3 ;
43210  int ecode3 = 0 ;
43211  PyObject * obj0 = 0 ;
43212  PyObject * obj1 = 0 ;
43213  PyObject * obj2 = 0 ;
43214 
43215  if (!PyArg_ParseTuple(args,(char *)"OOO:HNSW_set_nb_neighbors",&obj0,&obj1,&obj2)) SWIG_fail;
43216  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43217  if (!SWIG_IsOK(res1)) {
43218  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_set_nb_neighbors" "', argument " "1"" of type '" "faiss::HNSW *""'");
43219  }
43220  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43221  ecode2 = SWIG_AsVal_int(obj1, &val2);
43222  if (!SWIG_IsOK(ecode2)) {
43223  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_set_nb_neighbors" "', argument " "2"" of type '" "int""'");
43224  }
43225  arg2 = static_cast< int >(val2);
43226  ecode3 = SWIG_AsVal_int(obj2, &val3);
43227  if (!SWIG_IsOK(ecode3)) {
43228  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_set_nb_neighbors" "', argument " "3"" of type '" "int""'");
43229  }
43230  arg3 = static_cast< int >(val3);
43231  {
43232  Py_BEGIN_ALLOW_THREADS
43233  try {
43234  (arg1)->set_nb_neighbors(arg2,arg3);
43235  } catch(faiss::FaissException & e) {
43236  PyEval_RestoreThread(_save);
43237  PyErr_SetString(PyExc_RuntimeError, e.what());
43238  SWIG_fail;
43239  }
43240  Py_END_ALLOW_THREADS
43241  }
43242  resultobj = SWIG_Py_Void();
43243  return resultobj;
43244 fail:
43245  return NULL;
43246 }
43247 
43248 
43249 SWIGINTERN PyObject *_wrap_HNSW_nb_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43250  PyObject *resultobj = 0;
43251  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43252  int arg2 ;
43253  void *argp1 = 0 ;
43254  int res1 = 0 ;
43255  int val2 ;
43256  int ecode2 = 0 ;
43257  PyObject * obj0 = 0 ;
43258  PyObject * obj1 = 0 ;
43259  int result;
43260 
43261  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_nb_neighbors",&obj0,&obj1)) SWIG_fail;
43262  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43263  if (!SWIG_IsOK(res1)) {
43264  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_nb_neighbors" "', argument " "1"" of type '" "faiss::HNSW const *""'");
43265  }
43266  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43267  ecode2 = SWIG_AsVal_int(obj1, &val2);
43268  if (!SWIG_IsOK(ecode2)) {
43269  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_nb_neighbors" "', argument " "2"" of type '" "int""'");
43270  }
43271  arg2 = static_cast< int >(val2);
43272  {
43273  Py_BEGIN_ALLOW_THREADS
43274  try {
43275  result = (int)((faiss::HNSW const *)arg1)->nb_neighbors(arg2);
43276  } catch(faiss::FaissException & e) {
43277  PyEval_RestoreThread(_save);
43278  PyErr_SetString(PyExc_RuntimeError, e.what());
43279  SWIG_fail;
43280  }
43281  Py_END_ALLOW_THREADS
43282  }
43283  resultobj = SWIG_From_int(static_cast< int >(result));
43284  return resultobj;
43285 fail:
43286  return NULL;
43287 }
43288 
43289 
43290 SWIGINTERN PyObject *_wrap_HNSW_cum_nb_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43291  PyObject *resultobj = 0;
43292  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43293  int arg2 ;
43294  void *argp1 = 0 ;
43295  int res1 = 0 ;
43296  int val2 ;
43297  int ecode2 = 0 ;
43298  PyObject * obj0 = 0 ;
43299  PyObject * obj1 = 0 ;
43300  int result;
43301 
43302  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_cum_nb_neighbors",&obj0,&obj1)) SWIG_fail;
43303  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43304  if (!SWIG_IsOK(res1)) {
43305  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_cum_nb_neighbors" "', argument " "1"" of type '" "faiss::HNSW const *""'");
43306  }
43307  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43308  ecode2 = SWIG_AsVal_int(obj1, &val2);
43309  if (!SWIG_IsOK(ecode2)) {
43310  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_cum_nb_neighbors" "', argument " "2"" of type '" "int""'");
43311  }
43312  arg2 = static_cast< int >(val2);
43313  {
43314  Py_BEGIN_ALLOW_THREADS
43315  try {
43316  result = (int)((faiss::HNSW const *)arg1)->cum_nb_neighbors(arg2);
43317  } catch(faiss::FaissException & e) {
43318  PyEval_RestoreThread(_save);
43319  PyErr_SetString(PyExc_RuntimeError, e.what());
43320  SWIG_fail;
43321  }
43322  Py_END_ALLOW_THREADS
43323  }
43324  resultobj = SWIG_From_int(static_cast< int >(result));
43325  return resultobj;
43326 fail:
43327  return NULL;
43328 }
43329 
43330 
43331 SWIGINTERN PyObject *_wrap_HNSW_neighbor_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43332  PyObject *resultobj = 0;
43333  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43334  faiss::HNSW::idx_t arg2 ;
43335  int arg3 ;
43336  size_t *arg4 = (size_t *) 0 ;
43337  size_t *arg5 = (size_t *) 0 ;
43338  void *argp1 = 0 ;
43339  int res1 = 0 ;
43340  long val2 ;
43341  int ecode2 = 0 ;
43342  int val3 ;
43343  int ecode3 = 0 ;
43344  void *argp4 = 0 ;
43345  int res4 = 0 ;
43346  void *argp5 = 0 ;
43347  int res5 = 0 ;
43348  PyObject * obj0 = 0 ;
43349  PyObject * obj1 = 0 ;
43350  PyObject * obj2 = 0 ;
43351  PyObject * obj3 = 0 ;
43352  PyObject * obj4 = 0 ;
43353 
43354  if (!PyArg_ParseTuple(args,(char *)"OOOOO:HNSW_neighbor_range",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
43355  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43356  if (!SWIG_IsOK(res1)) {
43357  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_neighbor_range" "', argument " "1"" of type '" "faiss::HNSW const *""'");
43358  }
43359  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43360  ecode2 = SWIG_AsVal_long(obj1, &val2);
43361  if (!SWIG_IsOK(ecode2)) {
43362  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_neighbor_range" "', argument " "2"" of type '" "faiss::HNSW::idx_t""'");
43363  }
43364  arg2 = static_cast< faiss::HNSW::idx_t >(val2);
43365  ecode3 = SWIG_AsVal_int(obj2, &val3);
43366  if (!SWIG_IsOK(ecode3)) {
43367  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_neighbor_range" "', argument " "3"" of type '" "int""'");
43368  }
43369  arg3 = static_cast< int >(val3);
43370  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_long, 0 | 0 );
43371  if (!SWIG_IsOK(res4)) {
43372  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_neighbor_range" "', argument " "4"" of type '" "size_t *""'");
43373  }
43374  arg4 = reinterpret_cast< size_t * >(argp4);
43375  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_long, 0 | 0 );
43376  if (!SWIG_IsOK(res5)) {
43377  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_neighbor_range" "', argument " "5"" of type '" "size_t *""'");
43378  }
43379  arg5 = reinterpret_cast< size_t * >(argp5);
43380  {
43381  Py_BEGIN_ALLOW_THREADS
43382  try {
43383  ((faiss::HNSW const *)arg1)->neighbor_range(arg2,arg3,arg4,arg5);
43384  } catch(faiss::FaissException & e) {
43385  PyEval_RestoreThread(_save);
43386  PyErr_SetString(PyExc_RuntimeError, e.what());
43387  SWIG_fail;
43388  }
43389  Py_END_ALLOW_THREADS
43390  }
43391  resultobj = SWIG_Py_Void();
43392  return resultobj;
43393 fail:
43394  return NULL;
43395 }
43396 
43397 
43398 SWIGINTERN PyObject *_wrap_new_HNSW__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43399  PyObject *resultobj = 0;
43400  int arg1 ;
43401  int val1 ;
43402  int ecode1 = 0 ;
43403  PyObject * obj0 = 0 ;
43404  faiss::HNSW *result = 0 ;
43405 
43406  if (!PyArg_ParseTuple(args,(char *)"O:new_HNSW",&obj0)) SWIG_fail;
43407  ecode1 = SWIG_AsVal_int(obj0, &val1);
43408  if (!SWIG_IsOK(ecode1)) {
43409  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HNSW" "', argument " "1"" of type '" "int""'");
43410  }
43411  arg1 = static_cast< int >(val1);
43412  {
43413  Py_BEGIN_ALLOW_THREADS
43414  try {
43415  result = (faiss::HNSW *)new faiss::HNSW(arg1);
43416  } catch(faiss::FaissException & e) {
43417  PyEval_RestoreThread(_save);
43418  PyErr_SetString(PyExc_RuntimeError, e.what());
43419  SWIG_fail;
43420  }
43421  Py_END_ALLOW_THREADS
43422  }
43423  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, SWIG_POINTER_NEW | 0 );
43424  return resultobj;
43425 fail:
43426  return NULL;
43427 }
43428 
43429 
43430 SWIGINTERN PyObject *_wrap_new_HNSW__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43431  PyObject *resultobj = 0;
43432  faiss::HNSW *result = 0 ;
43433 
43434  if (!PyArg_ParseTuple(args,(char *)":new_HNSW")) SWIG_fail;
43435  {
43436  Py_BEGIN_ALLOW_THREADS
43437  try {
43438  result = (faiss::HNSW *)new faiss::HNSW();
43439  } catch(faiss::FaissException & e) {
43440  PyEval_RestoreThread(_save);
43441  PyErr_SetString(PyExc_RuntimeError, e.what());
43442  SWIG_fail;
43443  }
43444  Py_END_ALLOW_THREADS
43445  }
43446  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, SWIG_POINTER_NEW | 0 );
43447  return resultobj;
43448 fail:
43449  return NULL;
43450 }
43451 
43452 
43453 SWIGINTERN PyObject *_wrap_new_HNSW(PyObject *self, PyObject *args) {
43454  Py_ssize_t argc;
43455  PyObject *argv[2] = {
43456  0
43457  };
43458  Py_ssize_t ii;
43459 
43460  if (!PyTuple_Check(args)) SWIG_fail;
43461  argc = args ? PyObject_Length(args) : 0;
43462  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
43463  argv[ii] = PyTuple_GET_ITEM(args,ii);
43464  }
43465  if (argc == 0) {
43466  return _wrap_new_HNSW__SWIG_1(self, args);
43467  }
43468  if (argc == 1) {
43469  int _v;
43470  {
43471  int res = SWIG_AsVal_int(argv[0], NULL);
43472  _v = SWIG_CheckState(res);
43473  }
43474  if (_v) {
43475  return _wrap_new_HNSW__SWIG_0(self, args);
43476  }
43477  }
43478 
43479 fail:
43480  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HNSW'.\n"
43481  " Possible C/C++ prototypes are:\n"
43482  " faiss::HNSW::HNSW(int)\n"
43483  " faiss::HNSW::HNSW()\n");
43484  return 0;
43485 }
43486 
43487 
43488 SWIGINTERN PyObject *_wrap_HNSW_random_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43489  PyObject *resultobj = 0;
43490  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43491  void *argp1 = 0 ;
43492  int res1 = 0 ;
43493  PyObject * obj0 = 0 ;
43494  int result;
43495 
43496  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_random_level",&obj0)) SWIG_fail;
43497  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43498  if (!SWIG_IsOK(res1)) {
43499  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_random_level" "', argument " "1"" of type '" "faiss::HNSW *""'");
43500  }
43501  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43502  {
43503  Py_BEGIN_ALLOW_THREADS
43504  try {
43505  result = (int)(arg1)->random_level();
43506  } catch(faiss::FaissException & e) {
43507  PyEval_RestoreThread(_save);
43508  PyErr_SetString(PyExc_RuntimeError, e.what());
43509  SWIG_fail;
43510  }
43511  Py_END_ALLOW_THREADS
43512  }
43513  resultobj = SWIG_From_int(static_cast< int >(result));
43514  return resultobj;
43515 fail:
43516  return NULL;
43517 }
43518 
43519 
43520 SWIGINTERN PyObject *_wrap_HNSW_fill_with_random_links(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43521  PyObject *resultobj = 0;
43522  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43523  size_t arg2 ;
43524  void *argp1 = 0 ;
43525  int res1 = 0 ;
43526  size_t val2 ;
43527  int ecode2 = 0 ;
43528  PyObject * obj0 = 0 ;
43529  PyObject * obj1 = 0 ;
43530 
43531  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_fill_with_random_links",&obj0,&obj1)) SWIG_fail;
43532  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43533  if (!SWIG_IsOK(res1)) {
43534  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_fill_with_random_links" "', argument " "1"" of type '" "faiss::HNSW *""'");
43535  }
43536  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43537  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43538  if (!SWIG_IsOK(ecode2)) {
43539  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_fill_with_random_links" "', argument " "2"" of type '" "size_t""'");
43540  }
43541  arg2 = static_cast< size_t >(val2);
43542  {
43543  Py_BEGIN_ALLOW_THREADS
43544  try {
43545  (arg1)->fill_with_random_links(arg2);
43546  } catch(faiss::FaissException & e) {
43547  PyEval_RestoreThread(_save);
43548  PyErr_SetString(PyExc_RuntimeError, e.what());
43549  SWIG_fail;
43550  }
43551  Py_END_ALLOW_THREADS
43552  }
43553  resultobj = SWIG_Py_Void();
43554  return resultobj;
43555 fail:
43556  return NULL;
43557 }
43558 
43559 
43560 SWIGINTERN PyObject *_wrap_HNSW_add_links_starting_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43561  PyObject *resultobj = 0;
43562  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43563  faiss::HNSW::DistanceComputer *arg2 = 0 ;
43566  float arg5 ;
43567  int arg6 ;
43568  omp_lock_t *arg7 = (omp_lock_t *) 0 ;
43569  faiss::VisitedTable *arg8 = 0 ;
43570  void *argp1 = 0 ;
43571  int res1 = 0 ;
43572  void *argp2 = 0 ;
43573  int res2 = 0 ;
43574  int val3 ;
43575  int ecode3 = 0 ;
43576  int val4 ;
43577  int ecode4 = 0 ;
43578  float val5 ;
43579  int ecode5 = 0 ;
43580  int val6 ;
43581  int ecode6 = 0 ;
43582  void *argp7 = 0 ;
43583  int res7 = 0 ;
43584  void *argp8 = 0 ;
43585  int res8 = 0 ;
43586  PyObject * obj0 = 0 ;
43587  PyObject * obj1 = 0 ;
43588  PyObject * obj2 = 0 ;
43589  PyObject * obj3 = 0 ;
43590  PyObject * obj4 = 0 ;
43591  PyObject * obj5 = 0 ;
43592  PyObject * obj6 = 0 ;
43593  PyObject * obj7 = 0 ;
43594 
43595  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:HNSW_add_links_starting_from",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
43596  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43597  if (!SWIG_IsOK(res1)) {
43598  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_add_links_starting_from" "', argument " "1"" of type '" "faiss::HNSW *""'");
43599  }
43600  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43601  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
43602  if (!SWIG_IsOK(res2)) {
43603  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_add_links_starting_from" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43604  }
43605  if (!argp2) {
43606  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_links_starting_from" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43607  }
43608  arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
43609  ecode3 = SWIG_AsVal_int(obj2, &val3);
43610  if (!SWIG_IsOK(ecode3)) {
43611  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_add_links_starting_from" "', argument " "3"" of type '" "faiss::HNSW::storage_idx_t""'");
43612  }
43613  arg3 = static_cast< faiss::HNSW::storage_idx_t >(val3);
43614  ecode4 = SWIG_AsVal_int(obj3, &val4);
43615  if (!SWIG_IsOK(ecode4)) {
43616  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_add_links_starting_from" "', argument " "4"" of type '" "faiss::HNSW::storage_idx_t""'");
43617  }
43618  arg4 = static_cast< faiss::HNSW::storage_idx_t >(val4);
43619  ecode5 = SWIG_AsVal_float(obj4, &val5);
43620  if (!SWIG_IsOK(ecode5)) {
43621  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "HNSW_add_links_starting_from" "', argument " "5"" of type '" "float""'");
43622  }
43623  arg5 = static_cast< float >(val5);
43624  ecode6 = SWIG_AsVal_int(obj5, &val6);
43625  if (!SWIG_IsOK(ecode6)) {
43626  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "HNSW_add_links_starting_from" "', argument " "6"" of type '" "int""'");
43627  }
43628  arg6 = static_cast< int >(val6);
43629  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_omp_lock_t, 0 | 0 );
43630  if (!SWIG_IsOK(res7)) {
43631  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "HNSW_add_links_starting_from" "', argument " "7"" of type '" "omp_lock_t *""'");
43632  }
43633  arg7 = reinterpret_cast< omp_lock_t * >(argp7);
43634  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_faiss__VisitedTable, 0 );
43635  if (!SWIG_IsOK(res8)) {
43636  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "HNSW_add_links_starting_from" "', argument " "8"" of type '" "faiss::VisitedTable &""'");
43637  }
43638  if (!argp8) {
43639  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_links_starting_from" "', argument " "8"" of type '" "faiss::VisitedTable &""'");
43640  }
43641  arg8 = reinterpret_cast< faiss::VisitedTable * >(argp8);
43642  {
43643  Py_BEGIN_ALLOW_THREADS
43644  try {
43645  (arg1)->add_links_starting_from(*arg2,arg3,arg4,arg5,arg6,arg7,*arg8);
43646  } catch(faiss::FaissException & e) {
43647  PyEval_RestoreThread(_save);
43648  PyErr_SetString(PyExc_RuntimeError, e.what());
43649  SWIG_fail;
43650  }
43651  Py_END_ALLOW_THREADS
43652  }
43653  resultobj = SWIG_Py_Void();
43654  return resultobj;
43655 fail:
43656  return NULL;
43657 }
43658 
43659 
43660 SWIGINTERN PyObject *_wrap_HNSW_add_with_locks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43661  PyObject *resultobj = 0;
43662  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43663  faiss::HNSW::DistanceComputer *arg2 = 0 ;
43664  int arg3 ;
43665  int arg4 ;
43666  std::vector< omp_lock_t > *arg5 = 0 ;
43667  faiss::VisitedTable *arg6 = 0 ;
43668  void *argp1 = 0 ;
43669  int res1 = 0 ;
43670  void *argp2 = 0 ;
43671  int res2 = 0 ;
43672  int val3 ;
43673  int ecode3 = 0 ;
43674  int val4 ;
43675  int ecode4 = 0 ;
43676  void *argp5 = 0 ;
43677  int res5 = 0 ;
43678  void *argp6 = 0 ;
43679  int res6 = 0 ;
43680  PyObject * obj0 = 0 ;
43681  PyObject * obj1 = 0 ;
43682  PyObject * obj2 = 0 ;
43683  PyObject * obj3 = 0 ;
43684  PyObject * obj4 = 0 ;
43685  PyObject * obj5 = 0 ;
43686 
43687  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:HNSW_add_with_locks",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
43688  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43689  if (!SWIG_IsOK(res1)) {
43690  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_add_with_locks" "', argument " "1"" of type '" "faiss::HNSW *""'");
43691  }
43692  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43693  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
43694  if (!SWIG_IsOK(res2)) {
43695  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_add_with_locks" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43696  }
43697  if (!argp2) {
43698  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_with_locks" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43699  }
43700  arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
43701  ecode3 = SWIG_AsVal_int(obj2, &val3);
43702  if (!SWIG_IsOK(ecode3)) {
43703  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_add_with_locks" "', argument " "3"" of type '" "int""'");
43704  }
43705  arg3 = static_cast< int >(val3);
43706  ecode4 = SWIG_AsVal_int(obj3, &val4);
43707  if (!SWIG_IsOK(ecode4)) {
43708  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_add_with_locks" "', argument " "4"" of type '" "int""'");
43709  }
43710  arg4 = static_cast< int >(val4);
43711  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorT_omp_lock_t_t, 0 );
43712  if (!SWIG_IsOK(res5)) {
43713  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_add_with_locks" "', argument " "5"" of type '" "std::vector< omp_lock_t > &""'");
43714  }
43715  if (!argp5) {
43716  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_with_locks" "', argument " "5"" of type '" "std::vector< omp_lock_t > &""'");
43717  }
43718  arg5 = reinterpret_cast< std::vector< omp_lock_t > * >(argp5);
43719  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__VisitedTable, 0 );
43720  if (!SWIG_IsOK(res6)) {
43721  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_add_with_locks" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
43722  }
43723  if (!argp6) {
43724  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_with_locks" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
43725  }
43726  arg6 = reinterpret_cast< faiss::VisitedTable * >(argp6);
43727  {
43728  Py_BEGIN_ALLOW_THREADS
43729  try {
43730  (arg1)->add_with_locks(*arg2,arg3,arg4,*arg5,*arg6);
43731  } catch(faiss::FaissException & e) {
43732  PyEval_RestoreThread(_save);
43733  PyErr_SetString(PyExc_RuntimeError, e.what());
43734  SWIG_fail;
43735  }
43736  Py_END_ALLOW_THREADS
43737  }
43738  resultobj = SWIG_Py_Void();
43739  return resultobj;
43740 fail:
43741  return NULL;
43742 }
43743 
43744 
43745 SWIGINTERN PyObject *_wrap_HNSW_search_from_candidates__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43746  PyObject *resultobj = 0;
43747  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43748  faiss::HNSW::DistanceComputer *arg2 = 0 ;
43749  int arg3 ;
43750  faiss::HNSW::idx_t *arg4 = (faiss::HNSW::idx_t *) 0 ;
43751  float *arg5 = (float *) 0 ;
43752  faiss::HNSW::MinimaxHeap *arg6 = 0 ;
43753  faiss::VisitedTable *arg7 = 0 ;
43754  int arg8 ;
43755  int arg9 ;
43756  void *argp1 = 0 ;
43757  int res1 = 0 ;
43758  void *argp2 = 0 ;
43759  int res2 = 0 ;
43760  int val3 ;
43761  int ecode3 = 0 ;
43762  void *argp4 = 0 ;
43763  int res4 = 0 ;
43764  void *argp5 = 0 ;
43765  int res5 = 0 ;
43766  void *argp6 = 0 ;
43767  int res6 = 0 ;
43768  void *argp7 = 0 ;
43769  int res7 = 0 ;
43770  int val8 ;
43771  int ecode8 = 0 ;
43772  int val9 ;
43773  int ecode9 = 0 ;
43774  PyObject * obj0 = 0 ;
43775  PyObject * obj1 = 0 ;
43776  PyObject * obj2 = 0 ;
43777  PyObject * obj3 = 0 ;
43778  PyObject * obj4 = 0 ;
43779  PyObject * obj5 = 0 ;
43780  PyObject * obj6 = 0 ;
43781  PyObject * obj7 = 0 ;
43782  PyObject * obj8 = 0 ;
43783  int result;
43784 
43785  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:HNSW_search_from_candidates",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
43786  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43787  if (!SWIG_IsOK(res1)) {
43788  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search_from_candidates" "', argument " "1"" of type '" "faiss::HNSW const *""'");
43789  }
43790  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43791  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
43792  if (!SWIG_IsOK(res2)) {
43793  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43794  }
43795  if (!argp2) {
43796  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43797  }
43798  arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
43799  ecode3 = SWIG_AsVal_int(obj2, &val3);
43800  if (!SWIG_IsOK(ecode3)) {
43801  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_search_from_candidates" "', argument " "3"" of type '" "int""'");
43802  }
43803  arg3 = static_cast< int >(val3);
43804  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
43805  if (!SWIG_IsOK(res4)) {
43806  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_search_from_candidates" "', argument " "4"" of type '" "faiss::HNSW::idx_t *""'");
43807  }
43808  arg4 = reinterpret_cast< faiss::HNSW::idx_t * >(argp4);
43809  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
43810  if (!SWIG_IsOK(res5)) {
43811  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search_from_candidates" "', argument " "5"" of type '" "float *""'");
43812  }
43813  arg5 = reinterpret_cast< float * >(argp5);
43814  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0 );
43815  if (!SWIG_IsOK(res6)) {
43816  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
43817  }
43818  if (!argp6) {
43819  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
43820  }
43821  arg6 = reinterpret_cast< faiss::HNSW::MinimaxHeap * >(argp6);
43822  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_faiss__VisitedTable, 0 );
43823  if (!SWIG_IsOK(res7)) {
43824  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
43825  }
43826  if (!argp7) {
43827  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
43828  }
43829  arg7 = reinterpret_cast< faiss::VisitedTable * >(argp7);
43830  ecode8 = SWIG_AsVal_int(obj7, &val8);
43831  if (!SWIG_IsOK(ecode8)) {
43832  SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "HNSW_search_from_candidates" "', argument " "8"" of type '" "int""'");
43833  }
43834  arg8 = static_cast< int >(val8);
43835  ecode9 = SWIG_AsVal_int(obj8, &val9);
43836  if (!SWIG_IsOK(ecode9)) {
43837  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "HNSW_search_from_candidates" "', argument " "9"" of type '" "int""'");
43838  }
43839  arg9 = static_cast< int >(val9);
43840  {
43841  Py_BEGIN_ALLOW_THREADS
43842  try {
43843  result = (int)((faiss::HNSW const *)arg1)->search_from_candidates(*arg2,arg3,arg4,arg5,*arg6,*arg7,arg8,arg9);
43844  } catch(faiss::FaissException & e) {
43845  PyEval_RestoreThread(_save);
43846  PyErr_SetString(PyExc_RuntimeError, e.what());
43847  SWIG_fail;
43848  }
43849  Py_END_ALLOW_THREADS
43850  }
43851  resultobj = SWIG_From_int(static_cast< int >(result));
43852  return resultobj;
43853 fail:
43854  return NULL;
43855 }
43856 
43857 
43858 SWIGINTERN PyObject *_wrap_HNSW_search_from_candidates__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43859  PyObject *resultobj = 0;
43860  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43861  faiss::HNSW::DistanceComputer *arg2 = 0 ;
43862  int arg3 ;
43863  faiss::HNSW::idx_t *arg4 = (faiss::HNSW::idx_t *) 0 ;
43864  float *arg5 = (float *) 0 ;
43865  faiss::HNSW::MinimaxHeap *arg6 = 0 ;
43866  faiss::VisitedTable *arg7 = 0 ;
43867  int arg8 ;
43868  void *argp1 = 0 ;
43869  int res1 = 0 ;
43870  void *argp2 = 0 ;
43871  int res2 = 0 ;
43872  int val3 ;
43873  int ecode3 = 0 ;
43874  void *argp4 = 0 ;
43875  int res4 = 0 ;
43876  void *argp5 = 0 ;
43877  int res5 = 0 ;
43878  void *argp6 = 0 ;
43879  int res6 = 0 ;
43880  void *argp7 = 0 ;
43881  int res7 = 0 ;
43882  int val8 ;
43883  int ecode8 = 0 ;
43884  PyObject * obj0 = 0 ;
43885  PyObject * obj1 = 0 ;
43886  PyObject * obj2 = 0 ;
43887  PyObject * obj3 = 0 ;
43888  PyObject * obj4 = 0 ;
43889  PyObject * obj5 = 0 ;
43890  PyObject * obj6 = 0 ;
43891  PyObject * obj7 = 0 ;
43892  int result;
43893 
43894  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:HNSW_search_from_candidates",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
43895  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43896  if (!SWIG_IsOK(res1)) {
43897  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search_from_candidates" "', argument " "1"" of type '" "faiss::HNSW const *""'");
43898  }
43899  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43900  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
43901  if (!SWIG_IsOK(res2)) {
43902  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43903  }
43904  if (!argp2) {
43905  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
43906  }
43907  arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
43908  ecode3 = SWIG_AsVal_int(obj2, &val3);
43909  if (!SWIG_IsOK(ecode3)) {
43910  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_search_from_candidates" "', argument " "3"" of type '" "int""'");
43911  }
43912  arg3 = static_cast< int >(val3);
43913  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
43914  if (!SWIG_IsOK(res4)) {
43915  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_search_from_candidates" "', argument " "4"" of type '" "faiss::HNSW::idx_t *""'");
43916  }
43917  arg4 = reinterpret_cast< faiss::HNSW::idx_t * >(argp4);
43918  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
43919  if (!SWIG_IsOK(res5)) {
43920  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search_from_candidates" "', argument " "5"" of type '" "float *""'");
43921  }
43922  arg5 = reinterpret_cast< float * >(argp5);
43923  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0 );
43924  if (!SWIG_IsOK(res6)) {
43925  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
43926  }
43927  if (!argp6) {
43928  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
43929  }
43930  arg6 = reinterpret_cast< faiss::HNSW::MinimaxHeap * >(argp6);
43931  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_faiss__VisitedTable, 0 );
43932  if (!SWIG_IsOK(res7)) {
43933  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
43934  }
43935  if (!argp7) {
43936  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
43937  }
43938  arg7 = reinterpret_cast< faiss::VisitedTable * >(argp7);
43939  ecode8 = SWIG_AsVal_int(obj7, &val8);
43940  if (!SWIG_IsOK(ecode8)) {
43941  SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "HNSW_search_from_candidates" "', argument " "8"" of type '" "int""'");
43942  }
43943  arg8 = static_cast< int >(val8);
43944  {
43945  Py_BEGIN_ALLOW_THREADS
43946  try {
43947  result = (int)((faiss::HNSW const *)arg1)->search_from_candidates(*arg2,arg3,arg4,arg5,*arg6,*arg7,arg8);
43948  } catch(faiss::FaissException & e) {
43949  PyEval_RestoreThread(_save);
43950  PyErr_SetString(PyExc_RuntimeError, e.what());
43951  SWIG_fail;
43952  }
43953  Py_END_ALLOW_THREADS
43954  }
43955  resultobj = SWIG_From_int(static_cast< int >(result));
43956  return resultobj;
43957 fail:
43958  return NULL;
43959 }
43960 
43961 
43962 SWIGINTERN PyObject *_wrap_HNSW_search_from_candidates(PyObject *self, PyObject *args) {
43963  Py_ssize_t argc;
43964  PyObject *argv[10] = {
43965  0
43966  };
43967  Py_ssize_t ii;
43968 
43969  if (!PyTuple_Check(args)) SWIG_fail;
43970  argc = args ? PyObject_Length(args) : 0;
43971  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
43972  argv[ii] = PyTuple_GET_ITEM(args,ii);
43973  }
43974  if (argc == 8) {
43975  int _v;
43976  void *vptr = 0;
43977  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
43978  _v = SWIG_CheckState(res);
43979  if (_v) {
43980  void *vptr = 0;
43981  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0);
43982  _v = SWIG_CheckState(res);
43983  if (_v) {
43984  {
43985  int res = SWIG_AsVal_int(argv[2], NULL);
43986  _v = SWIG_CheckState(res);
43987  }
43988  if (_v) {
43989  void *vptr = 0;
43990  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
43991  _v = SWIG_CheckState(res);
43992  if (_v) {
43993  void *vptr = 0;
43994  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
43995  _v = SWIG_CheckState(res);
43996  if (_v) {
43997  void *vptr = 0;
43998  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0);
43999  _v = SWIG_CheckState(res);
44000  if (_v) {
44001  void *vptr = 0;
44002  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_faiss__VisitedTable, 0);
44003  _v = SWIG_CheckState(res);
44004  if (_v) {
44005  {
44006  int res = SWIG_AsVal_int(argv[7], NULL);
44007  _v = SWIG_CheckState(res);
44008  }
44009  if (_v) {
44010  return _wrap_HNSW_search_from_candidates__SWIG_1(self, args);
44011  }
44012  }
44013  }
44014  }
44015  }
44016  }
44017  }
44018  }
44019  }
44020  if (argc == 9) {
44021  int _v;
44022  void *vptr = 0;
44023  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
44024  _v = SWIG_CheckState(res);
44025  if (_v) {
44026  void *vptr = 0;
44027  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0);
44028  _v = SWIG_CheckState(res);
44029  if (_v) {
44030  {
44031  int res = SWIG_AsVal_int(argv[2], NULL);
44032  _v = SWIG_CheckState(res);
44033  }
44034  if (_v) {
44035  void *vptr = 0;
44036  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
44037  _v = SWIG_CheckState(res);
44038  if (_v) {
44039  void *vptr = 0;
44040  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
44041  _v = SWIG_CheckState(res);
44042  if (_v) {
44043  void *vptr = 0;
44044  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0);
44045  _v = SWIG_CheckState(res);
44046  if (_v) {
44047  void *vptr = 0;
44048  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_faiss__VisitedTable, 0);
44049  _v = SWIG_CheckState(res);
44050  if (_v) {
44051  {
44052  int res = SWIG_AsVal_int(argv[7], NULL);
44053  _v = SWIG_CheckState(res);
44054  }
44055  if (_v) {
44056  {
44057  int res = SWIG_AsVal_int(argv[8], NULL);
44058  _v = SWIG_CheckState(res);
44059  }
44060  if (_v) {
44061  return _wrap_HNSW_search_from_candidates__SWIG_0(self, args);
44062  }
44063  }
44064  }
44065  }
44066  }
44067  }
44068  }
44069  }
44070  }
44071  }
44072 
44073 fail:
44074  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'HNSW_search_from_candidates'.\n"
44075  " Possible C/C++ prototypes are:\n"
44076  " faiss::HNSW::search_from_candidates(faiss::HNSW::DistanceComputer &,int,faiss::HNSW::idx_t *,float *,faiss::HNSW::MinimaxHeap &,faiss::VisitedTable &,int,int) const\n"
44077  " faiss::HNSW::search_from_candidates(faiss::HNSW::DistanceComputer &,int,faiss::HNSW::idx_t *,float *,faiss::HNSW::MinimaxHeap &,faiss::VisitedTable &,int) const\n");
44078  return 0;
44079 }
44080 
44081 
44082 SWIGINTERN PyObject *_wrap_HNSW_search_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44083  PyObject *resultobj = 0;
44084  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44085  faiss::HNSW::Node *arg2 = 0 ;
44086  faiss::HNSW::DistanceComputer *arg3 = 0 ;
44087  int arg4 ;
44089  void *argp1 = 0 ;
44090  int res1 = 0 ;
44091  void *argp2 = 0 ;
44092  int res2 = 0 ;
44093  void *argp3 = 0 ;
44094  int res3 = 0 ;
44095  int val4 ;
44096  int ecode4 = 0 ;
44097  void *argp5 = 0 ;
44098  int res5 = 0 ;
44099  PyObject * obj0 = 0 ;
44100  PyObject * obj1 = 0 ;
44101  PyObject * obj2 = 0 ;
44102  PyObject * obj3 = 0 ;
44103  PyObject * obj4 = 0 ;
44104  std::priority_queue< faiss::HNSW::Node > result;
44105 
44106  if (!PyArg_ParseTuple(args,(char *)"OOOOO:HNSW_search_from",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
44107  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
44108  if (!SWIG_IsOK(res1)) {
44109  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search_from" "', argument " "1"" of type '" "faiss::HNSW const *""'");
44110  }
44111  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44112  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__pairT_float_int_t, 0 | 0);
44113  if (!SWIG_IsOK(res2)) {
44114  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search_from" "', argument " "2"" of type '" "faiss::HNSW::Node const &""'");
44115  }
44116  if (!argp2) {
44117  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from" "', argument " "2"" of type '" "faiss::HNSW::Node const &""'");
44118  }
44119  arg2 = reinterpret_cast< faiss::HNSW::Node * >(argp2);
44120  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
44121  if (!SWIG_IsOK(res3)) {
44122  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HNSW_search_from" "', argument " "3"" of type '" "faiss::HNSW::DistanceComputer &""'");
44123  }
44124  if (!argp3) {
44125  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from" "', argument " "3"" of type '" "faiss::HNSW::DistanceComputer &""'");
44126  }
44127  arg3 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp3);
44128  ecode4 = SWIG_AsVal_int(obj3, &val4);
44129  if (!SWIG_IsOK(ecode4)) {
44130  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_search_from" "', argument " "4"" of type '" "int""'");
44131  }
44132  arg4 = static_cast< int >(val4);
44133  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44134  if (!SWIG_IsOK(res5)) {
44135  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search_from" "', argument " "5"" of type '" "faiss::VisitedTable *""'");
44136  }
44137  arg5 = reinterpret_cast< faiss::VisitedTable * >(argp5);
44138  {
44139  Py_BEGIN_ALLOW_THREADS
44140  try {
44141  result = ((faiss::HNSW const *)arg1)->search_from((faiss::HNSW::Node const &)*arg2,*arg3,arg4,arg5);
44142  } catch(faiss::FaissException & e) {
44143  PyEval_RestoreThread(_save);
44144  PyErr_SetString(PyExc_RuntimeError, e.what());
44145  SWIG_fail;
44146  }
44147  Py_END_ALLOW_THREADS
44148  }
44149  resultobj = SWIG_NewPointerObj((new std::priority_queue< faiss::HNSW::Node >(static_cast< const std::priority_queue< faiss::HNSW::Node >& >(result))), SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t, SWIG_POINTER_OWN | 0 );
44150  return resultobj;
44151 fail:
44152  return NULL;
44153 }
44154 
44155 
44156 SWIGINTERN PyObject *_wrap_HNSW_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44157  PyObject *resultobj = 0;
44158  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44159  faiss::HNSW::DistanceComputer *arg2 = 0 ;
44160  int arg3 ;
44161  faiss::HNSW::idx_t *arg4 = (faiss::HNSW::idx_t *) 0 ;
44162  float *arg5 = (float *) 0 ;
44163  faiss::VisitedTable *arg6 = 0 ;
44164  void *argp1 = 0 ;
44165  int res1 = 0 ;
44166  void *argp2 = 0 ;
44167  int res2 = 0 ;
44168  int val3 ;
44169  int ecode3 = 0 ;
44170  void *argp4 = 0 ;
44171  int res4 = 0 ;
44172  void *argp5 = 0 ;
44173  int res5 = 0 ;
44174  void *argp6 = 0 ;
44175  int res6 = 0 ;
44176  PyObject * obj0 = 0 ;
44177  PyObject * obj1 = 0 ;
44178  PyObject * obj2 = 0 ;
44179  PyObject * obj3 = 0 ;
44180  PyObject * obj4 = 0 ;
44181  PyObject * obj5 = 0 ;
44182 
44183  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:HNSW_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
44184  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
44185  if (!SWIG_IsOK(res1)) {
44186  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search" "', argument " "1"" of type '" "faiss::HNSW const *""'");
44187  }
44188  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44189  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
44190  if (!SWIG_IsOK(res2)) {
44191  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
44192  }
44193  if (!argp2) {
44194  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
44195  }
44196  arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
44197  ecode3 = SWIG_AsVal_int(obj2, &val3);
44198  if (!SWIG_IsOK(ecode3)) {
44199  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_search" "', argument " "3"" of type '" "int""'");
44200  }
44201  arg3 = static_cast< int >(val3);
44202  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
44203  if (!SWIG_IsOK(res4)) {
44204  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_search" "', argument " "4"" of type '" "faiss::HNSW::idx_t *""'");
44205  }
44206  arg4 = reinterpret_cast< faiss::HNSW::idx_t * >(argp4);
44207  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
44208  if (!SWIG_IsOK(res5)) {
44209  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search" "', argument " "5"" of type '" "float *""'");
44210  }
44211  arg5 = reinterpret_cast< float * >(argp5);
44212  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__VisitedTable, 0 );
44213  if (!SWIG_IsOK(res6)) {
44214  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_search" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
44215  }
44216  if (!argp6) {
44217  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
44218  }
44219  arg6 = reinterpret_cast< faiss::VisitedTable * >(argp6);
44220  {
44221  Py_BEGIN_ALLOW_THREADS
44222  try {
44223  ((faiss::HNSW const *)arg1)->search(*arg2,arg3,arg4,arg5,*arg6);
44224  } catch(faiss::FaissException & e) {
44225  PyEval_RestoreThread(_save);
44226  PyErr_SetString(PyExc_RuntimeError, e.what());
44227  SWIG_fail;
44228  }
44229  Py_END_ALLOW_THREADS
44230  }
44231  resultobj = SWIG_Py_Void();
44232  return resultobj;
44233 fail:
44234  return NULL;
44235 }
44236 
44237 
44238 SWIGINTERN PyObject *_wrap_HNSW_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44239  PyObject *resultobj = 0;
44240  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44241  void *argp1 = 0 ;
44242  int res1 = 0 ;
44243  PyObject * obj0 = 0 ;
44244 
44245  if (!PyArg_ParseTuple(args,(char *)"O:HNSW_reset",&obj0)) SWIG_fail;
44246  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
44247  if (!SWIG_IsOK(res1)) {
44248  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_reset" "', argument " "1"" of type '" "faiss::HNSW *""'");
44249  }
44250  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44251  {
44252  Py_BEGIN_ALLOW_THREADS
44253  try {
44254  (arg1)->reset();
44255  } catch(faiss::FaissException & e) {
44256  PyEval_RestoreThread(_save);
44257  PyErr_SetString(PyExc_RuntimeError, e.what());
44258  SWIG_fail;
44259  }
44260  Py_END_ALLOW_THREADS
44261  }
44262  resultobj = SWIG_Py_Void();
44263  return resultobj;
44264 fail:
44265  return NULL;
44266 }
44267 
44268 
44269 SWIGINTERN PyObject *_wrap_HNSW_clear_neighbor_tables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44270  PyObject *resultobj = 0;
44271  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44272  int arg2 ;
44273  void *argp1 = 0 ;
44274  int res1 = 0 ;
44275  int val2 ;
44276  int ecode2 = 0 ;
44277  PyObject * obj0 = 0 ;
44278  PyObject * obj1 = 0 ;
44279 
44280  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_clear_neighbor_tables",&obj0,&obj1)) SWIG_fail;
44281  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
44282  if (!SWIG_IsOK(res1)) {
44283  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_clear_neighbor_tables" "', argument " "1"" of type '" "faiss::HNSW *""'");
44284  }
44285  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44286  ecode2 = SWIG_AsVal_int(obj1, &val2);
44287  if (!SWIG_IsOK(ecode2)) {
44288  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_clear_neighbor_tables" "', argument " "2"" of type '" "int""'");
44289  }
44290  arg2 = static_cast< int >(val2);
44291  {
44292  Py_BEGIN_ALLOW_THREADS
44293  try {
44294  (arg1)->clear_neighbor_tables(arg2);
44295  } catch(faiss::FaissException & e) {
44296  PyEval_RestoreThread(_save);
44297  PyErr_SetString(PyExc_RuntimeError, e.what());
44298  SWIG_fail;
44299  }
44300  Py_END_ALLOW_THREADS
44301  }
44302  resultobj = SWIG_Py_Void();
44303  return resultobj;
44304 fail:
44305  return NULL;
44306 }
44307 
44308 
44309 SWIGINTERN PyObject *_wrap_HNSW_print_neighbor_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44310  PyObject *resultobj = 0;
44311  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44312  int arg2 ;
44313  void *argp1 = 0 ;
44314  int res1 = 0 ;
44315  int val2 ;
44316  int ecode2 = 0 ;
44317  PyObject * obj0 = 0 ;
44318  PyObject * obj1 = 0 ;
44319 
44320  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_print_neighbor_stats",&obj0,&obj1)) SWIG_fail;
44321  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
44322  if (!SWIG_IsOK(res1)) {
44323  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_print_neighbor_stats" "', argument " "1"" of type '" "faiss::HNSW const *""'");
44324  }
44325  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44326  ecode2 = SWIG_AsVal_int(obj1, &val2);
44327  if (!SWIG_IsOK(ecode2)) {
44328  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_print_neighbor_stats" "', argument " "2"" of type '" "int""'");
44329  }
44330  arg2 = static_cast< int >(val2);
44331  {
44332  Py_BEGIN_ALLOW_THREADS
44333  try {
44334  ((faiss::HNSW const *)arg1)->print_neighbor_stats(arg2);
44335  } catch(faiss::FaissException & e) {
44336  PyEval_RestoreThread(_save);
44337  PyErr_SetString(PyExc_RuntimeError, e.what());
44338  SWIG_fail;
44339  }
44340  Py_END_ALLOW_THREADS
44341  }
44342  resultobj = SWIG_Py_Void();
44343  return resultobj;
44344 fail:
44345  return NULL;
44346 }
44347 
44348 
44349 SWIGINTERN PyObject *_wrap_HNSW_prepare_level_tab__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44350  PyObject *resultobj = 0;
44351  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44352  size_t arg2 ;
44353  bool arg3 ;
44354  void *argp1 = 0 ;
44355  int res1 = 0 ;
44356  size_t val2 ;
44357  int ecode2 = 0 ;
44358  bool val3 ;
44359  int ecode3 = 0 ;
44360  PyObject * obj0 = 0 ;
44361  PyObject * obj1 = 0 ;
44362  PyObject * obj2 = 0 ;
44363  int result;
44364 
44365  if (!PyArg_ParseTuple(args,(char *)"OOO:HNSW_prepare_level_tab",&obj0,&obj1,&obj2)) SWIG_fail;
44366  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
44367  if (!SWIG_IsOK(res1)) {
44368  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_prepare_level_tab" "', argument " "1"" of type '" "faiss::HNSW *""'");
44369  }
44370  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44371  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44372  if (!SWIG_IsOK(ecode2)) {
44373  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_prepare_level_tab" "', argument " "2"" of type '" "size_t""'");
44374  }
44375  arg2 = static_cast< size_t >(val2);
44376  ecode3 = SWIG_AsVal_bool(obj2, &val3);
44377  if (!SWIG_IsOK(ecode3)) {
44378  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_prepare_level_tab" "', argument " "3"" of type '" "bool""'");
44379  }
44380  arg3 = static_cast< bool >(val3);
44381  {
44382  Py_BEGIN_ALLOW_THREADS
44383  try {
44384  result = (int)(arg1)->prepare_level_tab(arg2,arg3);
44385  } catch(faiss::FaissException & e) {
44386  PyEval_RestoreThread(_save);
44387  PyErr_SetString(PyExc_RuntimeError, e.what());
44388  SWIG_fail;
44389  }
44390  Py_END_ALLOW_THREADS
44391  }
44392  resultobj = SWIG_From_int(static_cast< int >(result));
44393  return resultobj;
44394 fail:
44395  return NULL;
44396 }
44397 
44398 
44399 SWIGINTERN PyObject *_wrap_HNSW_prepare_level_tab__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44400  PyObject *resultobj = 0;
44401  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44402  size_t arg2 ;
44403  void *argp1 = 0 ;
44404  int res1 = 0 ;
44405  size_t val2 ;
44406  int ecode2 = 0 ;
44407  PyObject * obj0 = 0 ;
44408  PyObject * obj1 = 0 ;
44409  int result;
44410 
44411  if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_prepare_level_tab",&obj0,&obj1)) SWIG_fail;
44412  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
44413  if (!SWIG_IsOK(res1)) {
44414  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_prepare_level_tab" "', argument " "1"" of type '" "faiss::HNSW *""'");
44415  }
44416  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44417  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44418  if (!SWIG_IsOK(ecode2)) {
44419  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_prepare_level_tab" "', argument " "2"" of type '" "size_t""'");
44420  }
44421  arg2 = static_cast< size_t >(val2);
44422  {
44423  Py_BEGIN_ALLOW_THREADS
44424  try {
44425  result = (int)(arg1)->prepare_level_tab(arg2);
44426  } catch(faiss::FaissException & e) {
44427  PyEval_RestoreThread(_save);
44428  PyErr_SetString(PyExc_RuntimeError, e.what());
44429  SWIG_fail;
44430  }
44431  Py_END_ALLOW_THREADS
44432  }
44433  resultobj = SWIG_From_int(static_cast< int >(result));
44434  return resultobj;
44435 fail:
44436  return NULL;
44437 }
44438 
44439 
44440 SWIGINTERN PyObject *_wrap_HNSW_prepare_level_tab(PyObject *self, PyObject *args) {
44441  Py_ssize_t argc;
44442  PyObject *argv[4] = {
44443  0
44444  };
44445  Py_ssize_t ii;
44446 
44447  if (!PyTuple_Check(args)) SWIG_fail;
44448  argc = args ? PyObject_Length(args) : 0;
44449  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
44450  argv[ii] = PyTuple_GET_ITEM(args,ii);
44451  }
44452  if (argc == 2) {
44453  int _v;
44454  void *vptr = 0;
44455  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
44456  _v = SWIG_CheckState(res);
44457  if (_v) {
44458  {
44459  int res = SWIG_AsVal_size_t(argv[1], NULL);
44460  _v = SWIG_CheckState(res);
44461  }
44462  if (_v) {
44463  return _wrap_HNSW_prepare_level_tab__SWIG_1(self, args);
44464  }
44465  }
44466  }
44467  if (argc == 3) {
44468  int _v;
44469  void *vptr = 0;
44470  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
44471  _v = SWIG_CheckState(res);
44472  if (_v) {
44473  {
44474  int res = SWIG_AsVal_size_t(argv[1], NULL);
44475  _v = SWIG_CheckState(res);
44476  }
44477  if (_v) {
44478  {
44479  int res = SWIG_AsVal_bool(argv[2], NULL);
44480  _v = SWIG_CheckState(res);
44481  }
44482  if (_v) {
44483  return _wrap_HNSW_prepare_level_tab__SWIG_0(self, args);
44484  }
44485  }
44486  }
44487  }
44488 
44489 fail:
44490  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'HNSW_prepare_level_tab'.\n"
44491  " Possible C/C++ prototypes are:\n"
44492  " faiss::HNSW::prepare_level_tab(size_t,bool)\n"
44493  " faiss::HNSW::prepare_level_tab(size_t)\n");
44494  return 0;
44495 }
44496 
44497 
44498 SWIGINTERN PyObject *_wrap_HNSW_shrink_neighbor_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44499  PyObject *resultobj = 0;
44500  faiss::HNSW::DistanceComputer *arg1 = 0 ;
44501  std::priority_queue< faiss::HNSW::NodeDistFarther > *arg2 = 0 ;
44502  std::vector< faiss::HNSW::NodeDistFarther > *arg3 = 0 ;
44503  int arg4 ;
44504  void *argp1 = 0 ;
44505  int res1 = 0 ;
44506  void *argp2 = 0 ;
44507  int res2 = 0 ;
44508  void *argp3 = 0 ;
44509  int res3 = 0 ;
44510  int val4 ;
44511  int ecode4 = 0 ;
44512  PyObject * obj0 = 0 ;
44513  PyObject * obj1 = 0 ;
44514  PyObject * obj2 = 0 ;
44515  PyObject * obj3 = 0 ;
44516 
44517  if (!PyArg_ParseTuple(args,(char *)"OOOO:HNSW_shrink_neighbor_list",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
44518  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
44519  if (!SWIG_IsOK(res1)) {
44520  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_shrink_neighbor_list" "', argument " "1"" of type '" "faiss::HNSW::DistanceComputer &""'");
44521  }
44522  if (!argp1) {
44523  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_shrink_neighbor_list" "', argument " "1"" of type '" "faiss::HNSW::DistanceComputer &""'");
44524  }
44525  arg1 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp1);
44526  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t, 0 );
44527  if (!SWIG_IsOK(res2)) {
44528  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_shrink_neighbor_list" "', argument " "2"" of type '" "std::priority_queue< faiss::HNSW::NodeDistFarther > &""'");
44529  }
44530  if (!argp2) {
44531  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_shrink_neighbor_list" "', argument " "2"" of type '" "std::priority_queue< faiss::HNSW::NodeDistFarther > &""'");
44532  }
44533  arg2 = reinterpret_cast< std::priority_queue< faiss::HNSW::NodeDistFarther > * >(argp2);
44534  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t, 0 );
44535  if (!SWIG_IsOK(res3)) {
44536  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HNSW_shrink_neighbor_list" "', argument " "3"" of type '" "std::vector< faiss::HNSW::NodeDistFarther > &""'");
44537  }
44538  if (!argp3) {
44539  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_shrink_neighbor_list" "', argument " "3"" of type '" "std::vector< faiss::HNSW::NodeDistFarther > &""'");
44540  }
44541  arg3 = reinterpret_cast< std::vector< faiss::HNSW::NodeDistFarther > * >(argp3);
44542  ecode4 = SWIG_AsVal_int(obj3, &val4);
44543  if (!SWIG_IsOK(ecode4)) {
44544  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_shrink_neighbor_list" "', argument " "4"" of type '" "int""'");
44545  }
44546  arg4 = static_cast< int >(val4);
44547  {
44548  Py_BEGIN_ALLOW_THREADS
44549  try {
44550  faiss::HNSW::shrink_neighbor_list(*arg1,*arg2,*arg3,arg4);
44551  } catch(faiss::FaissException & e) {
44552  PyEval_RestoreThread(_save);
44553  PyErr_SetString(PyExc_RuntimeError, e.what());
44554  SWIG_fail;
44555  }
44556  Py_END_ALLOW_THREADS
44557  }
44558  resultobj = SWIG_Py_Void();
44559  return resultobj;
44560 fail:
44561  return NULL;
44562 }
44563 
44564 
44565 SWIGINTERN PyObject *_wrap_delete_HNSW(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44566  PyObject *resultobj = 0;
44567  faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
44568  void *argp1 = 0 ;
44569  int res1 = 0 ;
44570  PyObject * obj0 = 0 ;
44571 
44572  if (!PyArg_ParseTuple(args,(char *)"O:delete_HNSW",&obj0)) SWIG_fail;
44573  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, SWIG_POINTER_DISOWN | 0 );
44574  if (!SWIG_IsOK(res1)) {
44575  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HNSW" "', argument " "1"" of type '" "faiss::HNSW *""'");
44576  }
44577  arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
44578  delete arg1;
44579  resultobj = SWIG_Py_Void();
44580  return resultobj;
44581 fail:
44582  return NULL;
44583 }
44584 
44585 
44586 SWIGINTERN PyObject *HNSW_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44587  PyObject *obj;
44588  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
44589  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HNSW, SWIG_NewClientData(obj));
44590  return SWIG_Py_Void();
44591 }
44592 
44593 SWIGINTERN PyObject *_wrap_VisitedTable_visited_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44594  PyObject *resultobj = 0;
44596  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
44597  void *argp1 = 0 ;
44598  int res1 = 0 ;
44599  void *argp2 = 0 ;
44600  int res2 = 0 ;
44601  PyObject * obj0 = 0 ;
44602  PyObject * obj1 = 0 ;
44603 
44604  if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_visited_set",&obj0,&obj1)) SWIG_fail;
44605  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44606  if (!SWIG_IsOK(res1)) {
44607  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visited_set" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
44608  }
44609  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44610  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
44611  if (!SWIG_IsOK(res2)) {
44612  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VisitedTable_visited_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
44613  }
44614  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
44615  if (arg1) (arg1)->visited = *arg2;
44616  resultobj = SWIG_Py_Void();
44617  return resultobj;
44618 fail:
44619  return NULL;
44620 }
44621 
44622 
44623 SWIGINTERN PyObject *_wrap_VisitedTable_visited_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44624  PyObject *resultobj = 0;
44626  void *argp1 = 0 ;
44627  int res1 = 0 ;
44628  PyObject * obj0 = 0 ;
44629  std::vector< uint8_t > *result = 0 ;
44630 
44631  if (!PyArg_ParseTuple(args,(char *)"O:VisitedTable_visited_get",&obj0)) SWIG_fail;
44632  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44633  if (!SWIG_IsOK(res1)) {
44634  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visited_get" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
44635  }
44636  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44637  result = (std::vector< uint8_t > *)& ((arg1)->visited);
44638  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
44639  return resultobj;
44640 fail:
44641  return NULL;
44642 }
44643 
44644 
44645 SWIGINTERN PyObject *_wrap_VisitedTable_visno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44646  PyObject *resultobj = 0;
44648  int arg2 ;
44649  void *argp1 = 0 ;
44650  int res1 = 0 ;
44651  int val2 ;
44652  int ecode2 = 0 ;
44653  PyObject * obj0 = 0 ;
44654  PyObject * obj1 = 0 ;
44655 
44656  if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_visno_set",&obj0,&obj1)) SWIG_fail;
44657  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44658  if (!SWIG_IsOK(res1)) {
44659  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visno_set" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
44660  }
44661  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44662  ecode2 = SWIG_AsVal_int(obj1, &val2);
44663  if (!SWIG_IsOK(ecode2)) {
44664  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VisitedTable_visno_set" "', argument " "2"" of type '" "int""'");
44665  }
44666  arg2 = static_cast< int >(val2);
44667  if (arg1) (arg1)->visno = arg2;
44668  resultobj = SWIG_Py_Void();
44669  return resultobj;
44670 fail:
44671  return NULL;
44672 }
44673 
44674 
44675 SWIGINTERN PyObject *_wrap_VisitedTable_visno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44676  PyObject *resultobj = 0;
44678  void *argp1 = 0 ;
44679  int res1 = 0 ;
44680  PyObject * obj0 = 0 ;
44681  int result;
44682 
44683  if (!PyArg_ParseTuple(args,(char *)"O:VisitedTable_visno_get",&obj0)) SWIG_fail;
44684  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44685  if (!SWIG_IsOK(res1)) {
44686  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visno_get" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
44687  }
44688  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44689  result = (int) ((arg1)->visno);
44690  resultobj = SWIG_From_int(static_cast< int >(result));
44691  return resultobj;
44692 fail:
44693  return NULL;
44694 }
44695 
44696 
44697 SWIGINTERN PyObject *_wrap_new_VisitedTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44698  PyObject *resultobj = 0;
44699  int arg1 ;
44700  int val1 ;
44701  int ecode1 = 0 ;
44702  PyObject * obj0 = 0 ;
44703  faiss::VisitedTable *result = 0 ;
44704 
44705  if (!PyArg_ParseTuple(args,(char *)"O:new_VisitedTable",&obj0)) SWIG_fail;
44706  ecode1 = SWIG_AsVal_int(obj0, &val1);
44707  if (!SWIG_IsOK(ecode1)) {
44708  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VisitedTable" "', argument " "1"" of type '" "int""'");
44709  }
44710  arg1 = static_cast< int >(val1);
44711  {
44712  Py_BEGIN_ALLOW_THREADS
44713  try {
44714  result = (faiss::VisitedTable *)new faiss::VisitedTable(arg1);
44715  } catch(faiss::FaissException & e) {
44716  PyEval_RestoreThread(_save);
44717  PyErr_SetString(PyExc_RuntimeError, e.what());
44718  SWIG_fail;
44719  }
44720  Py_END_ALLOW_THREADS
44721  }
44722  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VisitedTable, SWIG_POINTER_NEW | 0 );
44723  return resultobj;
44724 fail:
44725  return NULL;
44726 }
44727 
44728 
44729 SWIGINTERN PyObject *_wrap_VisitedTable_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44730  PyObject *resultobj = 0;
44732  int arg2 ;
44733  void *argp1 = 0 ;
44734  int res1 = 0 ;
44735  int val2 ;
44736  int ecode2 = 0 ;
44737  PyObject * obj0 = 0 ;
44738  PyObject * obj1 = 0 ;
44739 
44740  if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_set",&obj0,&obj1)) SWIG_fail;
44741  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44742  if (!SWIG_IsOK(res1)) {
44743  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_set" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
44744  }
44745  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44746  ecode2 = SWIG_AsVal_int(obj1, &val2);
44747  if (!SWIG_IsOK(ecode2)) {
44748  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VisitedTable_set" "', argument " "2"" of type '" "int""'");
44749  }
44750  arg2 = static_cast< int >(val2);
44751  {
44752  Py_BEGIN_ALLOW_THREADS
44753  try {
44754  (arg1)->set(arg2);
44755  } catch(faiss::FaissException & e) {
44756  PyEval_RestoreThread(_save);
44757  PyErr_SetString(PyExc_RuntimeError, e.what());
44758  SWIG_fail;
44759  }
44760  Py_END_ALLOW_THREADS
44761  }
44762  resultobj = SWIG_Py_Void();
44763  return resultobj;
44764 fail:
44765  return NULL;
44766 }
44767 
44768 
44769 SWIGINTERN PyObject *_wrap_VisitedTable_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44770  PyObject *resultobj = 0;
44772  int arg2 ;
44773  void *argp1 = 0 ;
44774  int res1 = 0 ;
44775  int val2 ;
44776  int ecode2 = 0 ;
44777  PyObject * obj0 = 0 ;
44778  PyObject * obj1 = 0 ;
44779  bool result;
44780 
44781  if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_get",&obj0,&obj1)) SWIG_fail;
44782  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44783  if (!SWIG_IsOK(res1)) {
44784  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_get" "', argument " "1"" of type '" "faiss::VisitedTable const *""'");
44785  }
44786  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44787  ecode2 = SWIG_AsVal_int(obj1, &val2);
44788  if (!SWIG_IsOK(ecode2)) {
44789  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VisitedTable_get" "', argument " "2"" of type '" "int""'");
44790  }
44791  arg2 = static_cast< int >(val2);
44792  {
44793  Py_BEGIN_ALLOW_THREADS
44794  try {
44795  result = (bool)((faiss::VisitedTable const *)arg1)->get(arg2);
44796  } catch(faiss::FaissException & e) {
44797  PyEval_RestoreThread(_save);
44798  PyErr_SetString(PyExc_RuntimeError, e.what());
44799  SWIG_fail;
44800  }
44801  Py_END_ALLOW_THREADS
44802  }
44803  resultobj = SWIG_From_bool(static_cast< bool >(result));
44804  return resultobj;
44805 fail:
44806  return NULL;
44807 }
44808 
44809 
44810 SWIGINTERN PyObject *_wrap_VisitedTable_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44811  PyObject *resultobj = 0;
44813  void *argp1 = 0 ;
44814  int res1 = 0 ;
44815  PyObject * obj0 = 0 ;
44816 
44817  if (!PyArg_ParseTuple(args,(char *)"O:VisitedTable_advance",&obj0)) SWIG_fail;
44818  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
44819  if (!SWIG_IsOK(res1)) {
44820  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_advance" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
44821  }
44822  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44823  {
44824  Py_BEGIN_ALLOW_THREADS
44825  try {
44826  (arg1)->advance();
44827  } catch(faiss::FaissException & e) {
44828  PyEval_RestoreThread(_save);
44829  PyErr_SetString(PyExc_RuntimeError, e.what());
44830  SWIG_fail;
44831  }
44832  Py_END_ALLOW_THREADS
44833  }
44834  resultobj = SWIG_Py_Void();
44835  return resultobj;
44836 fail:
44837  return NULL;
44838 }
44839 
44840 
44841 SWIGINTERN PyObject *_wrap_delete_VisitedTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44842  PyObject *resultobj = 0;
44844  void *argp1 = 0 ;
44845  int res1 = 0 ;
44846  PyObject * obj0 = 0 ;
44847 
44848  if (!PyArg_ParseTuple(args,(char *)"O:delete_VisitedTable",&obj0)) SWIG_fail;
44849  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, SWIG_POINTER_DISOWN | 0 );
44850  if (!SWIG_IsOK(res1)) {
44851  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VisitedTable" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
44852  }
44853  arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
44854  delete arg1;
44855  resultobj = SWIG_Py_Void();
44856  return resultobj;
44857 fail:
44858  return NULL;
44859 }
44860 
44861 
44862 SWIGINTERN PyObject *VisitedTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44863  PyObject *obj;
44864  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
44865  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VisitedTable, SWIG_NewClientData(obj));
44866  return SWIG_Py_Void();
44867 }
44868 
44869 SWIGINTERN PyObject *_wrap_HNSWStats_n1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44870  PyObject *resultobj = 0;
44871  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
44872  size_t arg2 ;
44873  void *argp1 = 0 ;
44874  int res1 = 0 ;
44875  size_t val2 ;
44876  int ecode2 = 0 ;
44877  PyObject * obj0 = 0 ;
44878  PyObject * obj1 = 0 ;
44879 
44880  if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_n1_set",&obj0,&obj1)) SWIG_fail;
44881  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
44882  if (!SWIG_IsOK(res1)) {
44883  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n1_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
44884  }
44885  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
44886  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44887  if (!SWIG_IsOK(ecode2)) {
44888  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_n1_set" "', argument " "2"" of type '" "size_t""'");
44889  }
44890  arg2 = static_cast< size_t >(val2);
44891  if (arg1) (arg1)->n1 = arg2;
44892  resultobj = SWIG_Py_Void();
44893  return resultobj;
44894 fail:
44895  return NULL;
44896 }
44897 
44898 
44899 SWIGINTERN PyObject *_wrap_HNSWStats_n1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44900  PyObject *resultobj = 0;
44901  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
44902  void *argp1 = 0 ;
44903  int res1 = 0 ;
44904  PyObject * obj0 = 0 ;
44905  size_t result;
44906 
44907  if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_n1_get",&obj0)) SWIG_fail;
44908  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
44909  if (!SWIG_IsOK(res1)) {
44910  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n1_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
44911  }
44912  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
44913  result = (size_t) ((arg1)->n1);
44914  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44915  return resultobj;
44916 fail:
44917  return NULL;
44918 }
44919 
44920 
44921 SWIGINTERN PyObject *_wrap_HNSWStats_n2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44922  PyObject *resultobj = 0;
44923  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
44924  size_t arg2 ;
44925  void *argp1 = 0 ;
44926  int res1 = 0 ;
44927  size_t val2 ;
44928  int ecode2 = 0 ;
44929  PyObject * obj0 = 0 ;
44930  PyObject * obj1 = 0 ;
44931 
44932  if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_n2_set",&obj0,&obj1)) SWIG_fail;
44933  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
44934  if (!SWIG_IsOK(res1)) {
44935  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n2_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
44936  }
44937  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
44938  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44939  if (!SWIG_IsOK(ecode2)) {
44940  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_n2_set" "', argument " "2"" of type '" "size_t""'");
44941  }
44942  arg2 = static_cast< size_t >(val2);
44943  if (arg1) (arg1)->n2 = arg2;
44944  resultobj = SWIG_Py_Void();
44945  return resultobj;
44946 fail:
44947  return NULL;
44948 }
44949 
44950 
44951 SWIGINTERN PyObject *_wrap_HNSWStats_n2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44952  PyObject *resultobj = 0;
44953  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
44954  void *argp1 = 0 ;
44955  int res1 = 0 ;
44956  PyObject * obj0 = 0 ;
44957  size_t result;
44958 
44959  if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_n2_get",&obj0)) SWIG_fail;
44960  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
44961  if (!SWIG_IsOK(res1)) {
44962  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n2_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
44963  }
44964  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
44965  result = (size_t) ((arg1)->n2);
44966  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44967  return resultobj;
44968 fail:
44969  return NULL;
44970 }
44971 
44972 
44973 SWIGINTERN PyObject *_wrap_HNSWStats_n3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44974  PyObject *resultobj = 0;
44975  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
44976  size_t arg2 ;
44977  void *argp1 = 0 ;
44978  int res1 = 0 ;
44979  size_t val2 ;
44980  int ecode2 = 0 ;
44981  PyObject * obj0 = 0 ;
44982  PyObject * obj1 = 0 ;
44983 
44984  if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_n3_set",&obj0,&obj1)) SWIG_fail;
44985  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
44986  if (!SWIG_IsOK(res1)) {
44987  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n3_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
44988  }
44989  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
44990  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44991  if (!SWIG_IsOK(ecode2)) {
44992  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_n3_set" "', argument " "2"" of type '" "size_t""'");
44993  }
44994  arg2 = static_cast< size_t >(val2);
44995  if (arg1) (arg1)->n3 = arg2;
44996  resultobj = SWIG_Py_Void();
44997  return resultobj;
44998 fail:
44999  return NULL;
45000 }
45001 
45002 
45003 SWIGINTERN PyObject *_wrap_HNSWStats_n3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45004  PyObject *resultobj = 0;
45005  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45006  void *argp1 = 0 ;
45007  int res1 = 0 ;
45008  PyObject * obj0 = 0 ;
45009  size_t result;
45010 
45011  if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_n3_get",&obj0)) SWIG_fail;
45012  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45013  if (!SWIG_IsOK(res1)) {
45014  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n3_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45015  }
45016  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45017  result = (size_t) ((arg1)->n3);
45018  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45019  return resultobj;
45020 fail:
45021  return NULL;
45022 }
45023 
45024 
45025 SWIGINTERN PyObject *_wrap_HNSWStats_ndis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45026  PyObject *resultobj = 0;
45027  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45028  size_t arg2 ;
45029  void *argp1 = 0 ;
45030  int res1 = 0 ;
45031  size_t val2 ;
45032  int ecode2 = 0 ;
45033  PyObject * obj0 = 0 ;
45034  PyObject * obj1 = 0 ;
45035 
45036  if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_ndis_set",&obj0,&obj1)) SWIG_fail;
45037  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45038  if (!SWIG_IsOK(res1)) {
45039  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_ndis_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45040  }
45041  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45042  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45043  if (!SWIG_IsOK(ecode2)) {
45044  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_ndis_set" "', argument " "2"" of type '" "size_t""'");
45045  }
45046  arg2 = static_cast< size_t >(val2);
45047  if (arg1) (arg1)->ndis = arg2;
45048  resultobj = SWIG_Py_Void();
45049  return resultobj;
45050 fail:
45051  return NULL;
45052 }
45053 
45054 
45055 SWIGINTERN PyObject *_wrap_HNSWStats_ndis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45056  PyObject *resultobj = 0;
45057  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45058  void *argp1 = 0 ;
45059  int res1 = 0 ;
45060  PyObject * obj0 = 0 ;
45061  size_t result;
45062 
45063  if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_ndis_get",&obj0)) SWIG_fail;
45064  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45065  if (!SWIG_IsOK(res1)) {
45066  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_ndis_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45067  }
45068  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45069  result = (size_t) ((arg1)->ndis);
45070  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45071  return resultobj;
45072 fail:
45073  return NULL;
45074 }
45075 
45076 
45077 SWIGINTERN PyObject *_wrap_HNSWStats_nreorder_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45078  PyObject *resultobj = 0;
45079  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45080  size_t arg2 ;
45081  void *argp1 = 0 ;
45082  int res1 = 0 ;
45083  size_t val2 ;
45084  int ecode2 = 0 ;
45085  PyObject * obj0 = 0 ;
45086  PyObject * obj1 = 0 ;
45087 
45088  if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_nreorder_set",&obj0,&obj1)) SWIG_fail;
45089  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45090  if (!SWIG_IsOK(res1)) {
45091  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_nreorder_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45092  }
45093  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45094  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45095  if (!SWIG_IsOK(ecode2)) {
45096  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_nreorder_set" "', argument " "2"" of type '" "size_t""'");
45097  }
45098  arg2 = static_cast< size_t >(val2);
45099  if (arg1) (arg1)->nreorder = arg2;
45100  resultobj = SWIG_Py_Void();
45101  return resultobj;
45102 fail:
45103  return NULL;
45104 }
45105 
45106 
45107 SWIGINTERN PyObject *_wrap_HNSWStats_nreorder_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45108  PyObject *resultobj = 0;
45109  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45110  void *argp1 = 0 ;
45111  int res1 = 0 ;
45112  PyObject * obj0 = 0 ;
45113  size_t result;
45114 
45115  if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_nreorder_get",&obj0)) SWIG_fail;
45116  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45117  if (!SWIG_IsOK(res1)) {
45118  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_nreorder_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45119  }
45120  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45121  result = (size_t) ((arg1)->nreorder);
45122  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45123  return resultobj;
45124 fail:
45125  return NULL;
45126 }
45127 
45128 
45129 SWIGINTERN PyObject *_wrap_HNSWStats_view_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45130  PyObject *resultobj = 0;
45131  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45132  bool arg2 ;
45133  void *argp1 = 0 ;
45134  int res1 = 0 ;
45135  bool val2 ;
45136  int ecode2 = 0 ;
45137  PyObject * obj0 = 0 ;
45138  PyObject * obj1 = 0 ;
45139 
45140  if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_view_set",&obj0,&obj1)) SWIG_fail;
45141  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45142  if (!SWIG_IsOK(res1)) {
45143  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_view_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45144  }
45145  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45146  ecode2 = SWIG_AsVal_bool(obj1, &val2);
45147  if (!SWIG_IsOK(ecode2)) {
45148  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_view_set" "', argument " "2"" of type '" "bool""'");
45149  }
45150  arg2 = static_cast< bool >(val2);
45151  if (arg1) (arg1)->view = arg2;
45152  resultobj = SWIG_Py_Void();
45153  return resultobj;
45154 fail:
45155  return NULL;
45156 }
45157 
45158 
45159 SWIGINTERN PyObject *_wrap_HNSWStats_view_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45160  PyObject *resultobj = 0;
45161  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45162  void *argp1 = 0 ;
45163  int res1 = 0 ;
45164  PyObject * obj0 = 0 ;
45165  bool result;
45166 
45167  if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_view_get",&obj0)) SWIG_fail;
45168  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45169  if (!SWIG_IsOK(res1)) {
45170  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_view_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45171  }
45172  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45173  result = (bool) ((arg1)->view);
45174  resultobj = SWIG_From_bool(static_cast< bool >(result));
45175  return resultobj;
45176 fail:
45177  return NULL;
45178 }
45179 
45180 
45181 SWIGINTERN PyObject *_wrap_new_HNSWStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45182  PyObject *resultobj = 0;
45183  faiss::HNSWStats *result = 0 ;
45184 
45185  if (!PyArg_ParseTuple(args,(char *)":new_HNSWStats")) SWIG_fail;
45186  {
45187  Py_BEGIN_ALLOW_THREADS
45188  try {
45189  result = (faiss::HNSWStats *)new faiss::HNSWStats();
45190  } catch(faiss::FaissException & e) {
45191  PyEval_RestoreThread(_save);
45192  PyErr_SetString(PyExc_RuntimeError, e.what());
45193  SWIG_fail;
45194  }
45195  Py_END_ALLOW_THREADS
45196  }
45197  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSWStats, SWIG_POINTER_NEW | 0 );
45198  return resultobj;
45199 fail:
45200  return NULL;
45201 }
45202 
45203 
45204 SWIGINTERN PyObject *_wrap_HNSWStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45205  PyObject *resultobj = 0;
45206  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45207  void *argp1 = 0 ;
45208  int res1 = 0 ;
45209  PyObject * obj0 = 0 ;
45210 
45211  if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_reset",&obj0)) SWIG_fail;
45212  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
45213  if (!SWIG_IsOK(res1)) {
45214  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_reset" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45215  }
45216  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45217  {
45218  Py_BEGIN_ALLOW_THREADS
45219  try {
45220  (arg1)->reset();
45221  } catch(faiss::FaissException & e) {
45222  PyEval_RestoreThread(_save);
45223  PyErr_SetString(PyExc_RuntimeError, e.what());
45224  SWIG_fail;
45225  }
45226  Py_END_ALLOW_THREADS
45227  }
45228  resultobj = SWIG_Py_Void();
45229  return resultobj;
45230 fail:
45231  return NULL;
45232 }
45233 
45234 
45235 SWIGINTERN PyObject *_wrap_delete_HNSWStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45236  PyObject *resultobj = 0;
45237  faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
45238  void *argp1 = 0 ;
45239  int res1 = 0 ;
45240  PyObject * obj0 = 0 ;
45241 
45242  if (!PyArg_ParseTuple(args,(char *)"O:delete_HNSWStats",&obj0)) SWIG_fail;
45243  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, SWIG_POINTER_DISOWN | 0 );
45244  if (!SWIG_IsOK(res1)) {
45245  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HNSWStats" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
45246  }
45247  arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
45248  delete arg1;
45249  resultobj = SWIG_Py_Void();
45250  return resultobj;
45251 fail:
45252  return NULL;
45253 }
45254 
45255 
45256 SWIGINTERN PyObject *HNSWStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45257  PyObject *obj;
45258  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
45259  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HNSWStats, SWIG_NewClientData(obj));
45260  return SWIG_Py_Void();
45261 }
45262 
45263 SWIGINTERN int Swig_var_hnsw_stats_set(PyObject *_val) {
45264  {
45265  void *argp = 0;
45266  int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__HNSWStats, 0 | 0);
45267  if (!SWIG_IsOK(res)) {
45268  SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::hnsw_stats""' of type '""faiss::HNSWStats""'");
45269  }
45270  if (!argp) {
45271  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::hnsw_stats""' of type '""faiss::HNSWStats""'");
45272  } else {
45273  faiss::HNSWStats * temp;
45274  temp = reinterpret_cast< faiss::HNSWStats * >(argp);
45275  faiss::hnsw_stats = *temp;
45276  if (SWIG_IsNewObj(res)) delete temp;
45277  }
45278  }
45279  return 0;
45280 fail:
45281  return 1;
45282 }
45283 
45284 
45285 SWIGINTERN PyObject *Swig_var_hnsw_stats_get(void) {
45286  PyObject *pyobj = 0;
45287 
45288  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::hnsw_stats), SWIGTYPE_p_faiss__HNSWStats, 0 );
45289  return pyobj;
45290 }
45291 
45292 
45293 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45294  PyObject *resultobj = 0;
45296  void *argp1 = 0 ;
45297  int res1 = 0 ;
45298  PyObject * obj0 = 0 ;
45299  faiss::IndexHNSW *result = 0 ;
45300 
45301  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_index_get",&obj0)) SWIG_fail;
45302  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45303  if (!SWIG_IsOK(res1)) {
45304  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_index_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45305  }
45306  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45307  result = (faiss::IndexHNSW *) &(faiss::IndexHNSW const &) ((arg1)->index);
45308  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45309  return resultobj;
45310 fail:
45311  return NULL;
45312 }
45313 
45314 
45315 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_M_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45316  PyObject *resultobj = 0;
45318  size_t arg2 ;
45319  void *argp1 = 0 ;
45320  int res1 = 0 ;
45321  size_t val2 ;
45322  int ecode2 = 0 ;
45323  PyObject * obj0 = 0 ;
45324  PyObject * obj1 = 0 ;
45325 
45326  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_M_set",&obj0,&obj1)) SWIG_fail;
45327  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45328  if (!SWIG_IsOK(res1)) {
45329  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_M_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45330  }
45331  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45332  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45333  if (!SWIG_IsOK(ecode2)) {
45334  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_M_set" "', argument " "2"" of type '" "size_t""'");
45335  }
45336  arg2 = static_cast< size_t >(val2);
45337  if (arg1) (arg1)->M = arg2;
45338  resultobj = SWIG_Py_Void();
45339  return resultobj;
45340 fail:
45341  return NULL;
45342 }
45343 
45344 
45345 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_M_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45346  PyObject *resultobj = 0;
45348  void *argp1 = 0 ;
45349  int res1 = 0 ;
45350  PyObject * obj0 = 0 ;
45351  size_t result;
45352 
45353  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_M_get",&obj0)) SWIG_fail;
45354  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45355  if (!SWIG_IsOK(res1)) {
45356  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_M_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45357  }
45358  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45359  result = (size_t) ((arg1)->M);
45360  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45361  return resultobj;
45362 fail:
45363  return NULL;
45364 }
45365 
45366 
45367 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45368  PyObject *resultobj = 0;
45370  size_t arg2 ;
45371  void *argp1 = 0 ;
45372  int res1 = 0 ;
45373  size_t val2 ;
45374  int ecode2 = 0 ;
45375  PyObject * obj0 = 0 ;
45376  PyObject * obj1 = 0 ;
45377 
45378  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_k_set",&obj0,&obj1)) SWIG_fail;
45379  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45380  if (!SWIG_IsOK(res1)) {
45381  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45382  }
45383  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45384  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45385  if (!SWIG_IsOK(ecode2)) {
45386  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_k_set" "', argument " "2"" of type '" "size_t""'");
45387  }
45388  arg2 = static_cast< size_t >(val2);
45389  if (arg1) (arg1)->k = arg2;
45390  resultobj = SWIG_Py_Void();
45391  return resultobj;
45392 fail:
45393  return NULL;
45394 }
45395 
45396 
45397 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45398  PyObject *resultobj = 0;
45400  void *argp1 = 0 ;
45401  int res1 = 0 ;
45402  PyObject * obj0 = 0 ;
45403  size_t result;
45404 
45405  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_k_get",&obj0)) SWIG_fail;
45406  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45407  if (!SWIG_IsOK(res1)) {
45408  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45409  }
45410  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45411  result = (size_t) ((arg1)->k);
45412  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45413  return resultobj;
45414 fail:
45415  return NULL;
45416 }
45417 
45418 
45419 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_nsq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45420  PyObject *resultobj = 0;
45422  size_t arg2 ;
45423  void *argp1 = 0 ;
45424  int res1 = 0 ;
45425  size_t val2 ;
45426  int ecode2 = 0 ;
45427  PyObject * obj0 = 0 ;
45428  PyObject * obj1 = 0 ;
45429 
45430  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_nsq_set",&obj0,&obj1)) SWIG_fail;
45431  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45432  if (!SWIG_IsOK(res1)) {
45433  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_nsq_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45434  }
45435  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45436  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45437  if (!SWIG_IsOK(ecode2)) {
45438  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_nsq_set" "', argument " "2"" of type '" "size_t""'");
45439  }
45440  arg2 = static_cast< size_t >(val2);
45441  if (arg1) (arg1)->nsq = arg2;
45442  resultobj = SWIG_Py_Void();
45443  return resultobj;
45444 fail:
45445  return NULL;
45446 }
45447 
45448 
45449 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_nsq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45450  PyObject *resultobj = 0;
45452  void *argp1 = 0 ;
45453  int res1 = 0 ;
45454  PyObject * obj0 = 0 ;
45455  size_t result;
45456 
45457  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_nsq_get",&obj0)) SWIG_fail;
45458  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45459  if (!SWIG_IsOK(res1)) {
45460  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_nsq_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45461  }
45462  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45463  result = (size_t) ((arg1)->nsq);
45464  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45465  return resultobj;
45466 fail:
45467  return NULL;
45468 }
45469 
45470 
45471 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45472  PyObject *resultobj = 0;
45474  size_t arg2 ;
45475  void *argp1 = 0 ;
45476  int res1 = 0 ;
45477  size_t val2 ;
45478  int ecode2 = 0 ;
45479  PyObject * obj0 = 0 ;
45480  PyObject * obj1 = 0 ;
45481 
45482  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_code_size_set",&obj0,&obj1)) SWIG_fail;
45483  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45484  if (!SWIG_IsOK(res1)) {
45485  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_code_size_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45486  }
45487  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45488  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45489  if (!SWIG_IsOK(ecode2)) {
45490  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_code_size_set" "', argument " "2"" of type '" "size_t""'");
45491  }
45492  arg2 = static_cast< size_t >(val2);
45493  if (arg1) (arg1)->code_size = arg2;
45494  resultobj = SWIG_Py_Void();
45495  return resultobj;
45496 fail:
45497  return NULL;
45498 }
45499 
45500 
45501 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45502  PyObject *resultobj = 0;
45504  void *argp1 = 0 ;
45505  int res1 = 0 ;
45506  PyObject * obj0 = 0 ;
45507  size_t result;
45508 
45509  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_code_size_get",&obj0)) SWIG_fail;
45510  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45511  if (!SWIG_IsOK(res1)) {
45512  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_code_size_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45513  }
45514  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45515  result = (size_t) ((arg1)->code_size);
45516  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45517  return resultobj;
45518 fail:
45519  return NULL;
45520 }
45521 
45522 
45523 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_reorder_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45524  PyObject *resultobj = 0;
45526  int arg2 ;
45527  void *argp1 = 0 ;
45528  int res1 = 0 ;
45529  int val2 ;
45530  int ecode2 = 0 ;
45531  PyObject * obj0 = 0 ;
45532  PyObject * obj1 = 0 ;
45533 
45534  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_k_reorder_set",&obj0,&obj1)) SWIG_fail;
45535  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45536  if (!SWIG_IsOK(res1)) {
45537  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_reorder_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45538  }
45539  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45540  ecode2 = SWIG_AsVal_int(obj1, &val2);
45541  if (!SWIG_IsOK(ecode2)) {
45542  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_k_reorder_set" "', argument " "2"" of type '" "int""'");
45543  }
45544  arg2 = static_cast< int >(val2);
45545  if (arg1) (arg1)->k_reorder = arg2;
45546  resultobj = SWIG_Py_Void();
45547  return resultobj;
45548 fail:
45549  return NULL;
45550 }
45551 
45552 
45553 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_reorder_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45554  PyObject *resultobj = 0;
45556  void *argp1 = 0 ;
45557  int res1 = 0 ;
45558  PyObject * obj0 = 0 ;
45559  int result;
45560 
45561  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_k_reorder_get",&obj0)) SWIG_fail;
45562  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45563  if (!SWIG_IsOK(res1)) {
45564  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_reorder_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45565  }
45566  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45567  result = (int) ((arg1)->k_reorder);
45568  resultobj = SWIG_From_int(static_cast< int >(result));
45569  return resultobj;
45570 fail:
45571  return NULL;
45572 }
45573 
45574 
45575 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codebook_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45576  PyObject *resultobj = 0;
45578  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
45579  void *argp1 = 0 ;
45580  int res1 = 0 ;
45581  void *argp2 = 0 ;
45582  int res2 = 0 ;
45583  PyObject * obj0 = 0 ;
45584  PyObject * obj1 = 0 ;
45585 
45586  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_codebook_set",&obj0,&obj1)) SWIG_fail;
45587  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45588  if (!SWIG_IsOK(res1)) {
45589  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codebook_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45590  }
45591  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45592  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
45593  if (!SWIG_IsOK(res2)) {
45594  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReconstructFromNeighbors_codebook_set" "', argument " "2"" of type '" "std::vector< float > *""'");
45595  }
45596  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
45597  if (arg1) (arg1)->codebook = *arg2;
45598  resultobj = SWIG_Py_Void();
45599  return resultobj;
45600 fail:
45601  return NULL;
45602 }
45603 
45604 
45605 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codebook_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45606  PyObject *resultobj = 0;
45608  void *argp1 = 0 ;
45609  int res1 = 0 ;
45610  PyObject * obj0 = 0 ;
45611  std::vector< float > *result = 0 ;
45612 
45613  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_codebook_get",&obj0)) SWIG_fail;
45614  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45615  if (!SWIG_IsOK(res1)) {
45616  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codebook_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45617  }
45618  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45619  result = (std::vector< float > *)& ((arg1)->codebook);
45620  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
45621  return resultobj;
45622 fail:
45623  return NULL;
45624 }
45625 
45626 
45627 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45628  PyObject *resultobj = 0;
45630  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
45631  void *argp1 = 0 ;
45632  int res1 = 0 ;
45633  void *argp2 = 0 ;
45634  int res2 = 0 ;
45635  PyObject * obj0 = 0 ;
45636  PyObject * obj1 = 0 ;
45637 
45638  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_codes_set",&obj0,&obj1)) SWIG_fail;
45639  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45640  if (!SWIG_IsOK(res1)) {
45641  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codes_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45642  }
45643  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45644  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
45645  if (!SWIG_IsOK(res2)) {
45646  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReconstructFromNeighbors_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
45647  }
45648  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
45649  if (arg1) (arg1)->codes = *arg2;
45650  resultobj = SWIG_Py_Void();
45651  return resultobj;
45652 fail:
45653  return NULL;
45654 }
45655 
45656 
45657 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45658  PyObject *resultobj = 0;
45660  void *argp1 = 0 ;
45661  int res1 = 0 ;
45662  PyObject * obj0 = 0 ;
45663  std::vector< uint8_t > *result = 0 ;
45664 
45665  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_codes_get",&obj0)) SWIG_fail;
45666  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45667  if (!SWIG_IsOK(res1)) {
45668  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codes_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45669  }
45670  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45671  result = (std::vector< uint8_t > *)& ((arg1)->codes);
45672  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
45673  return resultobj;
45674 fail:
45675  return NULL;
45676 }
45677 
45678 
45679 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_ntotal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45680  PyObject *resultobj = 0;
45682  size_t arg2 ;
45683  void *argp1 = 0 ;
45684  int res1 = 0 ;
45685  size_t val2 ;
45686  int ecode2 = 0 ;
45687  PyObject * obj0 = 0 ;
45688  PyObject * obj1 = 0 ;
45689 
45690  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_ntotal_set",&obj0,&obj1)) SWIG_fail;
45691  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45692  if (!SWIG_IsOK(res1)) {
45693  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_ntotal_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45694  }
45695  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45696  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45697  if (!SWIG_IsOK(ecode2)) {
45698  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_ntotal_set" "', argument " "2"" of type '" "size_t""'");
45699  }
45700  arg2 = static_cast< size_t >(val2);
45701  if (arg1) (arg1)->ntotal = arg2;
45702  resultobj = SWIG_Py_Void();
45703  return resultobj;
45704 fail:
45705  return NULL;
45706 }
45707 
45708 
45709 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_ntotal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45710  PyObject *resultobj = 0;
45712  void *argp1 = 0 ;
45713  int res1 = 0 ;
45714  PyObject * obj0 = 0 ;
45715  size_t result;
45716 
45717  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_ntotal_get",&obj0)) SWIG_fail;
45718  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45719  if (!SWIG_IsOK(res1)) {
45720  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_ntotal_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45721  }
45722  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45723  result = (size_t) ((arg1)->ntotal);
45724  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45725  return resultobj;
45726 fail:
45727  return NULL;
45728 }
45729 
45730 
45731 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45732  PyObject *resultobj = 0;
45734  size_t arg2 ;
45735  void *argp1 = 0 ;
45736  int res1 = 0 ;
45737  size_t val2 ;
45738  int ecode2 = 0 ;
45739  PyObject * obj0 = 0 ;
45740  PyObject * obj1 = 0 ;
45741 
45742  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_d_set",&obj0,&obj1)) SWIG_fail;
45743  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45744  if (!SWIG_IsOK(res1)) {
45745  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_d_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45746  }
45747  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45748  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45749  if (!SWIG_IsOK(ecode2)) {
45750  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_d_set" "', argument " "2"" of type '" "size_t""'");
45751  }
45752  arg2 = static_cast< size_t >(val2);
45753  if (arg1) (arg1)->d = arg2;
45754  resultobj = SWIG_Py_Void();
45755  return resultobj;
45756 fail:
45757  return NULL;
45758 }
45759 
45760 
45761 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45762  PyObject *resultobj = 0;
45764  void *argp1 = 0 ;
45765  int res1 = 0 ;
45766  PyObject * obj0 = 0 ;
45767  size_t result;
45768 
45769  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_d_get",&obj0)) SWIG_fail;
45770  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45771  if (!SWIG_IsOK(res1)) {
45772  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_d_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45773  }
45774  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45775  result = (size_t) ((arg1)->d);
45776  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45777  return resultobj;
45778 fail:
45779  return NULL;
45780 }
45781 
45782 
45783 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_dsub_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45784  PyObject *resultobj = 0;
45786  size_t arg2 ;
45787  void *argp1 = 0 ;
45788  int res1 = 0 ;
45789  size_t val2 ;
45790  int ecode2 = 0 ;
45791  PyObject * obj0 = 0 ;
45792  PyObject * obj1 = 0 ;
45793 
45794  if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_dsub_set",&obj0,&obj1)) SWIG_fail;
45795  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45796  if (!SWIG_IsOK(res1)) {
45797  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_dsub_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45798  }
45799  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45800  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45801  if (!SWIG_IsOK(ecode2)) {
45802  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_dsub_set" "', argument " "2"" of type '" "size_t""'");
45803  }
45804  arg2 = static_cast< size_t >(val2);
45805  if (arg1) (arg1)->dsub = arg2;
45806  resultobj = SWIG_Py_Void();
45807  return resultobj;
45808 fail:
45809  return NULL;
45810 }
45811 
45812 
45813 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_dsub_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45814  PyObject *resultobj = 0;
45816  void *argp1 = 0 ;
45817  int res1 = 0 ;
45818  PyObject * obj0 = 0 ;
45819  size_t result;
45820 
45821  if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_dsub_get",&obj0)) SWIG_fail;
45822  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45823  if (!SWIG_IsOK(res1)) {
45824  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_dsub_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45825  }
45826  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45827  result = (size_t) ((arg1)->dsub);
45828  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
45829  return resultobj;
45830 fail:
45831  return NULL;
45832 }
45833 
45834 
45835 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45836  PyObject *resultobj = 0;
45837  faiss::IndexHNSW *arg1 = 0 ;
45838  size_t arg2 ;
45839  size_t arg3 ;
45840  void *argp1 = 0 ;
45841  int res1 = 0 ;
45842  size_t val2 ;
45843  int ecode2 = 0 ;
45844  size_t val3 ;
45845  int ecode3 = 0 ;
45846  PyObject * obj0 = 0 ;
45847  PyObject * obj1 = 0 ;
45848  PyObject * obj2 = 0 ;
45849  faiss::ReconstructFromNeighbors *result = 0 ;
45850 
45851  if (!PyArg_ParseTuple(args,(char *)"OOO:new_ReconstructFromNeighbors",&obj0,&obj1,&obj2)) SWIG_fail;
45852  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__IndexHNSW, 0 | 0);
45853  if (!SWIG_IsOK(res1)) {
45854  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
45855  }
45856  if (!argp1) {
45857  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
45858  }
45859  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45860  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45861  if (!SWIG_IsOK(ecode2)) {
45862  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ReconstructFromNeighbors" "', argument " "2"" of type '" "size_t""'");
45863  }
45864  arg2 = static_cast< size_t >(val2);
45865  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
45866  if (!SWIG_IsOK(ecode3)) {
45867  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ReconstructFromNeighbors" "', argument " "3"" of type '" "size_t""'");
45868  }
45869  arg3 = static_cast< size_t >(val3);
45870  {
45871  Py_BEGIN_ALLOW_THREADS
45872  try {
45873  result = (faiss::ReconstructFromNeighbors *)new faiss::ReconstructFromNeighbors((faiss::IndexHNSW const &)*arg1,arg2,arg3);
45874  } catch(faiss::FaissException & e) {
45875  PyEval_RestoreThread(_save);
45876  PyErr_SetString(PyExc_RuntimeError, e.what());
45877  SWIG_fail;
45878  }
45879  Py_END_ALLOW_THREADS
45880  }
45881  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_NEW | 0 );
45882  return resultobj;
45883 fail:
45884  return NULL;
45885 }
45886 
45887 
45888 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45889  PyObject *resultobj = 0;
45890  faiss::IndexHNSW *arg1 = 0 ;
45891  size_t arg2 ;
45892  void *argp1 = 0 ;
45893  int res1 = 0 ;
45894  size_t val2 ;
45895  int ecode2 = 0 ;
45896  PyObject * obj0 = 0 ;
45897  PyObject * obj1 = 0 ;
45898  faiss::ReconstructFromNeighbors *result = 0 ;
45899 
45900  if (!PyArg_ParseTuple(args,(char *)"OO:new_ReconstructFromNeighbors",&obj0,&obj1)) SWIG_fail;
45901  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__IndexHNSW, 0 | 0);
45902  if (!SWIG_IsOK(res1)) {
45903  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
45904  }
45905  if (!argp1) {
45906  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
45907  }
45908  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45909  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
45910  if (!SWIG_IsOK(ecode2)) {
45911  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ReconstructFromNeighbors" "', argument " "2"" of type '" "size_t""'");
45912  }
45913  arg2 = static_cast< size_t >(val2);
45914  {
45915  Py_BEGIN_ALLOW_THREADS
45916  try {
45918  } catch(faiss::FaissException & e) {
45919  PyEval_RestoreThread(_save);
45920  PyErr_SetString(PyExc_RuntimeError, e.what());
45921  SWIG_fail;
45922  }
45923  Py_END_ALLOW_THREADS
45924  }
45925  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_NEW | 0 );
45926  return resultobj;
45927 fail:
45928  return NULL;
45929 }
45930 
45931 
45932 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45933  PyObject *resultobj = 0;
45934  faiss::IndexHNSW *arg1 = 0 ;
45935  void *argp1 = 0 ;
45936  int res1 = 0 ;
45937  PyObject * obj0 = 0 ;
45938  faiss::ReconstructFromNeighbors *result = 0 ;
45939 
45940  if (!PyArg_ParseTuple(args,(char *)"O:new_ReconstructFromNeighbors",&obj0)) SWIG_fail;
45941  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__IndexHNSW, 0 | 0);
45942  if (!SWIG_IsOK(res1)) {
45943  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
45944  }
45945  if (!argp1) {
45946  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
45947  }
45948  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45949  {
45950  Py_BEGIN_ALLOW_THREADS
45951  try {
45953  } catch(faiss::FaissException & e) {
45954  PyEval_RestoreThread(_save);
45955  PyErr_SetString(PyExc_RuntimeError, e.what());
45956  SWIG_fail;
45957  }
45958  Py_END_ALLOW_THREADS
45959  }
45960  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_NEW | 0 );
45961  return resultobj;
45962 fail:
45963  return NULL;
45964 }
45965 
45966 
45967 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors(PyObject *self, PyObject *args) {
45968  Py_ssize_t argc;
45969  PyObject *argv[4] = {
45970  0
45971  };
45972  Py_ssize_t ii;
45973 
45974  if (!PyTuple_Check(args)) SWIG_fail;
45975  argc = args ? PyObject_Length(args) : 0;
45976  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
45977  argv[ii] = PyTuple_GET_ITEM(args,ii);
45978  }
45979  if (argc == 1) {
45980  int _v;
45981  int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_faiss__IndexHNSW, 0);
45982  _v = SWIG_CheckState(res);
45983  if (_v) {
45984  return _wrap_new_ReconstructFromNeighbors__SWIG_2(self, args);
45985  }
45986  }
45987  if (argc == 2) {
45988  int _v;
45989  int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_faiss__IndexHNSW, 0);
45990  _v = SWIG_CheckState(res);
45991  if (_v) {
45992  {
45993  int res = SWIG_AsVal_size_t(argv[1], NULL);
45994  _v = SWIG_CheckState(res);
45995  }
45996  if (_v) {
45997  return _wrap_new_ReconstructFromNeighbors__SWIG_1(self, args);
45998  }
45999  }
46000  }
46001  if (argc == 3) {
46002  int _v;
46003  int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_faiss__IndexHNSW, 0);
46004  _v = SWIG_CheckState(res);
46005  if (_v) {
46006  {
46007  int res = SWIG_AsVal_size_t(argv[1], NULL);
46008  _v = SWIG_CheckState(res);
46009  }
46010  if (_v) {
46011  {
46012  int res = SWIG_AsVal_size_t(argv[2], NULL);
46013  _v = SWIG_CheckState(res);
46014  }
46015  if (_v) {
46016  return _wrap_new_ReconstructFromNeighbors__SWIG_0(self, args);
46017  }
46018  }
46019  }
46020  }
46021 
46022 fail:
46023  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ReconstructFromNeighbors'.\n"
46024  " Possible C/C++ prototypes are:\n"
46025  " faiss::ReconstructFromNeighbors::ReconstructFromNeighbors(faiss::IndexHNSW const &,size_t,size_t)\n"
46026  " faiss::ReconstructFromNeighbors::ReconstructFromNeighbors(faiss::IndexHNSW const &,size_t)\n"
46027  " faiss::ReconstructFromNeighbors::ReconstructFromNeighbors(faiss::IndexHNSW const &)\n");
46028  return 0;
46029 }
46030 
46031 
46032 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_add_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46033  PyObject *resultobj = 0;
46035  size_t arg2 ;
46036  float *arg3 = (float *) 0 ;
46037  void *argp1 = 0 ;
46038  int res1 = 0 ;
46039  size_t val2 ;
46040  int ecode2 = 0 ;
46041  void *argp3 = 0 ;
46042  int res3 = 0 ;
46043  PyObject * obj0 = 0 ;
46044  PyObject * obj1 = 0 ;
46045  PyObject * obj2 = 0 ;
46046 
46047  if (!PyArg_ParseTuple(args,(char *)"OOO:ReconstructFromNeighbors_add_codes",&obj0,&obj1,&obj2)) SWIG_fail;
46048  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
46049  if (!SWIG_IsOK(res1)) {
46050  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_add_codes" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
46051  }
46052  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
46053  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
46054  if (!SWIG_IsOK(ecode2)) {
46055  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_add_codes" "', argument " "2"" of type '" "size_t""'");
46056  }
46057  arg2 = static_cast< size_t >(val2);
46058  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46059  if (!SWIG_IsOK(res3)) {
46060  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_add_codes" "', argument " "3"" of type '" "float const *""'");
46061  }
46062  arg3 = reinterpret_cast< float * >(argp3);
46063  {
46064  Py_BEGIN_ALLOW_THREADS
46065  try {
46066  (arg1)->add_codes(arg2,(float const *)arg3);
46067  } catch(faiss::FaissException & e) {
46068  PyEval_RestoreThread(_save);
46069  PyErr_SetString(PyExc_RuntimeError, e.what());
46070  SWIG_fail;
46071  }
46072  Py_END_ALLOW_THREADS
46073  }
46074  resultobj = SWIG_Py_Void();
46075  return resultobj;
46076 fail:
46077  return NULL;
46078 }
46079 
46080 
46081 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_compute_distances(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46082  PyObject *resultobj = 0;
46084  size_t arg2 ;
46085  faiss::ReconstructFromNeighbors::idx_t *arg3 = (faiss::ReconstructFromNeighbors::idx_t *) 0 ;
46086  float *arg4 = (float *) 0 ;
46087  float *arg5 = (float *) 0 ;
46088  void *argp1 = 0 ;
46089  int res1 = 0 ;
46090  size_t val2 ;
46091  int ecode2 = 0 ;
46092  void *argp3 = 0 ;
46093  int res3 = 0 ;
46094  void *argp4 = 0 ;
46095  int res4 = 0 ;
46096  void *argp5 = 0 ;
46097  int res5 = 0 ;
46098  PyObject * obj0 = 0 ;
46099  PyObject * obj1 = 0 ;
46100  PyObject * obj2 = 0 ;
46101  PyObject * obj3 = 0 ;
46102  PyObject * obj4 = 0 ;
46103  size_t result;
46104 
46105  if (!PyArg_ParseTuple(args,(char *)"OOOOO:ReconstructFromNeighbors_compute_distances",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
46106  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
46107  if (!SWIG_IsOK(res1)) {
46108  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
46109  }
46110  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
46111  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
46112  if (!SWIG_IsOK(ecode2)) {
46113  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "2"" of type '" "size_t""'");
46114  }
46115  arg2 = static_cast< size_t >(val2);
46116  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
46117  if (!SWIG_IsOK(res3)) {
46118  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "3"" of type '" "faiss::ReconstructFromNeighbors::idx_t const *""'");
46119  }
46120  arg3 = reinterpret_cast< faiss::ReconstructFromNeighbors::idx_t * >(argp3);
46121  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
46122  if (!SWIG_IsOK(res4)) {
46123  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "4"" of type '" "float const *""'");
46124  }
46125  arg4 = reinterpret_cast< float * >(argp4);
46126  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
46127  if (!SWIG_IsOK(res5)) {
46128  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "5"" of type '" "float *""'");
46129  }
46130  arg5 = reinterpret_cast< float * >(argp5);
46131  {
46132  Py_BEGIN_ALLOW_THREADS
46133  try {
46134  result = (size_t)((faiss::ReconstructFromNeighbors const *)arg1)->compute_distances(arg2,(faiss::ReconstructFromNeighbors::idx_t const *)arg3,(float const *)arg4,arg5);
46135  } catch(faiss::FaissException & e) {
46136  PyEval_RestoreThread(_save);
46137  PyErr_SetString(PyExc_RuntimeError, e.what());
46138  SWIG_fail;
46139  }
46140  Py_END_ALLOW_THREADS
46141  }
46142  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
46143  return resultobj;
46144 fail:
46145  return NULL;
46146 }
46147 
46148 
46149 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_estimate_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46150  PyObject *resultobj = 0;
46152  float *arg2 = (float *) 0 ;
46153  faiss::ReconstructFromNeighbors::storage_idx_t arg3 ;
46154  uint8_t *arg4 = (uint8_t *) 0 ;
46155  void *argp1 = 0 ;
46156  int res1 = 0 ;
46157  void *argp2 = 0 ;
46158  int res2 = 0 ;
46159  int val3 ;
46160  int ecode3 = 0 ;
46161  void *argp4 = 0 ;
46162  int res4 = 0 ;
46163  PyObject * obj0 = 0 ;
46164  PyObject * obj1 = 0 ;
46165  PyObject * obj2 = 0 ;
46166  PyObject * obj3 = 0 ;
46167 
46168  if (!PyArg_ParseTuple(args,(char *)"OOOO:ReconstructFromNeighbors_estimate_code",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
46169  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
46170  if (!SWIG_IsOK(res1)) {
46171  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
46172  }
46173  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
46174  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
46175  if (!SWIG_IsOK(res2)) {
46176  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "2"" of type '" "float const *""'");
46177  }
46178  arg2 = reinterpret_cast< float * >(argp2);
46179  ecode3 = SWIG_AsVal_int(obj2, &val3);
46180  if (!SWIG_IsOK(ecode3)) {
46181  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "3"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
46182  }
46183  arg3 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val3);
46184  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
46185  if (!SWIG_IsOK(res4)) {
46186  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "4"" of type '" "uint8_t *""'");
46187  }
46188  arg4 = reinterpret_cast< uint8_t * >(argp4);
46189  {
46190  Py_BEGIN_ALLOW_THREADS
46191  try {
46192  ((faiss::ReconstructFromNeighbors const *)arg1)->estimate_code((float const *)arg2,arg3,arg4);
46193  } catch(faiss::FaissException & e) {
46194  PyEval_RestoreThread(_save);
46195  PyErr_SetString(PyExc_RuntimeError, e.what());
46196  SWIG_fail;
46197  }
46198  Py_END_ALLOW_THREADS
46199  }
46200  resultobj = SWIG_Py_Void();
46201  return resultobj;
46202 fail:
46203  return NULL;
46204 }
46205 
46206 
46207 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46208  PyObject *resultobj = 0;
46210  faiss::ReconstructFromNeighbors::storage_idx_t arg2 ;
46211  float *arg3 = (float *) 0 ;
46212  float *arg4 = (float *) 0 ;
46213  void *argp1 = 0 ;
46214  int res1 = 0 ;
46215  int val2 ;
46216  int ecode2 = 0 ;
46217  void *argp3 = 0 ;
46218  int res3 = 0 ;
46219  void *argp4 = 0 ;
46220  int res4 = 0 ;
46221  PyObject * obj0 = 0 ;
46222  PyObject * obj1 = 0 ;
46223  PyObject * obj2 = 0 ;
46224  PyObject * obj3 = 0 ;
46225 
46226  if (!PyArg_ParseTuple(args,(char *)"OOOO:ReconstructFromNeighbors_reconstruct",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
46227  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
46228  if (!SWIG_IsOK(res1)) {
46229  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
46230  }
46231  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
46232  ecode2 = SWIG_AsVal_int(obj1, &val2);
46233  if (!SWIG_IsOK(ecode2)) {
46234  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
46235  }
46236  arg2 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val2);
46237  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46238  if (!SWIG_IsOK(res3)) {
46239  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "3"" of type '" "float *""'");
46240  }
46241  arg3 = reinterpret_cast< float * >(argp3);
46242  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
46243  if (!SWIG_IsOK(res4)) {
46244  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "4"" of type '" "float *""'");
46245  }
46246  arg4 = reinterpret_cast< float * >(argp4);
46247  {
46248  Py_BEGIN_ALLOW_THREADS
46249  try {
46250  ((faiss::ReconstructFromNeighbors const *)arg1)->reconstruct(arg2,arg3,arg4);
46251  } catch(faiss::FaissException & e) {
46252  PyEval_RestoreThread(_save);
46253  PyErr_SetString(PyExc_RuntimeError, e.what());
46254  SWIG_fail;
46255  }
46256  Py_END_ALLOW_THREADS
46257  }
46258  resultobj = SWIG_Py_Void();
46259  return resultobj;
46260 fail:
46261  return NULL;
46262 }
46263 
46264 
46265 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46266  PyObject *resultobj = 0;
46268  faiss::ReconstructFromNeighbors::storage_idx_t arg2 ;
46269  faiss::ReconstructFromNeighbors::storage_idx_t arg3 ;
46270  float *arg4 = (float *) 0 ;
46271  void *argp1 = 0 ;
46272  int res1 = 0 ;
46273  int val2 ;
46274  int ecode2 = 0 ;
46275  int val3 ;
46276  int ecode3 = 0 ;
46277  void *argp4 = 0 ;
46278  int res4 = 0 ;
46279  PyObject * obj0 = 0 ;
46280  PyObject * obj1 = 0 ;
46281  PyObject * obj2 = 0 ;
46282  PyObject * obj3 = 0 ;
46283 
46284  if (!PyArg_ParseTuple(args,(char *)"OOOO:ReconstructFromNeighbors_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
46285  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
46286  if (!SWIG_IsOK(res1)) {
46287  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
46288  }
46289  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
46290  ecode2 = SWIG_AsVal_int(obj1, &val2);
46291  if (!SWIG_IsOK(ecode2)) {
46292  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
46293  }
46294  arg2 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val2);
46295  ecode3 = SWIG_AsVal_int(obj2, &val3);
46296  if (!SWIG_IsOK(ecode3)) {
46297  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "3"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
46298  }
46299  arg3 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val3);
46300  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
46301  if (!SWIG_IsOK(res4)) {
46302  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "4"" of type '" "float *""'");
46303  }
46304  arg4 = reinterpret_cast< float * >(argp4);
46305  {
46306  Py_BEGIN_ALLOW_THREADS
46307  try {
46308  ((faiss::ReconstructFromNeighbors const *)arg1)->reconstruct_n(arg2,arg3,arg4);
46309  } catch(faiss::FaissException & e) {
46310  PyEval_RestoreThread(_save);
46311  PyErr_SetString(PyExc_RuntimeError, e.what());
46312  SWIG_fail;
46313  }
46314  Py_END_ALLOW_THREADS
46315  }
46316  resultobj = SWIG_Py_Void();
46317  return resultobj;
46318 fail:
46319  return NULL;
46320 }
46321 
46322 
46323 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_get_neighbor_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46324  PyObject *resultobj = 0;
46326  faiss::ReconstructFromNeighbors::storage_idx_t arg2 ;
46327  float *arg3 = (float *) 0 ;
46328  void *argp1 = 0 ;
46329  int res1 = 0 ;
46330  int val2 ;
46331  int ecode2 = 0 ;
46332  void *argp3 = 0 ;
46333  int res3 = 0 ;
46334  PyObject * obj0 = 0 ;
46335  PyObject * obj1 = 0 ;
46336  PyObject * obj2 = 0 ;
46337 
46338  if (!PyArg_ParseTuple(args,(char *)"OOO:ReconstructFromNeighbors_get_neighbor_table",&obj0,&obj1,&obj2)) SWIG_fail;
46339  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
46340  if (!SWIG_IsOK(res1)) {
46341  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_get_neighbor_table" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
46342  }
46343  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
46344  ecode2 = SWIG_AsVal_int(obj1, &val2);
46345  if (!SWIG_IsOK(ecode2)) {
46346  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_get_neighbor_table" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
46347  }
46348  arg2 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val2);
46349  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46350  if (!SWIG_IsOK(res3)) {
46351  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_get_neighbor_table" "', argument " "3"" of type '" "float *""'");
46352  }
46353  arg3 = reinterpret_cast< float * >(argp3);
46354  {
46355  Py_BEGIN_ALLOW_THREADS
46356  try {
46357  ((faiss::ReconstructFromNeighbors const *)arg1)->get_neighbor_table(arg2,arg3);
46358  } catch(faiss::FaissException & e) {
46359  PyEval_RestoreThread(_save);
46360  PyErr_SetString(PyExc_RuntimeError, e.what());
46361  SWIG_fail;
46362  }
46363  Py_END_ALLOW_THREADS
46364  }
46365  resultobj = SWIG_Py_Void();
46366  return resultobj;
46367 fail:
46368  return NULL;
46369 }
46370 
46371 
46372 SWIGINTERN PyObject *_wrap_delete_ReconstructFromNeighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46373  PyObject *resultobj = 0;
46375  void *argp1 = 0 ;
46376  int res1 = 0 ;
46377  PyObject * obj0 = 0 ;
46378 
46379  if (!PyArg_ParseTuple(args,(char *)"O:delete_ReconstructFromNeighbors",&obj0)) SWIG_fail;
46380  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_DISOWN | 0 );
46381  if (!SWIG_IsOK(res1)) {
46382  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
46383  }
46384  arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
46385  delete arg1;
46386  resultobj = SWIG_Py_Void();
46387  return resultobj;
46388 fail:
46389  return NULL;
46390 }
46391 
46392 
46393 SWIGINTERN PyObject *ReconstructFromNeighbors_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46394  PyObject *obj;
46395  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
46396  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_NewClientData(obj));
46397  return SWIG_Py_Void();
46398 }
46399 
46400 SWIGINTERN PyObject *_wrap_IndexHNSW_hnsw_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46401  PyObject *resultobj = 0;
46402  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46403  faiss::HNSW *arg2 = (faiss::HNSW *) 0 ;
46404  void *argp1 = 0 ;
46405  int res1 = 0 ;
46406  void *argp2 = 0 ;
46407  int res2 = 0 ;
46408  PyObject * obj0 = 0 ;
46409  PyObject * obj1 = 0 ;
46410 
46411  if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_hnsw_set",&obj0,&obj1)) SWIG_fail;
46412  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46413  if (!SWIG_IsOK(res1)) {
46414  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_hnsw_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46415  }
46416  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46417  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
46418  if (!SWIG_IsOK(res2)) {
46419  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexHNSW_hnsw_set" "', argument " "2"" of type '" "faiss::HNSW *""'");
46420  }
46421  arg2 = reinterpret_cast< faiss::HNSW * >(argp2);
46422  if (arg1) (arg1)->hnsw = *arg2;
46423  resultobj = SWIG_Py_Void();
46424  return resultobj;
46425 fail:
46426  return NULL;
46427 }
46428 
46429 
46430 SWIGINTERN PyObject *_wrap_IndexHNSW_hnsw_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46431  PyObject *resultobj = 0;
46432  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46433  void *argp1 = 0 ;
46434  int res1 = 0 ;
46435  PyObject * obj0 = 0 ;
46436  faiss::HNSW *result = 0 ;
46437 
46438  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_hnsw_get",&obj0)) SWIG_fail;
46439  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46440  if (!SWIG_IsOK(res1)) {
46441  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_hnsw_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46442  }
46443  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46444  result = (faiss::HNSW *)& ((arg1)->hnsw);
46445  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, 0 | 0 );
46446  return resultobj;
46447 fail:
46448  return NULL;
46449 }
46450 
46451 
46452 SWIGINTERN PyObject *_wrap_IndexHNSW_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46453  PyObject *resultobj = 0;
46454  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46455  bool arg2 ;
46456  void *argp1 = 0 ;
46457  int res1 = 0 ;
46458  bool val2 ;
46459  int ecode2 = 0 ;
46460  PyObject * obj0 = 0 ;
46461  PyObject * obj1 = 0 ;
46462 
46463  if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_own_fields_set",&obj0,&obj1)) SWIG_fail;
46464  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46465  if (!SWIG_IsOK(res1)) {
46466  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_own_fields_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46467  }
46468  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46469  ecode2 = SWIG_AsVal_bool(obj1, &val2);
46470  if (!SWIG_IsOK(ecode2)) {
46471  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_own_fields_set" "', argument " "2"" of type '" "bool""'");
46472  }
46473  arg2 = static_cast< bool >(val2);
46474  if (arg1) (arg1)->own_fields = arg2;
46475  resultobj = SWIG_Py_Void();
46476  return resultobj;
46477 fail:
46478  return NULL;
46479 }
46480 
46481 
46482 SWIGINTERN PyObject *_wrap_IndexHNSW_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46483  PyObject *resultobj = 0;
46484  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46485  void *argp1 = 0 ;
46486  int res1 = 0 ;
46487  PyObject * obj0 = 0 ;
46488  bool result;
46489 
46490  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_own_fields_get",&obj0)) SWIG_fail;
46491  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46492  if (!SWIG_IsOK(res1)) {
46493  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_own_fields_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46494  }
46495  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46496  result = (bool) ((arg1)->own_fields);
46497  resultobj = SWIG_From_bool(static_cast< bool >(result));
46498  return resultobj;
46499 fail:
46500  return NULL;
46501 }
46502 
46503 
46504 SWIGINTERN PyObject *_wrap_IndexHNSW_storage_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46505  PyObject *resultobj = 0;
46506  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46507  faiss::Index *arg2 = (faiss::Index *) 0 ;
46508  void *argp1 = 0 ;
46509  int res1 = 0 ;
46510  void *argp2 = 0 ;
46511  int res2 = 0 ;
46512  PyObject * obj0 = 0 ;
46513  PyObject * obj1 = 0 ;
46514 
46515  if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_storage_set",&obj0,&obj1)) SWIG_fail;
46516  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46517  if (!SWIG_IsOK(res1)) {
46518  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_storage_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46519  }
46520  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46521  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
46522  if (!SWIG_IsOK(res2)) {
46523  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexHNSW_storage_set" "', argument " "2"" of type '" "faiss::Index *""'");
46524  }
46525  arg2 = reinterpret_cast< faiss::Index * >(argp2);
46526  if (arg1) (arg1)->storage = arg2;
46527  resultobj = SWIG_Py_Void();
46528  return resultobj;
46529 fail:
46530  return NULL;
46531 }
46532 
46533 
46534 SWIGINTERN PyObject *_wrap_IndexHNSW_storage_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46535  PyObject *resultobj = 0;
46536  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46537  void *argp1 = 0 ;
46538  int res1 = 0 ;
46539  PyObject * obj0 = 0 ;
46540  faiss::Index *result = 0 ;
46541 
46542  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_storage_get",&obj0)) SWIG_fail;
46543  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46544  if (!SWIG_IsOK(res1)) {
46545  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_storage_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46546  }
46547  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46548  result = (faiss::Index *) ((arg1)->storage);
46549  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
46550  return resultobj;
46551 fail:
46552  return NULL;
46553 }
46554 
46555 
46556 SWIGINTERN PyObject *_wrap_IndexHNSW_reconstruct_from_neighbors_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46557  PyObject *resultobj = 0;
46558  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46560  void *argp1 = 0 ;
46561  int res1 = 0 ;
46562  void *argp2 = 0 ;
46563  int res2 = 0 ;
46564  PyObject * obj0 = 0 ;
46565  PyObject * obj1 = 0 ;
46566 
46567  if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_reconstruct_from_neighbors_set",&obj0,&obj1)) SWIG_fail;
46568  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46569  if (!SWIG_IsOK(res1)) {
46570  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reconstruct_from_neighbors_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46571  }
46572  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46573  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_DISOWN | 0 );
46574  if (!SWIG_IsOK(res2)) {
46575  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexHNSW_reconstruct_from_neighbors_set" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors *""'");
46576  }
46577  arg2 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp2);
46578  if (arg1) (arg1)->reconstruct_from_neighbors = arg2;
46579  resultobj = SWIG_Py_Void();
46580  return resultobj;
46581 fail:
46582  return NULL;
46583 }
46584 
46585 
46586 SWIGINTERN PyObject *_wrap_IndexHNSW_reconstruct_from_neighbors_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46587  PyObject *resultobj = 0;
46588  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46589  void *argp1 = 0 ;
46590  int res1 = 0 ;
46591  PyObject * obj0 = 0 ;
46592  faiss::ReconstructFromNeighbors *result = 0 ;
46593 
46594  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_reconstruct_from_neighbors_get",&obj0)) SWIG_fail;
46595  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46596  if (!SWIG_IsOK(res1)) {
46597  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reconstruct_from_neighbors_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46598  }
46599  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46600  result = (faiss::ReconstructFromNeighbors *) ((arg1)->reconstruct_from_neighbors);
46601  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
46602  return resultobj;
46603 fail:
46604  return NULL;
46605 }
46606 
46607 
46608 SWIGINTERN PyObject *_wrap_delete_IndexHNSW(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46609  PyObject *resultobj = 0;
46610  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46611  void *argp1 = 0 ;
46612  int res1 = 0 ;
46613  PyObject * obj0 = 0 ;
46614 
46615  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSW",&obj0)) SWIG_fail;
46616  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, SWIG_POINTER_DISOWN | 0 );
46617  if (!SWIG_IsOK(res1)) {
46618  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSW" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46619  }
46620  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46621  {
46622  Py_BEGIN_ALLOW_THREADS
46623  try {
46624  delete arg1;
46625  } catch(faiss::FaissException & e) {
46626  PyEval_RestoreThread(_save);
46627  PyErr_SetString(PyExc_RuntimeError, e.what());
46628  SWIG_fail;
46629  }
46630  Py_END_ALLOW_THREADS
46631  }
46632  resultobj = SWIG_Py_Void();
46633  return resultobj;
46634 fail:
46635  return NULL;
46636 }
46637 
46638 
46639 SWIGINTERN PyObject *_wrap_IndexHNSW_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46640  PyObject *resultobj = 0;
46641  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46642  void *argp1 = 0 ;
46643  int res1 = 0 ;
46644  PyObject * obj0 = 0 ;
46645  faiss::HNSW::DistanceComputer *result = 0 ;
46646 
46647  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_get_distance_computer",&obj0)) SWIG_fail;
46648  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46649  if (!SWIG_IsOK(res1)) {
46650  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
46651  }
46652  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46653  {
46654  Py_BEGIN_ALLOW_THREADS
46655  try {
46656  result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSW const *)arg1)->get_distance_computer();
46657  } catch(faiss::FaissException & e) {
46658  PyEval_RestoreThread(_save);
46659  PyErr_SetString(PyExc_RuntimeError, e.what());
46660  SWIG_fail;
46661  }
46662  Py_END_ALLOW_THREADS
46663  }
46664  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
46665  return resultobj;
46666 fail:
46667  return NULL;
46668 }
46669 
46670 
46671 SWIGINTERN PyObject *_wrap_IndexHNSW_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46672  PyObject *resultobj = 0;
46673  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46674  faiss::Index::idx_t arg2 ;
46675  float *arg3 = (float *) 0 ;
46676  void *argp1 = 0 ;
46677  int res1 = 0 ;
46678  long val2 ;
46679  int ecode2 = 0 ;
46680  void *argp3 = 0 ;
46681  int res3 = 0 ;
46682  PyObject * obj0 = 0 ;
46683  PyObject * obj1 = 0 ;
46684  PyObject * obj2 = 0 ;
46685 
46686  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSW_add",&obj0,&obj1,&obj2)) SWIG_fail;
46687  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46688  if (!SWIG_IsOK(res1)) {
46689  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_add" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46690  }
46691  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46692  ecode2 = SWIG_AsVal_long(obj1, &val2);
46693  if (!SWIG_IsOK(ecode2)) {
46694  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
46695  }
46696  arg2 = static_cast< faiss::Index::idx_t >(val2);
46697  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46698  if (!SWIG_IsOK(res3)) {
46699  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_add" "', argument " "3"" of type '" "float const *""'");
46700  }
46701  arg3 = reinterpret_cast< float * >(argp3);
46702  {
46703  Py_BEGIN_ALLOW_THREADS
46704  try {
46705  (arg1)->add(arg2,(float const *)arg3);
46706  } catch(faiss::FaissException & e) {
46707  PyEval_RestoreThread(_save);
46708  PyErr_SetString(PyExc_RuntimeError, e.what());
46709  SWIG_fail;
46710  }
46711  Py_END_ALLOW_THREADS
46712  }
46713  resultobj = SWIG_Py_Void();
46714  return resultobj;
46715 fail:
46716  return NULL;
46717 }
46718 
46719 
46720 SWIGINTERN PyObject *_wrap_IndexHNSW_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46721  PyObject *resultobj = 0;
46722  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46723  faiss::Index::idx_t arg2 ;
46724  float *arg3 = (float *) 0 ;
46725  void *argp1 = 0 ;
46726  int res1 = 0 ;
46727  long val2 ;
46728  int ecode2 = 0 ;
46729  void *argp3 = 0 ;
46730  int res3 = 0 ;
46731  PyObject * obj0 = 0 ;
46732  PyObject * obj1 = 0 ;
46733  PyObject * obj2 = 0 ;
46734 
46735  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSW_train",&obj0,&obj1,&obj2)) SWIG_fail;
46736  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46737  if (!SWIG_IsOK(res1)) {
46738  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_train" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46739  }
46740  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46741  ecode2 = SWIG_AsVal_long(obj1, &val2);
46742  if (!SWIG_IsOK(ecode2)) {
46743  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
46744  }
46745  arg2 = static_cast< faiss::Index::idx_t >(val2);
46746  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46747  if (!SWIG_IsOK(res3)) {
46748  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_train" "', argument " "3"" of type '" "float const *""'");
46749  }
46750  arg3 = reinterpret_cast< float * >(argp3);
46751  {
46752  Py_BEGIN_ALLOW_THREADS
46753  try {
46754  (arg1)->train(arg2,(float const *)arg3);
46755  } catch(faiss::FaissException & e) {
46756  PyEval_RestoreThread(_save);
46757  PyErr_SetString(PyExc_RuntimeError, e.what());
46758  SWIG_fail;
46759  }
46760  Py_END_ALLOW_THREADS
46761  }
46762  resultobj = SWIG_Py_Void();
46763  return resultobj;
46764 fail:
46765  return NULL;
46766 }
46767 
46768 
46769 SWIGINTERN PyObject *_wrap_IndexHNSW_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46770  PyObject *resultobj = 0;
46771  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46772  faiss::Index::idx_t arg2 ;
46773  float *arg3 = (float *) 0 ;
46774  faiss::Index::idx_t arg4 ;
46775  float *arg5 = (float *) 0 ;
46777  void *argp1 = 0 ;
46778  int res1 = 0 ;
46779  long val2 ;
46780  int ecode2 = 0 ;
46781  void *argp3 = 0 ;
46782  int res3 = 0 ;
46783  long val4 ;
46784  int ecode4 = 0 ;
46785  void *argp5 = 0 ;
46786  int res5 = 0 ;
46787  void *argp6 = 0 ;
46788  int res6 = 0 ;
46789  PyObject * obj0 = 0 ;
46790  PyObject * obj1 = 0 ;
46791  PyObject * obj2 = 0 ;
46792  PyObject * obj3 = 0 ;
46793  PyObject * obj4 = 0 ;
46794  PyObject * obj5 = 0 ;
46795 
46796  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexHNSW_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
46797  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46798  if (!SWIG_IsOK(res1)) {
46799  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
46800  }
46801  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46802  ecode2 = SWIG_AsVal_long(obj1, &val2);
46803  if (!SWIG_IsOK(ecode2)) {
46804  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
46805  }
46806  arg2 = static_cast< faiss::Index::idx_t >(val2);
46807  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46808  if (!SWIG_IsOK(res3)) {
46809  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search" "', argument " "3"" of type '" "float const *""'");
46810  }
46811  arg3 = reinterpret_cast< float * >(argp3);
46812  ecode4 = SWIG_AsVal_long(obj3, &val4);
46813  if (!SWIG_IsOK(ecode4)) {
46814  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
46815  }
46816  arg4 = static_cast< faiss::Index::idx_t >(val4);
46817  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
46818  if (!SWIG_IsOK(res5)) {
46819  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search" "', argument " "5"" of type '" "float *""'");
46820  }
46821  arg5 = reinterpret_cast< float * >(argp5);
46822  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
46823  if (!SWIG_IsOK(res6)) {
46824  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
46825  }
46826  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
46827  {
46828  Py_BEGIN_ALLOW_THREADS
46829  try {
46830  ((faiss::IndexHNSW const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
46831  } catch(faiss::FaissException & e) {
46832  PyEval_RestoreThread(_save);
46833  PyErr_SetString(PyExc_RuntimeError, e.what());
46834  SWIG_fail;
46835  }
46836  Py_END_ALLOW_THREADS
46837  }
46838  resultobj = SWIG_Py_Void();
46839  return resultobj;
46840 fail:
46841  return NULL;
46842 }
46843 
46844 
46845 SWIGINTERN PyObject *_wrap_IndexHNSW_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46846  PyObject *resultobj = 0;
46847  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46848  faiss::Index::idx_t arg2 ;
46849  float *arg3 = (float *) 0 ;
46850  void *argp1 = 0 ;
46851  int res1 = 0 ;
46852  long val2 ;
46853  int ecode2 = 0 ;
46854  void *argp3 = 0 ;
46855  int res3 = 0 ;
46856  PyObject * obj0 = 0 ;
46857  PyObject * obj1 = 0 ;
46858  PyObject * obj2 = 0 ;
46859 
46860  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSW_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
46861  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46862  if (!SWIG_IsOK(res1)) {
46863  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reconstruct" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
46864  }
46865  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46866  ecode2 = SWIG_AsVal_long(obj1, &val2);
46867  if (!SWIG_IsOK(ecode2)) {
46868  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
46869  }
46870  arg2 = static_cast< faiss::Index::idx_t >(val2);
46871  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46872  if (!SWIG_IsOK(res3)) {
46873  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_reconstruct" "', argument " "3"" of type '" "float *""'");
46874  }
46875  arg3 = reinterpret_cast< float * >(argp3);
46876  {
46877  Py_BEGIN_ALLOW_THREADS
46878  try {
46879  ((faiss::IndexHNSW const *)arg1)->reconstruct(arg2,arg3);
46880  } catch(faiss::FaissException & e) {
46881  PyEval_RestoreThread(_save);
46882  PyErr_SetString(PyExc_RuntimeError, e.what());
46883  SWIG_fail;
46884  }
46885  Py_END_ALLOW_THREADS
46886  }
46887  resultobj = SWIG_Py_Void();
46888  return resultobj;
46889 fail:
46890  return NULL;
46891 }
46892 
46893 
46894 SWIGINTERN PyObject *_wrap_IndexHNSW_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46895  PyObject *resultobj = 0;
46896  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46897  void *argp1 = 0 ;
46898  int res1 = 0 ;
46899  PyObject * obj0 = 0 ;
46900 
46901  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_reset",&obj0)) SWIG_fail;
46902  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46903  if (!SWIG_IsOK(res1)) {
46904  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reset" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46905  }
46906  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46907  {
46908  Py_BEGIN_ALLOW_THREADS
46909  try {
46910  (arg1)->reset();
46911  } catch(faiss::FaissException & e) {
46912  PyEval_RestoreThread(_save);
46913  PyErr_SetString(PyExc_RuntimeError, e.what());
46914  SWIG_fail;
46915  }
46916  Py_END_ALLOW_THREADS
46917  }
46918  resultobj = SWIG_Py_Void();
46919  return resultobj;
46920 fail:
46921  return NULL;
46922 }
46923 
46924 
46925 SWIGINTERN PyObject *_wrap_IndexHNSW_shrink_level_0_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46926  PyObject *resultobj = 0;
46927  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46928  int arg2 ;
46929  void *argp1 = 0 ;
46930  int res1 = 0 ;
46931  int val2 ;
46932  int ecode2 = 0 ;
46933  PyObject * obj0 = 0 ;
46934  PyObject * obj1 = 0 ;
46935 
46936  if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_shrink_level_0_neighbors",&obj0,&obj1)) SWIG_fail;
46937  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46938  if (!SWIG_IsOK(res1)) {
46939  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_shrink_level_0_neighbors" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46940  }
46941  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46942  ecode2 = SWIG_AsVal_int(obj1, &val2);
46943  if (!SWIG_IsOK(ecode2)) {
46944  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_shrink_level_0_neighbors" "', argument " "2"" of type '" "int""'");
46945  }
46946  arg2 = static_cast< int >(val2);
46947  {
46948  Py_BEGIN_ALLOW_THREADS
46949  try {
46950  (arg1)->shrink_level_0_neighbors(arg2);
46951  } catch(faiss::FaissException & e) {
46952  PyEval_RestoreThread(_save);
46953  PyErr_SetString(PyExc_RuntimeError, e.what());
46954  SWIG_fail;
46955  }
46956  Py_END_ALLOW_THREADS
46957  }
46958  resultobj = SWIG_Py_Void();
46959  return resultobj;
46960 fail:
46961  return NULL;
46962 }
46963 
46964 
46965 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46966  PyObject *resultobj = 0;
46967  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46968  faiss::Index::idx_t arg2 ;
46969  float *arg3 = (float *) 0 ;
46970  faiss::Index::idx_t arg4 ;
46971  faiss::IndexHNSW::storage_idx_t *arg5 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
46972  float *arg6 = (float *) 0 ;
46973  float *arg7 = (float *) 0 ;
46975  int arg9 ;
46976  int arg10 ;
46977  void *argp1 = 0 ;
46978  int res1 = 0 ;
46979  long val2 ;
46980  int ecode2 = 0 ;
46981  void *argp3 = 0 ;
46982  int res3 = 0 ;
46983  long val4 ;
46984  int ecode4 = 0 ;
46985  void *argp5 = 0 ;
46986  int res5 = 0 ;
46987  void *argp6 = 0 ;
46988  int res6 = 0 ;
46989  void *argp7 = 0 ;
46990  int res7 = 0 ;
46991  void *argp8 = 0 ;
46992  int res8 = 0 ;
46993  int val9 ;
46994  int ecode9 = 0 ;
46995  int val10 ;
46996  int ecode10 = 0 ;
46997  PyObject * obj0 = 0 ;
46998  PyObject * obj1 = 0 ;
46999  PyObject * obj2 = 0 ;
47000  PyObject * obj3 = 0 ;
47001  PyObject * obj4 = 0 ;
47002  PyObject * obj5 = 0 ;
47003  PyObject * obj6 = 0 ;
47004  PyObject * obj7 = 0 ;
47005  PyObject * obj8 = 0 ;
47006  PyObject * obj9 = 0 ;
47007 
47008  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexHNSW_search_level_0",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
47009  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
47010  if (!SWIG_IsOK(res1)) {
47011  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search_level_0" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
47012  }
47013  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
47014  ecode2 = SWIG_AsVal_long(obj1, &val2);
47015  if (!SWIG_IsOK(ecode2)) {
47016  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search_level_0" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47017  }
47018  arg2 = static_cast< faiss::Index::idx_t >(val2);
47019  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47020  if (!SWIG_IsOK(res3)) {
47021  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search_level_0" "', argument " "3"" of type '" "float const *""'");
47022  }
47023  arg3 = reinterpret_cast< float * >(argp3);
47024  ecode4 = SWIG_AsVal_long(obj3, &val4);
47025  if (!SWIG_IsOK(ecode4)) {
47026  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search_level_0" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
47027  }
47028  arg4 = static_cast< faiss::Index::idx_t >(val4);
47029  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
47030  if (!SWIG_IsOK(res5)) {
47031  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search_level_0" "', argument " "5"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
47032  }
47033  arg5 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp5);
47034  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
47035  if (!SWIG_IsOK(res6)) {
47036  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search_level_0" "', argument " "6"" of type '" "float const *""'");
47037  }
47038  arg6 = reinterpret_cast< float * >(argp6);
47039  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
47040  if (!SWIG_IsOK(res7)) {
47041  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexHNSW_search_level_0" "', argument " "7"" of type '" "float *""'");
47042  }
47043  arg7 = reinterpret_cast< float * >(argp7);
47044  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
47045  if (!SWIG_IsOK(res8)) {
47046  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexHNSW_search_level_0" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
47047  }
47048  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
47049  ecode9 = SWIG_AsVal_int(obj8, &val9);
47050  if (!SWIG_IsOK(ecode9)) {
47051  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexHNSW_search_level_0" "', argument " "9"" of type '" "int""'");
47052  }
47053  arg9 = static_cast< int >(val9);
47054  ecode10 = SWIG_AsVal_int(obj9, &val10);
47055  if (!SWIG_IsOK(ecode10)) {
47056  SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "IndexHNSW_search_level_0" "', argument " "10"" of type '" "int""'");
47057  }
47058  arg10 = static_cast< int >(val10);
47059  {
47060  Py_BEGIN_ALLOW_THREADS
47061  try {
47062  ((faiss::IndexHNSW const *)arg1)->search_level_0(arg2,(float const *)arg3,arg4,(faiss::IndexHNSW::storage_idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,arg10);
47063  } catch(faiss::FaissException & e) {
47064  PyEval_RestoreThread(_save);
47065  PyErr_SetString(PyExc_RuntimeError, e.what());
47066  SWIG_fail;
47067  }
47068  Py_END_ALLOW_THREADS
47069  }
47070  resultobj = SWIG_Py_Void();
47071  return resultobj;
47072 fail:
47073  return NULL;
47074 }
47075 
47076 
47077 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47078  PyObject *resultobj = 0;
47079  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
47080  faiss::Index::idx_t arg2 ;
47081  float *arg3 = (float *) 0 ;
47082  faiss::Index::idx_t arg4 ;
47083  faiss::IndexHNSW::storage_idx_t *arg5 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
47084  float *arg6 = (float *) 0 ;
47085  float *arg7 = (float *) 0 ;
47087  int arg9 ;
47088  void *argp1 = 0 ;
47089  int res1 = 0 ;
47090  long val2 ;
47091  int ecode2 = 0 ;
47092  void *argp3 = 0 ;
47093  int res3 = 0 ;
47094  long val4 ;
47095  int ecode4 = 0 ;
47096  void *argp5 = 0 ;
47097  int res5 = 0 ;
47098  void *argp6 = 0 ;
47099  int res6 = 0 ;
47100  void *argp7 = 0 ;
47101  int res7 = 0 ;
47102  void *argp8 = 0 ;
47103  int res8 = 0 ;
47104  int val9 ;
47105  int ecode9 = 0 ;
47106  PyObject * obj0 = 0 ;
47107  PyObject * obj1 = 0 ;
47108  PyObject * obj2 = 0 ;
47109  PyObject * obj3 = 0 ;
47110  PyObject * obj4 = 0 ;
47111  PyObject * obj5 = 0 ;
47112  PyObject * obj6 = 0 ;
47113  PyObject * obj7 = 0 ;
47114  PyObject * obj8 = 0 ;
47115 
47116  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexHNSW_search_level_0",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
47117  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
47118  if (!SWIG_IsOK(res1)) {
47119  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search_level_0" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
47120  }
47121  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
47122  ecode2 = SWIG_AsVal_long(obj1, &val2);
47123  if (!SWIG_IsOK(ecode2)) {
47124  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search_level_0" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47125  }
47126  arg2 = static_cast< faiss::Index::idx_t >(val2);
47127  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47128  if (!SWIG_IsOK(res3)) {
47129  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search_level_0" "', argument " "3"" of type '" "float const *""'");
47130  }
47131  arg3 = reinterpret_cast< float * >(argp3);
47132  ecode4 = SWIG_AsVal_long(obj3, &val4);
47133  if (!SWIG_IsOK(ecode4)) {
47134  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search_level_0" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
47135  }
47136  arg4 = static_cast< faiss::Index::idx_t >(val4);
47137  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
47138  if (!SWIG_IsOK(res5)) {
47139  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search_level_0" "', argument " "5"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
47140  }
47141  arg5 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp5);
47142  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
47143  if (!SWIG_IsOK(res6)) {
47144  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search_level_0" "', argument " "6"" of type '" "float const *""'");
47145  }
47146  arg6 = reinterpret_cast< float * >(argp6);
47147  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
47148  if (!SWIG_IsOK(res7)) {
47149  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexHNSW_search_level_0" "', argument " "7"" of type '" "float *""'");
47150  }
47151  arg7 = reinterpret_cast< float * >(argp7);
47152  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
47153  if (!SWIG_IsOK(res8)) {
47154  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexHNSW_search_level_0" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
47155  }
47156  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
47157  ecode9 = SWIG_AsVal_int(obj8, &val9);
47158  if (!SWIG_IsOK(ecode9)) {
47159  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexHNSW_search_level_0" "', argument " "9"" of type '" "int""'");
47160  }
47161  arg9 = static_cast< int >(val9);
47162  {
47163  Py_BEGIN_ALLOW_THREADS
47164  try {
47165  ((faiss::IndexHNSW const *)arg1)->search_level_0(arg2,(float const *)arg3,arg4,(faiss::IndexHNSW::storage_idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
47166  } catch(faiss::FaissException & e) {
47167  PyEval_RestoreThread(_save);
47168  PyErr_SetString(PyExc_RuntimeError, e.what());
47169  SWIG_fail;
47170  }
47171  Py_END_ALLOW_THREADS
47172  }
47173  resultobj = SWIG_Py_Void();
47174  return resultobj;
47175 fail:
47176  return NULL;
47177 }
47178 
47179 
47180 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47181  PyObject *resultobj = 0;
47182  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
47183  faiss::Index::idx_t arg2 ;
47184  float *arg3 = (float *) 0 ;
47185  faiss::Index::idx_t arg4 ;
47186  faiss::IndexHNSW::storage_idx_t *arg5 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
47187  float *arg6 = (float *) 0 ;
47188  float *arg7 = (float *) 0 ;
47190  void *argp1 = 0 ;
47191  int res1 = 0 ;
47192  long val2 ;
47193  int ecode2 = 0 ;
47194  void *argp3 = 0 ;
47195  int res3 = 0 ;
47196  long val4 ;
47197  int ecode4 = 0 ;
47198  void *argp5 = 0 ;
47199  int res5 = 0 ;
47200  void *argp6 = 0 ;
47201  int res6 = 0 ;
47202  void *argp7 = 0 ;
47203  int res7 = 0 ;
47204  void *argp8 = 0 ;
47205  int res8 = 0 ;
47206  PyObject * obj0 = 0 ;
47207  PyObject * obj1 = 0 ;
47208  PyObject * obj2 = 0 ;
47209  PyObject * obj3 = 0 ;
47210  PyObject * obj4 = 0 ;
47211  PyObject * obj5 = 0 ;
47212  PyObject * obj6 = 0 ;
47213  PyObject * obj7 = 0 ;
47214 
47215  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:IndexHNSW_search_level_0",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
47216  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
47217  if (!SWIG_IsOK(res1)) {
47218  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search_level_0" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
47219  }
47220  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
47221  ecode2 = SWIG_AsVal_long(obj1, &val2);
47222  if (!SWIG_IsOK(ecode2)) {
47223  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search_level_0" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47224  }
47225  arg2 = static_cast< faiss::Index::idx_t >(val2);
47226  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47227  if (!SWIG_IsOK(res3)) {
47228  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search_level_0" "', argument " "3"" of type '" "float const *""'");
47229  }
47230  arg3 = reinterpret_cast< float * >(argp3);
47231  ecode4 = SWIG_AsVal_long(obj3, &val4);
47232  if (!SWIG_IsOK(ecode4)) {
47233  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search_level_0" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
47234  }
47235  arg4 = static_cast< faiss::Index::idx_t >(val4);
47236  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
47237  if (!SWIG_IsOK(res5)) {
47238  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search_level_0" "', argument " "5"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
47239  }
47240  arg5 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp5);
47241  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
47242  if (!SWIG_IsOK(res6)) {
47243  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search_level_0" "', argument " "6"" of type '" "float const *""'");
47244  }
47245  arg6 = reinterpret_cast< float * >(argp6);
47246  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
47247  if (!SWIG_IsOK(res7)) {
47248  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexHNSW_search_level_0" "', argument " "7"" of type '" "float *""'");
47249  }
47250  arg7 = reinterpret_cast< float * >(argp7);
47251  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
47252  if (!SWIG_IsOK(res8)) {
47253  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexHNSW_search_level_0" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
47254  }
47255  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
47256  {
47257  Py_BEGIN_ALLOW_THREADS
47258  try {
47259  ((faiss::IndexHNSW const *)arg1)->search_level_0(arg2,(float const *)arg3,arg4,(faiss::IndexHNSW::storage_idx_t const *)arg5,(float const *)arg6,arg7,arg8);
47260  } catch(faiss::FaissException & e) {
47261  PyEval_RestoreThread(_save);
47262  PyErr_SetString(PyExc_RuntimeError, e.what());
47263  SWIG_fail;
47264  }
47265  Py_END_ALLOW_THREADS
47266  }
47267  resultobj = SWIG_Py_Void();
47268  return resultobj;
47269 fail:
47270  return NULL;
47271 }
47272 
47273 
47274 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0(PyObject *self, PyObject *args) {
47275  Py_ssize_t argc;
47276  PyObject *argv[11] = {
47277  0
47278  };
47279  Py_ssize_t ii;
47280 
47281  if (!PyTuple_Check(args)) SWIG_fail;
47282  argc = args ? PyObject_Length(args) : 0;
47283  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
47284  argv[ii] = PyTuple_GET_ITEM(args,ii);
47285  }
47286  if (argc == 8) {
47287  int _v;
47288  void *vptr = 0;
47289  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexHNSW, 0);
47290  _v = SWIG_CheckState(res);
47291  if (_v) {
47292  {
47293  int res = SWIG_AsVal_long(argv[1], NULL);
47294  _v = SWIG_CheckState(res);
47295  }
47296  if (_v) {
47297  void *vptr = 0;
47298  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
47299  _v = SWIG_CheckState(res);
47300  if (_v) {
47301  {
47302  int res = SWIG_AsVal_long(argv[3], NULL);
47303  _v = SWIG_CheckState(res);
47304  }
47305  if (_v) {
47306  void *vptr = 0;
47307  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
47308  _v = SWIG_CheckState(res);
47309  if (_v) {
47310  void *vptr = 0;
47311  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
47312  _v = SWIG_CheckState(res);
47313  if (_v) {
47314  void *vptr = 0;
47315  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
47316  _v = SWIG_CheckState(res);
47317  if (_v) {
47318  void *vptr = 0;
47319  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
47320  _v = SWIG_CheckState(res);
47321  if (_v) {
47322  return _wrap_IndexHNSW_search_level_0__SWIG_2(self, args);
47323  }
47324  }
47325  }
47326  }
47327  }
47328  }
47329  }
47330  }
47331  }
47332  if (argc == 9) {
47333  int _v;
47334  void *vptr = 0;
47335  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexHNSW, 0);
47336  _v = SWIG_CheckState(res);
47337  if (_v) {
47338  {
47339  int res = SWIG_AsVal_long(argv[1], NULL);
47340  _v = SWIG_CheckState(res);
47341  }
47342  if (_v) {
47343  void *vptr = 0;
47344  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
47345  _v = SWIG_CheckState(res);
47346  if (_v) {
47347  {
47348  int res = SWIG_AsVal_long(argv[3], NULL);
47349  _v = SWIG_CheckState(res);
47350  }
47351  if (_v) {
47352  void *vptr = 0;
47353  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
47354  _v = SWIG_CheckState(res);
47355  if (_v) {
47356  void *vptr = 0;
47357  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
47358  _v = SWIG_CheckState(res);
47359  if (_v) {
47360  void *vptr = 0;
47361  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
47362  _v = SWIG_CheckState(res);
47363  if (_v) {
47364  void *vptr = 0;
47365  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
47366  _v = SWIG_CheckState(res);
47367  if (_v) {
47368  {
47369  int res = SWIG_AsVal_int(argv[8], NULL);
47370  _v = SWIG_CheckState(res);
47371  }
47372  if (_v) {
47373  return _wrap_IndexHNSW_search_level_0__SWIG_1(self, args);
47374  }
47375  }
47376  }
47377  }
47378  }
47379  }
47380  }
47381  }
47382  }
47383  }
47384  if (argc == 10) {
47385  int _v;
47386  void *vptr = 0;
47387  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexHNSW, 0);
47388  _v = SWIG_CheckState(res);
47389  if (_v) {
47390  {
47391  int res = SWIG_AsVal_long(argv[1], NULL);
47392  _v = SWIG_CheckState(res);
47393  }
47394  if (_v) {
47395  void *vptr = 0;
47396  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
47397  _v = SWIG_CheckState(res);
47398  if (_v) {
47399  {
47400  int res = SWIG_AsVal_long(argv[3], NULL);
47401  _v = SWIG_CheckState(res);
47402  }
47403  if (_v) {
47404  void *vptr = 0;
47405  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
47406  _v = SWIG_CheckState(res);
47407  if (_v) {
47408  void *vptr = 0;
47409  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
47410  _v = SWIG_CheckState(res);
47411  if (_v) {
47412  void *vptr = 0;
47413  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
47414  _v = SWIG_CheckState(res);
47415  if (_v) {
47416  void *vptr = 0;
47417  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
47418  _v = SWIG_CheckState(res);
47419  if (_v) {
47420  {
47421  int res = SWIG_AsVal_int(argv[8], NULL);
47422  _v = SWIG_CheckState(res);
47423  }
47424  if (_v) {
47425  {
47426  int res = SWIG_AsVal_int(argv[9], NULL);
47427  _v = SWIG_CheckState(res);
47428  }
47429  if (_v) {
47430  return _wrap_IndexHNSW_search_level_0__SWIG_0(self, args);
47431  }
47432  }
47433  }
47434  }
47435  }
47436  }
47437  }
47438  }
47439  }
47440  }
47441  }
47442 
47443 fail:
47444  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexHNSW_search_level_0'.\n"
47445  " Possible C/C++ prototypes are:\n"
47446  " faiss::IndexHNSW::search_level_0(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::IndexHNSW::storage_idx_t const *,float const *,float *,faiss::Index::idx_t *,int,int) const\n"
47447  " faiss::IndexHNSW::search_level_0(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::IndexHNSW::storage_idx_t const *,float const *,float *,faiss::Index::idx_t *,int) const\n"
47448  " faiss::IndexHNSW::search_level_0(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::IndexHNSW::storage_idx_t const *,float const *,float *,faiss::Index::idx_t *) const\n");
47449  return 0;
47450 }
47451 
47452 
47453 SWIGINTERN PyObject *_wrap_IndexHNSW_init_level_0_from_knngraph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47454  PyObject *resultobj = 0;
47455  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
47456  int arg2 ;
47457  float *arg3 = (float *) 0 ;
47459  void *argp1 = 0 ;
47460  int res1 = 0 ;
47461  int val2 ;
47462  int ecode2 = 0 ;
47463  void *argp3 = 0 ;
47464  int res3 = 0 ;
47465  void *argp4 = 0 ;
47466  int res4 = 0 ;
47467  PyObject * obj0 = 0 ;
47468  PyObject * obj1 = 0 ;
47469  PyObject * obj2 = 0 ;
47470  PyObject * obj3 = 0 ;
47471 
47472  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexHNSW_init_level_0_from_knngraph",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
47473  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
47474  if (!SWIG_IsOK(res1)) {
47475  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
47476  }
47477  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
47478  ecode2 = SWIG_AsVal_int(obj1, &val2);
47479  if (!SWIG_IsOK(ecode2)) {
47480  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "2"" of type '" "int""'");
47481  }
47482  arg2 = static_cast< int >(val2);
47483  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47484  if (!SWIG_IsOK(res3)) {
47485  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "3"" of type '" "float const *""'");
47486  }
47487  arg3 = reinterpret_cast< float * >(argp3);
47488  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
47489  if (!SWIG_IsOK(res4)) {
47490  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
47491  }
47492  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
47493  {
47494  Py_BEGIN_ALLOW_THREADS
47495  try {
47496  (arg1)->init_level_0_from_knngraph(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4);
47497  } catch(faiss::FaissException & e) {
47498  PyEval_RestoreThread(_save);
47499  PyErr_SetString(PyExc_RuntimeError, e.what());
47500  SWIG_fail;
47501  }
47502  Py_END_ALLOW_THREADS
47503  }
47504  resultobj = SWIG_Py_Void();
47505  return resultobj;
47506 fail:
47507  return NULL;
47508 }
47509 
47510 
47511 SWIGINTERN PyObject *_wrap_IndexHNSW_init_level_0_from_entry_points(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47512  PyObject *resultobj = 0;
47513  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
47514  int arg2 ;
47515  faiss::IndexHNSW::storage_idx_t *arg3 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
47516  faiss::IndexHNSW::storage_idx_t *arg4 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
47517  void *argp1 = 0 ;
47518  int res1 = 0 ;
47519  int val2 ;
47520  int ecode2 = 0 ;
47521  void *argp3 = 0 ;
47522  int res3 = 0 ;
47523  void *argp4 = 0 ;
47524  int res4 = 0 ;
47525  PyObject * obj0 = 0 ;
47526  PyObject * obj1 = 0 ;
47527  PyObject * obj2 = 0 ;
47528  PyObject * obj3 = 0 ;
47529 
47530  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexHNSW_init_level_0_from_entry_points",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
47531  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
47532  if (!SWIG_IsOK(res1)) {
47533  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
47534  }
47535  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
47536  ecode2 = SWIG_AsVal_int(obj1, &val2);
47537  if (!SWIG_IsOK(ecode2)) {
47538  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "2"" of type '" "int""'");
47539  }
47540  arg2 = static_cast< int >(val2);
47541  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
47542  if (!SWIG_IsOK(res3)) {
47543  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "3"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
47544  }
47545  arg3 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp3);
47546  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
47547  if (!SWIG_IsOK(res4)) {
47548  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "4"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
47549  }
47550  arg4 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp4);
47551  {
47552  Py_BEGIN_ALLOW_THREADS
47553  try {
47554  (arg1)->init_level_0_from_entry_points(arg2,(faiss::IndexHNSW::storage_idx_t const *)arg3,(faiss::IndexHNSW::storage_idx_t const *)arg4);
47555  } catch(faiss::FaissException & e) {
47556  PyEval_RestoreThread(_save);
47557  PyErr_SetString(PyExc_RuntimeError, e.what());
47558  SWIG_fail;
47559  }
47560  Py_END_ALLOW_THREADS
47561  }
47562  resultobj = SWIG_Py_Void();
47563  return resultobj;
47564 fail:
47565  return NULL;
47566 }
47567 
47568 
47569 SWIGINTERN PyObject *_wrap_IndexHNSW_reorder_links(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47570  PyObject *resultobj = 0;
47571  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
47572  void *argp1 = 0 ;
47573  int res1 = 0 ;
47574  PyObject * obj0 = 0 ;
47575 
47576  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_reorder_links",&obj0)) SWIG_fail;
47577  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
47578  if (!SWIG_IsOK(res1)) {
47579  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reorder_links" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
47580  }
47581  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
47582  {
47583  Py_BEGIN_ALLOW_THREADS
47584  try {
47585  (arg1)->reorder_links();
47586  } catch(faiss::FaissException & e) {
47587  PyEval_RestoreThread(_save);
47588  PyErr_SetString(PyExc_RuntimeError, e.what());
47589  SWIG_fail;
47590  }
47591  Py_END_ALLOW_THREADS
47592  }
47593  resultobj = SWIG_Py_Void();
47594  return resultobj;
47595 fail:
47596  return NULL;
47597 }
47598 
47599 
47600 SWIGINTERN PyObject *_wrap_IndexHNSW_link_singletons(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47601  PyObject *resultobj = 0;
47602  faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
47603  void *argp1 = 0 ;
47604  int res1 = 0 ;
47605  PyObject * obj0 = 0 ;
47606 
47607  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_link_singletons",&obj0)) SWIG_fail;
47608  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
47609  if (!SWIG_IsOK(res1)) {
47610  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_link_singletons" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
47611  }
47612  arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
47613  {
47614  Py_BEGIN_ALLOW_THREADS
47615  try {
47616  (arg1)->link_singletons();
47617  } catch(faiss::FaissException & e) {
47618  PyEval_RestoreThread(_save);
47619  PyErr_SetString(PyExc_RuntimeError, e.what());
47620  SWIG_fail;
47621  }
47622  Py_END_ALLOW_THREADS
47623  }
47624  resultobj = SWIG_Py_Void();
47625  return resultobj;
47626 fail:
47627  return NULL;
47628 }
47629 
47630 
47631 SWIGINTERN PyObject *IndexHNSW_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47632  PyObject *obj;
47633  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
47634  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSW, SWIG_NewClientData(obj));
47635  return SWIG_Py_Void();
47636 }
47637 
47638 SWIGINTERN PyObject *_wrap_new_IndexHNSWFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47639  PyObject *resultobj = 0;
47640  faiss::IndexHNSWFlat *result = 0 ;
47641 
47642  if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSWFlat")) SWIG_fail;
47643  {
47644  Py_BEGIN_ALLOW_THREADS
47645  try {
47646  result = (faiss::IndexHNSWFlat *)new faiss::IndexHNSWFlat();
47647  } catch(faiss::FaissException & e) {
47648  PyEval_RestoreThread(_save);
47649  PyErr_SetString(PyExc_RuntimeError, e.what());
47650  SWIG_fail;
47651  }
47652  Py_END_ALLOW_THREADS
47653  }
47654  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_POINTER_NEW | 0 );
47655  return resultobj;
47656 fail:
47657  return NULL;
47658 }
47659 
47660 
47661 SWIGINTERN PyObject *_wrap_new_IndexHNSWFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47662  PyObject *resultobj = 0;
47663  int arg1 ;
47664  int arg2 ;
47665  int val1 ;
47666  int ecode1 = 0 ;
47667  int val2 ;
47668  int ecode2 = 0 ;
47669  PyObject * obj0 = 0 ;
47670  PyObject * obj1 = 0 ;
47671  faiss::IndexHNSWFlat *result = 0 ;
47672 
47673  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexHNSWFlat",&obj0,&obj1)) SWIG_fail;
47674  ecode1 = SWIG_AsVal_int(obj0, &val1);
47675  if (!SWIG_IsOK(ecode1)) {
47676  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexHNSWFlat" "', argument " "1"" of type '" "int""'");
47677  }
47678  arg1 = static_cast< int >(val1);
47679  ecode2 = SWIG_AsVal_int(obj1, &val2);
47680  if (!SWIG_IsOK(ecode2)) {
47681  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSWFlat" "', argument " "2"" of type '" "int""'");
47682  }
47683  arg2 = static_cast< int >(val2);
47684  {
47685  Py_BEGIN_ALLOW_THREADS
47686  try {
47687  result = (faiss::IndexHNSWFlat *)new faiss::IndexHNSWFlat(arg1,arg2);
47688  } catch(faiss::FaissException & e) {
47689  PyEval_RestoreThread(_save);
47690  PyErr_SetString(PyExc_RuntimeError, e.what());
47691  SWIG_fail;
47692  }
47693  Py_END_ALLOW_THREADS
47694  }
47695  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_POINTER_NEW | 0 );
47696  return resultobj;
47697 fail:
47698  return NULL;
47699 }
47700 
47701 
47702 SWIGINTERN PyObject *_wrap_new_IndexHNSWFlat(PyObject *self, PyObject *args) {
47703  Py_ssize_t argc;
47704  PyObject *argv[3] = {
47705  0
47706  };
47707  Py_ssize_t ii;
47708 
47709  if (!PyTuple_Check(args)) SWIG_fail;
47710  argc = args ? PyObject_Length(args) : 0;
47711  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
47712  argv[ii] = PyTuple_GET_ITEM(args,ii);
47713  }
47714  if (argc == 0) {
47715  return _wrap_new_IndexHNSWFlat__SWIG_0(self, args);
47716  }
47717  if (argc == 2) {
47718  int _v;
47719  {
47720  int res = SWIG_AsVal_int(argv[0], NULL);
47721  _v = SWIG_CheckState(res);
47722  }
47723  if (_v) {
47724  {
47725  int res = SWIG_AsVal_int(argv[1], NULL);
47726  _v = SWIG_CheckState(res);
47727  }
47728  if (_v) {
47729  return _wrap_new_IndexHNSWFlat__SWIG_1(self, args);
47730  }
47731  }
47732  }
47733 
47734 fail:
47735  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSWFlat'.\n"
47736  " Possible C/C++ prototypes are:\n"
47737  " faiss::IndexHNSWFlat::IndexHNSWFlat()\n"
47738  " faiss::IndexHNSWFlat::IndexHNSWFlat(int,int)\n");
47739  return 0;
47740 }
47741 
47742 
47743 SWIGINTERN PyObject *_wrap_IndexHNSWFlat_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47744  PyObject *resultobj = 0;
47746  void *argp1 = 0 ;
47747  int res1 = 0 ;
47748  PyObject * obj0 = 0 ;
47749  faiss::HNSW::DistanceComputer *result = 0 ;
47750 
47751  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSWFlat_get_distance_computer",&obj0)) SWIG_fail;
47752  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWFlat, 0 | 0 );
47753  if (!SWIG_IsOK(res1)) {
47754  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWFlat_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSWFlat const *""'");
47755  }
47756  arg1 = reinterpret_cast< faiss::IndexHNSWFlat * >(argp1);
47757  {
47758  Py_BEGIN_ALLOW_THREADS
47759  try {
47760  result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSWFlat const *)arg1)->get_distance_computer();
47761  } catch(faiss::FaissException & e) {
47762  PyEval_RestoreThread(_save);
47763  PyErr_SetString(PyExc_RuntimeError, e.what());
47764  SWIG_fail;
47765  }
47766  Py_END_ALLOW_THREADS
47767  }
47768  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
47769  return resultobj;
47770 fail:
47771  return NULL;
47772 }
47773 
47774 
47775 SWIGINTERN PyObject *_wrap_delete_IndexHNSWFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47776  PyObject *resultobj = 0;
47778  void *argp1 = 0 ;
47779  int res1 = 0 ;
47780  PyObject * obj0 = 0 ;
47781 
47782  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSWFlat",&obj0)) SWIG_fail;
47783  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_POINTER_DISOWN | 0 );
47784  if (!SWIG_IsOK(res1)) {
47785  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSWFlat" "', argument " "1"" of type '" "faiss::IndexHNSWFlat *""'");
47786  }
47787  arg1 = reinterpret_cast< faiss::IndexHNSWFlat * >(argp1);
47788  delete arg1;
47789  resultobj = SWIG_Py_Void();
47790  return resultobj;
47791 fail:
47792  return NULL;
47793 }
47794 
47795 
47796 SWIGINTERN PyObject *IndexHNSWFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47797  PyObject *obj;
47798  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
47799  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_NewClientData(obj));
47800  return SWIG_Py_Void();
47801 }
47802 
47803 SWIGINTERN PyObject *_wrap_new_IndexHNSWPQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47804  PyObject *resultobj = 0;
47805  faiss::IndexHNSWPQ *result = 0 ;
47806 
47807  if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSWPQ")) SWIG_fail;
47808  {
47809  Py_BEGIN_ALLOW_THREADS
47810  try {
47811  result = (faiss::IndexHNSWPQ *)new faiss::IndexHNSWPQ();
47812  } catch(faiss::FaissException & e) {
47813  PyEval_RestoreThread(_save);
47814  PyErr_SetString(PyExc_RuntimeError, e.what());
47815  SWIG_fail;
47816  }
47817  Py_END_ALLOW_THREADS
47818  }
47819  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_POINTER_NEW | 0 );
47820  return resultobj;
47821 fail:
47822  return NULL;
47823 }
47824 
47825 
47826 SWIGINTERN PyObject *_wrap_new_IndexHNSWPQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47827  PyObject *resultobj = 0;
47828  int arg1 ;
47829  int arg2 ;
47830  int arg3 ;
47831  int val1 ;
47832  int ecode1 = 0 ;
47833  int val2 ;
47834  int ecode2 = 0 ;
47835  int val3 ;
47836  int ecode3 = 0 ;
47837  PyObject * obj0 = 0 ;
47838  PyObject * obj1 = 0 ;
47839  PyObject * obj2 = 0 ;
47840  faiss::IndexHNSWPQ *result = 0 ;
47841 
47842  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexHNSWPQ",&obj0,&obj1,&obj2)) SWIG_fail;
47843  ecode1 = SWIG_AsVal_int(obj0, &val1);
47844  if (!SWIG_IsOK(ecode1)) {
47845  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexHNSWPQ" "', argument " "1"" of type '" "int""'");
47846  }
47847  arg1 = static_cast< int >(val1);
47848  ecode2 = SWIG_AsVal_int(obj1, &val2);
47849  if (!SWIG_IsOK(ecode2)) {
47850  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSWPQ" "', argument " "2"" of type '" "int""'");
47851  }
47852  arg2 = static_cast< int >(val2);
47853  ecode3 = SWIG_AsVal_int(obj2, &val3);
47854  if (!SWIG_IsOK(ecode3)) {
47855  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexHNSWPQ" "', argument " "3"" of type '" "int""'");
47856  }
47857  arg3 = static_cast< int >(val3);
47858  {
47859  Py_BEGIN_ALLOW_THREADS
47860  try {
47861  result = (faiss::IndexHNSWPQ *)new faiss::IndexHNSWPQ(arg1,arg2,arg3);
47862  } catch(faiss::FaissException & e) {
47863  PyEval_RestoreThread(_save);
47864  PyErr_SetString(PyExc_RuntimeError, e.what());
47865  SWIG_fail;
47866  }
47867  Py_END_ALLOW_THREADS
47868  }
47869  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_POINTER_NEW | 0 );
47870  return resultobj;
47871 fail:
47872  return NULL;
47873 }
47874 
47875 
47876 SWIGINTERN PyObject *_wrap_new_IndexHNSWPQ(PyObject *self, PyObject *args) {
47877  Py_ssize_t argc;
47878  PyObject *argv[4] = {
47879  0
47880  };
47881  Py_ssize_t ii;
47882 
47883  if (!PyTuple_Check(args)) SWIG_fail;
47884  argc = args ? PyObject_Length(args) : 0;
47885  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
47886  argv[ii] = PyTuple_GET_ITEM(args,ii);
47887  }
47888  if (argc == 0) {
47889  return _wrap_new_IndexHNSWPQ__SWIG_0(self, args);
47890  }
47891  if (argc == 3) {
47892  int _v;
47893  {
47894  int res = SWIG_AsVal_int(argv[0], NULL);
47895  _v = SWIG_CheckState(res);
47896  }
47897  if (_v) {
47898  {
47899  int res = SWIG_AsVal_int(argv[1], NULL);
47900  _v = SWIG_CheckState(res);
47901  }
47902  if (_v) {
47903  {
47904  int res = SWIG_AsVal_int(argv[2], NULL);
47905  _v = SWIG_CheckState(res);
47906  }
47907  if (_v) {
47908  return _wrap_new_IndexHNSWPQ__SWIG_1(self, args);
47909  }
47910  }
47911  }
47912  }
47913 
47914 fail:
47915  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSWPQ'.\n"
47916  " Possible C/C++ prototypes are:\n"
47917  " faiss::IndexHNSWPQ::IndexHNSWPQ()\n"
47918  " faiss::IndexHNSWPQ::IndexHNSWPQ(int,int,int)\n");
47919  return 0;
47920 }
47921 
47922 
47923 SWIGINTERN PyObject *_wrap_IndexHNSWPQ_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47924  PyObject *resultobj = 0;
47925  faiss::IndexHNSWPQ *arg1 = (faiss::IndexHNSWPQ *) 0 ;
47926  faiss::Index::idx_t arg2 ;
47927  float *arg3 = (float *) 0 ;
47928  void *argp1 = 0 ;
47929  int res1 = 0 ;
47930  long val2 ;
47931  int ecode2 = 0 ;
47932  void *argp3 = 0 ;
47933  int res3 = 0 ;
47934  PyObject * obj0 = 0 ;
47935  PyObject * obj1 = 0 ;
47936  PyObject * obj2 = 0 ;
47937 
47938  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSWPQ_train",&obj0,&obj1,&obj2)) SWIG_fail;
47939  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWPQ, 0 | 0 );
47940  if (!SWIG_IsOK(res1)) {
47941  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWPQ_train" "', argument " "1"" of type '" "faiss::IndexHNSWPQ *""'");
47942  }
47943  arg1 = reinterpret_cast< faiss::IndexHNSWPQ * >(argp1);
47944  ecode2 = SWIG_AsVal_long(obj1, &val2);
47945  if (!SWIG_IsOK(ecode2)) {
47946  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSWPQ_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47947  }
47948  arg2 = static_cast< faiss::Index::idx_t >(val2);
47949  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47950  if (!SWIG_IsOK(res3)) {
47951  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSWPQ_train" "', argument " "3"" of type '" "float const *""'");
47952  }
47953  arg3 = reinterpret_cast< float * >(argp3);
47954  {
47955  Py_BEGIN_ALLOW_THREADS
47956  try {
47957  (arg1)->train(arg2,(float const *)arg3);
47958  } catch(faiss::FaissException & e) {
47959  PyEval_RestoreThread(_save);
47960  PyErr_SetString(PyExc_RuntimeError, e.what());
47961  SWIG_fail;
47962  }
47963  Py_END_ALLOW_THREADS
47964  }
47965  resultobj = SWIG_Py_Void();
47966  return resultobj;
47967 fail:
47968  return NULL;
47969 }
47970 
47971 
47972 SWIGINTERN PyObject *_wrap_IndexHNSWPQ_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47973  PyObject *resultobj = 0;
47974  faiss::IndexHNSWPQ *arg1 = (faiss::IndexHNSWPQ *) 0 ;
47975  void *argp1 = 0 ;
47976  int res1 = 0 ;
47977  PyObject * obj0 = 0 ;
47978  faiss::HNSW::DistanceComputer *result = 0 ;
47979 
47980  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSWPQ_get_distance_computer",&obj0)) SWIG_fail;
47981  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWPQ, 0 | 0 );
47982  if (!SWIG_IsOK(res1)) {
47983  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWPQ_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSWPQ const *""'");
47984  }
47985  arg1 = reinterpret_cast< faiss::IndexHNSWPQ * >(argp1);
47986  {
47987  Py_BEGIN_ALLOW_THREADS
47988  try {
47989  result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSWPQ const *)arg1)->get_distance_computer();
47990  } catch(faiss::FaissException & e) {
47991  PyEval_RestoreThread(_save);
47992  PyErr_SetString(PyExc_RuntimeError, e.what());
47993  SWIG_fail;
47994  }
47995  Py_END_ALLOW_THREADS
47996  }
47997  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
47998  return resultobj;
47999 fail:
48000  return NULL;
48001 }
48002 
48003 
48004 SWIGINTERN PyObject *_wrap_delete_IndexHNSWPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48005  PyObject *resultobj = 0;
48006  faiss::IndexHNSWPQ *arg1 = (faiss::IndexHNSWPQ *) 0 ;
48007  void *argp1 = 0 ;
48008  int res1 = 0 ;
48009  PyObject * obj0 = 0 ;
48010 
48011  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSWPQ",&obj0)) SWIG_fail;
48012  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_POINTER_DISOWN | 0 );
48013  if (!SWIG_IsOK(res1)) {
48014  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSWPQ" "', argument " "1"" of type '" "faiss::IndexHNSWPQ *""'");
48015  }
48016  arg1 = reinterpret_cast< faiss::IndexHNSWPQ * >(argp1);
48017  delete arg1;
48018  resultobj = SWIG_Py_Void();
48019  return resultobj;
48020 fail:
48021  return NULL;
48022 }
48023 
48024 
48025 SWIGINTERN PyObject *IndexHNSWPQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48026  PyObject *obj;
48027  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
48028  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_NewClientData(obj));
48029  return SWIG_Py_Void();
48030 }
48031 
48032 SWIGINTERN PyObject *_wrap_new_IndexHNSWSQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48033  PyObject *resultobj = 0;
48034  faiss::IndexHNSWSQ *result = 0 ;
48035 
48036  if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSWSQ")) SWIG_fail;
48037  {
48038  Py_BEGIN_ALLOW_THREADS
48039  try {
48040  result = (faiss::IndexHNSWSQ *)new faiss::IndexHNSWSQ();
48041  } catch(faiss::FaissException & e) {
48042  PyEval_RestoreThread(_save);
48043  PyErr_SetString(PyExc_RuntimeError, e.what());
48044  SWIG_fail;
48045  }
48046  Py_END_ALLOW_THREADS
48047  }
48048  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_POINTER_NEW | 0 );
48049  return resultobj;
48050 fail:
48051  return NULL;
48052 }
48053 
48054 
48055 SWIGINTERN PyObject *_wrap_new_IndexHNSWSQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48056  PyObject *resultobj = 0;
48057  int arg1 ;
48059  int arg3 ;
48060  int val1 ;
48061  int ecode1 = 0 ;
48062  int val2 ;
48063  int ecode2 = 0 ;
48064  int val3 ;
48065  int ecode3 = 0 ;
48066  PyObject * obj0 = 0 ;
48067  PyObject * obj1 = 0 ;
48068  PyObject * obj2 = 0 ;
48069  faiss::IndexHNSWSQ *result = 0 ;
48070 
48071  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexHNSWSQ",&obj0,&obj1,&obj2)) SWIG_fail;
48072  ecode1 = SWIG_AsVal_int(obj0, &val1);
48073  if (!SWIG_IsOK(ecode1)) {
48074  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexHNSWSQ" "', argument " "1"" of type '" "int""'");
48075  }
48076  arg1 = static_cast< int >(val1);
48077  ecode2 = SWIG_AsVal_int(obj1, &val2);
48078  if (!SWIG_IsOK(ecode2)) {
48079  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSWSQ" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
48080  }
48081  arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
48082  ecode3 = SWIG_AsVal_int(obj2, &val3);
48083  if (!SWIG_IsOK(ecode3)) {
48084  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexHNSWSQ" "', argument " "3"" of type '" "int""'");
48085  }
48086  arg3 = static_cast< int >(val3);
48087  {
48088  Py_BEGIN_ALLOW_THREADS
48089  try {
48090  result = (faiss::IndexHNSWSQ *)new faiss::IndexHNSWSQ(arg1,arg2,arg3);
48091  } catch(faiss::FaissException & e) {
48092  PyEval_RestoreThread(_save);
48093  PyErr_SetString(PyExc_RuntimeError, e.what());
48094  SWIG_fail;
48095  }
48096  Py_END_ALLOW_THREADS
48097  }
48098  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_POINTER_NEW | 0 );
48099  return resultobj;
48100 fail:
48101  return NULL;
48102 }
48103 
48104 
48105 SWIGINTERN PyObject *_wrap_new_IndexHNSWSQ(PyObject *self, PyObject *args) {
48106  Py_ssize_t argc;
48107  PyObject *argv[4] = {
48108  0
48109  };
48110  Py_ssize_t ii;
48111 
48112  if (!PyTuple_Check(args)) SWIG_fail;
48113  argc = args ? PyObject_Length(args) : 0;
48114  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
48115  argv[ii] = PyTuple_GET_ITEM(args,ii);
48116  }
48117  if (argc == 0) {
48118  return _wrap_new_IndexHNSWSQ__SWIG_0(self, args);
48119  }
48120  if (argc == 3) {
48121  int _v;
48122  {
48123  int res = SWIG_AsVal_int(argv[0], NULL);
48124  _v = SWIG_CheckState(res);
48125  }
48126  if (_v) {
48127  {
48128  int res = SWIG_AsVal_int(argv[1], NULL);
48129  _v = SWIG_CheckState(res);
48130  }
48131  if (_v) {
48132  {
48133  int res = SWIG_AsVal_int(argv[2], NULL);
48134  _v = SWIG_CheckState(res);
48135  }
48136  if (_v) {
48137  return _wrap_new_IndexHNSWSQ__SWIG_1(self, args);
48138  }
48139  }
48140  }
48141  }
48142 
48143 fail:
48144  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSWSQ'.\n"
48145  " Possible C/C++ prototypes are:\n"
48146  " faiss::IndexHNSWSQ::IndexHNSWSQ()\n"
48147  " faiss::IndexHNSWSQ::IndexHNSWSQ(int,faiss::ScalarQuantizer::QuantizerType,int)\n");
48148  return 0;
48149 }
48150 
48151 
48152 SWIGINTERN PyObject *_wrap_IndexHNSWSQ_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48153  PyObject *resultobj = 0;
48154  faiss::IndexHNSWSQ *arg1 = (faiss::IndexHNSWSQ *) 0 ;
48155  void *argp1 = 0 ;
48156  int res1 = 0 ;
48157  PyObject * obj0 = 0 ;
48158  faiss::HNSW::DistanceComputer *result = 0 ;
48159 
48160  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSWSQ_get_distance_computer",&obj0)) SWIG_fail;
48161  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWSQ, 0 | 0 );
48162  if (!SWIG_IsOK(res1)) {
48163  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWSQ_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSWSQ const *""'");
48164  }
48165  arg1 = reinterpret_cast< faiss::IndexHNSWSQ * >(argp1);
48166  {
48167  Py_BEGIN_ALLOW_THREADS
48168  try {
48169  result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSWSQ const *)arg1)->get_distance_computer();
48170  } catch(faiss::FaissException & e) {
48171  PyEval_RestoreThread(_save);
48172  PyErr_SetString(PyExc_RuntimeError, e.what());
48173  SWIG_fail;
48174  }
48175  Py_END_ALLOW_THREADS
48176  }
48177  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
48178  return resultobj;
48179 fail:
48180  return NULL;
48181 }
48182 
48183 
48184 SWIGINTERN PyObject *_wrap_delete_IndexHNSWSQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48185  PyObject *resultobj = 0;
48186  faiss::IndexHNSWSQ *arg1 = (faiss::IndexHNSWSQ *) 0 ;
48187  void *argp1 = 0 ;
48188  int res1 = 0 ;
48189  PyObject * obj0 = 0 ;
48190 
48191  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSWSQ",&obj0)) SWIG_fail;
48192  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_POINTER_DISOWN | 0 );
48193  if (!SWIG_IsOK(res1)) {
48194  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSWSQ" "', argument " "1"" of type '" "faiss::IndexHNSWSQ *""'");
48195  }
48196  arg1 = reinterpret_cast< faiss::IndexHNSWSQ * >(argp1);
48197  delete arg1;
48198  resultobj = SWIG_Py_Void();
48199  return resultobj;
48200 fail:
48201  return NULL;
48202 }
48203 
48204 
48205 SWIGINTERN PyObject *IndexHNSWSQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48206  PyObject *obj;
48207  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
48208  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_NewClientData(obj));
48209  return SWIG_Py_Void();
48210 }
48211 
48212 SWIGINTERN PyObject *_wrap_new_IndexHNSW2Level__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48213  PyObject *resultobj = 0;
48214  faiss::IndexHNSW2Level *result = 0 ;
48215 
48216  if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSW2Level")) SWIG_fail;
48217  {
48218  Py_BEGIN_ALLOW_THREADS
48219  try {
48221  } catch(faiss::FaissException & e) {
48222  PyEval_RestoreThread(_save);
48223  PyErr_SetString(PyExc_RuntimeError, e.what());
48224  SWIG_fail;
48225  }
48226  Py_END_ALLOW_THREADS
48227  }
48228  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_POINTER_NEW | 0 );
48229  return resultobj;
48230 fail:
48231  return NULL;
48232 }
48233 
48234 
48235 SWIGINTERN PyObject *_wrap_new_IndexHNSW2Level__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48236  PyObject *resultobj = 0;
48237  faiss::Index *arg1 = (faiss::Index *) 0 ;
48238  size_t arg2 ;
48239  int arg3 ;
48240  int arg4 ;
48241  void *argp1 = 0 ;
48242  int res1 = 0 ;
48243  size_t val2 ;
48244  int ecode2 = 0 ;
48245  int val3 ;
48246  int ecode3 = 0 ;
48247  int val4 ;
48248  int ecode4 = 0 ;
48249  PyObject * obj0 = 0 ;
48250  PyObject * obj1 = 0 ;
48251  PyObject * obj2 = 0 ;
48252  PyObject * obj3 = 0 ;
48253  faiss::IndexHNSW2Level *result = 0 ;
48254 
48255  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexHNSW2Level",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
48256  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
48257  if (!SWIG_IsOK(res1)) {
48258  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexHNSW2Level" "', argument " "1"" of type '" "faiss::Index *""'");
48259  }
48260  arg1 = reinterpret_cast< faiss::Index * >(argp1);
48261  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
48262  if (!SWIG_IsOK(ecode2)) {
48263  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSW2Level" "', argument " "2"" of type '" "size_t""'");
48264  }
48265  arg2 = static_cast< size_t >(val2);
48266  ecode3 = SWIG_AsVal_int(obj2, &val3);
48267  if (!SWIG_IsOK(ecode3)) {
48268  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexHNSW2Level" "', argument " "3"" of type '" "int""'");
48269  }
48270  arg3 = static_cast< int >(val3);
48271  ecode4 = SWIG_AsVal_int(obj3, &val4);
48272  if (!SWIG_IsOK(ecode4)) {
48273  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexHNSW2Level" "', argument " "4"" of type '" "int""'");
48274  }
48275  arg4 = static_cast< int >(val4);
48276  {
48277  Py_BEGIN_ALLOW_THREADS
48278  try {
48279  result = (faiss::IndexHNSW2Level *)new faiss::IndexHNSW2Level(arg1,arg2,arg3,arg4);
48280  } catch(faiss::FaissException & e) {
48281  PyEval_RestoreThread(_save);
48282  PyErr_SetString(PyExc_RuntimeError, e.what());
48283  SWIG_fail;
48284  }
48285  Py_END_ALLOW_THREADS
48286  }
48287  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_POINTER_NEW | 0 );
48288  return resultobj;
48289 fail:
48290  return NULL;
48291 }
48292 
48293 
48294 SWIGINTERN PyObject *_wrap_new_IndexHNSW2Level(PyObject *self, PyObject *args) {
48295  Py_ssize_t argc;
48296  PyObject *argv[5] = {
48297  0
48298  };
48299  Py_ssize_t ii;
48300 
48301  if (!PyTuple_Check(args)) SWIG_fail;
48302  argc = args ? PyObject_Length(args) : 0;
48303  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
48304  argv[ii] = PyTuple_GET_ITEM(args,ii);
48305  }
48306  if (argc == 0) {
48307  return _wrap_new_IndexHNSW2Level__SWIG_0(self, args);
48308  }
48309  if (argc == 4) {
48310  int _v;
48311  void *vptr = 0;
48312  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
48313  _v = SWIG_CheckState(res);
48314  if (_v) {
48315  {
48316  int res = SWIG_AsVal_size_t(argv[1], NULL);
48317  _v = SWIG_CheckState(res);
48318  }
48319  if (_v) {
48320  {
48321  int res = SWIG_AsVal_int(argv[2], NULL);
48322  _v = SWIG_CheckState(res);
48323  }
48324  if (_v) {
48325  {
48326  int res = SWIG_AsVal_int(argv[3], NULL);
48327  _v = SWIG_CheckState(res);
48328  }
48329  if (_v) {
48330  return _wrap_new_IndexHNSW2Level__SWIG_1(self, args);
48331  }
48332  }
48333  }
48334  }
48335  }
48336 
48337 fail:
48338  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSW2Level'.\n"
48339  " Possible C/C++ prototypes are:\n"
48340  " faiss::IndexHNSW2Level::IndexHNSW2Level()\n"
48341  " faiss::IndexHNSW2Level::IndexHNSW2Level(faiss::Index *,size_t,int,int)\n");
48342  return 0;
48343 }
48344 
48345 
48346 SWIGINTERN PyObject *_wrap_IndexHNSW2Level_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48347  PyObject *resultobj = 0;
48349  void *argp1 = 0 ;
48350  int res1 = 0 ;
48351  PyObject * obj0 = 0 ;
48352  faiss::HNSW::DistanceComputer *result = 0 ;
48353 
48354  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW2Level_get_distance_computer",&obj0)) SWIG_fail;
48355  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, 0 | 0 );
48356  if (!SWIG_IsOK(res1)) {
48357  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW2Level_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSW2Level const *""'");
48358  }
48359  arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
48360  {
48361  Py_BEGIN_ALLOW_THREADS
48362  try {
48363  result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSW2Level const *)arg1)->get_distance_computer();
48364  } catch(faiss::FaissException & e) {
48365  PyEval_RestoreThread(_save);
48366  PyErr_SetString(PyExc_RuntimeError, e.what());
48367  SWIG_fail;
48368  }
48369  Py_END_ALLOW_THREADS
48370  }
48371  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
48372  return resultobj;
48373 fail:
48374  return NULL;
48375 }
48376 
48377 
48378 SWIGINTERN PyObject *_wrap_IndexHNSW2Level_flip_to_ivf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48379  PyObject *resultobj = 0;
48381  void *argp1 = 0 ;
48382  int res1 = 0 ;
48383  PyObject * obj0 = 0 ;
48384 
48385  if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW2Level_flip_to_ivf",&obj0)) SWIG_fail;
48386  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, 0 | 0 );
48387  if (!SWIG_IsOK(res1)) {
48388  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW2Level_flip_to_ivf" "', argument " "1"" of type '" "faiss::IndexHNSW2Level *""'");
48389  }
48390  arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
48391  {
48392  Py_BEGIN_ALLOW_THREADS
48393  try {
48394  (arg1)->flip_to_ivf();
48395  } catch(faiss::FaissException & e) {
48396  PyEval_RestoreThread(_save);
48397  PyErr_SetString(PyExc_RuntimeError, e.what());
48398  SWIG_fail;
48399  }
48400  Py_END_ALLOW_THREADS
48401  }
48402  resultobj = SWIG_Py_Void();
48403  return resultobj;
48404 fail:
48405  return NULL;
48406 }
48407 
48408 
48409 SWIGINTERN PyObject *_wrap_IndexHNSW2Level_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48410  PyObject *resultobj = 0;
48412  faiss::Index::idx_t arg2 ;
48413  float *arg3 = (float *) 0 ;
48414  faiss::Index::idx_t arg4 ;
48415  float *arg5 = (float *) 0 ;
48417  void *argp1 = 0 ;
48418  int res1 = 0 ;
48419  long val2 ;
48420  int ecode2 = 0 ;
48421  void *argp3 = 0 ;
48422  int res3 = 0 ;
48423  long val4 ;
48424  int ecode4 = 0 ;
48425  void *argp5 = 0 ;
48426  int res5 = 0 ;
48427  void *argp6 = 0 ;
48428  int res6 = 0 ;
48429  PyObject * obj0 = 0 ;
48430  PyObject * obj1 = 0 ;
48431  PyObject * obj2 = 0 ;
48432  PyObject * obj3 = 0 ;
48433  PyObject * obj4 = 0 ;
48434  PyObject * obj5 = 0 ;
48435 
48436  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexHNSW2Level_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
48437  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, 0 | 0 );
48438  if (!SWIG_IsOK(res1)) {
48439  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW2Level_search" "', argument " "1"" of type '" "faiss::IndexHNSW2Level const *""'");
48440  }
48441  arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
48442  ecode2 = SWIG_AsVal_long(obj1, &val2);
48443  if (!SWIG_IsOK(ecode2)) {
48444  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW2Level_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48445  }
48446  arg2 = static_cast< faiss::Index::idx_t >(val2);
48447  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48448  if (!SWIG_IsOK(res3)) {
48449  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW2Level_search" "', argument " "3"" of type '" "float const *""'");
48450  }
48451  arg3 = reinterpret_cast< float * >(argp3);
48452  ecode4 = SWIG_AsVal_long(obj3, &val4);
48453  if (!SWIG_IsOK(ecode4)) {
48454  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW2Level_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
48455  }
48456  arg4 = static_cast< faiss::Index::idx_t >(val4);
48457  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
48458  if (!SWIG_IsOK(res5)) {
48459  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW2Level_search" "', argument " "5"" of type '" "float *""'");
48460  }
48461  arg5 = reinterpret_cast< float * >(argp5);
48462  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
48463  if (!SWIG_IsOK(res6)) {
48464  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW2Level_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
48465  }
48466  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
48467  {
48468  Py_BEGIN_ALLOW_THREADS
48469  try {
48470  ((faiss::IndexHNSW2Level const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
48471  } catch(faiss::FaissException & e) {
48472  PyEval_RestoreThread(_save);
48473  PyErr_SetString(PyExc_RuntimeError, e.what());
48474  SWIG_fail;
48475  }
48476  Py_END_ALLOW_THREADS
48477  }
48478  resultobj = SWIG_Py_Void();
48479  return resultobj;
48480 fail:
48481  return NULL;
48482 }
48483 
48484 
48485 SWIGINTERN PyObject *_wrap_delete_IndexHNSW2Level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48486  PyObject *resultobj = 0;
48488  void *argp1 = 0 ;
48489  int res1 = 0 ;
48490  PyObject * obj0 = 0 ;
48491 
48492  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSW2Level",&obj0)) SWIG_fail;
48493  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_POINTER_DISOWN | 0 );
48494  if (!SWIG_IsOK(res1)) {
48495  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSW2Level" "', argument " "1"" of type '" "faiss::IndexHNSW2Level *""'");
48496  }
48497  arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
48498  delete arg1;
48499  resultobj = SWIG_Py_Void();
48500  return resultobj;
48501 fail:
48502  return NULL;
48503 }
48504 
48505 
48506 SWIGINTERN PyObject *IndexHNSW2Level_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48507  PyObject *obj;
48508  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
48509  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_NewClientData(obj));
48510  return SWIG_Py_Void();
48511 }
48512 
48513 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48514  PyObject *resultobj = 0;
48515  faiss::Index *arg1 = (faiss::Index *) 0 ;
48516  size_t arg2 ;
48517  size_t arg3 ;
48518  faiss::MetricType arg4 ;
48519  void *argp1 = 0 ;
48520  int res1 = 0 ;
48521  size_t val2 ;
48522  int ecode2 = 0 ;
48523  size_t val3 ;
48524  int ecode3 = 0 ;
48525  int val4 ;
48526  int ecode4 = 0 ;
48527  PyObject * obj0 = 0 ;
48528  PyObject * obj1 = 0 ;
48529  PyObject * obj2 = 0 ;
48530  PyObject * obj3 = 0 ;
48531  faiss::IndexIVFFlat *result = 0 ;
48532 
48533  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexIVFFlat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
48534  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
48535  if (!SWIG_IsOK(res1)) {
48536  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlat" "', argument " "1"" of type '" "faiss::Index *""'");
48537  }
48538  arg1 = reinterpret_cast< faiss::Index * >(argp1);
48539  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
48540  if (!SWIG_IsOK(ecode2)) {
48541  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlat" "', argument " "2"" of type '" "size_t""'");
48542  }
48543  arg2 = static_cast< size_t >(val2);
48544  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
48545  if (!SWIG_IsOK(ecode3)) {
48546  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlat" "', argument " "3"" of type '" "size_t""'");
48547  }
48548  arg3 = static_cast< size_t >(val3);
48549  ecode4 = SWIG_AsVal_int(obj3, &val4);
48550  if (!SWIG_IsOK(ecode4)) {
48551  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFFlat" "', argument " "4"" of type '" "faiss::MetricType""'");
48552  }
48553  arg4 = static_cast< faiss::MetricType >(val4);
48554  {
48555  Py_BEGIN_ALLOW_THREADS
48556  try {
48557  result = (faiss::IndexIVFFlat *)new faiss::IndexIVFFlat(arg1,arg2,arg3,arg4);
48558  } catch(faiss::FaissException & e) {
48559  PyEval_RestoreThread(_save);
48560  PyErr_SetString(PyExc_RuntimeError, e.what());
48561  SWIG_fail;
48562  }
48563  Py_END_ALLOW_THREADS
48564  }
48565  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_NEW | 0 );
48566  return resultobj;
48567 fail:
48568  return NULL;
48569 }
48570 
48571 
48572 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48573  PyObject *resultobj = 0;
48574  faiss::Index *arg1 = (faiss::Index *) 0 ;
48575  size_t arg2 ;
48576  size_t arg3 ;
48577  void *argp1 = 0 ;
48578  int res1 = 0 ;
48579  size_t val2 ;
48580  int ecode2 = 0 ;
48581  size_t val3 ;
48582  int ecode3 = 0 ;
48583  PyObject * obj0 = 0 ;
48584  PyObject * obj1 = 0 ;
48585  PyObject * obj2 = 0 ;
48586  faiss::IndexIVFFlat *result = 0 ;
48587 
48588  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexIVFFlat",&obj0,&obj1,&obj2)) SWIG_fail;
48589  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
48590  if (!SWIG_IsOK(res1)) {
48591  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlat" "', argument " "1"" of type '" "faiss::Index *""'");
48592  }
48593  arg1 = reinterpret_cast< faiss::Index * >(argp1);
48594  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
48595  if (!SWIG_IsOK(ecode2)) {
48596  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlat" "', argument " "2"" of type '" "size_t""'");
48597  }
48598  arg2 = static_cast< size_t >(val2);
48599  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
48600  if (!SWIG_IsOK(ecode3)) {
48601  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlat" "', argument " "3"" of type '" "size_t""'");
48602  }
48603  arg3 = static_cast< size_t >(val3);
48604  {
48605  Py_BEGIN_ALLOW_THREADS
48606  try {
48607  result = (faiss::IndexIVFFlat *)new faiss::IndexIVFFlat(arg1,arg2,arg3);
48608  } catch(faiss::FaissException & e) {
48609  PyEval_RestoreThread(_save);
48610  PyErr_SetString(PyExc_RuntimeError, e.what());
48611  SWIG_fail;
48612  }
48613  Py_END_ALLOW_THREADS
48614  }
48615  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_NEW | 0 );
48616  return resultobj;
48617 fail:
48618  return NULL;
48619 }
48620 
48621 
48622 SWIGINTERN PyObject *_wrap_IndexIVFFlat_add_core(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48623  PyObject *resultobj = 0;
48625  faiss::Index::idx_t arg2 ;
48626  float *arg3 = (float *) 0 ;
48627  long *arg4 = (long *) 0 ;
48628  long *arg5 = (long *) 0 ;
48629  void *argp1 = 0 ;
48630  int res1 = 0 ;
48631  long val2 ;
48632  int ecode2 = 0 ;
48633  void *argp3 = 0 ;
48634  int res3 = 0 ;
48635  void *argp4 = 0 ;
48636  int res4 = 0 ;
48637  void *argp5 = 0 ;
48638  int res5 = 0 ;
48639  PyObject * obj0 = 0 ;
48640  PyObject * obj1 = 0 ;
48641  PyObject * obj2 = 0 ;
48642  PyObject * obj3 = 0 ;
48643  PyObject * obj4 = 0 ;
48644 
48645  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlat_add_core",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
48646  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
48647  if (!SWIG_IsOK(res1)) {
48648  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_add_core" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
48649  }
48650  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
48651  ecode2 = SWIG_AsVal_long(obj1, &val2);
48652  if (!SWIG_IsOK(ecode2)) {
48653  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_add_core" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48654  }
48655  arg2 = static_cast< faiss::Index::idx_t >(val2);
48656  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48657  if (!SWIG_IsOK(res3)) {
48658  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_add_core" "', argument " "3"" of type '" "float const *""'");
48659  }
48660  arg3 = reinterpret_cast< float * >(argp3);
48661  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
48662  if (!SWIG_IsOK(res4)) {
48663  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_add_core" "', argument " "4"" of type '" "long const *""'");
48664  }
48665  arg4 = reinterpret_cast< long * >(argp4);
48666  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
48667  if (!SWIG_IsOK(res5)) {
48668  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlat_add_core" "', argument " "5"" of type '" "long const *""'");
48669  }
48670  arg5 = reinterpret_cast< long * >(argp5);
48671  {
48672  Py_BEGIN_ALLOW_THREADS
48673  try {
48674  (arg1)->add_core(arg2,(float const *)arg3,(long const *)arg4,(long const *)arg5);
48675  } catch(faiss::FaissException & e) {
48676  PyEval_RestoreThread(_save);
48677  PyErr_SetString(PyExc_RuntimeError, e.what());
48678  SWIG_fail;
48679  }
48680  Py_END_ALLOW_THREADS
48681  }
48682  resultobj = SWIG_Py_Void();
48683  return resultobj;
48684 fail:
48685  return NULL;
48686 }
48687 
48688 
48689 SWIGINTERN PyObject *_wrap_IndexIVFFlat_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48690  PyObject *resultobj = 0;
48692  faiss::Index::idx_t arg2 ;
48693  float *arg3 = (float *) 0 ;
48694  long *arg4 = (long *) 0 ;
48695  void *argp1 = 0 ;
48696  int res1 = 0 ;
48697  long val2 ;
48698  int ecode2 = 0 ;
48699  void *argp3 = 0 ;
48700  int res3 = 0 ;
48701  void *argp4 = 0 ;
48702  int res4 = 0 ;
48703  PyObject * obj0 = 0 ;
48704  PyObject * obj1 = 0 ;
48705  PyObject * obj2 = 0 ;
48706  PyObject * obj3 = 0 ;
48707 
48708  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlat_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
48709  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
48710  if (!SWIG_IsOK(res1)) {
48711  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
48712  }
48713  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
48714  ecode2 = SWIG_AsVal_long(obj1, &val2);
48715  if (!SWIG_IsOK(ecode2)) {
48716  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48717  }
48718  arg2 = static_cast< faiss::Index::idx_t >(val2);
48719  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48720  if (!SWIG_IsOK(res3)) {
48721  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "3"" of type '" "float const *""'");
48722  }
48723  arg3 = reinterpret_cast< float * >(argp3);
48724  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
48725  if (!SWIG_IsOK(res4)) {
48726  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "4"" of type '" "long const *""'");
48727  }
48728  arg4 = reinterpret_cast< long * >(argp4);
48729  {
48730  Py_BEGIN_ALLOW_THREADS
48731  try {
48732  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
48733  } catch(faiss::FaissException & e) {
48734  PyEval_RestoreThread(_save);
48735  PyErr_SetString(PyExc_RuntimeError, e.what());
48736  SWIG_fail;
48737  }
48738  Py_END_ALLOW_THREADS
48739  }
48740  resultobj = SWIG_Py_Void();
48741  return resultobj;
48742 fail:
48743  return NULL;
48744 }
48745 
48746 
48747 SWIGINTERN PyObject *_wrap_IndexIVFFlat_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48748  PyObject *resultobj = 0;
48750  faiss::Index::idx_t arg2 ;
48751  float *arg3 = (float *) 0 ;
48753  uint8_t *arg5 = (uint8_t *) 0 ;
48754  void *argp1 = 0 ;
48755  int res1 = 0 ;
48756  long val2 ;
48757  int ecode2 = 0 ;
48758  void *argp3 = 0 ;
48759  int res3 = 0 ;
48760  void *argp4 = 0 ;
48761  int res4 = 0 ;
48762  void *argp5 = 0 ;
48763  int res5 = 0 ;
48764  PyObject * obj0 = 0 ;
48765  PyObject * obj1 = 0 ;
48766  PyObject * obj2 = 0 ;
48767  PyObject * obj3 = 0 ;
48768  PyObject * obj4 = 0 ;
48769 
48770  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlat_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
48771  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
48772  if (!SWIG_IsOK(res1)) {
48773  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
48774  }
48775  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
48776  ecode2 = SWIG_AsVal_long(obj1, &val2);
48777  if (!SWIG_IsOK(ecode2)) {
48778  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48779  }
48780  arg2 = static_cast< faiss::Index::idx_t >(val2);
48781  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48782  if (!SWIG_IsOK(res3)) {
48783  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "3"" of type '" "float const *""'");
48784  }
48785  arg3 = reinterpret_cast< float * >(argp3);
48786  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
48787  if (!SWIG_IsOK(res4)) {
48788  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
48789  }
48790  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
48791  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
48792  if (!SWIG_IsOK(res5)) {
48793  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
48794  }
48795  arg5 = reinterpret_cast< uint8_t * >(argp5);
48796  {
48797  Py_BEGIN_ALLOW_THREADS
48798  try {
48799  ((faiss::IndexIVFFlat const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
48800  } catch(faiss::FaissException & e) {
48801  PyEval_RestoreThread(_save);
48802  PyErr_SetString(PyExc_RuntimeError, e.what());
48803  SWIG_fail;
48804  }
48805  Py_END_ALLOW_THREADS
48806  }
48807  resultobj = SWIG_Py_Void();
48808  return resultobj;
48809 fail:
48810  return NULL;
48811 }
48812 
48813 
48814 SWIGINTERN PyObject *_wrap_IndexIVFFlat_get_InvertedListScanner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48815  PyObject *resultobj = 0;
48817  bool arg2 ;
48818  void *argp1 = 0 ;
48819  int res1 = 0 ;
48820  bool val2 ;
48821  int ecode2 = 0 ;
48822  PyObject * obj0 = 0 ;
48823  PyObject * obj1 = 0 ;
48824  faiss::InvertedListScanner *result = 0 ;
48825 
48826  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFFlat_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
48827  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
48828  if (!SWIG_IsOK(res1)) {
48829  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
48830  }
48831  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
48832  ecode2 = SWIG_AsVal_bool(obj1, &val2);
48833  if (!SWIG_IsOK(ecode2)) {
48834  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
48835  }
48836  arg2 = static_cast< bool >(val2);
48837  {
48838  Py_BEGIN_ALLOW_THREADS
48839  try {
48840  result = (faiss::InvertedListScanner *)((faiss::IndexIVFFlat const *)arg1)->get_InvertedListScanner(arg2);
48841  } catch(faiss::FaissException & e) {
48842  PyEval_RestoreThread(_save);
48843  PyErr_SetString(PyExc_RuntimeError, e.what());
48844  SWIG_fail;
48845  }
48846  Py_END_ALLOW_THREADS
48847  }
48848  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
48849  return resultobj;
48850 fail:
48851  return NULL;
48852 }
48853 
48854 
48855 SWIGINTERN PyObject *_wrap_IndexIVFFlat_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48856  PyObject *resultobj = 0;
48858  faiss::Index::idx_t arg2 ;
48859  float *arg3 = (float *) 0 ;
48860  float arg4 ;
48862  void *argp1 = 0 ;
48863  int res1 = 0 ;
48864  long val2 ;
48865  int ecode2 = 0 ;
48866  void *argp3 = 0 ;
48867  int res3 = 0 ;
48868  float val4 ;
48869  int ecode4 = 0 ;
48870  void *argp5 = 0 ;
48871  int res5 = 0 ;
48872  PyObject * obj0 = 0 ;
48873  PyObject * obj1 = 0 ;
48874  PyObject * obj2 = 0 ;
48875  PyObject * obj3 = 0 ;
48876  PyObject * obj4 = 0 ;
48877 
48878  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlat_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
48879  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
48880  if (!SWIG_IsOK(res1)) {
48881  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_range_search" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
48882  }
48883  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
48884  ecode2 = SWIG_AsVal_long(obj1, &val2);
48885  if (!SWIG_IsOK(ecode2)) {
48886  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48887  }
48888  arg2 = static_cast< faiss::Index::idx_t >(val2);
48889  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48890  if (!SWIG_IsOK(res3)) {
48891  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_range_search" "', argument " "3"" of type '" "float const *""'");
48892  }
48893  arg3 = reinterpret_cast< float * >(argp3);
48894  ecode4 = SWIG_AsVal_float(obj3, &val4);
48895  if (!SWIG_IsOK(ecode4)) {
48896  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlat_range_search" "', argument " "4"" of type '" "float""'");
48897  }
48898  arg4 = static_cast< float >(val4);
48899  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
48900  if (!SWIG_IsOK(res5)) {
48901  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlat_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
48902  }
48903  arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
48904  {
48905  Py_BEGIN_ALLOW_THREADS
48906  try {
48907  ((faiss::IndexIVFFlat const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
48908  } catch(faiss::FaissException & e) {
48909  PyEval_RestoreThread(_save);
48910  PyErr_SetString(PyExc_RuntimeError, e.what());
48911  SWIG_fail;
48912  }
48913  Py_END_ALLOW_THREADS
48914  }
48915  resultobj = SWIG_Py_Void();
48916  return resultobj;
48917 fail:
48918  return NULL;
48919 }
48920 
48921 
48922 SWIGINTERN PyObject *_wrap_IndexIVFFlat_update_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48923  PyObject *resultobj = 0;
48925  int arg2 ;
48927  float *arg4 = (float *) 0 ;
48928  void *argp1 = 0 ;
48929  int res1 = 0 ;
48930  int val2 ;
48931  int ecode2 = 0 ;
48932  void *argp3 = 0 ;
48933  int res3 = 0 ;
48934  void *argp4 = 0 ;
48935  int res4 = 0 ;
48936  PyObject * obj0 = 0 ;
48937  PyObject * obj1 = 0 ;
48938  PyObject * obj2 = 0 ;
48939  PyObject * obj3 = 0 ;
48940 
48941  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlat_update_vectors",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
48942  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
48943  if (!SWIG_IsOK(res1)) {
48944  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_update_vectors" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
48945  }
48946  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
48947  ecode2 = SWIG_AsVal_int(obj1, &val2);
48948  if (!SWIG_IsOK(ecode2)) {
48949  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_update_vectors" "', argument " "2"" of type '" "int""'");
48950  }
48951  arg2 = static_cast< int >(val2);
48952  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
48953  if (!SWIG_IsOK(res3)) {
48954  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_update_vectors" "', argument " "3"" of type '" "faiss::Index::idx_t *""'");
48955  }
48956  arg3 = reinterpret_cast< faiss::Index::idx_t * >(argp3);
48957  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
48958  if (!SWIG_IsOK(res4)) {
48959  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_update_vectors" "', argument " "4"" of type '" "float const *""'");
48960  }
48961  arg4 = reinterpret_cast< float * >(argp4);
48962  {
48963  Py_BEGIN_ALLOW_THREADS
48964  try {
48965  (arg1)->update_vectors(arg2,arg3,(float const *)arg4);
48966  } catch(faiss::FaissException & e) {
48967  PyEval_RestoreThread(_save);
48968  PyErr_SetString(PyExc_RuntimeError, e.what());
48969  SWIG_fail;
48970  }
48971  Py_END_ALLOW_THREADS
48972  }
48973  resultobj = SWIG_Py_Void();
48974  return resultobj;
48975 fail:
48976  return NULL;
48977 }
48978 
48979 
48980 SWIGINTERN PyObject *_wrap_IndexIVFFlat_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48981  PyObject *resultobj = 0;
48983  long arg2 ;
48984  long arg3 ;
48985  float *arg4 = (float *) 0 ;
48986  void *argp1 = 0 ;
48987  int res1 = 0 ;
48988  long val2 ;
48989  int ecode2 = 0 ;
48990  long val3 ;
48991  int ecode3 = 0 ;
48992  void *argp4 = 0 ;
48993  int res4 = 0 ;
48994  PyObject * obj0 = 0 ;
48995  PyObject * obj1 = 0 ;
48996  PyObject * obj2 = 0 ;
48997  PyObject * obj3 = 0 ;
48998 
48999  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlat_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
49000  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
49001  if (!SWIG_IsOK(res1)) {
49002  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
49003  }
49004  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
49005  ecode2 = SWIG_AsVal_long(obj1, &val2);
49006  if (!SWIG_IsOK(ecode2)) {
49007  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
49008  }
49009  arg2 = static_cast< long >(val2);
49010  ecode3 = SWIG_AsVal_long(obj2, &val3);
49011  if (!SWIG_IsOK(ecode3)) {
49012  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
49013  }
49014  arg3 = static_cast< long >(val3);
49015  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
49016  if (!SWIG_IsOK(res4)) {
49017  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
49018  }
49019  arg4 = reinterpret_cast< float * >(argp4);
49020  {
49021  Py_BEGIN_ALLOW_THREADS
49022  try {
49023  ((faiss::IndexIVFFlat const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
49024  } catch(faiss::FaissException & e) {
49025  PyEval_RestoreThread(_save);
49026  PyErr_SetString(PyExc_RuntimeError, e.what());
49027  SWIG_fail;
49028  }
49029  Py_END_ALLOW_THREADS
49030  }
49031  resultobj = SWIG_Py_Void();
49032  return resultobj;
49033 fail:
49034  return NULL;
49035 }
49036 
49037 
49038 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49039  PyObject *resultobj = 0;
49040  faiss::IndexIVFFlat *result = 0 ;
49041 
49042  if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFFlat")) SWIG_fail;
49043  {
49044  Py_BEGIN_ALLOW_THREADS
49045  try {
49046  result = (faiss::IndexIVFFlat *)new faiss::IndexIVFFlat();
49047  } catch(faiss::FaissException & e) {
49048  PyEval_RestoreThread(_save);
49049  PyErr_SetString(PyExc_RuntimeError, e.what());
49050  SWIG_fail;
49051  }
49052  Py_END_ALLOW_THREADS
49053  }
49054  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_NEW | 0 );
49055  return resultobj;
49056 fail:
49057  return NULL;
49058 }
49059 
49060 
49061 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat(PyObject *self, PyObject *args) {
49062  Py_ssize_t argc;
49063  PyObject *argv[5] = {
49064  0
49065  };
49066  Py_ssize_t ii;
49067 
49068  if (!PyTuple_Check(args)) SWIG_fail;
49069  argc = args ? PyObject_Length(args) : 0;
49070  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
49071  argv[ii] = PyTuple_GET_ITEM(args,ii);
49072  }
49073  if (argc == 0) {
49074  return _wrap_new_IndexIVFFlat__SWIG_2(self, args);
49075  }
49076  if (argc == 3) {
49077  int _v;
49078  void *vptr = 0;
49079  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
49080  _v = SWIG_CheckState(res);
49081  if (_v) {
49082  {
49083  int res = SWIG_AsVal_size_t(argv[1], NULL);
49084  _v = SWIG_CheckState(res);
49085  }
49086  if (_v) {
49087  {
49088  int res = SWIG_AsVal_size_t(argv[2], NULL);
49089  _v = SWIG_CheckState(res);
49090  }
49091  if (_v) {
49092  return _wrap_new_IndexIVFFlat__SWIG_1(self, args);
49093  }
49094  }
49095  }
49096  }
49097  if (argc == 4) {
49098  int _v;
49099  void *vptr = 0;
49100  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
49101  _v = SWIG_CheckState(res);
49102  if (_v) {
49103  {
49104  int res = SWIG_AsVal_size_t(argv[1], NULL);
49105  _v = SWIG_CheckState(res);
49106  }
49107  if (_v) {
49108  {
49109  int res = SWIG_AsVal_size_t(argv[2], NULL);
49110  _v = SWIG_CheckState(res);
49111  }
49112  if (_v) {
49113  {
49114  int res = SWIG_AsVal_int(argv[3], NULL);
49115  _v = SWIG_CheckState(res);
49116  }
49117  if (_v) {
49118  return _wrap_new_IndexIVFFlat__SWIG_0(self, args);
49119  }
49120  }
49121  }
49122  }
49123  }
49124 
49125 fail:
49126  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFFlat'.\n"
49127  " Possible C/C++ prototypes are:\n"
49128  " faiss::IndexIVFFlat::IndexIVFFlat(faiss::Index *,size_t,size_t,faiss::MetricType)\n"
49129  " faiss::IndexIVFFlat::IndexIVFFlat(faiss::Index *,size_t,size_t)\n"
49130  " faiss::IndexIVFFlat::IndexIVFFlat()\n");
49131  return 0;
49132 }
49133 
49134 
49135 SWIGINTERN PyObject *_wrap_delete_IndexIVFFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49136  PyObject *resultobj = 0;
49138  void *argp1 = 0 ;
49139  int res1 = 0 ;
49140  PyObject * obj0 = 0 ;
49141 
49142  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFFlat",&obj0)) SWIG_fail;
49143  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_DISOWN | 0 );
49144  if (!SWIG_IsOK(res1)) {
49145  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFFlat" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
49146  }
49147  arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
49148  delete arg1;
49149  resultobj = SWIG_Py_Void();
49150  return resultobj;
49151 fail:
49152  return NULL;
49153 }
49154 
49155 
49156 SWIGINTERN PyObject *IndexIVFFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49157  PyObject *obj;
49158  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
49159  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_NewClientData(obj));
49160  return SWIG_Py_Void();
49161 }
49162 
49163 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_instances_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49164  PyObject *resultobj = 0;
49166  std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > arg2 ;
49167  void *argp1 = 0 ;
49168  int res1 = 0 ;
49169  void *argp2 ;
49170  int res2 = 0 ;
49171  PyObject * obj0 = 0 ;
49172  PyObject * obj1 = 0 ;
49173 
49174  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFFlatDedup_instances_set",&obj0,&obj1)) SWIG_fail;
49175  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49176  if (!SWIG_IsOK(res1)) {
49177  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_instances_set" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
49178  }
49179  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49180  {
49181  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__unordered_multimapT_long_long_t, 0 | 0);
49182  if (!SWIG_IsOK(res2)) {
49183  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFFlatDedup_instances_set" "', argument " "2"" of type '" "std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >""'");
49184  }
49185  if (!argp2) {
49186  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFFlatDedup_instances_set" "', argument " "2"" of type '" "std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >""'");
49187  } else {
49188  std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > * temp = reinterpret_cast< std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > * >(argp2);
49189  arg2 = *temp;
49190  if (SWIG_IsNewObj(res2)) delete temp;
49191  }
49192  }
49193  if (arg1) (arg1)->instances = arg2;
49194  resultobj = SWIG_Py_Void();
49195  return resultobj;
49196 fail:
49197  return NULL;
49198 }
49199 
49200 
49201 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_instances_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49202  PyObject *resultobj = 0;
49204  void *argp1 = 0 ;
49205  int res1 = 0 ;
49206  PyObject * obj0 = 0 ;
49207  std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > result;
49208 
49209  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFFlatDedup_instances_get",&obj0)) SWIG_fail;
49210  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49211  if (!SWIG_IsOK(res1)) {
49212  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_instances_get" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
49213  }
49214  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49215  result = ((arg1)->instances);
49216  resultobj = SWIG_NewPointerObj((new std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >(static_cast< const std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >& >(result))), SWIGTYPE_p_std__unordered_multimapT_long_long_t, SWIG_POINTER_OWN | 0 );
49217  return resultobj;
49218 fail:
49219  return NULL;
49220 }
49221 
49222 
49223 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49224  PyObject *resultobj = 0;
49225  faiss::Index *arg1 = (faiss::Index *) 0 ;
49226  size_t arg2 ;
49227  size_t arg3 ;
49228  faiss::MetricType arg4 ;
49229  void *argp1 = 0 ;
49230  int res1 = 0 ;
49231  size_t val2 ;
49232  int ecode2 = 0 ;
49233  size_t val3 ;
49234  int ecode3 = 0 ;
49235  int val4 ;
49236  int ecode4 = 0 ;
49237  PyObject * obj0 = 0 ;
49238  PyObject * obj1 = 0 ;
49239  PyObject * obj2 = 0 ;
49240  PyObject * obj3 = 0 ;
49241  faiss::IndexIVFFlatDedup *result = 0 ;
49242 
49243  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexIVFFlatDedup",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
49244  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
49245  if (!SWIG_IsOK(res1)) {
49246  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlatDedup" "', argument " "1"" of type '" "faiss::Index *""'");
49247  }
49248  arg1 = reinterpret_cast< faiss::Index * >(argp1);
49249  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49250  if (!SWIG_IsOK(ecode2)) {
49251  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlatDedup" "', argument " "2"" of type '" "size_t""'");
49252  }
49253  arg2 = static_cast< size_t >(val2);
49254  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
49255  if (!SWIG_IsOK(ecode3)) {
49256  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlatDedup" "', argument " "3"" of type '" "size_t""'");
49257  }
49258  arg3 = static_cast< size_t >(val3);
49259  ecode4 = SWIG_AsVal_int(obj3, &val4);
49260  if (!SWIG_IsOK(ecode4)) {
49261  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFFlatDedup" "', argument " "4"" of type '" "faiss::MetricType""'");
49262  }
49263  arg4 = static_cast< faiss::MetricType >(val4);
49264  {
49265  Py_BEGIN_ALLOW_THREADS
49266  try {
49267  result = (faiss::IndexIVFFlatDedup *)new faiss::IndexIVFFlatDedup(arg1,arg2,arg3,arg4);
49268  } catch(faiss::FaissException & e) {
49269  PyEval_RestoreThread(_save);
49270  PyErr_SetString(PyExc_RuntimeError, e.what());
49271  SWIG_fail;
49272  }
49273  Py_END_ALLOW_THREADS
49274  }
49275  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_NEW | 0 );
49276  return resultobj;
49277 fail:
49278  return NULL;
49279 }
49280 
49281 
49282 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49283  PyObject *resultobj = 0;
49284  faiss::Index *arg1 = (faiss::Index *) 0 ;
49285  size_t arg2 ;
49286  size_t arg3 ;
49287  void *argp1 = 0 ;
49288  int res1 = 0 ;
49289  size_t val2 ;
49290  int ecode2 = 0 ;
49291  size_t val3 ;
49292  int ecode3 = 0 ;
49293  PyObject * obj0 = 0 ;
49294  PyObject * obj1 = 0 ;
49295  PyObject * obj2 = 0 ;
49296  faiss::IndexIVFFlatDedup *result = 0 ;
49297 
49298  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexIVFFlatDedup",&obj0,&obj1,&obj2)) SWIG_fail;
49299  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
49300  if (!SWIG_IsOK(res1)) {
49301  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlatDedup" "', argument " "1"" of type '" "faiss::Index *""'");
49302  }
49303  arg1 = reinterpret_cast< faiss::Index * >(argp1);
49304  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49305  if (!SWIG_IsOK(ecode2)) {
49306  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlatDedup" "', argument " "2"" of type '" "size_t""'");
49307  }
49308  arg2 = static_cast< size_t >(val2);
49309  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
49310  if (!SWIG_IsOK(ecode3)) {
49311  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlatDedup" "', argument " "3"" of type '" "size_t""'");
49312  }
49313  arg3 = static_cast< size_t >(val3);
49314  {
49315  Py_BEGIN_ALLOW_THREADS
49316  try {
49317  result = (faiss::IndexIVFFlatDedup *)new faiss::IndexIVFFlatDedup(arg1,arg2,arg3);
49318  } catch(faiss::FaissException & e) {
49319  PyEval_RestoreThread(_save);
49320  PyErr_SetString(PyExc_RuntimeError, e.what());
49321  SWIG_fail;
49322  }
49323  Py_END_ALLOW_THREADS
49324  }
49325  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_NEW | 0 );
49326  return resultobj;
49327 fail:
49328  return NULL;
49329 }
49330 
49331 
49332 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49333  PyObject *resultobj = 0;
49335  faiss::Index::idx_t arg2 ;
49336  float *arg3 = (float *) 0 ;
49337  void *argp1 = 0 ;
49338  int res1 = 0 ;
49339  long val2 ;
49340  int ecode2 = 0 ;
49341  void *argp3 = 0 ;
49342  int res3 = 0 ;
49343  PyObject * obj0 = 0 ;
49344  PyObject * obj1 = 0 ;
49345  PyObject * obj2 = 0 ;
49346 
49347  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFFlatDedup_train",&obj0,&obj1,&obj2)) SWIG_fail;
49348  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49349  if (!SWIG_IsOK(res1)) {
49350  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_train" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
49351  }
49352  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49353  ecode2 = SWIG_AsVal_long(obj1, &val2);
49354  if (!SWIG_IsOK(ecode2)) {
49355  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
49356  }
49357  arg2 = static_cast< faiss::Index::idx_t >(val2);
49358  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
49359  if (!SWIG_IsOK(res3)) {
49360  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_train" "', argument " "3"" of type '" "float const *""'");
49361  }
49362  arg3 = reinterpret_cast< float * >(argp3);
49363  {
49364  Py_BEGIN_ALLOW_THREADS
49365  try {
49366  (arg1)->train(arg2,(float const *)arg3);
49367  } catch(faiss::FaissException & e) {
49368  PyEval_RestoreThread(_save);
49369  PyErr_SetString(PyExc_RuntimeError, e.what());
49370  SWIG_fail;
49371  }
49372  Py_END_ALLOW_THREADS
49373  }
49374  resultobj = SWIG_Py_Void();
49375  return resultobj;
49376 fail:
49377  return NULL;
49378 }
49379 
49380 
49381 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49382  PyObject *resultobj = 0;
49384  faiss::Index::idx_t arg2 ;
49385  float *arg3 = (float *) 0 ;
49386  long *arg4 = (long *) 0 ;
49387  void *argp1 = 0 ;
49388  int res1 = 0 ;
49389  long val2 ;
49390  int ecode2 = 0 ;
49391  void *argp3 = 0 ;
49392  int res3 = 0 ;
49393  void *argp4 = 0 ;
49394  int res4 = 0 ;
49395  PyObject * obj0 = 0 ;
49396  PyObject * obj1 = 0 ;
49397  PyObject * obj2 = 0 ;
49398  PyObject * obj3 = 0 ;
49399 
49400  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlatDedup_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
49401  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49402  if (!SWIG_IsOK(res1)) {
49403  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
49404  }
49405  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49406  ecode2 = SWIG_AsVal_long(obj1, &val2);
49407  if (!SWIG_IsOK(ecode2)) {
49408  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
49409  }
49410  arg2 = static_cast< faiss::Index::idx_t >(val2);
49411  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
49412  if (!SWIG_IsOK(res3)) {
49413  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "3"" of type '" "float const *""'");
49414  }
49415  arg3 = reinterpret_cast< float * >(argp3);
49416  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
49417  if (!SWIG_IsOK(res4)) {
49418  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "4"" of type '" "long const *""'");
49419  }
49420  arg4 = reinterpret_cast< long * >(argp4);
49421  {
49422  Py_BEGIN_ALLOW_THREADS
49423  try {
49424  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
49425  } catch(faiss::FaissException & e) {
49426  PyEval_RestoreThread(_save);
49427  PyErr_SetString(PyExc_RuntimeError, e.what());
49428  SWIG_fail;
49429  }
49430  Py_END_ALLOW_THREADS
49431  }
49432  resultobj = SWIG_Py_Void();
49433  return resultobj;
49434 fail:
49435  return NULL;
49436 }
49437 
49438 
49439 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49440  PyObject *resultobj = 0;
49442  faiss::Index::idx_t arg2 ;
49443  float *arg3 = (float *) 0 ;
49444  faiss::Index::idx_t arg4 ;
49446  float *arg6 = (float *) 0 ;
49447  float *arg7 = (float *) 0 ;
49449  bool arg9 ;
49451  void *argp1 = 0 ;
49452  int res1 = 0 ;
49453  long val2 ;
49454  int ecode2 = 0 ;
49455  void *argp3 = 0 ;
49456  int res3 = 0 ;
49457  long val4 ;
49458  int ecode4 = 0 ;
49459  void *argp5 = 0 ;
49460  int res5 = 0 ;
49461  void *argp6 = 0 ;
49462  int res6 = 0 ;
49463  void *argp7 = 0 ;
49464  int res7 = 0 ;
49465  void *argp8 = 0 ;
49466  int res8 = 0 ;
49467  bool val9 ;
49468  int ecode9 = 0 ;
49469  void *argp10 = 0 ;
49470  int res10 = 0 ;
49471  PyObject * obj0 = 0 ;
49472  PyObject * obj1 = 0 ;
49473  PyObject * obj2 = 0 ;
49474  PyObject * obj3 = 0 ;
49475  PyObject * obj4 = 0 ;
49476  PyObject * obj5 = 0 ;
49477  PyObject * obj6 = 0 ;
49478  PyObject * obj7 = 0 ;
49479  PyObject * obj8 = 0 ;
49480  PyObject * obj9 = 0 ;
49481 
49482  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexIVFFlatDedup_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
49483  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49484  if (!SWIG_IsOK(res1)) {
49485  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
49486  }
49487  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49488  ecode2 = SWIG_AsVal_long(obj1, &val2);
49489  if (!SWIG_IsOK(ecode2)) {
49490  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
49491  }
49492  arg2 = static_cast< faiss::Index::idx_t >(val2);
49493  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
49494  if (!SWIG_IsOK(res3)) {
49495  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "3"" of type '" "float const *""'");
49496  }
49497  arg3 = reinterpret_cast< float * >(argp3);
49498  ecode4 = SWIG_AsVal_long(obj3, &val4);
49499  if (!SWIG_IsOK(ecode4)) {
49500  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
49501  }
49502  arg4 = static_cast< faiss::Index::idx_t >(val4);
49503  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
49504  if (!SWIG_IsOK(res5)) {
49505  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
49506  }
49507  arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
49508  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
49509  if (!SWIG_IsOK(res6)) {
49510  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "6"" of type '" "float const *""'");
49511  }
49512  arg6 = reinterpret_cast< float * >(argp6);
49513  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
49514  if (!SWIG_IsOK(res7)) {
49515  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "7"" of type '" "float *""'");
49516  }
49517  arg7 = reinterpret_cast< float * >(argp7);
49518  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
49519  if (!SWIG_IsOK(res8)) {
49520  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
49521  }
49522  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
49523  ecode9 = SWIG_AsVal_bool(obj8, &val9);
49524  if (!SWIG_IsOK(ecode9)) {
49525  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "9"" of type '" "bool""'");
49526  }
49527  arg9 = static_cast< bool >(val9);
49528  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
49529  if (!SWIG_IsOK(res10)) {
49530  SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
49531  }
49532  arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
49533  {
49534  Py_BEGIN_ALLOW_THREADS
49535  try {
49536  ((faiss::IndexIVFFlatDedup const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
49537  } catch(faiss::FaissException & e) {
49538  PyEval_RestoreThread(_save);
49539  PyErr_SetString(PyExc_RuntimeError, e.what());
49540  SWIG_fail;
49541  }
49542  Py_END_ALLOW_THREADS
49543  }
49544  resultobj = SWIG_Py_Void();
49545  return resultobj;
49546 fail:
49547  return NULL;
49548 }
49549 
49550 
49551 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49552  PyObject *resultobj = 0;
49554  faiss::Index::idx_t arg2 ;
49555  float *arg3 = (float *) 0 ;
49556  faiss::Index::idx_t arg4 ;
49558  float *arg6 = (float *) 0 ;
49559  float *arg7 = (float *) 0 ;
49561  bool arg9 ;
49562  void *argp1 = 0 ;
49563  int res1 = 0 ;
49564  long val2 ;
49565  int ecode2 = 0 ;
49566  void *argp3 = 0 ;
49567  int res3 = 0 ;
49568  long val4 ;
49569  int ecode4 = 0 ;
49570  void *argp5 = 0 ;
49571  int res5 = 0 ;
49572  void *argp6 = 0 ;
49573  int res6 = 0 ;
49574  void *argp7 = 0 ;
49575  int res7 = 0 ;
49576  void *argp8 = 0 ;
49577  int res8 = 0 ;
49578  bool val9 ;
49579  int ecode9 = 0 ;
49580  PyObject * obj0 = 0 ;
49581  PyObject * obj1 = 0 ;
49582  PyObject * obj2 = 0 ;
49583  PyObject * obj3 = 0 ;
49584  PyObject * obj4 = 0 ;
49585  PyObject * obj5 = 0 ;
49586  PyObject * obj6 = 0 ;
49587  PyObject * obj7 = 0 ;
49588  PyObject * obj8 = 0 ;
49589 
49590  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexIVFFlatDedup_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
49591  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49592  if (!SWIG_IsOK(res1)) {
49593  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
49594  }
49595  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49596  ecode2 = SWIG_AsVal_long(obj1, &val2);
49597  if (!SWIG_IsOK(ecode2)) {
49598  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
49599  }
49600  arg2 = static_cast< faiss::Index::idx_t >(val2);
49601  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
49602  if (!SWIG_IsOK(res3)) {
49603  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "3"" of type '" "float const *""'");
49604  }
49605  arg3 = reinterpret_cast< float * >(argp3);
49606  ecode4 = SWIG_AsVal_long(obj3, &val4);
49607  if (!SWIG_IsOK(ecode4)) {
49608  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
49609  }
49610  arg4 = static_cast< faiss::Index::idx_t >(val4);
49611  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
49612  if (!SWIG_IsOK(res5)) {
49613  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
49614  }
49615  arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
49616  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
49617  if (!SWIG_IsOK(res6)) {
49618  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "6"" of type '" "float const *""'");
49619  }
49620  arg6 = reinterpret_cast< float * >(argp6);
49621  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
49622  if (!SWIG_IsOK(res7)) {
49623  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "7"" of type '" "float *""'");
49624  }
49625  arg7 = reinterpret_cast< float * >(argp7);
49626  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
49627  if (!SWIG_IsOK(res8)) {
49628  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
49629  }
49630  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
49631  ecode9 = SWIG_AsVal_bool(obj8, &val9);
49632  if (!SWIG_IsOK(ecode9)) {
49633  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "9"" of type '" "bool""'");
49634  }
49635  arg9 = static_cast< bool >(val9);
49636  {
49637  Py_BEGIN_ALLOW_THREADS
49638  try {
49639  ((faiss::IndexIVFFlatDedup const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
49640  } catch(faiss::FaissException & e) {
49641  PyEval_RestoreThread(_save);
49642  PyErr_SetString(PyExc_RuntimeError, e.what());
49643  SWIG_fail;
49644  }
49645  Py_END_ALLOW_THREADS
49646  }
49647  resultobj = SWIG_Py_Void();
49648  return resultobj;
49649 fail:
49650  return NULL;
49651 }
49652 
49653 
49654 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_search_preassigned(PyObject *self, PyObject *args) {
49655  Py_ssize_t argc;
49656  PyObject *argv[11] = {
49657  0
49658  };
49659  Py_ssize_t ii;
49660 
49661  if (!PyTuple_Check(args)) SWIG_fail;
49662  argc = args ? PyObject_Length(args) : 0;
49663  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
49664  argv[ii] = PyTuple_GET_ITEM(args,ii);
49665  }
49666  if (argc == 9) {
49667  int _v;
49668  void *vptr = 0;
49669  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0);
49670  _v = SWIG_CheckState(res);
49671  if (_v) {
49672  {
49673  int res = SWIG_AsVal_long(argv[1], NULL);
49674  _v = SWIG_CheckState(res);
49675  }
49676  if (_v) {
49677  void *vptr = 0;
49678  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
49679  _v = SWIG_CheckState(res);
49680  if (_v) {
49681  {
49682  int res = SWIG_AsVal_long(argv[3], NULL);
49683  _v = SWIG_CheckState(res);
49684  }
49685  if (_v) {
49686  void *vptr = 0;
49687  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
49688  _v = SWIG_CheckState(res);
49689  if (_v) {
49690  void *vptr = 0;
49691  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
49692  _v = SWIG_CheckState(res);
49693  if (_v) {
49694  void *vptr = 0;
49695  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
49696  _v = SWIG_CheckState(res);
49697  if (_v) {
49698  void *vptr = 0;
49699  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
49700  _v = SWIG_CheckState(res);
49701  if (_v) {
49702  {
49703  int res = SWIG_AsVal_bool(argv[8], NULL);
49704  _v = SWIG_CheckState(res);
49705  }
49706  if (_v) {
49707  return _wrap_IndexIVFFlatDedup_search_preassigned__SWIG_1(self, args);
49708  }
49709  }
49710  }
49711  }
49712  }
49713  }
49714  }
49715  }
49716  }
49717  }
49718  if (argc == 10) {
49719  int _v;
49720  void *vptr = 0;
49721  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0);
49722  _v = SWIG_CheckState(res);
49723  if (_v) {
49724  {
49725  int res = SWIG_AsVal_long(argv[1], NULL);
49726  _v = SWIG_CheckState(res);
49727  }
49728  if (_v) {
49729  void *vptr = 0;
49730  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
49731  _v = SWIG_CheckState(res);
49732  if (_v) {
49733  {
49734  int res = SWIG_AsVal_long(argv[3], NULL);
49735  _v = SWIG_CheckState(res);
49736  }
49737  if (_v) {
49738  void *vptr = 0;
49739  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
49740  _v = SWIG_CheckState(res);
49741  if (_v) {
49742  void *vptr = 0;
49743  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
49744  _v = SWIG_CheckState(res);
49745  if (_v) {
49746  void *vptr = 0;
49747  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
49748  _v = SWIG_CheckState(res);
49749  if (_v) {
49750  void *vptr = 0;
49751  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
49752  _v = SWIG_CheckState(res);
49753  if (_v) {
49754  {
49755  int res = SWIG_AsVal_bool(argv[8], NULL);
49756  _v = SWIG_CheckState(res);
49757  }
49758  if (_v) {
49759  void *vptr = 0;
49760  int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
49761  _v = SWIG_CheckState(res);
49762  if (_v) {
49763  return _wrap_IndexIVFFlatDedup_search_preassigned__SWIG_0(self, args);
49764  }
49765  }
49766  }
49767  }
49768  }
49769  }
49770  }
49771  }
49772  }
49773  }
49774  }
49775 
49776 fail:
49777  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFFlatDedup_search_preassigned'.\n"
49778  " Possible C/C++ prototypes are:\n"
49779  " faiss::IndexIVFFlatDedup::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
49780  " faiss::IndexIVFFlatDedup::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool) const\n");
49781  return 0;
49782 }
49783 
49784 
49785 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49786  PyObject *resultobj = 0;
49788  faiss::IDSelector *arg2 = 0 ;
49789  void *argp1 = 0 ;
49790  int res1 = 0 ;
49791  void *argp2 = 0 ;
49792  int res2 = 0 ;
49793  PyObject * obj0 = 0 ;
49794  PyObject * obj1 = 0 ;
49795  long result;
49796 
49797  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFFlatDedup_remove_ids",&obj0,&obj1)) SWIG_fail;
49798  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49799  if (!SWIG_IsOK(res1)) {
49800  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_remove_ids" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
49801  }
49802  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49803  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
49804  if (!SWIG_IsOK(res2)) {
49805  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFFlatDedup_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
49806  }
49807  if (!argp2) {
49808  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFFlatDedup_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
49809  }
49810  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
49811  {
49812  Py_BEGIN_ALLOW_THREADS
49813  try {
49814  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
49815  } catch(faiss::FaissException & e) {
49816  PyEval_RestoreThread(_save);
49817  PyErr_SetString(PyExc_RuntimeError, e.what());
49818  SWIG_fail;
49819  }
49820  Py_END_ALLOW_THREADS
49821  }
49822  resultobj = SWIG_From_long(static_cast< long >(result));
49823  return resultobj;
49824 fail:
49825  return NULL;
49826 }
49827 
49828 
49829 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49830  PyObject *resultobj = 0;
49832  faiss::Index::idx_t arg2 ;
49833  float *arg3 = (float *) 0 ;
49834  float arg4 ;
49836  void *argp1 = 0 ;
49837  int res1 = 0 ;
49838  long val2 ;
49839  int ecode2 = 0 ;
49840  void *argp3 = 0 ;
49841  int res3 = 0 ;
49842  float val4 ;
49843  int ecode4 = 0 ;
49844  void *argp5 = 0 ;
49845  int res5 = 0 ;
49846  PyObject * obj0 = 0 ;
49847  PyObject * obj1 = 0 ;
49848  PyObject * obj2 = 0 ;
49849  PyObject * obj3 = 0 ;
49850  PyObject * obj4 = 0 ;
49851 
49852  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlatDedup_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
49853  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49854  if (!SWIG_IsOK(res1)) {
49855  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
49856  }
49857  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49858  ecode2 = SWIG_AsVal_long(obj1, &val2);
49859  if (!SWIG_IsOK(ecode2)) {
49860  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
49861  }
49862  arg2 = static_cast< faiss::Index::idx_t >(val2);
49863  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
49864  if (!SWIG_IsOK(res3)) {
49865  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "3"" of type '" "float const *""'");
49866  }
49867  arg3 = reinterpret_cast< float * >(argp3);
49868  ecode4 = SWIG_AsVal_float(obj3, &val4);
49869  if (!SWIG_IsOK(ecode4)) {
49870  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "4"" of type '" "float""'");
49871  }
49872  arg4 = static_cast< float >(val4);
49873  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
49874  if (!SWIG_IsOK(res5)) {
49875  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
49876  }
49877  arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
49878  {
49879  Py_BEGIN_ALLOW_THREADS
49880  try {
49881  ((faiss::IndexIVFFlatDedup const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
49882  } catch(faiss::FaissException & e) {
49883  PyEval_RestoreThread(_save);
49884  PyErr_SetString(PyExc_RuntimeError, e.what());
49885  SWIG_fail;
49886  }
49887  Py_END_ALLOW_THREADS
49888  }
49889  resultobj = SWIG_Py_Void();
49890  return resultobj;
49891 fail:
49892  return NULL;
49893 }
49894 
49895 
49896 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_update_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49897  PyObject *resultobj = 0;
49899  int arg2 ;
49901  float *arg4 = (float *) 0 ;
49902  void *argp1 = 0 ;
49903  int res1 = 0 ;
49904  int val2 ;
49905  int ecode2 = 0 ;
49906  void *argp3 = 0 ;
49907  int res3 = 0 ;
49908  void *argp4 = 0 ;
49909  int res4 = 0 ;
49910  PyObject * obj0 = 0 ;
49911  PyObject * obj1 = 0 ;
49912  PyObject * obj2 = 0 ;
49913  PyObject * obj3 = 0 ;
49914 
49915  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlatDedup_update_vectors",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
49916  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49917  if (!SWIG_IsOK(res1)) {
49918  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
49919  }
49920  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49921  ecode2 = SWIG_AsVal_int(obj1, &val2);
49922  if (!SWIG_IsOK(ecode2)) {
49923  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "2"" of type '" "int""'");
49924  }
49925  arg2 = static_cast< int >(val2);
49926  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
49927  if (!SWIG_IsOK(res3)) {
49928  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "3"" of type '" "faiss::Index::idx_t *""'");
49929  }
49930  arg3 = reinterpret_cast< faiss::Index::idx_t * >(argp3);
49931  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
49932  if (!SWIG_IsOK(res4)) {
49933  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "4"" of type '" "float const *""'");
49934  }
49935  arg4 = reinterpret_cast< float * >(argp4);
49936  {
49937  Py_BEGIN_ALLOW_THREADS
49938  try {
49939  (arg1)->update_vectors(arg2,arg3,(float const *)arg4);
49940  } catch(faiss::FaissException & e) {
49941  PyEval_RestoreThread(_save);
49942  PyErr_SetString(PyExc_RuntimeError, e.what());
49943  SWIG_fail;
49944  }
49945  Py_END_ALLOW_THREADS
49946  }
49947  resultobj = SWIG_Py_Void();
49948  return resultobj;
49949 fail:
49950  return NULL;
49951 }
49952 
49953 
49954 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49955  PyObject *resultobj = 0;
49957  long arg2 ;
49958  long arg3 ;
49959  float *arg4 = (float *) 0 ;
49960  void *argp1 = 0 ;
49961  int res1 = 0 ;
49962  long val2 ;
49963  int ecode2 = 0 ;
49964  long val3 ;
49965  int ecode3 = 0 ;
49966  void *argp4 = 0 ;
49967  int res4 = 0 ;
49968  PyObject * obj0 = 0 ;
49969  PyObject * obj1 = 0 ;
49970  PyObject * obj2 = 0 ;
49971  PyObject * obj3 = 0 ;
49972 
49973  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlatDedup_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
49974  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
49975  if (!SWIG_IsOK(res1)) {
49976  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
49977  }
49978  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
49979  ecode2 = SWIG_AsVal_long(obj1, &val2);
49980  if (!SWIG_IsOK(ecode2)) {
49981  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
49982  }
49983  arg2 = static_cast< long >(val2);
49984  ecode3 = SWIG_AsVal_long(obj2, &val3);
49985  if (!SWIG_IsOK(ecode3)) {
49986  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
49987  }
49988  arg3 = static_cast< long >(val3);
49989  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
49990  if (!SWIG_IsOK(res4)) {
49991  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
49992  }
49993  arg4 = reinterpret_cast< float * >(argp4);
49994  {
49995  Py_BEGIN_ALLOW_THREADS
49996  try {
49997  ((faiss::IndexIVFFlatDedup const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
49998  } catch(faiss::FaissException & e) {
49999  PyEval_RestoreThread(_save);
50000  PyErr_SetString(PyExc_RuntimeError, e.what());
50001  SWIG_fail;
50002  }
50003  Py_END_ALLOW_THREADS
50004  }
50005  resultobj = SWIG_Py_Void();
50006  return resultobj;
50007 fail:
50008  return NULL;
50009 }
50010 
50011 
50012 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50013  PyObject *resultobj = 0;
50014  faiss::IndexIVFFlatDedup *result = 0 ;
50015 
50016  if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFFlatDedup")) SWIG_fail;
50017  {
50018  Py_BEGIN_ALLOW_THREADS
50019  try {
50021  } catch(faiss::FaissException & e) {
50022  PyEval_RestoreThread(_save);
50023  PyErr_SetString(PyExc_RuntimeError, e.what());
50024  SWIG_fail;
50025  }
50026  Py_END_ALLOW_THREADS
50027  }
50028  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_NEW | 0 );
50029  return resultobj;
50030 fail:
50031  return NULL;
50032 }
50033 
50034 
50035 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup(PyObject *self, PyObject *args) {
50036  Py_ssize_t argc;
50037  PyObject *argv[5] = {
50038  0
50039  };
50040  Py_ssize_t ii;
50041 
50042  if (!PyTuple_Check(args)) SWIG_fail;
50043  argc = args ? PyObject_Length(args) : 0;
50044  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
50045  argv[ii] = PyTuple_GET_ITEM(args,ii);
50046  }
50047  if (argc == 0) {
50048  return _wrap_new_IndexIVFFlatDedup__SWIG_2(self, args);
50049  }
50050  if (argc == 3) {
50051  int _v;
50052  void *vptr = 0;
50053  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
50054  _v = SWIG_CheckState(res);
50055  if (_v) {
50056  {
50057  int res = SWIG_AsVal_size_t(argv[1], NULL);
50058  _v = SWIG_CheckState(res);
50059  }
50060  if (_v) {
50061  {
50062  int res = SWIG_AsVal_size_t(argv[2], NULL);
50063  _v = SWIG_CheckState(res);
50064  }
50065  if (_v) {
50066  return _wrap_new_IndexIVFFlatDedup__SWIG_1(self, args);
50067  }
50068  }
50069  }
50070  }
50071  if (argc == 4) {
50072  int _v;
50073  void *vptr = 0;
50074  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
50075  _v = SWIG_CheckState(res);
50076  if (_v) {
50077  {
50078  int res = SWIG_AsVal_size_t(argv[1], NULL);
50079  _v = SWIG_CheckState(res);
50080  }
50081  if (_v) {
50082  {
50083  int res = SWIG_AsVal_size_t(argv[2], NULL);
50084  _v = SWIG_CheckState(res);
50085  }
50086  if (_v) {
50087  {
50088  int res = SWIG_AsVal_int(argv[3], NULL);
50089  _v = SWIG_CheckState(res);
50090  }
50091  if (_v) {
50092  return _wrap_new_IndexIVFFlatDedup__SWIG_0(self, args);
50093  }
50094  }
50095  }
50096  }
50097  }
50098 
50099 fail:
50100  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFFlatDedup'.\n"
50101  " Possible C/C++ prototypes are:\n"
50102  " faiss::IndexIVFFlatDedup::IndexIVFFlatDedup(faiss::Index *,size_t,size_t,faiss::MetricType)\n"
50103  " faiss::IndexIVFFlatDedup::IndexIVFFlatDedup(faiss::Index *,size_t,size_t)\n"
50104  " faiss::IndexIVFFlatDedup::IndexIVFFlatDedup()\n");
50105  return 0;
50106 }
50107 
50108 
50109 SWIGINTERN PyObject *_wrap_delete_IndexIVFFlatDedup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50110  PyObject *resultobj = 0;
50112  void *argp1 = 0 ;
50113  int res1 = 0 ;
50114  PyObject * obj0 = 0 ;
50115 
50116  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFFlatDedup",&obj0)) SWIG_fail;
50117  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_DISOWN | 0 );
50118  if (!SWIG_IsOK(res1)) {
50119  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFFlatDedup" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
50120  }
50121  arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
50122  delete arg1;
50123  resultobj = SWIG_Py_Void();
50124  return resultobj;
50125 fail:
50126  return NULL;
50127 }
50128 
50129 
50130 SWIGINTERN PyObject *IndexIVFFlatDedup_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50131  PyObject *obj;
50132  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
50133  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_NewClientData(obj));
50134  return SWIG_Py_Void();
50135 }
50136 
50137 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_lists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50138  PyObject *resultobj = 0;
50140  std::vector< faiss::OnDiskInvertedLists::List > *arg2 = (std::vector< faiss::OnDiskInvertedLists::List > *) 0 ;
50141  void *argp1 = 0 ;
50142  int res1 = 0 ;
50143  void *argp2 = 0 ;
50144  int res2 = 0 ;
50145  PyObject * obj0 = 0 ;
50146  PyObject * obj1 = 0 ;
50147 
50148  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_lists_set",&obj0,&obj1)) SWIG_fail;
50149  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50150  if (!SWIG_IsOK(res1)) {
50151  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_lists_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50152  }
50153  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50154  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__OnDiskInvertedLists__List_t, 0 | 0 );
50155  if (!SWIG_IsOK(res2)) {
50156  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_lists_set" "', argument " "2"" of type '" "std::vector< faiss::OnDiskInvertedLists::List > *""'");
50157  }
50158  arg2 = reinterpret_cast< std::vector< faiss::OnDiskInvertedLists::List > * >(argp2);
50159  if (arg1) (arg1)->lists = *arg2;
50160  resultobj = SWIG_Py_Void();
50161  return resultobj;
50162 fail:
50163  return NULL;
50164 }
50165 
50166 
50167 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_lists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50168  PyObject *resultobj = 0;
50170  void *argp1 = 0 ;
50171  int res1 = 0 ;
50172  PyObject * obj0 = 0 ;
50173  std::vector< faiss::OnDiskInvertedLists::List > *result = 0 ;
50174 
50175  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_lists_get",&obj0)) SWIG_fail;
50176  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50177  if (!SWIG_IsOK(res1)) {
50178  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_lists_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50179  }
50180  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50181  result = (std::vector< faiss::OnDiskInvertedLists::List > *)& ((arg1)->lists);
50182  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OnDiskInvertedLists__List_t, 0 | 0 );
50183  return resultobj;
50184 fail:
50185  return NULL;
50186 }
50187 
50188 
50189 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_slots_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50190  PyObject *resultobj = 0;
50192  std::list< faiss::OnDiskInvertedLists::Slot > *arg2 = (std::list< faiss::OnDiskInvertedLists::Slot > *) 0 ;
50193  void *argp1 = 0 ;
50194  int res1 = 0 ;
50195  void *argp2 = 0 ;
50196  int res2 = 0 ;
50197  PyObject * obj0 = 0 ;
50198  PyObject * obj1 = 0 ;
50199 
50200  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_slots_set",&obj0,&obj1)) SWIG_fail;
50201  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50202  if (!SWIG_IsOK(res1)) {
50203  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_slots_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50204  }
50205  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50206  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t, 0 | 0 );
50207  if (!SWIG_IsOK(res2)) {
50208  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_slots_set" "', argument " "2"" of type '" "std::list< faiss::OnDiskInvertedLists::Slot > *""'");
50209  }
50210  arg2 = reinterpret_cast< std::list< faiss::OnDiskInvertedLists::Slot > * >(argp2);
50211  if (arg1) (arg1)->slots = *arg2;
50212  resultobj = SWIG_Py_Void();
50213  return resultobj;
50214 fail:
50215  return NULL;
50216 }
50217 
50218 
50219 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_slots_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50220  PyObject *resultobj = 0;
50222  void *argp1 = 0 ;
50223  int res1 = 0 ;
50224  PyObject * obj0 = 0 ;
50225  std::list< faiss::OnDiskInvertedLists::Slot > *result = 0 ;
50226 
50227  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_slots_get",&obj0)) SWIG_fail;
50228  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50229  if (!SWIG_IsOK(res1)) {
50230  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_slots_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50231  }
50232  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50233  result = (std::list< faiss::OnDiskInvertedLists::Slot > *)& ((arg1)->slots);
50234  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t, 0 | 0 );
50235  return resultobj;
50236 fail:
50237  return NULL;
50238 }
50239 
50240 
50241 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_filename_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50242  PyObject *resultobj = 0;
50244  std::string *arg2 = 0 ;
50245  void *argp1 = 0 ;
50246  int res1 = 0 ;
50247  int res2 = SWIG_OLDOBJ ;
50248  PyObject * obj0 = 0 ;
50249  PyObject * obj1 = 0 ;
50250 
50251  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_filename_set",&obj0,&obj1)) SWIG_fail;
50252  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50253  if (!SWIG_IsOK(res1)) {
50254  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_filename_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50255  }
50256  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50257  {
50258  std::string *ptr = (std::string *)0;
50259  res2 = SWIG_AsPtr_std_string(obj1, &ptr);
50260  if (!SWIG_IsOK(res2)) {
50261  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_filename_set" "', argument " "2"" of type '" "std::string const &""'");
50262  }
50263  if (!ptr) {
50264  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OnDiskInvertedLists_filename_set" "', argument " "2"" of type '" "std::string const &""'");
50265  }
50266  arg2 = ptr;
50267  }
50268  if (arg1) (arg1)->filename = *arg2;
50269  resultobj = SWIG_Py_Void();
50270  if (SWIG_IsNewObj(res2)) delete arg2;
50271  return resultobj;
50272 fail:
50273  if (SWIG_IsNewObj(res2)) delete arg2;
50274  return NULL;
50275 }
50276 
50277 
50278 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_filename_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50279  PyObject *resultobj = 0;
50281  void *argp1 = 0 ;
50282  int res1 = 0 ;
50283  PyObject * obj0 = 0 ;
50284  std::string *result = 0 ;
50285 
50286  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_filename_get",&obj0)) SWIG_fail;
50287  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50288  if (!SWIG_IsOK(res1)) {
50289  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_filename_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50290  }
50291  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50292  result = (std::string *) & ((arg1)->filename);
50293  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
50294  return resultobj;
50295 fail:
50296  return NULL;
50297 }
50298 
50299 
50300 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_totsize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50301  PyObject *resultobj = 0;
50303  size_t arg2 ;
50304  void *argp1 = 0 ;
50305  int res1 = 0 ;
50306  size_t val2 ;
50307  int ecode2 = 0 ;
50308  PyObject * obj0 = 0 ;
50309  PyObject * obj1 = 0 ;
50310 
50311  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_totsize_set",&obj0,&obj1)) SWIG_fail;
50312  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50313  if (!SWIG_IsOK(res1)) {
50314  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_totsize_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50315  }
50316  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50317  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50318  if (!SWIG_IsOK(ecode2)) {
50319  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_totsize_set" "', argument " "2"" of type '" "size_t""'");
50320  }
50321  arg2 = static_cast< size_t >(val2);
50322  if (arg1) (arg1)->totsize = arg2;
50323  resultobj = SWIG_Py_Void();
50324  return resultobj;
50325 fail:
50326  return NULL;
50327 }
50328 
50329 
50330 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_totsize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50331  PyObject *resultobj = 0;
50333  void *argp1 = 0 ;
50334  int res1 = 0 ;
50335  PyObject * obj0 = 0 ;
50336  size_t result;
50337 
50338  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_totsize_get",&obj0)) SWIG_fail;
50339  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50340  if (!SWIG_IsOK(res1)) {
50341  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_totsize_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50342  }
50343  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50344  result = (size_t) ((arg1)->totsize);
50345  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
50346  return resultobj;
50347 fail:
50348  return NULL;
50349 }
50350 
50351 
50352 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_ptr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50353  PyObject *resultobj = 0;
50355  uint8_t *arg2 = (uint8_t *) 0 ;
50356  void *argp1 = 0 ;
50357  int res1 = 0 ;
50358  void *argp2 = 0 ;
50359  int res2 = 0 ;
50360  PyObject * obj0 = 0 ;
50361  PyObject * obj1 = 0 ;
50362 
50363  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_ptr_set",&obj0,&obj1)) SWIG_fail;
50364  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50365  if (!SWIG_IsOK(res1)) {
50366  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_ptr_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50367  }
50368  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50369  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, SWIG_POINTER_DISOWN | 0 );
50370  if (!SWIG_IsOK(res2)) {
50371  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_ptr_set" "', argument " "2"" of type '" "uint8_t *""'");
50372  }
50373  arg2 = reinterpret_cast< uint8_t * >(argp2);
50374  if (arg1) (arg1)->ptr = arg2;
50375  resultobj = SWIG_Py_Void();
50376  return resultobj;
50377 fail:
50378  return NULL;
50379 }
50380 
50381 
50382 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_ptr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50383  PyObject *resultobj = 0;
50385  void *argp1 = 0 ;
50386  int res1 = 0 ;
50387  PyObject * obj0 = 0 ;
50388  uint8_t *result = 0 ;
50389 
50390  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_ptr_get",&obj0)) SWIG_fail;
50391  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50392  if (!SWIG_IsOK(res1)) {
50393  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_ptr_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50394  }
50395  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50396  result = (uint8_t *) ((arg1)->ptr);
50397  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
50398  return resultobj;
50399 fail:
50400  return NULL;
50401 }
50402 
50403 
50404 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_read_only_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50405  PyObject *resultobj = 0;
50407  bool arg2 ;
50408  void *argp1 = 0 ;
50409  int res1 = 0 ;
50410  bool val2 ;
50411  int ecode2 = 0 ;
50412  PyObject * obj0 = 0 ;
50413  PyObject * obj1 = 0 ;
50414 
50415  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_read_only_set",&obj0,&obj1)) SWIG_fail;
50416  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50417  if (!SWIG_IsOK(res1)) {
50418  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_read_only_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50419  }
50420  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50421  ecode2 = SWIG_AsVal_bool(obj1, &val2);
50422  if (!SWIG_IsOK(ecode2)) {
50423  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_read_only_set" "', argument " "2"" of type '" "bool""'");
50424  }
50425  arg2 = static_cast< bool >(val2);
50426  if (arg1) (arg1)->read_only = arg2;
50427  resultobj = SWIG_Py_Void();
50428  return resultobj;
50429 fail:
50430  return NULL;
50431 }
50432 
50433 
50434 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_read_only_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50435  PyObject *resultobj = 0;
50437  void *argp1 = 0 ;
50438  int res1 = 0 ;
50439  PyObject * obj0 = 0 ;
50440  bool result;
50441 
50442  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_read_only_get",&obj0)) SWIG_fail;
50443  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50444  if (!SWIG_IsOK(res1)) {
50445  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_read_only_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50446  }
50447  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50448  result = (bool) ((arg1)->read_only);
50449  resultobj = SWIG_From_bool(static_cast< bool >(result));
50450  return resultobj;
50451 fail:
50452  return NULL;
50453 }
50454 
50455 
50456 SWIGINTERN PyObject *_wrap_new_OnDiskInvertedLists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50457  PyObject *resultobj = 0;
50458  size_t arg1 ;
50459  size_t arg2 ;
50460  char *arg3 = (char *) 0 ;
50461  size_t val1 ;
50462  int ecode1 = 0 ;
50463  size_t val2 ;
50464  int ecode2 = 0 ;
50465  int res3 ;
50466  char *buf3 = 0 ;
50467  int alloc3 = 0 ;
50468  PyObject * obj0 = 0 ;
50469  PyObject * obj1 = 0 ;
50470  PyObject * obj2 = 0 ;
50471  faiss::OnDiskInvertedLists *result = 0 ;
50472 
50473  if (!PyArg_ParseTuple(args,(char *)"OOO:new_OnDiskInvertedLists",&obj0,&obj1,&obj2)) SWIG_fail;
50474  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
50475  if (!SWIG_IsOK(ecode1)) {
50476  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OnDiskInvertedLists" "', argument " "1"" of type '" "size_t""'");
50477  }
50478  arg1 = static_cast< size_t >(val1);
50479  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50480  if (!SWIG_IsOK(ecode2)) {
50481  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OnDiskInvertedLists" "', argument " "2"" of type '" "size_t""'");
50482  }
50483  arg2 = static_cast< size_t >(val2);
50484  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
50485  if (!SWIG_IsOK(res3)) {
50486  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OnDiskInvertedLists" "', argument " "3"" of type '" "char const *""'");
50487  }
50488  arg3 = reinterpret_cast< char * >(buf3);
50489  {
50490  Py_BEGIN_ALLOW_THREADS
50491  try {
50492  result = (faiss::OnDiskInvertedLists *)new faiss::OnDiskInvertedLists(arg1,arg2,(char const *)arg3);
50493  } catch(faiss::FaissException & e) {
50494  PyEval_RestoreThread(_save);
50495  PyErr_SetString(PyExc_RuntimeError, e.what());
50496  SWIG_fail;
50497  }
50498  Py_END_ALLOW_THREADS
50499  }
50500  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_POINTER_NEW | 0 );
50501  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
50502  return resultobj;
50503 fail:
50504  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
50505  return NULL;
50506 }
50507 
50508 
50509 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50510  PyObject *resultobj = 0;
50512  size_t arg2 ;
50513  void *argp1 = 0 ;
50514  int res1 = 0 ;
50515  size_t val2 ;
50516  int ecode2 = 0 ;
50517  PyObject * obj0 = 0 ;
50518  PyObject * obj1 = 0 ;
50519  size_t result;
50520 
50521  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
50522  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50523  if (!SWIG_IsOK(res1)) {
50524  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_list_size" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
50525  }
50526  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50527  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50528  if (!SWIG_IsOK(ecode2)) {
50529  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
50530  }
50531  arg2 = static_cast< size_t >(val2);
50532  {
50533  Py_BEGIN_ALLOW_THREADS
50534  try {
50535  result = (size_t)((faiss::OnDiskInvertedLists const *)arg1)->list_size(arg2);
50536  } catch(faiss::FaissException & e) {
50537  PyEval_RestoreThread(_save);
50538  PyErr_SetString(PyExc_RuntimeError, e.what());
50539  SWIG_fail;
50540  }
50541  Py_END_ALLOW_THREADS
50542  }
50543  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
50544  return resultobj;
50545 fail:
50546  return NULL;
50547 }
50548 
50549 
50550 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50551  PyObject *resultobj = 0;
50553  size_t arg2 ;
50554  void *argp1 = 0 ;
50555  int res1 = 0 ;
50556  size_t val2 ;
50557  int ecode2 = 0 ;
50558  PyObject * obj0 = 0 ;
50559  PyObject * obj1 = 0 ;
50560  uint8_t *result = 0 ;
50561 
50562  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
50563  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50564  if (!SWIG_IsOK(res1)) {
50565  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_get_codes" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
50566  }
50567  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50568  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50569  if (!SWIG_IsOK(ecode2)) {
50570  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
50571  }
50572  arg2 = static_cast< size_t >(val2);
50573  {
50574  Py_BEGIN_ALLOW_THREADS
50575  try {
50576  result = (uint8_t *)((faiss::OnDiskInvertedLists const *)arg1)->get_codes(arg2);
50577  } catch(faiss::FaissException & e) {
50578  PyEval_RestoreThread(_save);
50579  PyErr_SetString(PyExc_RuntimeError, e.what());
50580  SWIG_fail;
50581  }
50582  Py_END_ALLOW_THREADS
50583  }
50584  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
50585  return resultobj;
50586 fail:
50587  return NULL;
50588 }
50589 
50590 
50591 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50592  PyObject *resultobj = 0;
50594  size_t arg2 ;
50595  void *argp1 = 0 ;
50596  int res1 = 0 ;
50597  size_t val2 ;
50598  int ecode2 = 0 ;
50599  PyObject * obj0 = 0 ;
50600  PyObject * obj1 = 0 ;
50601  faiss::InvertedLists::idx_t *result = 0 ;
50602 
50603  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
50604  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50605  if (!SWIG_IsOK(res1)) {
50606  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_get_ids" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
50607  }
50608  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50609  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50610  if (!SWIG_IsOK(ecode2)) {
50611  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
50612  }
50613  arg2 = static_cast< size_t >(val2);
50614  {
50615  Py_BEGIN_ALLOW_THREADS
50616  try {
50617  result = (faiss::InvertedLists::idx_t *)((faiss::OnDiskInvertedLists const *)arg1)->get_ids(arg2);
50618  } catch(faiss::FaissException & e) {
50619  PyEval_RestoreThread(_save);
50620  PyErr_SetString(PyExc_RuntimeError, e.what());
50621  SWIG_fail;
50622  }
50623  Py_END_ALLOW_THREADS
50624  }
50625  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
50626  return resultobj;
50627 fail:
50628  return NULL;
50629 }
50630 
50631 
50632 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50633  PyObject *resultobj = 0;
50635  size_t arg2 ;
50636  size_t arg3 ;
50637  faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
50638  uint8_t *arg5 = (uint8_t *) 0 ;
50639  void *argp1 = 0 ;
50640  int res1 = 0 ;
50641  size_t val2 ;
50642  int ecode2 = 0 ;
50643  size_t val3 ;
50644  int ecode3 = 0 ;
50645  void *argp4 = 0 ;
50646  int res4 = 0 ;
50647  void *argp5 = 0 ;
50648  int res5 = 0 ;
50649  PyObject * obj0 = 0 ;
50650  PyObject * obj1 = 0 ;
50651  PyObject * obj2 = 0 ;
50652  PyObject * obj3 = 0 ;
50653  PyObject * obj4 = 0 ;
50654  size_t result;
50655 
50656  if (!PyArg_ParseTuple(args,(char *)"OOOOO:OnDiskInvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
50657  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50658  if (!SWIG_IsOK(res1)) {
50659  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50660  }
50661  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50662  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50663  if (!SWIG_IsOK(ecode2)) {
50664  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
50665  }
50666  arg2 = static_cast< size_t >(val2);
50667  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
50668  if (!SWIG_IsOK(ecode3)) {
50669  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
50670  }
50671  arg3 = static_cast< size_t >(val3);
50672  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
50673  if (!SWIG_IsOK(res4)) {
50674  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
50675  }
50676  arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
50677  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
50678  if (!SWIG_IsOK(res5)) {
50679  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
50680  }
50681  arg5 = reinterpret_cast< uint8_t * >(argp5);
50682  {
50683  Py_BEGIN_ALLOW_THREADS
50684  try {
50685  result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
50686  } catch(faiss::FaissException & e) {
50687  PyEval_RestoreThread(_save);
50688  PyErr_SetString(PyExc_RuntimeError, e.what());
50689  SWIG_fail;
50690  }
50691  Py_END_ALLOW_THREADS
50692  }
50693  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
50694  return resultobj;
50695 fail:
50696  return NULL;
50697 }
50698 
50699 
50700 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50701  PyObject *resultobj = 0;
50703  size_t arg2 ;
50704  size_t arg3 ;
50705  size_t arg4 ;
50706  faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
50707  uint8_t *arg6 = (uint8_t *) 0 ;
50708  void *argp1 = 0 ;
50709  int res1 = 0 ;
50710  size_t val2 ;
50711  int ecode2 = 0 ;
50712  size_t val3 ;
50713  int ecode3 = 0 ;
50714  size_t val4 ;
50715  int ecode4 = 0 ;
50716  void *argp5 = 0 ;
50717  int res5 = 0 ;
50718  void *argp6 = 0 ;
50719  int res6 = 0 ;
50720  PyObject * obj0 = 0 ;
50721  PyObject * obj1 = 0 ;
50722  PyObject * obj2 = 0 ;
50723  PyObject * obj3 = 0 ;
50724  PyObject * obj4 = 0 ;
50725  PyObject * obj5 = 0 ;
50726 
50727  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:OnDiskInvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
50728  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50729  if (!SWIG_IsOK(res1)) {
50730  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50731  }
50732  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50733  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50734  if (!SWIG_IsOK(ecode2)) {
50735  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
50736  }
50737  arg2 = static_cast< size_t >(val2);
50738  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
50739  if (!SWIG_IsOK(ecode3)) {
50740  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
50741  }
50742  arg3 = static_cast< size_t >(val3);
50743  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
50744  if (!SWIG_IsOK(ecode4)) {
50745  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
50746  }
50747  arg4 = static_cast< size_t >(val4);
50748  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
50749  if (!SWIG_IsOK(res5)) {
50750  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
50751  }
50752  arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
50753  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
50754  if (!SWIG_IsOK(res6)) {
50755  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
50756  }
50757  arg6 = reinterpret_cast< uint8_t * >(argp6);
50758  {
50759  Py_BEGIN_ALLOW_THREADS
50760  try {
50761  (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
50762  } catch(faiss::FaissException & e) {
50763  PyEval_RestoreThread(_save);
50764  PyErr_SetString(PyExc_RuntimeError, e.what());
50765  SWIG_fail;
50766  }
50767  Py_END_ALLOW_THREADS
50768  }
50769  resultobj = SWIG_Py_Void();
50770  return resultobj;
50771 fail:
50772  return NULL;
50773 }
50774 
50775 
50776 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50777  PyObject *resultobj = 0;
50779  size_t arg2 ;
50780  size_t arg3 ;
50781  void *argp1 = 0 ;
50782  int res1 = 0 ;
50783  size_t val2 ;
50784  int ecode2 = 0 ;
50785  size_t val3 ;
50786  int ecode3 = 0 ;
50787  PyObject * obj0 = 0 ;
50788  PyObject * obj1 = 0 ;
50789  PyObject * obj2 = 0 ;
50790 
50791  if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
50792  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50793  if (!SWIG_IsOK(res1)) {
50794  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_resize" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50795  }
50796  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50797  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50798  if (!SWIG_IsOK(ecode2)) {
50799  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
50800  }
50801  arg2 = static_cast< size_t >(val2);
50802  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
50803  if (!SWIG_IsOK(ecode3)) {
50804  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
50805  }
50806  arg3 = static_cast< size_t >(val3);
50807  {
50808  Py_BEGIN_ALLOW_THREADS
50809  try {
50810  (arg1)->resize(arg2,arg3);
50811  } catch(faiss::FaissException & e) {
50812  PyEval_RestoreThread(_save);
50813  PyErr_SetString(PyExc_RuntimeError, e.what());
50814  SWIG_fail;
50815  }
50816  Py_END_ALLOW_THREADS
50817  }
50818  resultobj = SWIG_Py_Void();
50819  return resultobj;
50820 fail:
50821  return NULL;
50822 }
50823 
50824 
50825 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50826  PyObject *resultobj = 0;
50828  faiss::InvertedLists **arg2 = (faiss::InvertedLists **) 0 ;
50829  int arg3 ;
50830  void *argp1 = 0 ;
50831  int res1 = 0 ;
50832  void *argp2 = 0 ;
50833  int res2 = 0 ;
50834  int val3 ;
50835  int ecode3 = 0 ;
50836  PyObject * obj0 = 0 ;
50837  PyObject * obj1 = 0 ;
50838  PyObject * obj2 = 0 ;
50839  size_t result;
50840 
50841  if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
50842  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50843  if (!SWIG_IsOK(res1)) {
50844  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_merge_from" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50845  }
50846  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50847  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_faiss__InvertedLists, 0 | 0 );
50848  if (!SWIG_IsOK(res2)) {
50849  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_merge_from" "', argument " "2"" of type '" "faiss::InvertedLists const **""'");
50850  }
50851  arg2 = reinterpret_cast< faiss::InvertedLists ** >(argp2);
50852  ecode3 = SWIG_AsVal_int(obj2, &val3);
50853  if (!SWIG_IsOK(ecode3)) {
50854  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_merge_from" "', argument " "3"" of type '" "int""'");
50855  }
50856  arg3 = static_cast< int >(val3);
50857  {
50858  Py_BEGIN_ALLOW_THREADS
50859  try {
50860  result = (size_t)(arg1)->merge_from((faiss::InvertedLists const **)arg2,arg3);
50861  } catch(faiss::FaissException & e) {
50862  PyEval_RestoreThread(_save);
50863  PyErr_SetString(PyExc_RuntimeError, e.what());
50864  SWIG_fail;
50865  }
50866  Py_END_ALLOW_THREADS
50867  }
50868  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
50869  return resultobj;
50870 fail:
50871  return NULL;
50872 }
50873 
50874 
50875 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_prefetch_lists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50876  PyObject *resultobj = 0;
50878  long *arg2 = (long *) 0 ;
50879  int arg3 ;
50880  void *argp1 = 0 ;
50881  int res1 = 0 ;
50882  void *argp2 = 0 ;
50883  int res2 = 0 ;
50884  int val3 ;
50885  int ecode3 = 0 ;
50886  PyObject * obj0 = 0 ;
50887  PyObject * obj1 = 0 ;
50888  PyObject * obj2 = 0 ;
50889 
50890  if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_prefetch_lists",&obj0,&obj1,&obj2)) SWIG_fail;
50891  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50892  if (!SWIG_IsOK(res1)) {
50893  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_prefetch_lists" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
50894  }
50895  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50896  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
50897  if (!SWIG_IsOK(res2)) {
50898  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_prefetch_lists" "', argument " "2"" of type '" "long const *""'");
50899  }
50900  arg2 = reinterpret_cast< long * >(argp2);
50901  ecode3 = SWIG_AsVal_int(obj2, &val3);
50902  if (!SWIG_IsOK(ecode3)) {
50903  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_prefetch_lists" "', argument " "3"" of type '" "int""'");
50904  }
50905  arg3 = static_cast< int >(val3);
50906  {
50907  Py_BEGIN_ALLOW_THREADS
50908  try {
50909  ((faiss::OnDiskInvertedLists const *)arg1)->prefetch_lists((long const *)arg2,arg3);
50910  } catch(faiss::FaissException & e) {
50911  PyEval_RestoreThread(_save);
50912  PyErr_SetString(PyExc_RuntimeError, e.what());
50913  SWIG_fail;
50914  }
50915  Py_END_ALLOW_THREADS
50916  }
50917  resultobj = SWIG_Py_Void();
50918  return resultobj;
50919 fail:
50920  return NULL;
50921 }
50922 
50923 
50924 SWIGINTERN PyObject *_wrap_delete_OnDiskInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50925  PyObject *resultobj = 0;
50927  void *argp1 = 0 ;
50928  int res1 = 0 ;
50929  PyObject * obj0 = 0 ;
50930 
50931  if (!PyArg_ParseTuple(args,(char *)"O:delete_OnDiskInvertedLists",&obj0)) SWIG_fail;
50932  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_POINTER_DISOWN | 0 );
50933  if (!SWIG_IsOK(res1)) {
50934  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OnDiskInvertedLists" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50935  }
50936  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50937  {
50938  Py_BEGIN_ALLOW_THREADS
50939  try {
50940  delete arg1;
50941  } catch(faiss::FaissException & e) {
50942  PyEval_RestoreThread(_save);
50943  PyErr_SetString(PyExc_RuntimeError, e.what());
50944  SWIG_fail;
50945  }
50946  Py_END_ALLOW_THREADS
50947  }
50948  resultobj = SWIG_Py_Void();
50949  return resultobj;
50950 fail:
50951  return NULL;
50952 }
50953 
50954 
50955 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_locks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50956  PyObject *resultobj = 0;
50958  faiss::LockLevels *arg2 = (faiss::LockLevels *) 0 ;
50959  void *argp1 = 0 ;
50960  int res1 = 0 ;
50961  void *argp2 = 0 ;
50962  int res2 = 0 ;
50963  PyObject * obj0 = 0 ;
50964  PyObject * obj1 = 0 ;
50965 
50966  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_locks_set",&obj0,&obj1)) SWIG_fail;
50967  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50968  if (!SWIG_IsOK(res1)) {
50969  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_locks_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50970  }
50971  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50972  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__LockLevels, SWIG_POINTER_DISOWN | 0 );
50973  if (!SWIG_IsOK(res2)) {
50974  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_locks_set" "', argument " "2"" of type '" "faiss::LockLevels *""'");
50975  }
50976  arg2 = reinterpret_cast< faiss::LockLevels * >(argp2);
50977  if (arg1) (arg1)->locks = arg2;
50978  resultobj = SWIG_Py_Void();
50979  return resultobj;
50980 fail:
50981  return NULL;
50982 }
50983 
50984 
50985 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_locks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50986  PyObject *resultobj = 0;
50988  void *argp1 = 0 ;
50989  int res1 = 0 ;
50990  PyObject * obj0 = 0 ;
50991  faiss::LockLevels *result = 0 ;
50992 
50993  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_locks_get",&obj0)) SWIG_fail;
50994  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
50995  if (!SWIG_IsOK(res1)) {
50996  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_locks_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
50997  }
50998  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
50999  result = (faiss::LockLevels *) ((arg1)->locks);
51000  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LockLevels, 0 | 0 );
51001  return resultobj;
51002 fail:
51003  return NULL;
51004 }
51005 
51006 
51007 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_pf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51008  PyObject *resultobj = 0;
51011  void *argp1 = 0 ;
51012  int res1 = 0 ;
51013  void *argp2 = 0 ;
51014  int res2 = 0 ;
51015  PyObject * obj0 = 0 ;
51016  PyObject * obj1 = 0 ;
51017 
51018  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_pf_set",&obj0,&obj1)) SWIG_fail;
51019  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
51020  if (!SWIG_IsOK(res1)) {
51021  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_pf_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
51022  }
51023  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
51024  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch, SWIG_POINTER_DISOWN | 0 );
51025  if (!SWIG_IsOK(res2)) {
51026  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_pf_set" "', argument " "2"" of type '" "faiss::OnDiskInvertedLists::OngoingPrefetch *""'");
51027  }
51028  arg2 = reinterpret_cast< faiss::OnDiskInvertedLists::OngoingPrefetch * >(argp2);
51029  if (arg1) (arg1)->pf = arg2;
51030  resultobj = SWIG_Py_Void();
51031  return resultobj;
51032 fail:
51033  return NULL;
51034 }
51035 
51036 
51037 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_pf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51038  PyObject *resultobj = 0;
51040  void *argp1 = 0 ;
51041  int res1 = 0 ;
51042  PyObject * obj0 = 0 ;
51044 
51045  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_pf_get",&obj0)) SWIG_fail;
51046  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
51047  if (!SWIG_IsOK(res1)) {
51048  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_pf_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
51049  }
51050  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
51051  result = (faiss::OnDiskInvertedLists::OngoingPrefetch *) ((arg1)->pf);
51052  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch, 0 | 0 );
51053  return resultobj;
51054 fail:
51055  return NULL;
51056 }
51057 
51058 
51059 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_do_mmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51060  PyObject *resultobj = 0;
51062  void *argp1 = 0 ;
51063  int res1 = 0 ;
51064  PyObject * obj0 = 0 ;
51065 
51066  if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_do_mmap",&obj0)) SWIG_fail;
51067  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
51068  if (!SWIG_IsOK(res1)) {
51069  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_do_mmap" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
51070  }
51071  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
51072  {
51073  Py_BEGIN_ALLOW_THREADS
51074  try {
51075  (arg1)->do_mmap();
51076  } catch(faiss::FaissException & e) {
51077  PyEval_RestoreThread(_save);
51078  PyErr_SetString(PyExc_RuntimeError, e.what());
51079  SWIG_fail;
51080  }
51081  Py_END_ALLOW_THREADS
51082  }
51083  resultobj = SWIG_Py_Void();
51084  return resultobj;
51085 fail:
51086  return NULL;
51087 }
51088 
51089 
51090 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_update_totsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51091  PyObject *resultobj = 0;
51093  size_t arg2 ;
51094  void *argp1 = 0 ;
51095  int res1 = 0 ;
51096  size_t val2 ;
51097  int ecode2 = 0 ;
51098  PyObject * obj0 = 0 ;
51099  PyObject * obj1 = 0 ;
51100 
51101  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_update_totsize",&obj0,&obj1)) SWIG_fail;
51102  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
51103  if (!SWIG_IsOK(res1)) {
51104  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_update_totsize" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
51105  }
51106  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
51107  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51108  if (!SWIG_IsOK(ecode2)) {
51109  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_update_totsize" "', argument " "2"" of type '" "size_t""'");
51110  }
51111  arg2 = static_cast< size_t >(val2);
51112  {
51113  Py_BEGIN_ALLOW_THREADS
51114  try {
51115  (arg1)->update_totsize(arg2);
51116  } catch(faiss::FaissException & e) {
51117  PyEval_RestoreThread(_save);
51118  PyErr_SetString(PyExc_RuntimeError, e.what());
51119  SWIG_fail;
51120  }
51121  Py_END_ALLOW_THREADS
51122  }
51123  resultobj = SWIG_Py_Void();
51124  return resultobj;
51125 fail:
51126  return NULL;
51127 }
51128 
51129 
51130 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_resize_locked(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51131  PyObject *resultobj = 0;
51133  size_t arg2 ;
51134  size_t arg3 ;
51135  void *argp1 = 0 ;
51136  int res1 = 0 ;
51137  size_t val2 ;
51138  int ecode2 = 0 ;
51139  size_t val3 ;
51140  int ecode3 = 0 ;
51141  PyObject * obj0 = 0 ;
51142  PyObject * obj1 = 0 ;
51143  PyObject * obj2 = 0 ;
51144 
51145  if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_resize_locked",&obj0,&obj1,&obj2)) SWIG_fail;
51146  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
51147  if (!SWIG_IsOK(res1)) {
51148  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_resize_locked" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
51149  }
51150  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
51151  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51152  if (!SWIG_IsOK(ecode2)) {
51153  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_resize_locked" "', argument " "2"" of type '" "size_t""'");
51154  }
51155  arg2 = static_cast< size_t >(val2);
51156  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
51157  if (!SWIG_IsOK(ecode3)) {
51158  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_resize_locked" "', argument " "3"" of type '" "size_t""'");
51159  }
51160  arg3 = static_cast< size_t >(val3);
51161  {
51162  Py_BEGIN_ALLOW_THREADS
51163  try {
51164  (arg1)->resize_locked(arg2,arg3);
51165  } catch(faiss::FaissException & e) {
51166  PyEval_RestoreThread(_save);
51167  PyErr_SetString(PyExc_RuntimeError, e.what());
51168  SWIG_fail;
51169  }
51170  Py_END_ALLOW_THREADS
51171  }
51172  resultobj = SWIG_Py_Void();
51173  return resultobj;
51174 fail:
51175  return NULL;
51176 }
51177 
51178 
51179 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_allocate_slot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51180  PyObject *resultobj = 0;
51182  size_t arg2 ;
51183  void *argp1 = 0 ;
51184  int res1 = 0 ;
51185  size_t val2 ;
51186  int ecode2 = 0 ;
51187  PyObject * obj0 = 0 ;
51188  PyObject * obj1 = 0 ;
51189  size_t result;
51190 
51191  if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_allocate_slot",&obj0,&obj1)) SWIG_fail;
51192  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
51193  if (!SWIG_IsOK(res1)) {
51194  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_allocate_slot" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
51195  }
51196  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
51197  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51198  if (!SWIG_IsOK(ecode2)) {
51199  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_allocate_slot" "', argument " "2"" of type '" "size_t""'");
51200  }
51201  arg2 = static_cast< size_t >(val2);
51202  {
51203  Py_BEGIN_ALLOW_THREADS
51204  try {
51205  result = (size_t)(arg1)->allocate_slot(arg2);
51206  } catch(faiss::FaissException & e) {
51207  PyEval_RestoreThread(_save);
51208  PyErr_SetString(PyExc_RuntimeError, e.what());
51209  SWIG_fail;
51210  }
51211  Py_END_ALLOW_THREADS
51212  }
51213  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
51214  return resultobj;
51215 fail:
51216  return NULL;
51217 }
51218 
51219 
51220 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_free_slot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51221  PyObject *resultobj = 0;
51223  size_t arg2 ;
51224  size_t arg3 ;
51225  void *argp1 = 0 ;
51226  int res1 = 0 ;
51227  size_t val2 ;
51228  int ecode2 = 0 ;
51229  size_t val3 ;
51230  int ecode3 = 0 ;
51231  PyObject * obj0 = 0 ;
51232  PyObject * obj1 = 0 ;
51233  PyObject * obj2 = 0 ;
51234 
51235  if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_free_slot",&obj0,&obj1,&obj2)) SWIG_fail;
51236  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
51237  if (!SWIG_IsOK(res1)) {
51238  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_free_slot" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
51239  }
51240  arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
51241  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51242  if (!SWIG_IsOK(ecode2)) {
51243  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_free_slot" "', argument " "2"" of type '" "size_t""'");
51244  }
51245  arg2 = static_cast< size_t >(val2);
51246  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
51247  if (!SWIG_IsOK(ecode3)) {
51248  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_free_slot" "', argument " "3"" of type '" "size_t""'");
51249  }
51250  arg3 = static_cast< size_t >(val3);
51251  {
51252  Py_BEGIN_ALLOW_THREADS
51253  try {
51254  (arg1)->free_slot(arg2,arg3);
51255  } catch(faiss::FaissException & e) {
51256  PyEval_RestoreThread(_save);
51257  PyErr_SetString(PyExc_RuntimeError, e.what());
51258  SWIG_fail;
51259  }
51260  Py_END_ALLOW_THREADS
51261  }
51262  resultobj = SWIG_Py_Void();
51263  return resultobj;
51264 fail:
51265  return NULL;
51266 }
51267 
51268 
51269 SWIGINTERN PyObject *_wrap_new_OnDiskInvertedLists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51270  PyObject *resultobj = 0;
51271  faiss::OnDiskInvertedLists *result = 0 ;
51272 
51273  if (!PyArg_ParseTuple(args,(char *)":new_OnDiskInvertedLists")) SWIG_fail;
51274  {
51275  Py_BEGIN_ALLOW_THREADS
51276  try {
51278  } catch(faiss::FaissException & e) {
51279  PyEval_RestoreThread(_save);
51280  PyErr_SetString(PyExc_RuntimeError, e.what());
51281  SWIG_fail;
51282  }
51283  Py_END_ALLOW_THREADS
51284  }
51285  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_POINTER_NEW | 0 );
51286  return resultobj;
51287 fail:
51288  return NULL;
51289 }
51290 
51291 
51292 SWIGINTERN PyObject *_wrap_new_OnDiskInvertedLists(PyObject *self, PyObject *args) {
51293  Py_ssize_t argc;
51294  PyObject *argv[4] = {
51295  0
51296  };
51297  Py_ssize_t ii;
51298 
51299  if (!PyTuple_Check(args)) SWIG_fail;
51300  argc = args ? PyObject_Length(args) : 0;
51301  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
51302  argv[ii] = PyTuple_GET_ITEM(args,ii);
51303  }
51304  if (argc == 0) {
51305  return _wrap_new_OnDiskInvertedLists__SWIG_1(self, args);
51306  }
51307  if (argc == 3) {
51308  int _v;
51309  {
51310  int res = SWIG_AsVal_size_t(argv[0], NULL);
51311  _v = SWIG_CheckState(res);
51312  }
51313  if (_v) {
51314  {
51315  int res = SWIG_AsVal_size_t(argv[1], NULL);
51316  _v = SWIG_CheckState(res);
51317  }
51318  if (_v) {
51319  int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
51320  _v = SWIG_CheckState(res);
51321  if (_v) {
51322  return _wrap_new_OnDiskInvertedLists__SWIG_0(self, args);
51323  }
51324  }
51325  }
51326  }
51327 
51328 fail:
51329  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_OnDiskInvertedLists'.\n"
51330  " Possible C/C++ prototypes are:\n"
51331  " faiss::OnDiskInvertedLists::OnDiskInvertedLists(size_t,size_t,char const *)\n"
51332  " faiss::OnDiskInvertedLists::OnDiskInvertedLists()\n");
51333  return 0;
51334 }
51335 
51336 
51337 SWIGINTERN PyObject *OnDiskInvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51338  PyObject *obj;
51339  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
51340  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_NewClientData(obj));
51341  return SWIG_Py_Void();
51342 }
51343 
51344 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_scan_table_threshold_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51345  PyObject *resultobj = 0;
51347  size_t arg2 ;
51348  void *argp1 = 0 ;
51349  int res1 = 0 ;
51350  size_t val2 ;
51351  int ecode2 = 0 ;
51352  PyObject * obj0 = 0 ;
51353  PyObject * obj1 = 0 ;
51354 
51355  if (!PyArg_ParseTuple(args,(char *)"OO:IVFPQSearchParameters_scan_table_threshold_set",&obj0,&obj1)) SWIG_fail;
51356  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
51357  if (!SWIG_IsOK(res1)) {
51358  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_scan_table_threshold_set" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
51359  }
51360  arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
51361  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51362  if (!SWIG_IsOK(ecode2)) {
51363  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFPQSearchParameters_scan_table_threshold_set" "', argument " "2"" of type '" "size_t""'");
51364  }
51365  arg2 = static_cast< size_t >(val2);
51366  if (arg1) (arg1)->scan_table_threshold = arg2;
51367  resultobj = SWIG_Py_Void();
51368  return resultobj;
51369 fail:
51370  return NULL;
51371 }
51372 
51373 
51374 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_scan_table_threshold_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51375  PyObject *resultobj = 0;
51377  void *argp1 = 0 ;
51378  int res1 = 0 ;
51379  PyObject * obj0 = 0 ;
51380  size_t result;
51381 
51382  if (!PyArg_ParseTuple(args,(char *)"O:IVFPQSearchParameters_scan_table_threshold_get",&obj0)) SWIG_fail;
51383  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
51384  if (!SWIG_IsOK(res1)) {
51385  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_scan_table_threshold_get" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
51386  }
51387  arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
51388  result = (size_t) ((arg1)->scan_table_threshold);
51389  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
51390  return resultobj;
51391 fail:
51392  return NULL;
51393 }
51394 
51395 
51396 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_polysemous_ht_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51397  PyObject *resultobj = 0;
51399  int arg2 ;
51400  void *argp1 = 0 ;
51401  int res1 = 0 ;
51402  int val2 ;
51403  int ecode2 = 0 ;
51404  PyObject * obj0 = 0 ;
51405  PyObject * obj1 = 0 ;
51406 
51407  if (!PyArg_ParseTuple(args,(char *)"OO:IVFPQSearchParameters_polysemous_ht_set",&obj0,&obj1)) SWIG_fail;
51408  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
51409  if (!SWIG_IsOK(res1)) {
51410  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_polysemous_ht_set" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
51411  }
51412  arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
51413  ecode2 = SWIG_AsVal_int(obj1, &val2);
51414  if (!SWIG_IsOK(ecode2)) {
51415  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFPQSearchParameters_polysemous_ht_set" "', argument " "2"" of type '" "int""'");
51416  }
51417  arg2 = static_cast< int >(val2);
51418  if (arg1) (arg1)->polysemous_ht = arg2;
51419  resultobj = SWIG_Py_Void();
51420  return resultobj;
51421 fail:
51422  return NULL;
51423 }
51424 
51425 
51426 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_polysemous_ht_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51427  PyObject *resultobj = 0;
51429  void *argp1 = 0 ;
51430  int res1 = 0 ;
51431  PyObject * obj0 = 0 ;
51432  int result;
51433 
51434  if (!PyArg_ParseTuple(args,(char *)"O:IVFPQSearchParameters_polysemous_ht_get",&obj0)) SWIG_fail;
51435  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
51436  if (!SWIG_IsOK(res1)) {
51437  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_polysemous_ht_get" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
51438  }
51439  arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
51440  result = (int) ((arg1)->polysemous_ht);
51441  resultobj = SWIG_From_int(static_cast< int >(result));
51442  return resultobj;
51443 fail:
51444  return NULL;
51445 }
51446 
51447 
51448 SWIGINTERN PyObject *_wrap_delete_IVFPQSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51449  PyObject *resultobj = 0;
51451  void *argp1 = 0 ;
51452  int res1 = 0 ;
51453  PyObject * obj0 = 0 ;
51454 
51455  if (!PyArg_ParseTuple(args,(char *)"O:delete_IVFPQSearchParameters",&obj0)) SWIG_fail;
51456  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, SWIG_POINTER_DISOWN | 0 );
51457  if (!SWIG_IsOK(res1)) {
51458  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVFPQSearchParameters" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
51459  }
51460  arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
51461  {
51462  Py_BEGIN_ALLOW_THREADS
51463  try {
51464  delete arg1;
51465  } catch(faiss::FaissException & e) {
51466  PyEval_RestoreThread(_save);
51467  PyErr_SetString(PyExc_RuntimeError, e.what());
51468  SWIG_fail;
51469  }
51470  Py_END_ALLOW_THREADS
51471  }
51472  resultobj = SWIG_Py_Void();
51473  return resultobj;
51474 fail:
51475  return NULL;
51476 }
51477 
51478 
51479 SWIGINTERN PyObject *_wrap_new_IVFPQSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51480  PyObject *resultobj = 0;
51481  faiss::IVFPQSearchParameters *result = 0 ;
51482 
51483  if (!PyArg_ParseTuple(args,(char *)":new_IVFPQSearchParameters")) SWIG_fail;
51485  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IVFPQSearchParameters, SWIG_POINTER_NEW | 0 );
51486  return resultobj;
51487 fail:
51488  return NULL;
51489 }
51490 
51491 
51492 SWIGINTERN PyObject *IVFPQSearchParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51493  PyObject *obj;
51494  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
51495  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IVFPQSearchParameters, SWIG_NewClientData(obj));
51496  return SWIG_Py_Void();
51497 }
51498 
51499 SWIGINTERN PyObject *_wrap_IndexIVFPQ_by_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51500  PyObject *resultobj = 0;
51501  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51502  bool arg2 ;
51503  void *argp1 = 0 ;
51504  int res1 = 0 ;
51505  bool val2 ;
51506  int ecode2 = 0 ;
51507  PyObject * obj0 = 0 ;
51508  PyObject * obj1 = 0 ;
51509 
51510  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_by_residual_set",&obj0,&obj1)) SWIG_fail;
51511  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51512  if (!SWIG_IsOK(res1)) {
51513  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_by_residual_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51514  }
51515  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51516  ecode2 = SWIG_AsVal_bool(obj1, &val2);
51517  if (!SWIG_IsOK(ecode2)) {
51518  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_by_residual_set" "', argument " "2"" of type '" "bool""'");
51519  }
51520  arg2 = static_cast< bool >(val2);
51521  if (arg1) (arg1)->by_residual = arg2;
51522  resultobj = SWIG_Py_Void();
51523  return resultobj;
51524 fail:
51525  return NULL;
51526 }
51527 
51528 
51529 SWIGINTERN PyObject *_wrap_IndexIVFPQ_by_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51530  PyObject *resultobj = 0;
51531  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51532  void *argp1 = 0 ;
51533  int res1 = 0 ;
51534  PyObject * obj0 = 0 ;
51535  bool result;
51536 
51537  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_by_residual_get",&obj0)) SWIG_fail;
51538  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51539  if (!SWIG_IsOK(res1)) {
51540  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_by_residual_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51541  }
51542  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51543  result = (bool) ((arg1)->by_residual);
51544  resultobj = SWIG_From_bool(static_cast< bool >(result));
51545  return resultobj;
51546 fail:
51547  return NULL;
51548 }
51549 
51550 
51551 SWIGINTERN PyObject *_wrap_IndexIVFPQ_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51552  PyObject *resultobj = 0;
51553  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51555  void *argp1 = 0 ;
51556  int res1 = 0 ;
51557  void *argp2 = 0 ;
51558  int res2 = 0 ;
51559  PyObject * obj0 = 0 ;
51560  PyObject * obj1 = 0 ;
51561 
51562  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_pq_set",&obj0,&obj1)) SWIG_fail;
51563  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51564  if (!SWIG_IsOK(res1)) {
51565  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_pq_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51566  }
51567  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51568  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
51569  if (!SWIG_IsOK(res2)) {
51570  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
51571  }
51572  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
51573  if (arg1) (arg1)->pq = *arg2;
51574  resultobj = SWIG_Py_Void();
51575  return resultobj;
51576 fail:
51577  return NULL;
51578 }
51579 
51580 
51581 SWIGINTERN PyObject *_wrap_IndexIVFPQ_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51582  PyObject *resultobj = 0;
51583  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51584  void *argp1 = 0 ;
51585  int res1 = 0 ;
51586  PyObject * obj0 = 0 ;
51587  faiss::ProductQuantizer *result = 0 ;
51588 
51589  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_pq_get",&obj0)) SWIG_fail;
51590  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51591  if (!SWIG_IsOK(res1)) {
51592  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_pq_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51593  }
51594  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51595  result = (faiss::ProductQuantizer *)& ((arg1)->pq);
51596  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
51597  return resultobj;
51598 fail:
51599  return NULL;
51600 }
51601 
51602 
51603 SWIGINTERN PyObject *_wrap_IndexIVFPQ_do_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51604  PyObject *resultobj = 0;
51605  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51606  bool arg2 ;
51607  void *argp1 = 0 ;
51608  int res1 = 0 ;
51609  bool val2 ;
51610  int ecode2 = 0 ;
51611  PyObject * obj0 = 0 ;
51612  PyObject * obj1 = 0 ;
51613 
51614  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_do_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
51615  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51616  if (!SWIG_IsOK(res1)) {
51617  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_do_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51618  }
51619  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51620  ecode2 = SWIG_AsVal_bool(obj1, &val2);
51621  if (!SWIG_IsOK(ecode2)) {
51622  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_do_polysemous_training_set" "', argument " "2"" of type '" "bool""'");
51623  }
51624  arg2 = static_cast< bool >(val2);
51625  if (arg1) (arg1)->do_polysemous_training = arg2;
51626  resultobj = SWIG_Py_Void();
51627  return resultobj;
51628 fail:
51629  return NULL;
51630 }
51631 
51632 
51633 SWIGINTERN PyObject *_wrap_IndexIVFPQ_do_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51634  PyObject *resultobj = 0;
51635  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51636  void *argp1 = 0 ;
51637  int res1 = 0 ;
51638  PyObject * obj0 = 0 ;
51639  bool result;
51640 
51641  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_do_polysemous_training_get",&obj0)) SWIG_fail;
51642  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51643  if (!SWIG_IsOK(res1)) {
51644  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_do_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51645  }
51646  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51647  result = (bool) ((arg1)->do_polysemous_training);
51648  resultobj = SWIG_From_bool(static_cast< bool >(result));
51649  return resultobj;
51650 fail:
51651  return NULL;
51652 }
51653 
51654 
51655 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51656  PyObject *resultobj = 0;
51657  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51659  void *argp1 = 0 ;
51660  int res1 = 0 ;
51661  void *argp2 = 0 ;
51662  int res2 = 0 ;
51663  PyObject * obj0 = 0 ;
51664  PyObject * obj1 = 0 ;
51665 
51666  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
51667  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51668  if (!SWIG_IsOK(res1)) {
51669  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51670  }
51671  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51672  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__PolysemousTraining, SWIG_POINTER_DISOWN | 0 );
51673  if (!SWIG_IsOK(res2)) {
51674  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_polysemous_training_set" "', argument " "2"" of type '" "faiss::PolysemousTraining *""'");
51675  }
51676  arg2 = reinterpret_cast< faiss::PolysemousTraining * >(argp2);
51677  if (arg1) (arg1)->polysemous_training = arg2;
51678  resultobj = SWIG_Py_Void();
51679  return resultobj;
51680 fail:
51681  return NULL;
51682 }
51683 
51684 
51685 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51686  PyObject *resultobj = 0;
51687  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51688  void *argp1 = 0 ;
51689  int res1 = 0 ;
51690  PyObject * obj0 = 0 ;
51691  faiss::PolysemousTraining *result = 0 ;
51692 
51693  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_polysemous_training_get",&obj0)) SWIG_fail;
51694  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51695  if (!SWIG_IsOK(res1)) {
51696  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51697  }
51698  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51699  result = (faiss::PolysemousTraining *) ((arg1)->polysemous_training);
51700  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
51701  return resultobj;
51702 fail:
51703  return NULL;
51704 }
51705 
51706 
51707 SWIGINTERN PyObject *_wrap_IndexIVFPQ_scan_table_threshold_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51708  PyObject *resultobj = 0;
51709  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51710  size_t arg2 ;
51711  void *argp1 = 0 ;
51712  int res1 = 0 ;
51713  size_t val2 ;
51714  int ecode2 = 0 ;
51715  PyObject * obj0 = 0 ;
51716  PyObject * obj1 = 0 ;
51717 
51718  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_scan_table_threshold_set",&obj0,&obj1)) SWIG_fail;
51719  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51720  if (!SWIG_IsOK(res1)) {
51721  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_scan_table_threshold_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51722  }
51723  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51724  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51725  if (!SWIG_IsOK(ecode2)) {
51726  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_scan_table_threshold_set" "', argument " "2"" of type '" "size_t""'");
51727  }
51728  arg2 = static_cast< size_t >(val2);
51729  if (arg1) (arg1)->scan_table_threshold = arg2;
51730  resultobj = SWIG_Py_Void();
51731  return resultobj;
51732 fail:
51733  return NULL;
51734 }
51735 
51736 
51737 SWIGINTERN PyObject *_wrap_IndexIVFPQ_scan_table_threshold_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51738  PyObject *resultobj = 0;
51739  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51740  void *argp1 = 0 ;
51741  int res1 = 0 ;
51742  PyObject * obj0 = 0 ;
51743  size_t result;
51744 
51745  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_scan_table_threshold_get",&obj0)) SWIG_fail;
51746  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51747  if (!SWIG_IsOK(res1)) {
51748  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_scan_table_threshold_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51749  }
51750  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51751  result = (size_t) ((arg1)->scan_table_threshold);
51752  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
51753  return resultobj;
51754 fail:
51755  return NULL;
51756 }
51757 
51758 
51759 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_ht_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51760  PyObject *resultobj = 0;
51761  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51762  int arg2 ;
51763  void *argp1 = 0 ;
51764  int res1 = 0 ;
51765  int val2 ;
51766  int ecode2 = 0 ;
51767  PyObject * obj0 = 0 ;
51768  PyObject * obj1 = 0 ;
51769 
51770  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_polysemous_ht_set",&obj0,&obj1)) SWIG_fail;
51771  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51772  if (!SWIG_IsOK(res1)) {
51773  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_ht_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51774  }
51775  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51776  ecode2 = SWIG_AsVal_int(obj1, &val2);
51777  if (!SWIG_IsOK(ecode2)) {
51778  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_polysemous_ht_set" "', argument " "2"" of type '" "int""'");
51779  }
51780  arg2 = static_cast< int >(val2);
51781  if (arg1) (arg1)->polysemous_ht = arg2;
51782  resultobj = SWIG_Py_Void();
51783  return resultobj;
51784 fail:
51785  return NULL;
51786 }
51787 
51788 
51789 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_ht_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51790  PyObject *resultobj = 0;
51791  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51792  void *argp1 = 0 ;
51793  int res1 = 0 ;
51794  PyObject * obj0 = 0 ;
51795  int result;
51796 
51797  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_polysemous_ht_get",&obj0)) SWIG_fail;
51798  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51799  if (!SWIG_IsOK(res1)) {
51800  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_ht_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51801  }
51802  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51803  result = (int) ((arg1)->polysemous_ht);
51804  resultobj = SWIG_From_int(static_cast< int >(result));
51805  return resultobj;
51806 fail:
51807  return NULL;
51808 }
51809 
51810 
51811 SWIGINTERN PyObject *_wrap_IndexIVFPQ_use_precomputed_table_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51812  PyObject *resultobj = 0;
51813  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51814  int arg2 ;
51815  void *argp1 = 0 ;
51816  int res1 = 0 ;
51817  int val2 ;
51818  int ecode2 = 0 ;
51819  PyObject * obj0 = 0 ;
51820  PyObject * obj1 = 0 ;
51821 
51822  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_use_precomputed_table_set",&obj0,&obj1)) SWIG_fail;
51823  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51824  if (!SWIG_IsOK(res1)) {
51825  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_use_precomputed_table_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51826  }
51827  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51828  ecode2 = SWIG_AsVal_int(obj1, &val2);
51829  if (!SWIG_IsOK(ecode2)) {
51830  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_use_precomputed_table_set" "', argument " "2"" of type '" "int""'");
51831  }
51832  arg2 = static_cast< int >(val2);
51833  if (arg1) (arg1)->use_precomputed_table = arg2;
51834  resultobj = SWIG_Py_Void();
51835  return resultobj;
51836 fail:
51837  return NULL;
51838 }
51839 
51840 
51841 SWIGINTERN PyObject *_wrap_IndexIVFPQ_use_precomputed_table_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51842  PyObject *resultobj = 0;
51843  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51844  void *argp1 = 0 ;
51845  int res1 = 0 ;
51846  PyObject * obj0 = 0 ;
51847  int result;
51848 
51849  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_use_precomputed_table_get",&obj0)) SWIG_fail;
51850  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51851  if (!SWIG_IsOK(res1)) {
51852  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_use_precomputed_table_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51853  }
51854  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51855  result = (int) ((arg1)->use_precomputed_table);
51856  resultobj = SWIG_From_int(static_cast< int >(result));
51857  return resultobj;
51858 fail:
51859  return NULL;
51860 }
51861 
51862 
51863 SWIGINTERN int Swig_var_IndexIVFPQ_precomputed_table_max_bytes_set(PyObject *_val) {
51864  {
51865  size_t val;
51866  int res = SWIG_AsVal_size_t(_val, &val);
51867  if (!SWIG_IsOK(res)) {
51868  SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::IndexIVFPQ::precomputed_table_max_bytes""' of type '""size_t""'");
51869  }
51870  faiss::IndexIVFPQ::precomputed_table_max_bytes = static_cast< size_t >(val);
51871  }
51872  return 0;
51873 fail:
51874  return 1;
51875 }
51876 
51877 
51878 SWIGINTERN PyObject *Swig_var_IndexIVFPQ_precomputed_table_max_bytes_get(void) {
51879  PyObject *pyobj = 0;
51880 
51881  pyobj = SWIG_From_size_t(static_cast< size_t >(faiss::IndexIVFPQ::precomputed_table_max_bytes));
51882  return pyobj;
51883 }
51884 
51885 
51886 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_max_bytes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
51887  return Swig_var_IndexIVFPQ_precomputed_table_max_bytes_get();
51888 }
51889 
51890 
51891 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_max_bytes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51892  int res;
51893  PyObject *value;
51894 
51895  if (!PyArg_ParseTuple(args,(char *)"O:set",&value)) return NULL;
51896  res = Swig_var_IndexIVFPQ_precomputed_table_max_bytes_set(value);
51897  return !res ? SWIG_Py_Void() : NULL;
51898 }
51899 
51900 
51901 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51902  PyObject *resultobj = 0;
51903  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51904  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
51905  void *argp1 = 0 ;
51906  int res1 = 0 ;
51907  void *argp2 = 0 ;
51908  int res2 = 0 ;
51909  PyObject * obj0 = 0 ;
51910  PyObject * obj1 = 0 ;
51911 
51912  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_precomputed_table_set",&obj0,&obj1)) SWIG_fail;
51913  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51914  if (!SWIG_IsOK(res1)) {
51915  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_precomputed_table_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51916  }
51917  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51918  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
51919  if (!SWIG_IsOK(res2)) {
51920  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_precomputed_table_set" "', argument " "2"" of type '" "std::vector< float > *""'");
51921  }
51922  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
51923  if (arg1) (arg1)->precomputed_table = *arg2;
51924  resultobj = SWIG_Py_Void();
51925  return resultobj;
51926 fail:
51927  return NULL;
51928 }
51929 
51930 
51931 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51932  PyObject *resultobj = 0;
51933  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51934  void *argp1 = 0 ;
51935  int res1 = 0 ;
51936  PyObject * obj0 = 0 ;
51937  std::vector< float > *result = 0 ;
51938 
51939  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_precomputed_table_get",&obj0)) SWIG_fail;
51940  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51941  if (!SWIG_IsOK(res1)) {
51942  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_precomputed_table_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51943  }
51944  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51945  result = (std::vector< float > *)& ((arg1)->precomputed_table);
51946  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
51947  return resultobj;
51948 fail:
51949  return NULL;
51950 }
51951 
51952 
51953 SWIGINTERN PyObject *_wrap_new_IndexIVFPQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51954  PyObject *resultobj = 0;
51955  faiss::Index *arg1 = (faiss::Index *) 0 ;
51956  size_t arg2 ;
51957  size_t arg3 ;
51958  size_t arg4 ;
51959  size_t arg5 ;
51960  void *argp1 = 0 ;
51961  int res1 = 0 ;
51962  size_t val2 ;
51963  int ecode2 = 0 ;
51964  size_t val3 ;
51965  int ecode3 = 0 ;
51966  size_t val4 ;
51967  int ecode4 = 0 ;
51968  size_t val5 ;
51969  int ecode5 = 0 ;
51970  PyObject * obj0 = 0 ;
51971  PyObject * obj1 = 0 ;
51972  PyObject * obj2 = 0 ;
51973  PyObject * obj3 = 0 ;
51974  PyObject * obj4 = 0 ;
51975  faiss::IndexIVFPQ *result = 0 ;
51976 
51977  if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_IndexIVFPQ",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
51978  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
51979  if (!SWIG_IsOK(res1)) {
51980  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFPQ" "', argument " "1"" of type '" "faiss::Index *""'");
51981  }
51982  arg1 = reinterpret_cast< faiss::Index * >(argp1);
51983  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51984  if (!SWIG_IsOK(ecode2)) {
51985  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFPQ" "', argument " "2"" of type '" "size_t""'");
51986  }
51987  arg2 = static_cast< size_t >(val2);
51988  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
51989  if (!SWIG_IsOK(ecode3)) {
51990  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFPQ" "', argument " "3"" of type '" "size_t""'");
51991  }
51992  arg3 = static_cast< size_t >(val3);
51993  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
51994  if (!SWIG_IsOK(ecode4)) {
51995  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFPQ" "', argument " "4"" of type '" "size_t""'");
51996  }
51997  arg4 = static_cast< size_t >(val4);
51998  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
51999  if (!SWIG_IsOK(ecode5)) {
52000  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IndexIVFPQ" "', argument " "5"" of type '" "size_t""'");
52001  }
52002  arg5 = static_cast< size_t >(val5);
52003  {
52004  Py_BEGIN_ALLOW_THREADS
52005  try {
52006  result = (faiss::IndexIVFPQ *)new faiss::IndexIVFPQ(arg1,arg2,arg3,arg4,arg5);
52007  } catch(faiss::FaissException & e) {
52008  PyEval_RestoreThread(_save);
52009  PyErr_SetString(PyExc_RuntimeError, e.what());
52010  SWIG_fail;
52011  }
52012  Py_END_ALLOW_THREADS
52013  }
52014  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_POINTER_NEW | 0 );
52015  return resultobj;
52016 fail:
52017  return NULL;
52018 }
52019 
52020 
52021 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52022  PyObject *resultobj = 0;
52023  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52024  faiss::Index::idx_t arg2 ;
52025  float *arg3 = (float *) 0 ;
52026  long *arg4 = (long *) 0 ;
52027  void *argp1 = 0 ;
52028  int res1 = 0 ;
52029  long val2 ;
52030  int ecode2 = 0 ;
52031  void *argp3 = 0 ;
52032  int res3 = 0 ;
52033  void *argp4 = 0 ;
52034  int res4 = 0 ;
52035  PyObject * obj0 = 0 ;
52036  PyObject * obj1 = 0 ;
52037  PyObject * obj2 = 0 ;
52038  PyObject * obj3 = 0 ;
52039 
52040  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
52041  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52042  if (!SWIG_IsOK(res1)) {
52043  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
52044  }
52045  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52046  ecode2 = SWIG_AsVal_long(obj1, &val2);
52047  if (!SWIG_IsOK(ecode2)) {
52048  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52049  }
52050  arg2 = static_cast< faiss::Index::idx_t >(val2);
52051  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52052  if (!SWIG_IsOK(res3)) {
52053  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "3"" of type '" "float const *""'");
52054  }
52055  arg3 = reinterpret_cast< float * >(argp3);
52056  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
52057  if (!SWIG_IsOK(res4)) {
52058  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "4"" of type '" "long const *""'");
52059  }
52060  arg4 = reinterpret_cast< long * >(argp4);
52061  {
52062  Py_BEGIN_ALLOW_THREADS
52063  try {
52064  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
52065  } catch(faiss::FaissException & e) {
52066  PyEval_RestoreThread(_save);
52067  PyErr_SetString(PyExc_RuntimeError, e.what());
52068  SWIG_fail;
52069  }
52070  Py_END_ALLOW_THREADS
52071  }
52072  resultobj = SWIG_Py_Void();
52073  return resultobj;
52074 fail:
52075  return NULL;
52076 }
52077 
52078 
52079 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52080  PyObject *resultobj = 0;
52081  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52082  faiss::Index::idx_t arg2 ;
52083  float *arg3 = (float *) 0 ;
52084  void *argp1 = 0 ;
52085  int res1 = 0 ;
52086  long val2 ;
52087  int ecode2 = 0 ;
52088  void *argp3 = 0 ;
52089  int res3 = 0 ;
52090  PyObject * obj0 = 0 ;
52091  PyObject * obj1 = 0 ;
52092  PyObject * obj2 = 0 ;
52093 
52094  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQ_add_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
52095  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52096  if (!SWIG_IsOK(res1)) {
52097  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
52098  }
52099  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52100  ecode2 = SWIG_AsVal_long(obj1, &val2);
52101  if (!SWIG_IsOK(ecode2)) {
52102  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52103  }
52104  arg2 = static_cast< faiss::Index::idx_t >(val2);
52105  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52106  if (!SWIG_IsOK(res3)) {
52107  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "3"" of type '" "float const *""'");
52108  }
52109  arg3 = reinterpret_cast< float * >(argp3);
52110  {
52111  Py_BEGIN_ALLOW_THREADS
52112  try {
52113  (arg1)->add_with_ids(arg2,(float const *)arg3);
52114  } catch(faiss::FaissException & e) {
52115  PyEval_RestoreThread(_save);
52116  PyErr_SetString(PyExc_RuntimeError, e.what());
52117  SWIG_fail;
52118  }
52119  Py_END_ALLOW_THREADS
52120  }
52121  resultobj = SWIG_Py_Void();
52122  return resultobj;
52123 fail:
52124  return NULL;
52125 }
52126 
52127 
52128 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_with_ids(PyObject *self, PyObject *args) {
52129  Py_ssize_t argc;
52130  PyObject *argv[5] = {
52131  0
52132  };
52133  Py_ssize_t ii;
52134 
52135  if (!PyTuple_Check(args)) SWIG_fail;
52136  argc = args ? PyObject_Length(args) : 0;
52137  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
52138  argv[ii] = PyTuple_GET_ITEM(args,ii);
52139  }
52140  if (argc == 3) {
52141  int _v;
52142  void *vptr = 0;
52143  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
52144  _v = SWIG_CheckState(res);
52145  if (_v) {
52146  {
52147  int res = SWIG_AsVal_long(argv[1], NULL);
52148  _v = SWIG_CheckState(res);
52149  }
52150  if (_v) {
52151  void *vptr = 0;
52152  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
52153  _v = SWIG_CheckState(res);
52154  if (_v) {
52155  return _wrap_IndexIVFPQ_add_with_ids__SWIG_1(self, args);
52156  }
52157  }
52158  }
52159  }
52160  if (argc == 4) {
52161  int _v;
52162  void *vptr = 0;
52163  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
52164  _v = SWIG_CheckState(res);
52165  if (_v) {
52166  {
52167  int res = SWIG_AsVal_long(argv[1], NULL);
52168  _v = SWIG_CheckState(res);
52169  }
52170  if (_v) {
52171  void *vptr = 0;
52172  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
52173  _v = SWIG_CheckState(res);
52174  if (_v) {
52175  void *vptr = 0;
52176  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
52177  _v = SWIG_CheckState(res);
52178  if (_v) {
52179  return _wrap_IndexIVFPQ_add_with_ids__SWIG_0(self, args);
52180  }
52181  }
52182  }
52183  }
52184  }
52185 
52186 fail:
52187  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQ_add_with_ids'.\n"
52188  " Possible C/C++ prototypes are:\n"
52189  " faiss::IndexIVFPQ::add_with_ids(faiss::Index::idx_t,float const *,long const *)\n"
52190  " faiss::IndexIVFPQ::add_with_ids(faiss::Index::idx_t,float const *)\n");
52191  return 0;
52192 }
52193 
52194 
52195 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52196  PyObject *resultobj = 0;
52197  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52198  faiss::Index::idx_t arg2 ;
52199  float *arg3 = (float *) 0 ;
52201  uint8_t *arg5 = (uint8_t *) 0 ;
52202  void *argp1 = 0 ;
52203  int res1 = 0 ;
52204  long val2 ;
52205  int ecode2 = 0 ;
52206  void *argp3 = 0 ;
52207  int res3 = 0 ;
52208  void *argp4 = 0 ;
52209  int res4 = 0 ;
52210  void *argp5 = 0 ;
52211  int res5 = 0 ;
52212  PyObject * obj0 = 0 ;
52213  PyObject * obj1 = 0 ;
52214  PyObject * obj2 = 0 ;
52215  PyObject * obj3 = 0 ;
52216  PyObject * obj4 = 0 ;
52217 
52218  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
52219  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52220  if (!SWIG_IsOK(res1)) {
52221  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
52222  }
52223  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52224  ecode2 = SWIG_AsVal_long(obj1, &val2);
52225  if (!SWIG_IsOK(ecode2)) {
52226  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52227  }
52228  arg2 = static_cast< faiss::Index::idx_t >(val2);
52229  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52230  if (!SWIG_IsOK(res3)) {
52231  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "3"" of type '" "float const *""'");
52232  }
52233  arg3 = reinterpret_cast< float * >(argp3);
52234  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
52235  if (!SWIG_IsOK(res4)) {
52236  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
52237  }
52238  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
52239  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
52240  if (!SWIG_IsOK(res5)) {
52241  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
52242  }
52243  arg5 = reinterpret_cast< uint8_t * >(argp5);
52244  {
52245  Py_BEGIN_ALLOW_THREADS
52246  try {
52247  ((faiss::IndexIVFPQ const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
52248  } catch(faiss::FaissException & e) {
52249  PyEval_RestoreThread(_save);
52250  PyErr_SetString(PyExc_RuntimeError, e.what());
52251  SWIG_fail;
52252  }
52253  Py_END_ALLOW_THREADS
52254  }
52255  resultobj = SWIG_Py_Void();
52256  return resultobj;
52257 fail:
52258  return NULL;
52259 }
52260 
52261 
52262 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_core_o__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52263  PyObject *resultobj = 0;
52264  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52265  faiss::Index::idx_t arg2 ;
52266  float *arg3 = (float *) 0 ;
52267  long *arg4 = (long *) 0 ;
52268  float *arg5 = (float *) 0 ;
52269  long *arg6 = (long *) 0 ;
52270  void *argp1 = 0 ;
52271  int res1 = 0 ;
52272  long val2 ;
52273  int ecode2 = 0 ;
52274  void *argp3 = 0 ;
52275  int res3 = 0 ;
52276  void *argp4 = 0 ;
52277  int res4 = 0 ;
52278  void *argp5 = 0 ;
52279  int res5 = 0 ;
52280  void *argp6 = 0 ;
52281  int res6 = 0 ;
52282  PyObject * obj0 = 0 ;
52283  PyObject * obj1 = 0 ;
52284  PyObject * obj2 = 0 ;
52285  PyObject * obj3 = 0 ;
52286  PyObject * obj4 = 0 ;
52287  PyObject * obj5 = 0 ;
52288 
52289  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIVFPQ_add_core_o",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
52290  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52291  if (!SWIG_IsOK(res1)) {
52292  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_core_o" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
52293  }
52294  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52295  ecode2 = SWIG_AsVal_long(obj1, &val2);
52296  if (!SWIG_IsOK(ecode2)) {
52297  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_core_o" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52298  }
52299  arg2 = static_cast< faiss::Index::idx_t >(val2);
52300  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52301  if (!SWIG_IsOK(res3)) {
52302  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_core_o" "', argument " "3"" of type '" "float const *""'");
52303  }
52304  arg3 = reinterpret_cast< float * >(argp3);
52305  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
52306  if (!SWIG_IsOK(res4)) {
52307  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_add_core_o" "', argument " "4"" of type '" "long const *""'");
52308  }
52309  arg4 = reinterpret_cast< long * >(argp4);
52310  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
52311  if (!SWIG_IsOK(res5)) {
52312  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_add_core_o" "', argument " "5"" of type '" "float *""'");
52313  }
52314  arg5 = reinterpret_cast< float * >(argp5);
52315  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
52316  if (!SWIG_IsOK(res6)) {
52317  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFPQ_add_core_o" "', argument " "6"" of type '" "long const *""'");
52318  }
52319  arg6 = reinterpret_cast< long * >(argp6);
52320  {
52321  Py_BEGIN_ALLOW_THREADS
52322  try {
52323  (arg1)->add_core_o(arg2,(float const *)arg3,(long const *)arg4,arg5,(long const *)arg6);
52324  } catch(faiss::FaissException & e) {
52325  PyEval_RestoreThread(_save);
52326  PyErr_SetString(PyExc_RuntimeError, e.what());
52327  SWIG_fail;
52328  }
52329  Py_END_ALLOW_THREADS
52330  }
52331  resultobj = SWIG_Py_Void();
52332  return resultobj;
52333 fail:
52334  return NULL;
52335 }
52336 
52337 
52338 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_core_o__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52339  PyObject *resultobj = 0;
52340  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52341  faiss::Index::idx_t arg2 ;
52342  float *arg3 = (float *) 0 ;
52343  long *arg4 = (long *) 0 ;
52344  float *arg5 = (float *) 0 ;
52345  void *argp1 = 0 ;
52346  int res1 = 0 ;
52347  long val2 ;
52348  int ecode2 = 0 ;
52349  void *argp3 = 0 ;
52350  int res3 = 0 ;
52351  void *argp4 = 0 ;
52352  int res4 = 0 ;
52353  void *argp5 = 0 ;
52354  int res5 = 0 ;
52355  PyObject * obj0 = 0 ;
52356  PyObject * obj1 = 0 ;
52357  PyObject * obj2 = 0 ;
52358  PyObject * obj3 = 0 ;
52359  PyObject * obj4 = 0 ;
52360 
52361  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_add_core_o",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
52362  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52363  if (!SWIG_IsOK(res1)) {
52364  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_core_o" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
52365  }
52366  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52367  ecode2 = SWIG_AsVal_long(obj1, &val2);
52368  if (!SWIG_IsOK(ecode2)) {
52369  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_core_o" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52370  }
52371  arg2 = static_cast< faiss::Index::idx_t >(val2);
52372  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52373  if (!SWIG_IsOK(res3)) {
52374  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_core_o" "', argument " "3"" of type '" "float const *""'");
52375  }
52376  arg3 = reinterpret_cast< float * >(argp3);
52377  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
52378  if (!SWIG_IsOK(res4)) {
52379  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_add_core_o" "', argument " "4"" of type '" "long const *""'");
52380  }
52381  arg4 = reinterpret_cast< long * >(argp4);
52382  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
52383  if (!SWIG_IsOK(res5)) {
52384  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_add_core_o" "', argument " "5"" of type '" "float *""'");
52385  }
52386  arg5 = reinterpret_cast< float * >(argp5);
52387  {
52388  Py_BEGIN_ALLOW_THREADS
52389  try {
52390  (arg1)->add_core_o(arg2,(float const *)arg3,(long const *)arg4,arg5);
52391  } catch(faiss::FaissException & e) {
52392  PyEval_RestoreThread(_save);
52393  PyErr_SetString(PyExc_RuntimeError, e.what());
52394  SWIG_fail;
52395  }
52396  Py_END_ALLOW_THREADS
52397  }
52398  resultobj = SWIG_Py_Void();
52399  return resultobj;
52400 fail:
52401  return NULL;
52402 }
52403 
52404 
52405 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_core_o(PyObject *self, PyObject *args) {
52406  Py_ssize_t argc;
52407  PyObject *argv[7] = {
52408  0
52409  };
52410  Py_ssize_t ii;
52411 
52412  if (!PyTuple_Check(args)) SWIG_fail;
52413  argc = args ? PyObject_Length(args) : 0;
52414  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
52415  argv[ii] = PyTuple_GET_ITEM(args,ii);
52416  }
52417  if (argc == 5) {
52418  int _v;
52419  void *vptr = 0;
52420  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
52421  _v = SWIG_CheckState(res);
52422  if (_v) {
52423  {
52424  int res = SWIG_AsVal_long(argv[1], NULL);
52425  _v = SWIG_CheckState(res);
52426  }
52427  if (_v) {
52428  void *vptr = 0;
52429  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
52430  _v = SWIG_CheckState(res);
52431  if (_v) {
52432  void *vptr = 0;
52433  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
52434  _v = SWIG_CheckState(res);
52435  if (_v) {
52436  void *vptr = 0;
52437  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
52438  _v = SWIG_CheckState(res);
52439  if (_v) {
52440  return _wrap_IndexIVFPQ_add_core_o__SWIG_1(self, args);
52441  }
52442  }
52443  }
52444  }
52445  }
52446  }
52447  if (argc == 6) {
52448  int _v;
52449  void *vptr = 0;
52450  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
52451  _v = SWIG_CheckState(res);
52452  if (_v) {
52453  {
52454  int res = SWIG_AsVal_long(argv[1], NULL);
52455  _v = SWIG_CheckState(res);
52456  }
52457  if (_v) {
52458  void *vptr = 0;
52459  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
52460  _v = SWIG_CheckState(res);
52461  if (_v) {
52462  void *vptr = 0;
52463  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
52464  _v = SWIG_CheckState(res);
52465  if (_v) {
52466  void *vptr = 0;
52467  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
52468  _v = SWIG_CheckState(res);
52469  if (_v) {
52470  void *vptr = 0;
52471  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_long, 0);
52472  _v = SWIG_CheckState(res);
52473  if (_v) {
52474  return _wrap_IndexIVFPQ_add_core_o__SWIG_0(self, args);
52475  }
52476  }
52477  }
52478  }
52479  }
52480  }
52481  }
52482 
52483 fail:
52484  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQ_add_core_o'.\n"
52485  " Possible C/C++ prototypes are:\n"
52486  " faiss::IndexIVFPQ::add_core_o(faiss::Index::idx_t,float const *,long const *,float *,long const *)\n"
52487  " faiss::IndexIVFPQ::add_core_o(faiss::Index::idx_t,float const *,long const *,float *)\n");
52488  return 0;
52489 }
52490 
52491 
52492 SWIGINTERN PyObject *_wrap_IndexIVFPQ_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52493  PyObject *resultobj = 0;
52494  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52495  faiss::Index::idx_t arg2 ;
52496  float *arg3 = (float *) 0 ;
52497  void *argp1 = 0 ;
52498  int res1 = 0 ;
52499  long val2 ;
52500  int ecode2 = 0 ;
52501  void *argp3 = 0 ;
52502  int res3 = 0 ;
52503  PyObject * obj0 = 0 ;
52504  PyObject * obj1 = 0 ;
52505  PyObject * obj2 = 0 ;
52506 
52507  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQ_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
52508  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52509  if (!SWIG_IsOK(res1)) {
52510  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_train_residual" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
52511  }
52512  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52513  ecode2 = SWIG_AsVal_long(obj1, &val2);
52514  if (!SWIG_IsOK(ecode2)) {
52515  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52516  }
52517  arg2 = static_cast< faiss::Index::idx_t >(val2);
52518  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52519  if (!SWIG_IsOK(res3)) {
52520  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_train_residual" "', argument " "3"" of type '" "float const *""'");
52521  }
52522  arg3 = reinterpret_cast< float * >(argp3);
52523  {
52524  Py_BEGIN_ALLOW_THREADS
52525  try {
52526  (arg1)->train_residual(arg2,(float const *)arg3);
52527  } catch(faiss::FaissException & e) {
52528  PyEval_RestoreThread(_save);
52529  PyErr_SetString(PyExc_RuntimeError, e.what());
52530  SWIG_fail;
52531  }
52532  Py_END_ALLOW_THREADS
52533  }
52534  resultobj = SWIG_Py_Void();
52535  return resultobj;
52536 fail:
52537  return NULL;
52538 }
52539 
52540 
52541 SWIGINTERN PyObject *_wrap_IndexIVFPQ_train_residual_o(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52542  PyObject *resultobj = 0;
52543  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52544  faiss::Index::idx_t arg2 ;
52545  float *arg3 = (float *) 0 ;
52546  float *arg4 = (float *) 0 ;
52547  void *argp1 = 0 ;
52548  int res1 = 0 ;
52549  long val2 ;
52550  int ecode2 = 0 ;
52551  void *argp3 = 0 ;
52552  int res3 = 0 ;
52553  void *argp4 = 0 ;
52554  int res4 = 0 ;
52555  PyObject * obj0 = 0 ;
52556  PyObject * obj1 = 0 ;
52557  PyObject * obj2 = 0 ;
52558  PyObject * obj3 = 0 ;
52559 
52560  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_train_residual_o",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
52561  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52562  if (!SWIG_IsOK(res1)) {
52563  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
52564  }
52565  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52566  ecode2 = SWIG_AsVal_long(obj1, &val2);
52567  if (!SWIG_IsOK(ecode2)) {
52568  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52569  }
52570  arg2 = static_cast< faiss::Index::idx_t >(val2);
52571  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52572  if (!SWIG_IsOK(res3)) {
52573  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "3"" of type '" "float const *""'");
52574  }
52575  arg3 = reinterpret_cast< float * >(argp3);
52576  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
52577  if (!SWIG_IsOK(res4)) {
52578  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "4"" of type '" "float *""'");
52579  }
52580  arg4 = reinterpret_cast< float * >(argp4);
52581  {
52582  Py_BEGIN_ALLOW_THREADS
52583  try {
52584  (arg1)->train_residual_o(arg2,(float const *)arg3,arg4);
52585  } catch(faiss::FaissException & e) {
52586  PyEval_RestoreThread(_save);
52587  PyErr_SetString(PyExc_RuntimeError, e.what());
52588  SWIG_fail;
52589  }
52590  Py_END_ALLOW_THREADS
52591  }
52592  resultobj = SWIG_Py_Void();
52593  return resultobj;
52594 fail:
52595  return NULL;
52596 }
52597 
52598 
52599 SWIGINTERN PyObject *_wrap_IndexIVFPQ_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52600  PyObject *resultobj = 0;
52601  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52602  long arg2 ;
52603  long arg3 ;
52604  float *arg4 = (float *) 0 ;
52605  void *argp1 = 0 ;
52606  int res1 = 0 ;
52607  long val2 ;
52608  int ecode2 = 0 ;
52609  long val3 ;
52610  int ecode3 = 0 ;
52611  void *argp4 = 0 ;
52612  int res4 = 0 ;
52613  PyObject * obj0 = 0 ;
52614  PyObject * obj1 = 0 ;
52615  PyObject * obj2 = 0 ;
52616  PyObject * obj3 = 0 ;
52617 
52618  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
52619  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52620  if (!SWIG_IsOK(res1)) {
52621  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
52622  }
52623  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52624  ecode2 = SWIG_AsVal_long(obj1, &val2);
52625  if (!SWIG_IsOK(ecode2)) {
52626  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
52627  }
52628  arg2 = static_cast< long >(val2);
52629  ecode3 = SWIG_AsVal_long(obj2, &val3);
52630  if (!SWIG_IsOK(ecode3)) {
52631  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
52632  }
52633  arg3 = static_cast< long >(val3);
52634  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
52635  if (!SWIG_IsOK(res4)) {
52636  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
52637  }
52638  arg4 = reinterpret_cast< float * >(argp4);
52639  {
52640  Py_BEGIN_ALLOW_THREADS
52641  try {
52642  ((faiss::IndexIVFPQ const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
52643  } catch(faiss::FaissException & e) {
52644  PyEval_RestoreThread(_save);
52645  PyErr_SetString(PyExc_RuntimeError, e.what());
52646  SWIG_fail;
52647  }
52648  Py_END_ALLOW_THREADS
52649  }
52650  resultobj = SWIG_Py_Void();
52651  return resultobj;
52652 fail:
52653  return NULL;
52654 }
52655 
52656 
52657 SWIGINTERN PyObject *_wrap_IndexIVFPQ_find_duplicates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52658  PyObject *resultobj = 0;
52659  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52661  size_t *arg3 = (size_t *) 0 ;
52662  void *argp1 = 0 ;
52663  int res1 = 0 ;
52664  void *argp2 = 0 ;
52665  int res2 = 0 ;
52666  void *argp3 = 0 ;
52667  int res3 = 0 ;
52668  PyObject * obj0 = 0 ;
52669  PyObject * obj1 = 0 ;
52670  PyObject * obj2 = 0 ;
52671  size_t result;
52672 
52673  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQ_find_duplicates",&obj0,&obj1,&obj2)) SWIG_fail;
52674  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52675  if (!SWIG_IsOK(res1)) {
52676  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_find_duplicates" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
52677  }
52678  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52679  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
52680  if (!SWIG_IsOK(res2)) {
52681  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_find_duplicates" "', argument " "2"" of type '" "faiss::Index::idx_t *""'");
52682  }
52683  arg2 = reinterpret_cast< faiss::Index::idx_t * >(argp2);
52684  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
52685  if (!SWIG_IsOK(res3)) {
52686  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_find_duplicates" "', argument " "3"" of type '" "size_t *""'");
52687  }
52688  arg3 = reinterpret_cast< size_t * >(argp3);
52689  {
52690  Py_BEGIN_ALLOW_THREADS
52691  try {
52692  result = (size_t)((faiss::IndexIVFPQ const *)arg1)->find_duplicates(arg2,arg3);
52693  } catch(faiss::FaissException & e) {
52694  PyEval_RestoreThread(_save);
52695  PyErr_SetString(PyExc_RuntimeError, e.what());
52696  SWIG_fail;
52697  }
52698  Py_END_ALLOW_THREADS
52699  }
52700  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
52701  return resultobj;
52702 fail:
52703  return NULL;
52704 }
52705 
52706 
52707 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52708  PyObject *resultobj = 0;
52709  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52710  long arg2 ;
52711  float *arg3 = (float *) 0 ;
52712  uint8_t *arg4 = (uint8_t *) 0 ;
52713  void *argp1 = 0 ;
52714  int res1 = 0 ;
52715  long val2 ;
52716  int ecode2 = 0 ;
52717  void *argp3 = 0 ;
52718  int res3 = 0 ;
52719  void *argp4 = 0 ;
52720  int res4 = 0 ;
52721  PyObject * obj0 = 0 ;
52722  PyObject * obj1 = 0 ;
52723  PyObject * obj2 = 0 ;
52724  PyObject * obj3 = 0 ;
52725 
52726  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_encode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
52727  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52728  if (!SWIG_IsOK(res1)) {
52729  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
52730  }
52731  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52732  ecode2 = SWIG_AsVal_long(obj1, &val2);
52733  if (!SWIG_IsOK(ecode2)) {
52734  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode" "', argument " "2"" of type '" "long""'");
52735  }
52736  arg2 = static_cast< long >(val2);
52737  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52738  if (!SWIG_IsOK(res3)) {
52739  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode" "', argument " "3"" of type '" "float const *""'");
52740  }
52741  arg3 = reinterpret_cast< float * >(argp3);
52742  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
52743  if (!SWIG_IsOK(res4)) {
52744  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode" "', argument " "4"" of type '" "uint8_t *""'");
52745  }
52746  arg4 = reinterpret_cast< uint8_t * >(argp4);
52747  {
52748  Py_BEGIN_ALLOW_THREADS
52749  try {
52750  ((faiss::IndexIVFPQ const *)arg1)->encode(arg2,(float const *)arg3,arg4);
52751  } catch(faiss::FaissException & e) {
52752  PyEval_RestoreThread(_save);
52753  PyErr_SetString(PyExc_RuntimeError, e.what());
52754  SWIG_fail;
52755  }
52756  Py_END_ALLOW_THREADS
52757  }
52758  resultobj = SWIG_Py_Void();
52759  return resultobj;
52760 fail:
52761  return NULL;
52762 }
52763 
52764 
52765 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_multiple__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52766  PyObject *resultobj = 0;
52767  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52768  size_t arg2 ;
52769  long *arg3 = (long *) 0 ;
52770  float *arg4 = (float *) 0 ;
52771  uint8_t *arg5 = (uint8_t *) 0 ;
52772  bool arg6 ;
52773  void *argp1 = 0 ;
52774  int res1 = 0 ;
52775  size_t val2 ;
52776  int ecode2 = 0 ;
52777  void *argp3 = 0 ;
52778  int res3 = 0 ;
52779  void *argp4 = 0 ;
52780  int res4 = 0 ;
52781  void *argp5 = 0 ;
52782  int res5 = 0 ;
52783  bool val6 ;
52784  int ecode6 = 0 ;
52785  PyObject * obj0 = 0 ;
52786  PyObject * obj1 = 0 ;
52787  PyObject * obj2 = 0 ;
52788  PyObject * obj3 = 0 ;
52789  PyObject * obj4 = 0 ;
52790  PyObject * obj5 = 0 ;
52791 
52792  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIVFPQ_encode_multiple",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
52793  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52794  if (!SWIG_IsOK(res1)) {
52795  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
52796  }
52797  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52798  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
52799  if (!SWIG_IsOK(ecode2)) {
52800  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "2"" of type '" "size_t""'");
52801  }
52802  arg2 = static_cast< size_t >(val2);
52803  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
52804  if (!SWIG_IsOK(res3)) {
52805  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "3"" of type '" "long *""'");
52806  }
52807  arg3 = reinterpret_cast< long * >(argp3);
52808  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
52809  if (!SWIG_IsOK(res4)) {
52810  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "4"" of type '" "float const *""'");
52811  }
52812  arg4 = reinterpret_cast< float * >(argp4);
52813  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
52814  if (!SWIG_IsOK(res5)) {
52815  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "5"" of type '" "uint8_t *""'");
52816  }
52817  arg5 = reinterpret_cast< uint8_t * >(argp5);
52818  ecode6 = SWIG_AsVal_bool(obj5, &val6);
52819  if (!SWIG_IsOK(ecode6)) {
52820  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "6"" of type '" "bool""'");
52821  }
52822  arg6 = static_cast< bool >(val6);
52823  {
52824  Py_BEGIN_ALLOW_THREADS
52825  try {
52826  ((faiss::IndexIVFPQ const *)arg1)->encode_multiple(arg2,arg3,(float const *)arg4,arg5,arg6);
52827  } catch(faiss::FaissException & e) {
52828  PyEval_RestoreThread(_save);
52829  PyErr_SetString(PyExc_RuntimeError, e.what());
52830  SWIG_fail;
52831  }
52832  Py_END_ALLOW_THREADS
52833  }
52834  resultobj = SWIG_Py_Void();
52835  return resultobj;
52836 fail:
52837  return NULL;
52838 }
52839 
52840 
52841 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_multiple__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52842  PyObject *resultobj = 0;
52843  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52844  size_t arg2 ;
52845  long *arg3 = (long *) 0 ;
52846  float *arg4 = (float *) 0 ;
52847  uint8_t *arg5 = (uint8_t *) 0 ;
52848  void *argp1 = 0 ;
52849  int res1 = 0 ;
52850  size_t val2 ;
52851  int ecode2 = 0 ;
52852  void *argp3 = 0 ;
52853  int res3 = 0 ;
52854  void *argp4 = 0 ;
52855  int res4 = 0 ;
52856  void *argp5 = 0 ;
52857  int res5 = 0 ;
52858  PyObject * obj0 = 0 ;
52859  PyObject * obj1 = 0 ;
52860  PyObject * obj2 = 0 ;
52861  PyObject * obj3 = 0 ;
52862  PyObject * obj4 = 0 ;
52863 
52864  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_encode_multiple",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
52865  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
52866  if (!SWIG_IsOK(res1)) {
52867  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
52868  }
52869  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
52870  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
52871  if (!SWIG_IsOK(ecode2)) {
52872  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "2"" of type '" "size_t""'");
52873  }
52874  arg2 = static_cast< size_t >(val2);
52875  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
52876  if (!SWIG_IsOK(res3)) {
52877  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "3"" of type '" "long *""'");
52878  }
52879  arg3 = reinterpret_cast< long * >(argp3);
52880  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
52881  if (!SWIG_IsOK(res4)) {
52882  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "4"" of type '" "float const *""'");
52883  }
52884  arg4 = reinterpret_cast< float * >(argp4);
52885  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
52886  if (!SWIG_IsOK(res5)) {
52887  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "5"" of type '" "uint8_t *""'");
52888  }
52889  arg5 = reinterpret_cast< uint8_t * >(argp5);
52890  {
52891  Py_BEGIN_ALLOW_THREADS
52892  try {
52893  ((faiss::IndexIVFPQ const *)arg1)->encode_multiple(arg2,arg3,(float const *)arg4,arg5);
52894  } catch(faiss::FaissException & e) {
52895  PyEval_RestoreThread(_save);
52896  PyErr_SetString(PyExc_RuntimeError, e.what());
52897  SWIG_fail;
52898  }
52899  Py_END_ALLOW_THREADS
52900  }
52901  resultobj = SWIG_Py_Void();
52902  return resultobj;
52903 fail:
52904  return NULL;
52905 }
52906 
52907 
52908 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_multiple(PyObject *self, PyObject *args) {
52909  Py_ssize_t argc;
52910  PyObject *argv[7] = {
52911  0
52912  };
52913  Py_ssize_t ii;
52914 
52915  if (!PyTuple_Check(args)) SWIG_fail;
52916  argc = args ? PyObject_Length(args) : 0;
52917  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
52918  argv[ii] = PyTuple_GET_ITEM(args,ii);
52919  }
52920  if (argc == 5) {
52921  int _v;
52922  void *vptr = 0;
52923  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
52924  _v = SWIG_CheckState(res);
52925  if (_v) {
52926  {
52927  int res = SWIG_AsVal_size_t(argv[1], NULL);
52928  _v = SWIG_CheckState(res);
52929  }
52930  if (_v) {
52931  void *vptr = 0;
52932  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
52933  _v = SWIG_CheckState(res);
52934  if (_v) {
52935  void *vptr = 0;
52936  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
52937  _v = SWIG_CheckState(res);
52938  if (_v) {
52939  void *vptr = 0;
52940  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_unsigned_char, 0);
52941  _v = SWIG_CheckState(res);
52942  if (_v) {
52943  return _wrap_IndexIVFPQ_encode_multiple__SWIG_1(self, args);
52944  }
52945  }
52946  }
52947  }
52948  }
52949  }
52950  if (argc == 6) {
52951  int _v;
52952  void *vptr = 0;
52953  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
52954  _v = SWIG_CheckState(res);
52955  if (_v) {
52956  {
52957  int res = SWIG_AsVal_size_t(argv[1], NULL);
52958  _v = SWIG_CheckState(res);
52959  }
52960  if (_v) {
52961  void *vptr = 0;
52962  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
52963  _v = SWIG_CheckState(res);
52964  if (_v) {
52965  void *vptr = 0;
52966  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
52967  _v = SWIG_CheckState(res);
52968  if (_v) {
52969  void *vptr = 0;
52970  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_unsigned_char, 0);
52971  _v = SWIG_CheckState(res);
52972  if (_v) {
52973  {
52974  int res = SWIG_AsVal_bool(argv[5], NULL);
52975  _v = SWIG_CheckState(res);
52976  }
52977  if (_v) {
52978  return _wrap_IndexIVFPQ_encode_multiple__SWIG_0(self, args);
52979  }
52980  }
52981  }
52982  }
52983  }
52984  }
52985  }
52986 
52987 fail:
52988  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQ_encode_multiple'.\n"
52989  " Possible C/C++ prototypes are:\n"
52990  " faiss::IndexIVFPQ::encode_multiple(size_t,long *,float const *,uint8_t *,bool) const\n"
52991  " faiss::IndexIVFPQ::encode_multiple(size_t,long *,float const *,uint8_t *) const\n");
52992  return 0;
52993 }
52994 
52995 
52996 SWIGINTERN PyObject *_wrap_IndexIVFPQ_decode_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52997  PyObject *resultobj = 0;
52998  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
52999  size_t arg2 ;
53000  long *arg3 = (long *) 0 ;
53001  uint8_t *arg4 = (uint8_t *) 0 ;
53002  float *arg5 = (float *) 0 ;
53003  void *argp1 = 0 ;
53004  int res1 = 0 ;
53005  size_t val2 ;
53006  int ecode2 = 0 ;
53007  void *argp3 = 0 ;
53008  int res3 = 0 ;
53009  void *argp4 = 0 ;
53010  int res4 = 0 ;
53011  void *argp5 = 0 ;
53012  int res5 = 0 ;
53013  PyObject * obj0 = 0 ;
53014  PyObject * obj1 = 0 ;
53015  PyObject * obj2 = 0 ;
53016  PyObject * obj3 = 0 ;
53017  PyObject * obj4 = 0 ;
53018 
53019  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_decode_multiple",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
53020  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
53021  if (!SWIG_IsOK(res1)) {
53022  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
53023  }
53024  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
53025  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53026  if (!SWIG_IsOK(ecode2)) {
53027  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "2"" of type '" "size_t""'");
53028  }
53029  arg2 = static_cast< size_t >(val2);
53030  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
53031  if (!SWIG_IsOK(res3)) {
53032  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "3"" of type '" "long const *""'");
53033  }
53034  arg3 = reinterpret_cast< long * >(argp3);
53035  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
53036  if (!SWIG_IsOK(res4)) {
53037  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "4"" of type '" "uint8_t const *""'");
53038  }
53039  arg4 = reinterpret_cast< uint8_t * >(argp4);
53040  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
53041  if (!SWIG_IsOK(res5)) {
53042  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "5"" of type '" "float *""'");
53043  }
53044  arg5 = reinterpret_cast< float * >(argp5);
53045  {
53046  Py_BEGIN_ALLOW_THREADS
53047  try {
53048  ((faiss::IndexIVFPQ const *)arg1)->decode_multiple(arg2,(long const *)arg3,(uint8_t const *)arg4,arg5);
53049  } catch(faiss::FaissException & e) {
53050  PyEval_RestoreThread(_save);
53051  PyErr_SetString(PyExc_RuntimeError, e.what());
53052  SWIG_fail;
53053  }
53054  Py_END_ALLOW_THREADS
53055  }
53056  resultobj = SWIG_Py_Void();
53057  return resultobj;
53058 fail:
53059  return NULL;
53060 }
53061 
53062 
53063 SWIGINTERN PyObject *_wrap_IndexIVFPQ_get_InvertedListScanner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53064  PyObject *resultobj = 0;
53065  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
53066  bool arg2 ;
53067  void *argp1 = 0 ;
53068  int res1 = 0 ;
53069  bool val2 ;
53070  int ecode2 = 0 ;
53071  PyObject * obj0 = 0 ;
53072  PyObject * obj1 = 0 ;
53073  faiss::InvertedListScanner *result = 0 ;
53074 
53075  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
53076  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
53077  if (!SWIG_IsOK(res1)) {
53078  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
53079  }
53080  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
53081  ecode2 = SWIG_AsVal_bool(obj1, &val2);
53082  if (!SWIG_IsOK(ecode2)) {
53083  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
53084  }
53085  arg2 = static_cast< bool >(val2);
53086  {
53087  Py_BEGIN_ALLOW_THREADS
53088  try {
53089  result = (faiss::InvertedListScanner *)((faiss::IndexIVFPQ const *)arg1)->get_InvertedListScanner(arg2);
53090  } catch(faiss::FaissException & e) {
53091  PyEval_RestoreThread(_save);
53092  PyErr_SetString(PyExc_RuntimeError, e.what());
53093  SWIG_fail;
53094  }
53095  Py_END_ALLOW_THREADS
53096  }
53097  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
53098  return resultobj;
53099 fail:
53100  return NULL;
53101 }
53102 
53103 
53104 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precompute_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53105  PyObject *resultobj = 0;
53106  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
53107  void *argp1 = 0 ;
53108  int res1 = 0 ;
53109  PyObject * obj0 = 0 ;
53110 
53111  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_precompute_table",&obj0)) SWIG_fail;
53112  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
53113  if (!SWIG_IsOK(res1)) {
53114  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_precompute_table" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
53115  }
53116  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
53117  {
53118  Py_BEGIN_ALLOW_THREADS
53119  try {
53120  (arg1)->precompute_table();
53121  } catch(faiss::FaissException & e) {
53122  PyEval_RestoreThread(_save);
53123  PyErr_SetString(PyExc_RuntimeError, e.what());
53124  SWIG_fail;
53125  }
53126  Py_END_ALLOW_THREADS
53127  }
53128  resultobj = SWIG_Py_Void();
53129  return resultobj;
53130 fail:
53131  return NULL;
53132 }
53133 
53134 
53135 SWIGINTERN PyObject *_wrap_new_IndexIVFPQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53136  PyObject *resultobj = 0;
53137  faiss::IndexIVFPQ *result = 0 ;
53138 
53139  if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFPQ")) SWIG_fail;
53140  {
53141  Py_BEGIN_ALLOW_THREADS
53142  try {
53143  result = (faiss::IndexIVFPQ *)new faiss::IndexIVFPQ();
53144  } catch(faiss::FaissException & e) {
53145  PyEval_RestoreThread(_save);
53146  PyErr_SetString(PyExc_RuntimeError, e.what());
53147  SWIG_fail;
53148  }
53149  Py_END_ALLOW_THREADS
53150  }
53151  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_POINTER_NEW | 0 );
53152  return resultobj;
53153 fail:
53154  return NULL;
53155 }
53156 
53157 
53158 SWIGINTERN PyObject *_wrap_new_IndexIVFPQ(PyObject *self, PyObject *args) {
53159  Py_ssize_t argc;
53160  PyObject *argv[6] = {
53161  0
53162  };
53163  Py_ssize_t ii;
53164 
53165  if (!PyTuple_Check(args)) SWIG_fail;
53166  argc = args ? PyObject_Length(args) : 0;
53167  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
53168  argv[ii] = PyTuple_GET_ITEM(args,ii);
53169  }
53170  if (argc == 0) {
53171  return _wrap_new_IndexIVFPQ__SWIG_1(self, args);
53172  }
53173  if (argc == 5) {
53174  int _v;
53175  void *vptr = 0;
53176  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
53177  _v = SWIG_CheckState(res);
53178  if (_v) {
53179  {
53180  int res = SWIG_AsVal_size_t(argv[1], NULL);
53181  _v = SWIG_CheckState(res);
53182  }
53183  if (_v) {
53184  {
53185  int res = SWIG_AsVal_size_t(argv[2], NULL);
53186  _v = SWIG_CheckState(res);
53187  }
53188  if (_v) {
53189  {
53190  int res = SWIG_AsVal_size_t(argv[3], NULL);
53191  _v = SWIG_CheckState(res);
53192  }
53193  if (_v) {
53194  {
53195  int res = SWIG_AsVal_size_t(argv[4], NULL);
53196  _v = SWIG_CheckState(res);
53197  }
53198  if (_v) {
53199  return _wrap_new_IndexIVFPQ__SWIG_0(self, args);
53200  }
53201  }
53202  }
53203  }
53204  }
53205  }
53206 
53207 fail:
53208  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFPQ'.\n"
53209  " Possible C/C++ prototypes are:\n"
53210  " faiss::IndexIVFPQ::IndexIVFPQ(faiss::Index *,size_t,size_t,size_t,size_t)\n"
53211  " faiss::IndexIVFPQ::IndexIVFPQ()\n");
53212  return 0;
53213 }
53214 
53215 
53216 SWIGINTERN PyObject *_wrap_delete_IndexIVFPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53217  PyObject *resultobj = 0;
53218  faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
53219  void *argp1 = 0 ;
53220  int res1 = 0 ;
53221  PyObject * obj0 = 0 ;
53222 
53223  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFPQ",&obj0)) SWIG_fail;
53224  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_POINTER_DISOWN | 0 );
53225  if (!SWIG_IsOK(res1)) {
53226  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFPQ" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
53227  }
53228  arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
53229  delete arg1;
53230  resultobj = SWIG_Py_Void();
53231  return resultobj;
53232 fail:
53233  return NULL;
53234 }
53235 
53236 
53237 SWIGINTERN PyObject *IndexIVFPQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53238  PyObject *obj;
53239  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
53240  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_NewClientData(obj));
53241  return SWIG_Py_Void();
53242 }
53243 
53244 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_nrefine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53245  PyObject *resultobj = 0;
53247  size_t arg2 ;
53248  void *argp1 = 0 ;
53249  int res1 = 0 ;
53250  size_t val2 ;
53251  int ecode2 = 0 ;
53252  PyObject * obj0 = 0 ;
53253  PyObject * obj1 = 0 ;
53254 
53255  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_nrefine_set",&obj0,&obj1)) SWIG_fail;
53256  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53257  if (!SWIG_IsOK(res1)) {
53258  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_nrefine_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53259  }
53260  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53261  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53262  if (!SWIG_IsOK(ecode2)) {
53263  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_nrefine_set" "', argument " "2"" of type '" "size_t""'");
53264  }
53265  arg2 = static_cast< size_t >(val2);
53266  if (arg1) (arg1)->nrefine = arg2;
53267  resultobj = SWIG_Py_Void();
53268  return resultobj;
53269 fail:
53270  return NULL;
53271 }
53272 
53273 
53274 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_nrefine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53275  PyObject *resultobj = 0;
53277  void *argp1 = 0 ;
53278  int res1 = 0 ;
53279  PyObject * obj0 = 0 ;
53280  size_t result;
53281 
53282  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_nrefine_get",&obj0)) SWIG_fail;
53283  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53284  if (!SWIG_IsOK(res1)) {
53285  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_nrefine_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53286  }
53287  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53288  result = (size_t) ((arg1)->nrefine);
53289  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
53290  return resultobj;
53291 fail:
53292  return NULL;
53293 }
53294 
53295 
53296 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_n_hamming_pass_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53297  PyObject *resultobj = 0;
53299  size_t arg2 ;
53300  void *argp1 = 0 ;
53301  int res1 = 0 ;
53302  size_t val2 ;
53303  int ecode2 = 0 ;
53304  PyObject * obj0 = 0 ;
53305  PyObject * obj1 = 0 ;
53306 
53307  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_n_hamming_pass_set",&obj0,&obj1)) SWIG_fail;
53308  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53309  if (!SWIG_IsOK(res1)) {
53310  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_n_hamming_pass_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53311  }
53312  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53313  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53314  if (!SWIG_IsOK(ecode2)) {
53315  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_n_hamming_pass_set" "', argument " "2"" of type '" "size_t""'");
53316  }
53317  arg2 = static_cast< size_t >(val2);
53318  if (arg1) (arg1)->n_hamming_pass = arg2;
53319  resultobj = SWIG_Py_Void();
53320  return resultobj;
53321 fail:
53322  return NULL;
53323 }
53324 
53325 
53326 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_n_hamming_pass_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53327  PyObject *resultobj = 0;
53329  void *argp1 = 0 ;
53330  int res1 = 0 ;
53331  PyObject * obj0 = 0 ;
53332  size_t result;
53333 
53334  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_n_hamming_pass_get",&obj0)) SWIG_fail;
53335  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53336  if (!SWIG_IsOK(res1)) {
53337  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_n_hamming_pass_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53338  }
53339  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53340  result = (size_t) ((arg1)->n_hamming_pass);
53341  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
53342  return resultobj;
53343 fail:
53344  return NULL;
53345 }
53346 
53347 
53348 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_search_cycles_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53349  PyObject *resultobj = 0;
53351  size_t arg2 ;
53352  void *argp1 = 0 ;
53353  int res1 = 0 ;
53354  size_t val2 ;
53355  int ecode2 = 0 ;
53356  PyObject * obj0 = 0 ;
53357  PyObject * obj1 = 0 ;
53358 
53359  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_search_cycles_set",&obj0,&obj1)) SWIG_fail;
53360  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53361  if (!SWIG_IsOK(res1)) {
53362  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_search_cycles_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53363  }
53364  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53365  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53366  if (!SWIG_IsOK(ecode2)) {
53367  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_search_cycles_set" "', argument " "2"" of type '" "size_t""'");
53368  }
53369  arg2 = static_cast< size_t >(val2);
53370  if (arg1) (arg1)->search_cycles = arg2;
53371  resultobj = SWIG_Py_Void();
53372  return resultobj;
53373 fail:
53374  return NULL;
53375 }
53376 
53377 
53378 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_search_cycles_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53379  PyObject *resultobj = 0;
53381  void *argp1 = 0 ;
53382  int res1 = 0 ;
53383  PyObject * obj0 = 0 ;
53384  size_t result;
53385 
53386  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_search_cycles_get",&obj0)) SWIG_fail;
53387  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53388  if (!SWIG_IsOK(res1)) {
53389  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_search_cycles_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53390  }
53391  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53392  result = (size_t) ((arg1)->search_cycles);
53393  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
53394  return resultobj;
53395 fail:
53396  return NULL;
53397 }
53398 
53399 
53400 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_refine_cycles_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53401  PyObject *resultobj = 0;
53403  size_t arg2 ;
53404  void *argp1 = 0 ;
53405  int res1 = 0 ;
53406  size_t val2 ;
53407  int ecode2 = 0 ;
53408  PyObject * obj0 = 0 ;
53409  PyObject * obj1 = 0 ;
53410 
53411  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_refine_cycles_set",&obj0,&obj1)) SWIG_fail;
53412  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53413  if (!SWIG_IsOK(res1)) {
53414  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_refine_cycles_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53415  }
53416  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53417  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53418  if (!SWIG_IsOK(ecode2)) {
53419  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_refine_cycles_set" "', argument " "2"" of type '" "size_t""'");
53420  }
53421  arg2 = static_cast< size_t >(val2);
53422  if (arg1) (arg1)->refine_cycles = arg2;
53423  resultobj = SWIG_Py_Void();
53424  return resultobj;
53425 fail:
53426  return NULL;
53427 }
53428 
53429 
53430 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_refine_cycles_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53431  PyObject *resultobj = 0;
53433  void *argp1 = 0 ;
53434  int res1 = 0 ;
53435  PyObject * obj0 = 0 ;
53436  size_t result;
53437 
53438  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_refine_cycles_get",&obj0)) SWIG_fail;
53439  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53440  if (!SWIG_IsOK(res1)) {
53441  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_refine_cycles_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53442  }
53443  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53444  result = (size_t) ((arg1)->refine_cycles);
53445  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
53446  return resultobj;
53447 fail:
53448  return NULL;
53449 }
53450 
53451 
53452 SWIGINTERN PyObject *_wrap_new_IndexIVFPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53453  PyObject *resultobj = 0;
53454  faiss::IndexIVFPQStats *result = 0 ;
53455 
53456  if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFPQStats")) SWIG_fail;
53457  {
53458  Py_BEGIN_ALLOW_THREADS
53459  try {
53461  } catch(faiss::FaissException & e) {
53462  PyEval_RestoreThread(_save);
53463  PyErr_SetString(PyExc_RuntimeError, e.what());
53464  SWIG_fail;
53465  }
53466  Py_END_ALLOW_THREADS
53467  }
53468  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQStats, SWIG_POINTER_NEW | 0 );
53469  return resultobj;
53470 fail:
53471  return NULL;
53472 }
53473 
53474 
53475 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53476  PyObject *resultobj = 0;
53478  void *argp1 = 0 ;
53479  int res1 = 0 ;
53480  PyObject * obj0 = 0 ;
53481 
53482  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_reset",&obj0)) SWIG_fail;
53483  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
53484  if (!SWIG_IsOK(res1)) {
53485  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_reset" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53486  }
53487  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53488  {
53489  Py_BEGIN_ALLOW_THREADS
53490  try {
53491  (arg1)->reset();
53492  } catch(faiss::FaissException & e) {
53493  PyEval_RestoreThread(_save);
53494  PyErr_SetString(PyExc_RuntimeError, e.what());
53495  SWIG_fail;
53496  }
53497  Py_END_ALLOW_THREADS
53498  }
53499  resultobj = SWIG_Py_Void();
53500  return resultobj;
53501 fail:
53502  return NULL;
53503 }
53504 
53505 
53506 SWIGINTERN PyObject *_wrap_delete_IndexIVFPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53507  PyObject *resultobj = 0;
53509  void *argp1 = 0 ;
53510  int res1 = 0 ;
53511  PyObject * obj0 = 0 ;
53512 
53513  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFPQStats",&obj0)) SWIG_fail;
53514  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, SWIG_POINTER_DISOWN | 0 );
53515  if (!SWIG_IsOK(res1)) {
53516  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFPQStats" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
53517  }
53518  arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
53519  delete arg1;
53520  resultobj = SWIG_Py_Void();
53521  return resultobj;
53522 fail:
53523  return NULL;
53524 }
53525 
53526 
53527 SWIGINTERN PyObject *IndexIVFPQStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53528  PyObject *obj;
53529  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
53530  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFPQStats, SWIG_NewClientData(obj));
53531  return SWIG_Py_Void();
53532 }
53533 
53534 SWIGINTERN int Swig_var_indexIVFPQ_stats_set(PyObject *_val) {
53535  {
53536  void *argp = 0;
53537  int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0);
53538  if (!SWIG_IsOK(res)) {
53539  SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::indexIVFPQ_stats""' of type '""faiss::IndexIVFPQStats""'");
53540  }
53541  if (!argp) {
53542  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::indexIVFPQ_stats""' of type '""faiss::IndexIVFPQStats""'");
53543  } else {
53544  faiss::IndexIVFPQStats * temp;
53545  temp = reinterpret_cast< faiss::IndexIVFPQStats * >(argp);
53546  faiss::indexIVFPQ_stats = *temp;
53547  if (SWIG_IsNewObj(res)) delete temp;
53548  }
53549  }
53550  return 0;
53551 fail:
53552  return 1;
53553 }
53554 
53555 
53556 SWIGINTERN PyObject *Swig_var_indexIVFPQ_stats_get(void) {
53557  PyObject *pyobj = 0;
53558 
53559  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::indexIVFPQ_stats), SWIGTYPE_p_faiss__IndexIVFPQStats, 0 );
53560  return pyobj;
53561 }
53562 
53563 
53564 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53565  PyObject *resultobj = 0;
53566  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53568  void *argp1 = 0 ;
53569  int res1 = 0 ;
53570  void *argp2 = 0 ;
53571  int res2 = 0 ;
53572  PyObject * obj0 = 0 ;
53573  PyObject * obj1 = 0 ;
53574 
53575  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_refine_pq_set",&obj0,&obj1)) SWIG_fail;
53576  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53577  if (!SWIG_IsOK(res1)) {
53578  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_pq_set" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53579  }
53580  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53581  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
53582  if (!SWIG_IsOK(res2)) {
53583  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_refine_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
53584  }
53585  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
53586  if (arg1) (arg1)->refine_pq = *arg2;
53587  resultobj = SWIG_Py_Void();
53588  return resultobj;
53589 fail:
53590  return NULL;
53591 }
53592 
53593 
53594 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53595  PyObject *resultobj = 0;
53596  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53597  void *argp1 = 0 ;
53598  int res1 = 0 ;
53599  PyObject * obj0 = 0 ;
53600  faiss::ProductQuantizer *result = 0 ;
53601 
53602  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_refine_pq_get",&obj0)) SWIG_fail;
53603  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53604  if (!SWIG_IsOK(res1)) {
53605  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_pq_get" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53606  }
53607  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53608  result = (faiss::ProductQuantizer *)& ((arg1)->refine_pq);
53609  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
53610  return resultobj;
53611 fail:
53612  return NULL;
53613 }
53614 
53615 
53616 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53617  PyObject *resultobj = 0;
53618  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53619  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
53620  void *argp1 = 0 ;
53621  int res1 = 0 ;
53622  void *argp2 = 0 ;
53623  int res2 = 0 ;
53624  PyObject * obj0 = 0 ;
53625  PyObject * obj1 = 0 ;
53626 
53627  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_refine_codes_set",&obj0,&obj1)) SWIG_fail;
53628  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53629  if (!SWIG_IsOK(res1)) {
53630  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_codes_set" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53631  }
53632  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53633  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
53634  if (!SWIG_IsOK(res2)) {
53635  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_refine_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
53636  }
53637  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
53638  if (arg1) (arg1)->refine_codes = *arg2;
53639  resultobj = SWIG_Py_Void();
53640  return resultobj;
53641 fail:
53642  return NULL;
53643 }
53644 
53645 
53646 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53647  PyObject *resultobj = 0;
53648  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53649  void *argp1 = 0 ;
53650  int res1 = 0 ;
53651  PyObject * obj0 = 0 ;
53652  std::vector< uint8_t > *result = 0 ;
53653 
53654  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_refine_codes_get",&obj0)) SWIG_fail;
53655  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53656  if (!SWIG_IsOK(res1)) {
53657  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_codes_get" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53658  }
53659  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53660  result = (std::vector< uint8_t > *)& ((arg1)->refine_codes);
53661  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
53662  return resultobj;
53663 fail:
53664  return NULL;
53665 }
53666 
53667 
53668 SWIGINTERN PyObject *_wrap_IndexIVFPQR_k_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53669  PyObject *resultobj = 0;
53670  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53671  float arg2 ;
53672  void *argp1 = 0 ;
53673  int res1 = 0 ;
53674  float val2 ;
53675  int ecode2 = 0 ;
53676  PyObject * obj0 = 0 ;
53677  PyObject * obj1 = 0 ;
53678 
53679  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_k_factor_set",&obj0,&obj1)) SWIG_fail;
53680  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53681  if (!SWIG_IsOK(res1)) {
53682  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_k_factor_set" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53683  }
53684  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53685  ecode2 = SWIG_AsVal_float(obj1, &val2);
53686  if (!SWIG_IsOK(ecode2)) {
53687  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_k_factor_set" "', argument " "2"" of type '" "float""'");
53688  }
53689  arg2 = static_cast< float >(val2);
53690  if (arg1) (arg1)->k_factor = arg2;
53691  resultobj = SWIG_Py_Void();
53692  return resultobj;
53693 fail:
53694  return NULL;
53695 }
53696 
53697 
53698 SWIGINTERN PyObject *_wrap_IndexIVFPQR_k_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53699  PyObject *resultobj = 0;
53700  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53701  void *argp1 = 0 ;
53702  int res1 = 0 ;
53703  PyObject * obj0 = 0 ;
53704  float result;
53705 
53706  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_k_factor_get",&obj0)) SWIG_fail;
53707  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53708  if (!SWIG_IsOK(res1)) {
53709  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_k_factor_get" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53710  }
53711  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53712  result = (float) ((arg1)->k_factor);
53713  resultobj = SWIG_From_float(static_cast< float >(result));
53714  return resultobj;
53715 fail:
53716  return NULL;
53717 }
53718 
53719 
53720 SWIGINTERN PyObject *_wrap_new_IndexIVFPQR__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53721  PyObject *resultobj = 0;
53722  faiss::Index *arg1 = (faiss::Index *) 0 ;
53723  size_t arg2 ;
53724  size_t arg3 ;
53725  size_t arg4 ;
53726  size_t arg5 ;
53727  size_t arg6 ;
53728  size_t arg7 ;
53729  void *argp1 = 0 ;
53730  int res1 = 0 ;
53731  size_t val2 ;
53732  int ecode2 = 0 ;
53733  size_t val3 ;
53734  int ecode3 = 0 ;
53735  size_t val4 ;
53736  int ecode4 = 0 ;
53737  size_t val5 ;
53738  int ecode5 = 0 ;
53739  size_t val6 ;
53740  int ecode6 = 0 ;
53741  size_t val7 ;
53742  int ecode7 = 0 ;
53743  PyObject * obj0 = 0 ;
53744  PyObject * obj1 = 0 ;
53745  PyObject * obj2 = 0 ;
53746  PyObject * obj3 = 0 ;
53747  PyObject * obj4 = 0 ;
53748  PyObject * obj5 = 0 ;
53749  PyObject * obj6 = 0 ;
53750  faiss::IndexIVFPQR *result = 0 ;
53751 
53752  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:new_IndexIVFPQR",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
53753  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
53754  if (!SWIG_IsOK(res1)) {
53755  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFPQR" "', argument " "1"" of type '" "faiss::Index *""'");
53756  }
53757  arg1 = reinterpret_cast< faiss::Index * >(argp1);
53758  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53759  if (!SWIG_IsOK(ecode2)) {
53760  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFPQR" "', argument " "2"" of type '" "size_t""'");
53761  }
53762  arg2 = static_cast< size_t >(val2);
53763  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
53764  if (!SWIG_IsOK(ecode3)) {
53765  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFPQR" "', argument " "3"" of type '" "size_t""'");
53766  }
53767  arg3 = static_cast< size_t >(val3);
53768  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
53769  if (!SWIG_IsOK(ecode4)) {
53770  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFPQR" "', argument " "4"" of type '" "size_t""'");
53771  }
53772  arg4 = static_cast< size_t >(val4);
53773  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
53774  if (!SWIG_IsOK(ecode5)) {
53775  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IndexIVFPQR" "', argument " "5"" of type '" "size_t""'");
53776  }
53777  arg5 = static_cast< size_t >(val5);
53778  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
53779  if (!SWIG_IsOK(ecode6)) {
53780  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_IndexIVFPQR" "', argument " "6"" of type '" "size_t""'");
53781  }
53782  arg6 = static_cast< size_t >(val6);
53783  ecode7 = SWIG_AsVal_size_t(obj6, &val7);
53784  if (!SWIG_IsOK(ecode7)) {
53785  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IndexIVFPQR" "', argument " "7"" of type '" "size_t""'");
53786  }
53787  arg7 = static_cast< size_t >(val7);
53788  {
53789  Py_BEGIN_ALLOW_THREADS
53790  try {
53791  result = (faiss::IndexIVFPQR *)new faiss::IndexIVFPQR(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
53792  } catch(faiss::FaissException & e) {
53793  PyEval_RestoreThread(_save);
53794  PyErr_SetString(PyExc_RuntimeError, e.what());
53795  SWIG_fail;
53796  }
53797  Py_END_ALLOW_THREADS
53798  }
53799  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_POINTER_NEW | 0 );
53800  return resultobj;
53801 fail:
53802  return NULL;
53803 }
53804 
53805 
53806 SWIGINTERN PyObject *_wrap_IndexIVFPQR_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53807  PyObject *resultobj = 0;
53808  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53809  void *argp1 = 0 ;
53810  int res1 = 0 ;
53811  PyObject * obj0 = 0 ;
53812 
53813  if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_reset",&obj0)) SWIG_fail;
53814  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53815  if (!SWIG_IsOK(res1)) {
53816  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_reset" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53817  }
53818  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53819  {
53820  Py_BEGIN_ALLOW_THREADS
53821  try {
53822  (arg1)->reset();
53823  } catch(faiss::FaissException & e) {
53824  PyEval_RestoreThread(_save);
53825  PyErr_SetString(PyExc_RuntimeError, e.what());
53826  SWIG_fail;
53827  }
53828  Py_END_ALLOW_THREADS
53829  }
53830  resultobj = SWIG_Py_Void();
53831  return resultobj;
53832 fail:
53833  return NULL;
53834 }
53835 
53836 
53837 SWIGINTERN PyObject *_wrap_IndexIVFPQR_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53838  PyObject *resultobj = 0;
53839  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53840  faiss::IDSelector *arg2 = 0 ;
53841  void *argp1 = 0 ;
53842  int res1 = 0 ;
53843  void *argp2 = 0 ;
53844  int res2 = 0 ;
53845  PyObject * obj0 = 0 ;
53846  PyObject * obj1 = 0 ;
53847  long result;
53848 
53849  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_remove_ids",&obj0,&obj1)) SWIG_fail;
53850  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53851  if (!SWIG_IsOK(res1)) {
53852  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_remove_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53853  }
53854  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53855  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
53856  if (!SWIG_IsOK(res2)) {
53857  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
53858  }
53859  if (!argp2) {
53860  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFPQR_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
53861  }
53862  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
53863  {
53864  Py_BEGIN_ALLOW_THREADS
53865  try {
53866  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
53867  } catch(faiss::FaissException & e) {
53868  PyEval_RestoreThread(_save);
53869  PyErr_SetString(PyExc_RuntimeError, e.what());
53870  SWIG_fail;
53871  }
53872  Py_END_ALLOW_THREADS
53873  }
53874  resultobj = SWIG_From_long(static_cast< long >(result));
53875  return resultobj;
53876 fail:
53877  return NULL;
53878 }
53879 
53880 
53881 SWIGINTERN PyObject *_wrap_IndexIVFPQR_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53882  PyObject *resultobj = 0;
53883  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53884  faiss::Index::idx_t arg2 ;
53885  float *arg3 = (float *) 0 ;
53886  void *argp1 = 0 ;
53887  int res1 = 0 ;
53888  long val2 ;
53889  int ecode2 = 0 ;
53890  void *argp3 = 0 ;
53891  int res3 = 0 ;
53892  PyObject * obj0 = 0 ;
53893  PyObject * obj1 = 0 ;
53894  PyObject * obj2 = 0 ;
53895 
53896  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQR_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
53897  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53898  if (!SWIG_IsOK(res1)) {
53899  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_train_residual" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53900  }
53901  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53902  ecode2 = SWIG_AsVal_long(obj1, &val2);
53903  if (!SWIG_IsOK(ecode2)) {
53904  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
53905  }
53906  arg2 = static_cast< faiss::Index::idx_t >(val2);
53907  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
53908  if (!SWIG_IsOK(res3)) {
53909  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_train_residual" "', argument " "3"" of type '" "float const *""'");
53910  }
53911  arg3 = reinterpret_cast< float * >(argp3);
53912  {
53913  Py_BEGIN_ALLOW_THREADS
53914  try {
53915  (arg1)->train_residual(arg2,(float const *)arg3);
53916  } catch(faiss::FaissException & e) {
53917  PyEval_RestoreThread(_save);
53918  PyErr_SetString(PyExc_RuntimeError, e.what());
53919  SWIG_fail;
53920  }
53921  Py_END_ALLOW_THREADS
53922  }
53923  resultobj = SWIG_Py_Void();
53924  return resultobj;
53925 fail:
53926  return NULL;
53927 }
53928 
53929 
53930 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53931  PyObject *resultobj = 0;
53932  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53933  faiss::Index::idx_t arg2 ;
53934  float *arg3 = (float *) 0 ;
53935  long *arg4 = (long *) 0 ;
53936  void *argp1 = 0 ;
53937  int res1 = 0 ;
53938  long val2 ;
53939  int ecode2 = 0 ;
53940  void *argp3 = 0 ;
53941  int res3 = 0 ;
53942  void *argp4 = 0 ;
53943  int res4 = 0 ;
53944  PyObject * obj0 = 0 ;
53945  PyObject * obj1 = 0 ;
53946  PyObject * obj2 = 0 ;
53947  PyObject * obj3 = 0 ;
53948 
53949  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQR_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
53950  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53951  if (!SWIG_IsOK(res1)) {
53952  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53953  }
53954  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53955  ecode2 = SWIG_AsVal_long(obj1, &val2);
53956  if (!SWIG_IsOK(ecode2)) {
53957  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
53958  }
53959  arg2 = static_cast< faiss::Index::idx_t >(val2);
53960  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
53961  if (!SWIG_IsOK(res3)) {
53962  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "3"" of type '" "float const *""'");
53963  }
53964  arg3 = reinterpret_cast< float * >(argp3);
53965  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
53966  if (!SWIG_IsOK(res4)) {
53967  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "4"" of type '" "long const *""'");
53968  }
53969  arg4 = reinterpret_cast< long * >(argp4);
53970  {
53971  Py_BEGIN_ALLOW_THREADS
53972  try {
53973  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
53974  } catch(faiss::FaissException & e) {
53975  PyEval_RestoreThread(_save);
53976  PyErr_SetString(PyExc_RuntimeError, e.what());
53977  SWIG_fail;
53978  }
53979  Py_END_ALLOW_THREADS
53980  }
53981  resultobj = SWIG_Py_Void();
53982  return resultobj;
53983 fail:
53984  return NULL;
53985 }
53986 
53987 
53988 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_core__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53989  PyObject *resultobj = 0;
53990  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53991  faiss::Index::idx_t arg2 ;
53992  float *arg3 = (float *) 0 ;
53993  long *arg4 = (long *) 0 ;
53994  long *arg5 = (long *) 0 ;
53995  void *argp1 = 0 ;
53996  int res1 = 0 ;
53997  long val2 ;
53998  int ecode2 = 0 ;
53999  void *argp3 = 0 ;
54000  int res3 = 0 ;
54001  void *argp4 = 0 ;
54002  int res4 = 0 ;
54003  void *argp5 = 0 ;
54004  int res5 = 0 ;
54005  PyObject * obj0 = 0 ;
54006  PyObject * obj1 = 0 ;
54007  PyObject * obj2 = 0 ;
54008  PyObject * obj3 = 0 ;
54009  PyObject * obj4 = 0 ;
54010 
54011  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQR_add_core",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
54012  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
54013  if (!SWIG_IsOK(res1)) {
54014  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_add_core" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
54015  }
54016  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
54017  ecode2 = SWIG_AsVal_long(obj1, &val2);
54018  if (!SWIG_IsOK(ecode2)) {
54019  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_add_core" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54020  }
54021  arg2 = static_cast< faiss::Index::idx_t >(val2);
54022  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54023  if (!SWIG_IsOK(res3)) {
54024  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_add_core" "', argument " "3"" of type '" "float const *""'");
54025  }
54026  arg3 = reinterpret_cast< float * >(argp3);
54027  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
54028  if (!SWIG_IsOK(res4)) {
54029  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_add_core" "', argument " "4"" of type '" "long const *""'");
54030  }
54031  arg4 = reinterpret_cast< long * >(argp4);
54032  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
54033  if (!SWIG_IsOK(res5)) {
54034  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQR_add_core" "', argument " "5"" of type '" "long const *""'");
54035  }
54036  arg5 = reinterpret_cast< long * >(argp5);
54037  {
54038  Py_BEGIN_ALLOW_THREADS
54039  try {
54040  (arg1)->add_core(arg2,(float const *)arg3,(long const *)arg4,(long const *)arg5);
54041  } catch(faiss::FaissException & e) {
54042  PyEval_RestoreThread(_save);
54043  PyErr_SetString(PyExc_RuntimeError, e.what());
54044  SWIG_fail;
54045  }
54046  Py_END_ALLOW_THREADS
54047  }
54048  resultobj = SWIG_Py_Void();
54049  return resultobj;
54050 fail:
54051  return NULL;
54052 }
54053 
54054 
54055 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_core__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54056  PyObject *resultobj = 0;
54057  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
54058  faiss::Index::idx_t arg2 ;
54059  float *arg3 = (float *) 0 ;
54060  long *arg4 = (long *) 0 ;
54061  void *argp1 = 0 ;
54062  int res1 = 0 ;
54063  long val2 ;
54064  int ecode2 = 0 ;
54065  void *argp3 = 0 ;
54066  int res3 = 0 ;
54067  void *argp4 = 0 ;
54068  int res4 = 0 ;
54069  PyObject * obj0 = 0 ;
54070  PyObject * obj1 = 0 ;
54071  PyObject * obj2 = 0 ;
54072  PyObject * obj3 = 0 ;
54073 
54074  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQR_add_core",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
54075  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
54076  if (!SWIG_IsOK(res1)) {
54077  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_add_core" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
54078  }
54079  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
54080  ecode2 = SWIG_AsVal_long(obj1, &val2);
54081  if (!SWIG_IsOK(ecode2)) {
54082  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_add_core" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54083  }
54084  arg2 = static_cast< faiss::Index::idx_t >(val2);
54085  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54086  if (!SWIG_IsOK(res3)) {
54087  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_add_core" "', argument " "3"" of type '" "float const *""'");
54088  }
54089  arg3 = reinterpret_cast< float * >(argp3);
54090  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
54091  if (!SWIG_IsOK(res4)) {
54092  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_add_core" "', argument " "4"" of type '" "long const *""'");
54093  }
54094  arg4 = reinterpret_cast< long * >(argp4);
54095  {
54096  Py_BEGIN_ALLOW_THREADS
54097  try {
54098  (arg1)->add_core(arg2,(float const *)arg3,(long const *)arg4);
54099  } catch(faiss::FaissException & e) {
54100  PyEval_RestoreThread(_save);
54101  PyErr_SetString(PyExc_RuntimeError, e.what());
54102  SWIG_fail;
54103  }
54104  Py_END_ALLOW_THREADS
54105  }
54106  resultobj = SWIG_Py_Void();
54107  return resultobj;
54108 fail:
54109  return NULL;
54110 }
54111 
54112 
54113 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_core(PyObject *self, PyObject *args) {
54114  Py_ssize_t argc;
54115  PyObject *argv[6] = {
54116  0
54117  };
54118  Py_ssize_t ii;
54119 
54120  if (!PyTuple_Check(args)) SWIG_fail;
54121  argc = args ? PyObject_Length(args) : 0;
54122  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
54123  argv[ii] = PyTuple_GET_ITEM(args,ii);
54124  }
54125  if (argc == 4) {
54126  int _v;
54127  void *vptr = 0;
54128  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
54129  _v = SWIG_CheckState(res);
54130  if (_v) {
54131  {
54132  int res = SWIG_AsVal_long(argv[1], NULL);
54133  _v = SWIG_CheckState(res);
54134  }
54135  if (_v) {
54136  void *vptr = 0;
54137  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
54138  _v = SWIG_CheckState(res);
54139  if (_v) {
54140  void *vptr = 0;
54141  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
54142  _v = SWIG_CheckState(res);
54143  if (_v) {
54144  return _wrap_IndexIVFPQR_add_core__SWIG_1(self, args);
54145  }
54146  }
54147  }
54148  }
54149  }
54150  if (argc == 5) {
54151  int _v;
54152  void *vptr = 0;
54153  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
54154  _v = SWIG_CheckState(res);
54155  if (_v) {
54156  {
54157  int res = SWIG_AsVal_long(argv[1], NULL);
54158  _v = SWIG_CheckState(res);
54159  }
54160  if (_v) {
54161  void *vptr = 0;
54162  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
54163  _v = SWIG_CheckState(res);
54164  if (_v) {
54165  void *vptr = 0;
54166  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
54167  _v = SWIG_CheckState(res);
54168  if (_v) {
54169  void *vptr = 0;
54170  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
54171  _v = SWIG_CheckState(res);
54172  if (_v) {
54173  return _wrap_IndexIVFPQR_add_core__SWIG_0(self, args);
54174  }
54175  }
54176  }
54177  }
54178  }
54179  }
54180 
54181 fail:
54182  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQR_add_core'.\n"
54183  " Possible C/C++ prototypes are:\n"
54184  " faiss::IndexIVFPQR::add_core(faiss::Index::idx_t,float const *,long const *,long const *)\n"
54185  " faiss::IndexIVFPQR::add_core(faiss::Index::idx_t,float const *,long const *)\n");
54186  return 0;
54187 }
54188 
54189 
54190 SWIGINTERN PyObject *_wrap_IndexIVFPQR_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54191  PyObject *resultobj = 0;
54192  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
54193  long arg2 ;
54194  long arg3 ;
54195  float *arg4 = (float *) 0 ;
54196  void *argp1 = 0 ;
54197  int res1 = 0 ;
54198  long val2 ;
54199  int ecode2 = 0 ;
54200  long val3 ;
54201  int ecode3 = 0 ;
54202  void *argp4 = 0 ;
54203  int res4 = 0 ;
54204  PyObject * obj0 = 0 ;
54205  PyObject * obj1 = 0 ;
54206  PyObject * obj2 = 0 ;
54207  PyObject * obj3 = 0 ;
54208 
54209  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQR_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
54210  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
54211  if (!SWIG_IsOK(res1)) {
54212  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFPQR const *""'");
54213  }
54214  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
54215  ecode2 = SWIG_AsVal_long(obj1, &val2);
54216  if (!SWIG_IsOK(ecode2)) {
54217  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
54218  }
54219  arg2 = static_cast< long >(val2);
54220  ecode3 = SWIG_AsVal_long(obj2, &val3);
54221  if (!SWIG_IsOK(ecode3)) {
54222  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
54223  }
54224  arg3 = static_cast< long >(val3);
54225  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
54226  if (!SWIG_IsOK(res4)) {
54227  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
54228  }
54229  arg4 = reinterpret_cast< float * >(argp4);
54230  {
54231  Py_BEGIN_ALLOW_THREADS
54232  try {
54233  ((faiss::IndexIVFPQR const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
54234  } catch(faiss::FaissException & e) {
54235  PyEval_RestoreThread(_save);
54236  PyErr_SetString(PyExc_RuntimeError, e.what());
54237  SWIG_fail;
54238  }
54239  Py_END_ALLOW_THREADS
54240  }
54241  resultobj = SWIG_Py_Void();
54242  return resultobj;
54243 fail:
54244  return NULL;
54245 }
54246 
54247 
54248 SWIGINTERN PyObject *_wrap_IndexIVFPQR_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54249  PyObject *resultobj = 0;
54250  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
54251  faiss::IndexIVF *arg2 = 0 ;
54252  faiss::Index::idx_t arg3 ;
54253  void *argp1 = 0 ;
54254  int res1 = 0 ;
54255  void *argp2 = 0 ;
54256  int res2 = 0 ;
54257  long val3 ;
54258  int ecode3 = 0 ;
54259  PyObject * obj0 = 0 ;
54260  PyObject * obj1 = 0 ;
54261  PyObject * obj2 = 0 ;
54262 
54263  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQR_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
54264  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
54265  if (!SWIG_IsOK(res1)) {
54266  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_merge_from" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
54267  }
54268  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
54269  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 );
54270  if (!SWIG_IsOK(res2)) {
54271  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
54272  }
54273  if (!argp2) {
54274  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFPQR_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
54275  }
54276  arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
54277  ecode3 = SWIG_AsVal_long(obj2, &val3);
54278  if (!SWIG_IsOK(ecode3)) {
54279  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFPQR_merge_from" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
54280  }
54281  arg3 = static_cast< faiss::Index::idx_t >(val3);
54282  {
54283  Py_BEGIN_ALLOW_THREADS
54284  try {
54285  (arg1)->merge_from(*arg2,arg3);
54286  } catch(faiss::FaissException & e) {
54287  PyEval_RestoreThread(_save);
54288  PyErr_SetString(PyExc_RuntimeError, e.what());
54289  SWIG_fail;
54290  }
54291  Py_END_ALLOW_THREADS
54292  }
54293  resultobj = SWIG_Py_Void();
54294  return resultobj;
54295 fail:
54296  return NULL;
54297 }
54298 
54299 
54300 SWIGINTERN PyObject *_wrap_IndexIVFPQR_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54301  PyObject *resultobj = 0;
54302  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
54303  faiss::Index::idx_t arg2 ;
54304  float *arg3 = (float *) 0 ;
54305  faiss::Index::idx_t arg4 ;
54307  float *arg6 = (float *) 0 ;
54308  float *arg7 = (float *) 0 ;
54310  bool arg9 ;
54312  void *argp1 = 0 ;
54313  int res1 = 0 ;
54314  long val2 ;
54315  int ecode2 = 0 ;
54316  void *argp3 = 0 ;
54317  int res3 = 0 ;
54318  long val4 ;
54319  int ecode4 = 0 ;
54320  void *argp5 = 0 ;
54321  int res5 = 0 ;
54322  void *argp6 = 0 ;
54323  int res6 = 0 ;
54324  void *argp7 = 0 ;
54325  int res7 = 0 ;
54326  void *argp8 = 0 ;
54327  int res8 = 0 ;
54328  bool val9 ;
54329  int ecode9 = 0 ;
54330  void *argp10 = 0 ;
54331  int res10 = 0 ;
54332  PyObject * obj0 = 0 ;
54333  PyObject * obj1 = 0 ;
54334  PyObject * obj2 = 0 ;
54335  PyObject * obj3 = 0 ;
54336  PyObject * obj4 = 0 ;
54337  PyObject * obj5 = 0 ;
54338  PyObject * obj6 = 0 ;
54339  PyObject * obj7 = 0 ;
54340  PyObject * obj8 = 0 ;
54341  PyObject * obj9 = 0 ;
54342 
54343  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexIVFPQR_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
54344  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
54345  if (!SWIG_IsOK(res1)) {
54346  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFPQR const *""'");
54347  }
54348  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
54349  ecode2 = SWIG_AsVal_long(obj1, &val2);
54350  if (!SWIG_IsOK(ecode2)) {
54351  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54352  }
54353  arg2 = static_cast< faiss::Index::idx_t >(val2);
54354  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54355  if (!SWIG_IsOK(res3)) {
54356  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "3"" of type '" "float const *""'");
54357  }
54358  arg3 = reinterpret_cast< float * >(argp3);
54359  ecode4 = SWIG_AsVal_long(obj3, &val4);
54360  if (!SWIG_IsOK(ecode4)) {
54361  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
54362  }
54363  arg4 = static_cast< faiss::Index::idx_t >(val4);
54364  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
54365  if (!SWIG_IsOK(res5)) {
54366  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
54367  }
54368  arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
54369  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
54370  if (!SWIG_IsOK(res6)) {
54371  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "6"" of type '" "float const *""'");
54372  }
54373  arg6 = reinterpret_cast< float * >(argp6);
54374  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
54375  if (!SWIG_IsOK(res7)) {
54376  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "7"" of type '" "float *""'");
54377  }
54378  arg7 = reinterpret_cast< float * >(argp7);
54379  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
54380  if (!SWIG_IsOK(res8)) {
54381  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
54382  }
54383  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
54384  ecode9 = SWIG_AsVal_bool(obj8, &val9);
54385  if (!SWIG_IsOK(ecode9)) {
54386  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "9"" of type '" "bool""'");
54387  }
54388  arg9 = static_cast< bool >(val9);
54389  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
54390  if (!SWIG_IsOK(res10)) {
54391  SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
54392  }
54393  arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
54394  {
54395  Py_BEGIN_ALLOW_THREADS
54396  try {
54397  ((faiss::IndexIVFPQR const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
54398  } catch(faiss::FaissException & e) {
54399  PyEval_RestoreThread(_save);
54400  PyErr_SetString(PyExc_RuntimeError, e.what());
54401  SWIG_fail;
54402  }
54403  Py_END_ALLOW_THREADS
54404  }
54405  resultobj = SWIG_Py_Void();
54406  return resultobj;
54407 fail:
54408  return NULL;
54409 }
54410 
54411 
54412 SWIGINTERN PyObject *_wrap_IndexIVFPQR_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54413  PyObject *resultobj = 0;
54414  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
54415  faiss::Index::idx_t arg2 ;
54416  float *arg3 = (float *) 0 ;
54417  faiss::Index::idx_t arg4 ;
54419  float *arg6 = (float *) 0 ;
54420  float *arg7 = (float *) 0 ;
54422  bool arg9 ;
54423  void *argp1 = 0 ;
54424  int res1 = 0 ;
54425  long val2 ;
54426  int ecode2 = 0 ;
54427  void *argp3 = 0 ;
54428  int res3 = 0 ;
54429  long val4 ;
54430  int ecode4 = 0 ;
54431  void *argp5 = 0 ;
54432  int res5 = 0 ;
54433  void *argp6 = 0 ;
54434  int res6 = 0 ;
54435  void *argp7 = 0 ;
54436  int res7 = 0 ;
54437  void *argp8 = 0 ;
54438  int res8 = 0 ;
54439  bool val9 ;
54440  int ecode9 = 0 ;
54441  PyObject * obj0 = 0 ;
54442  PyObject * obj1 = 0 ;
54443  PyObject * obj2 = 0 ;
54444  PyObject * obj3 = 0 ;
54445  PyObject * obj4 = 0 ;
54446  PyObject * obj5 = 0 ;
54447  PyObject * obj6 = 0 ;
54448  PyObject * obj7 = 0 ;
54449  PyObject * obj8 = 0 ;
54450 
54451  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexIVFPQR_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
54452  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
54453  if (!SWIG_IsOK(res1)) {
54454  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFPQR const *""'");
54455  }
54456  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
54457  ecode2 = SWIG_AsVal_long(obj1, &val2);
54458  if (!SWIG_IsOK(ecode2)) {
54459  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54460  }
54461  arg2 = static_cast< faiss::Index::idx_t >(val2);
54462  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54463  if (!SWIG_IsOK(res3)) {
54464  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "3"" of type '" "float const *""'");
54465  }
54466  arg3 = reinterpret_cast< float * >(argp3);
54467  ecode4 = SWIG_AsVal_long(obj3, &val4);
54468  if (!SWIG_IsOK(ecode4)) {
54469  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
54470  }
54471  arg4 = static_cast< faiss::Index::idx_t >(val4);
54472  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
54473  if (!SWIG_IsOK(res5)) {
54474  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
54475  }
54476  arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
54477  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
54478  if (!SWIG_IsOK(res6)) {
54479  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "6"" of type '" "float const *""'");
54480  }
54481  arg6 = reinterpret_cast< float * >(argp6);
54482  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
54483  if (!SWIG_IsOK(res7)) {
54484  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "7"" of type '" "float *""'");
54485  }
54486  arg7 = reinterpret_cast< float * >(argp7);
54487  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
54488  if (!SWIG_IsOK(res8)) {
54489  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
54490  }
54491  arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
54492  ecode9 = SWIG_AsVal_bool(obj8, &val9);
54493  if (!SWIG_IsOK(ecode9)) {
54494  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "9"" of type '" "bool""'");
54495  }
54496  arg9 = static_cast< bool >(val9);
54497  {
54498  Py_BEGIN_ALLOW_THREADS
54499  try {
54500  ((faiss::IndexIVFPQR const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
54501  } catch(faiss::FaissException & e) {
54502  PyEval_RestoreThread(_save);
54503  PyErr_SetString(PyExc_RuntimeError, e.what());
54504  SWIG_fail;
54505  }
54506  Py_END_ALLOW_THREADS
54507  }
54508  resultobj = SWIG_Py_Void();
54509  return resultobj;
54510 fail:
54511  return NULL;
54512 }
54513 
54514 
54515 SWIGINTERN PyObject *_wrap_IndexIVFPQR_search_preassigned(PyObject *self, PyObject *args) {
54516  Py_ssize_t argc;
54517  PyObject *argv[11] = {
54518  0
54519  };
54520  Py_ssize_t ii;
54521 
54522  if (!PyTuple_Check(args)) SWIG_fail;
54523  argc = args ? PyObject_Length(args) : 0;
54524  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
54525  argv[ii] = PyTuple_GET_ITEM(args,ii);
54526  }
54527  if (argc == 9) {
54528  int _v;
54529  void *vptr = 0;
54530  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
54531  _v = SWIG_CheckState(res);
54532  if (_v) {
54533  {
54534  int res = SWIG_AsVal_long(argv[1], NULL);
54535  _v = SWIG_CheckState(res);
54536  }
54537  if (_v) {
54538  void *vptr = 0;
54539  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
54540  _v = SWIG_CheckState(res);
54541  if (_v) {
54542  {
54543  int res = SWIG_AsVal_long(argv[3], NULL);
54544  _v = SWIG_CheckState(res);
54545  }
54546  if (_v) {
54547  void *vptr = 0;
54548  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
54549  _v = SWIG_CheckState(res);
54550  if (_v) {
54551  void *vptr = 0;
54552  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
54553  _v = SWIG_CheckState(res);
54554  if (_v) {
54555  void *vptr = 0;
54556  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
54557  _v = SWIG_CheckState(res);
54558  if (_v) {
54559  void *vptr = 0;
54560  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
54561  _v = SWIG_CheckState(res);
54562  if (_v) {
54563  {
54564  int res = SWIG_AsVal_bool(argv[8], NULL);
54565  _v = SWIG_CheckState(res);
54566  }
54567  if (_v) {
54568  return _wrap_IndexIVFPQR_search_preassigned__SWIG_1(self, args);
54569  }
54570  }
54571  }
54572  }
54573  }
54574  }
54575  }
54576  }
54577  }
54578  }
54579  if (argc == 10) {
54580  int _v;
54581  void *vptr = 0;
54582  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
54583  _v = SWIG_CheckState(res);
54584  if (_v) {
54585  {
54586  int res = SWIG_AsVal_long(argv[1], NULL);
54587  _v = SWIG_CheckState(res);
54588  }
54589  if (_v) {
54590  void *vptr = 0;
54591  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
54592  _v = SWIG_CheckState(res);
54593  if (_v) {
54594  {
54595  int res = SWIG_AsVal_long(argv[3], NULL);
54596  _v = SWIG_CheckState(res);
54597  }
54598  if (_v) {
54599  void *vptr = 0;
54600  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
54601  _v = SWIG_CheckState(res);
54602  if (_v) {
54603  void *vptr = 0;
54604  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
54605  _v = SWIG_CheckState(res);
54606  if (_v) {
54607  void *vptr = 0;
54608  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
54609  _v = SWIG_CheckState(res);
54610  if (_v) {
54611  void *vptr = 0;
54612  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
54613  _v = SWIG_CheckState(res);
54614  if (_v) {
54615  {
54616  int res = SWIG_AsVal_bool(argv[8], NULL);
54617  _v = SWIG_CheckState(res);
54618  }
54619  if (_v) {
54620  void *vptr = 0;
54621  int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
54622  _v = SWIG_CheckState(res);
54623  if (_v) {
54624  return _wrap_IndexIVFPQR_search_preassigned__SWIG_0(self, args);
54625  }
54626  }
54627  }
54628  }
54629  }
54630  }
54631  }
54632  }
54633  }
54634  }
54635  }
54636 
54637 fail:
54638  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQR_search_preassigned'.\n"
54639  " Possible C/C++ prototypes are:\n"
54640  " faiss::IndexIVFPQR::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
54641  " faiss::IndexIVFPQR::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool) const\n");
54642  return 0;
54643 }
54644 
54645 
54646 SWIGINTERN PyObject *_wrap_new_IndexIVFPQR__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54647  PyObject *resultobj = 0;
54648  faiss::IndexIVFPQR *result = 0 ;
54649 
54650  if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFPQR")) SWIG_fail;
54651  {
54652  Py_BEGIN_ALLOW_THREADS
54653  try {
54654  result = (faiss::IndexIVFPQR *)new faiss::IndexIVFPQR();
54655  } catch(faiss::FaissException & e) {
54656  PyEval_RestoreThread(_save);
54657  PyErr_SetString(PyExc_RuntimeError, e.what());
54658  SWIG_fail;
54659  }
54660  Py_END_ALLOW_THREADS
54661  }
54662  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_POINTER_NEW | 0 );
54663  return resultobj;
54664 fail:
54665  return NULL;
54666 }
54667 
54668 
54669 SWIGINTERN PyObject *_wrap_new_IndexIVFPQR(PyObject *self, PyObject *args) {
54670  Py_ssize_t argc;
54671  PyObject *argv[8] = {
54672  0
54673  };
54674  Py_ssize_t ii;
54675 
54676  if (!PyTuple_Check(args)) SWIG_fail;
54677  argc = args ? PyObject_Length(args) : 0;
54678  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
54679  argv[ii] = PyTuple_GET_ITEM(args,ii);
54680  }
54681  if (argc == 0) {
54682  return _wrap_new_IndexIVFPQR__SWIG_1(self, args);
54683  }
54684  if (argc == 7) {
54685  int _v;
54686  void *vptr = 0;
54687  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
54688  _v = SWIG_CheckState(res);
54689  if (_v) {
54690  {
54691  int res = SWIG_AsVal_size_t(argv[1], NULL);
54692  _v = SWIG_CheckState(res);
54693  }
54694  if (_v) {
54695  {
54696  int res = SWIG_AsVal_size_t(argv[2], NULL);
54697  _v = SWIG_CheckState(res);
54698  }
54699  if (_v) {
54700  {
54701  int res = SWIG_AsVal_size_t(argv[3], NULL);
54702  _v = SWIG_CheckState(res);
54703  }
54704  if (_v) {
54705  {
54706  int res = SWIG_AsVal_size_t(argv[4], NULL);
54707  _v = SWIG_CheckState(res);
54708  }
54709  if (_v) {
54710  {
54711  int res = SWIG_AsVal_size_t(argv[5], NULL);
54712  _v = SWIG_CheckState(res);
54713  }
54714  if (_v) {
54715  {
54716  int res = SWIG_AsVal_size_t(argv[6], NULL);
54717  _v = SWIG_CheckState(res);
54718  }
54719  if (_v) {
54720  return _wrap_new_IndexIVFPQR__SWIG_0(self, args);
54721  }
54722  }
54723  }
54724  }
54725  }
54726  }
54727  }
54728  }
54729 
54730 fail:
54731  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFPQR'.\n"
54732  " Possible C/C++ prototypes are:\n"
54733  " faiss::IndexIVFPQR::IndexIVFPQR(faiss::Index *,size_t,size_t,size_t,size_t,size_t,size_t)\n"
54734  " faiss::IndexIVFPQR::IndexIVFPQR()\n");
54735  return 0;
54736 }
54737 
54738 
54739 SWIGINTERN PyObject *_wrap_delete_IndexIVFPQR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54740  PyObject *resultobj = 0;
54741  faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
54742  void *argp1 = 0 ;
54743  int res1 = 0 ;
54744  PyObject * obj0 = 0 ;
54745 
54746  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFPQR",&obj0)) SWIG_fail;
54747  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_POINTER_DISOWN | 0 );
54748  if (!SWIG_IsOK(res1)) {
54749  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFPQR" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
54750  }
54751  arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
54752  delete arg1;
54753  resultobj = SWIG_Py_Void();
54754  return resultobj;
54755 fail:
54756  return NULL;
54757 }
54758 
54759 
54760 SWIGINTERN PyObject *IndexIVFPQR_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54761  PyObject *obj;
54762  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
54763  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_NewClientData(obj));
54764  return SWIG_Py_Void();
54765 }
54766 
54767 SWIGINTERN PyObject *_wrap_Index2Layer_q1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54768  PyObject *resultobj = 0;
54769  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54771  void *argp1 = 0 ;
54772  int res1 = 0 ;
54773  void *argp2 = 0 ;
54774  int res2 = 0 ;
54775  PyObject * obj0 = 0 ;
54776  PyObject * obj1 = 0 ;
54777 
54778  if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_q1_set",&obj0,&obj1)) SWIG_fail;
54779  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54780  if (!SWIG_IsOK(res1)) {
54781  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_q1_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54782  }
54783  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54784  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
54785  if (!SWIG_IsOK(res2)) {
54786  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_q1_set" "', argument " "2"" of type '" "faiss::Level1Quantizer *""'");
54787  }
54788  arg2 = reinterpret_cast< faiss::Level1Quantizer * >(argp2);
54789  if (arg1) (arg1)->q1 = *arg2;
54790  resultobj = SWIG_Py_Void();
54791  return resultobj;
54792 fail:
54793  return NULL;
54794 }
54795 
54796 
54797 SWIGINTERN PyObject *_wrap_Index2Layer_q1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54798  PyObject *resultobj = 0;
54799  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54800  void *argp1 = 0 ;
54801  int res1 = 0 ;
54802  PyObject * obj0 = 0 ;
54803  faiss::Level1Quantizer *result = 0 ;
54804 
54805  if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_q1_get",&obj0)) SWIG_fail;
54806  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54807  if (!SWIG_IsOK(res1)) {
54808  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_q1_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54809  }
54810  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54811  result = (faiss::Level1Quantizer *)& ((arg1)->q1);
54812  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
54813  return resultobj;
54814 fail:
54815  return NULL;
54816 }
54817 
54818 
54819 SWIGINTERN PyObject *_wrap_Index2Layer_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54820  PyObject *resultobj = 0;
54821  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54823  void *argp1 = 0 ;
54824  int res1 = 0 ;
54825  void *argp2 = 0 ;
54826  int res2 = 0 ;
54827  PyObject * obj0 = 0 ;
54828  PyObject * obj1 = 0 ;
54829 
54830  if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_pq_set",&obj0,&obj1)) SWIG_fail;
54831  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54832  if (!SWIG_IsOK(res1)) {
54833  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_pq_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54834  }
54835  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54836  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
54837  if (!SWIG_IsOK(res2)) {
54838  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
54839  }
54840  arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
54841  if (arg1) (arg1)->pq = *arg2;
54842  resultobj = SWIG_Py_Void();
54843  return resultobj;
54844 fail:
54845  return NULL;
54846 }
54847 
54848 
54849 SWIGINTERN PyObject *_wrap_Index2Layer_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54850  PyObject *resultobj = 0;
54851  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54852  void *argp1 = 0 ;
54853  int res1 = 0 ;
54854  PyObject * obj0 = 0 ;
54855  faiss::ProductQuantizer *result = 0 ;
54856 
54857  if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_pq_get",&obj0)) SWIG_fail;
54858  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54859  if (!SWIG_IsOK(res1)) {
54860  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_pq_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54861  }
54862  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54863  result = (faiss::ProductQuantizer *)& ((arg1)->pq);
54864  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
54865  return resultobj;
54866 fail:
54867  return NULL;
54868 }
54869 
54870 
54871 SWIGINTERN PyObject *_wrap_Index2Layer_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54872  PyObject *resultobj = 0;
54873  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54874  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
54875  void *argp1 = 0 ;
54876  int res1 = 0 ;
54877  void *argp2 = 0 ;
54878  int res2 = 0 ;
54879  PyObject * obj0 = 0 ;
54880  PyObject * obj1 = 0 ;
54881 
54882  if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_codes_set",&obj0,&obj1)) SWIG_fail;
54883  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54884  if (!SWIG_IsOK(res1)) {
54885  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_codes_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54886  }
54887  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54888  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
54889  if (!SWIG_IsOK(res2)) {
54890  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
54891  }
54892  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
54893  if (arg1) (arg1)->codes = *arg2;
54894  resultobj = SWIG_Py_Void();
54895  return resultobj;
54896 fail:
54897  return NULL;
54898 }
54899 
54900 
54901 SWIGINTERN PyObject *_wrap_Index2Layer_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54902  PyObject *resultobj = 0;
54903  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54904  void *argp1 = 0 ;
54905  int res1 = 0 ;
54906  PyObject * obj0 = 0 ;
54907  std::vector< uint8_t > *result = 0 ;
54908 
54909  if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_codes_get",&obj0)) SWIG_fail;
54910  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54911  if (!SWIG_IsOK(res1)) {
54912  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_codes_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54913  }
54914  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54915  result = (std::vector< uint8_t > *)& ((arg1)->codes);
54916  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
54917  return resultobj;
54918 fail:
54919  return NULL;
54920 }
54921 
54922 
54923 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54924  PyObject *resultobj = 0;
54925  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54926  size_t arg2 ;
54927  void *argp1 = 0 ;
54928  int res1 = 0 ;
54929  size_t val2 ;
54930  int ecode2 = 0 ;
54931  PyObject * obj0 = 0 ;
54932  PyObject * obj1 = 0 ;
54933 
54934  if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_code_size_1_set",&obj0,&obj1)) SWIG_fail;
54935  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54936  if (!SWIG_IsOK(res1)) {
54937  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_1_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54938  }
54939  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54940  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
54941  if (!SWIG_IsOK(ecode2)) {
54942  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_code_size_1_set" "', argument " "2"" of type '" "size_t""'");
54943  }
54944  arg2 = static_cast< size_t >(val2);
54945  if (arg1) (arg1)->code_size_1 = arg2;
54946  resultobj = SWIG_Py_Void();
54947  return resultobj;
54948 fail:
54949  return NULL;
54950 }
54951 
54952 
54953 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54954  PyObject *resultobj = 0;
54955  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54956  void *argp1 = 0 ;
54957  int res1 = 0 ;
54958  PyObject * obj0 = 0 ;
54959  size_t result;
54960 
54961  if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_code_size_1_get",&obj0)) SWIG_fail;
54962  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54963  if (!SWIG_IsOK(res1)) {
54964  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_1_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54965  }
54966  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54967  result = (size_t) ((arg1)->code_size_1);
54968  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
54969  return resultobj;
54970 fail:
54971  return NULL;
54972 }
54973 
54974 
54975 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54976  PyObject *resultobj = 0;
54977  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54978  size_t arg2 ;
54979  void *argp1 = 0 ;
54980  int res1 = 0 ;
54981  size_t val2 ;
54982  int ecode2 = 0 ;
54983  PyObject * obj0 = 0 ;
54984  PyObject * obj1 = 0 ;
54985 
54986  if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_code_size_2_set",&obj0,&obj1)) SWIG_fail;
54987  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54988  if (!SWIG_IsOK(res1)) {
54989  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_2_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54990  }
54991  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54992  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
54993  if (!SWIG_IsOK(ecode2)) {
54994  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_code_size_2_set" "', argument " "2"" of type '" "size_t""'");
54995  }
54996  arg2 = static_cast< size_t >(val2);
54997  if (arg1) (arg1)->code_size_2 = arg2;
54998  resultobj = SWIG_Py_Void();
54999  return resultobj;
55000 fail:
55001  return NULL;
55002 }
55003 
55004 
55005 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55006  PyObject *resultobj = 0;
55007  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55008  void *argp1 = 0 ;
55009  int res1 = 0 ;
55010  PyObject * obj0 = 0 ;
55011  size_t result;
55012 
55013  if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_code_size_2_get",&obj0)) SWIG_fail;
55014  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55015  if (!SWIG_IsOK(res1)) {
55016  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_2_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
55017  }
55018  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55019  result = (size_t) ((arg1)->code_size_2);
55020  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
55021  return resultobj;
55022 fail:
55023  return NULL;
55024 }
55025 
55026 
55027 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55028  PyObject *resultobj = 0;
55029  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55030  size_t arg2 ;
55031  void *argp1 = 0 ;
55032  int res1 = 0 ;
55033  size_t val2 ;
55034  int ecode2 = 0 ;
55035  PyObject * obj0 = 0 ;
55036  PyObject * obj1 = 0 ;
55037 
55038  if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_code_size_set",&obj0,&obj1)) SWIG_fail;
55039  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55040  if (!SWIG_IsOK(res1)) {
55041  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
55042  }
55043  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55044  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
55045  if (!SWIG_IsOK(ecode2)) {
55046  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_code_size_set" "', argument " "2"" of type '" "size_t""'");
55047  }
55048  arg2 = static_cast< size_t >(val2);
55049  if (arg1) (arg1)->code_size = arg2;
55050  resultobj = SWIG_Py_Void();
55051  return resultobj;
55052 fail:
55053  return NULL;
55054 }
55055 
55056 
55057 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55058  PyObject *resultobj = 0;
55059  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55060  void *argp1 = 0 ;
55061  int res1 = 0 ;
55062  PyObject * obj0 = 0 ;
55063  size_t result;
55064 
55065  if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_code_size_get",&obj0)) SWIG_fail;
55066  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55067  if (!SWIG_IsOK(res1)) {
55068  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
55069  }
55070  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55071  result = (size_t) ((arg1)->code_size);
55072  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
55073  return resultobj;
55074 fail:
55075  return NULL;
55076 }
55077 
55078 
55079 SWIGINTERN PyObject *_wrap_new_Index2Layer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55080  PyObject *resultobj = 0;
55081  faiss::Index *arg1 = (faiss::Index *) 0 ;
55082  size_t arg2 ;
55083  int arg3 ;
55084  faiss::MetricType arg4 ;
55085  void *argp1 = 0 ;
55086  int res1 = 0 ;
55087  size_t val2 ;
55088  int ecode2 = 0 ;
55089  int val3 ;
55090  int ecode3 = 0 ;
55091  int val4 ;
55092  int ecode4 = 0 ;
55093  PyObject * obj0 = 0 ;
55094  PyObject * obj1 = 0 ;
55095  PyObject * obj2 = 0 ;
55096  PyObject * obj3 = 0 ;
55097  faiss::Index2Layer *result = 0 ;
55098 
55099  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_Index2Layer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
55100  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
55101  if (!SWIG_IsOK(res1)) {
55102  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Index2Layer" "', argument " "1"" of type '" "faiss::Index *""'");
55103  }
55104  arg1 = reinterpret_cast< faiss::Index * >(argp1);
55105  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
55106  if (!SWIG_IsOK(ecode2)) {
55107  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Index2Layer" "', argument " "2"" of type '" "size_t""'");
55108  }
55109  arg2 = static_cast< size_t >(val2);
55110  ecode3 = SWIG_AsVal_int(obj2, &val3);
55111  if (!SWIG_IsOK(ecode3)) {
55112  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Index2Layer" "', argument " "3"" of type '" "int""'");
55113  }
55114  arg3 = static_cast< int >(val3);
55115  ecode4 = SWIG_AsVal_int(obj3, &val4);
55116  if (!SWIG_IsOK(ecode4)) {
55117  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Index2Layer" "', argument " "4"" of type '" "faiss::MetricType""'");
55118  }
55119  arg4 = static_cast< faiss::MetricType >(val4);
55120  {
55121  Py_BEGIN_ALLOW_THREADS
55122  try {
55123  result = (faiss::Index2Layer *)new faiss::Index2Layer(arg1,arg2,arg3,arg4);
55124  } catch(faiss::FaissException & e) {
55125  PyEval_RestoreThread(_save);
55126  PyErr_SetString(PyExc_RuntimeError, e.what());
55127  SWIG_fail;
55128  }
55129  Py_END_ALLOW_THREADS
55130  }
55131  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_NEW | 0 );
55132  return resultobj;
55133 fail:
55134  return NULL;
55135 }
55136 
55137 
55138 SWIGINTERN PyObject *_wrap_new_Index2Layer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55139  PyObject *resultobj = 0;
55140  faiss::Index *arg1 = (faiss::Index *) 0 ;
55141  size_t arg2 ;
55142  int arg3 ;
55143  void *argp1 = 0 ;
55144  int res1 = 0 ;
55145  size_t val2 ;
55146  int ecode2 = 0 ;
55147  int val3 ;
55148  int ecode3 = 0 ;
55149  PyObject * obj0 = 0 ;
55150  PyObject * obj1 = 0 ;
55151  PyObject * obj2 = 0 ;
55152  faiss::Index2Layer *result = 0 ;
55153 
55154  if (!PyArg_ParseTuple(args,(char *)"OOO:new_Index2Layer",&obj0,&obj1,&obj2)) SWIG_fail;
55155  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
55156  if (!SWIG_IsOK(res1)) {
55157  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Index2Layer" "', argument " "1"" of type '" "faiss::Index *""'");
55158  }
55159  arg1 = reinterpret_cast< faiss::Index * >(argp1);
55160  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
55161  if (!SWIG_IsOK(ecode2)) {
55162  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Index2Layer" "', argument " "2"" of type '" "size_t""'");
55163  }
55164  arg2 = static_cast< size_t >(val2);
55165  ecode3 = SWIG_AsVal_int(obj2, &val3);
55166  if (!SWIG_IsOK(ecode3)) {
55167  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Index2Layer" "', argument " "3"" of type '" "int""'");
55168  }
55169  arg3 = static_cast< int >(val3);
55170  {
55171  Py_BEGIN_ALLOW_THREADS
55172  try {
55173  result = (faiss::Index2Layer *)new faiss::Index2Layer(arg1,arg2,arg3);
55174  } catch(faiss::FaissException & e) {
55175  PyEval_RestoreThread(_save);
55176  PyErr_SetString(PyExc_RuntimeError, e.what());
55177  SWIG_fail;
55178  }
55179  Py_END_ALLOW_THREADS
55180  }
55181  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_NEW | 0 );
55182  return resultobj;
55183 fail:
55184  return NULL;
55185 }
55186 
55187 
55188 SWIGINTERN PyObject *_wrap_new_Index2Layer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55189  PyObject *resultobj = 0;
55190  faiss::Index2Layer *result = 0 ;
55191 
55192  if (!PyArg_ParseTuple(args,(char *)":new_Index2Layer")) SWIG_fail;
55193  {
55194  Py_BEGIN_ALLOW_THREADS
55195  try {
55196  result = (faiss::Index2Layer *)new faiss::Index2Layer();
55197  } catch(faiss::FaissException & e) {
55198  PyEval_RestoreThread(_save);
55199  PyErr_SetString(PyExc_RuntimeError, e.what());
55200  SWIG_fail;
55201  }
55202  Py_END_ALLOW_THREADS
55203  }
55204  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_NEW | 0 );
55205  return resultobj;
55206 fail:
55207  return NULL;
55208 }
55209 
55210 
55211 SWIGINTERN PyObject *_wrap_new_Index2Layer(PyObject *self, PyObject *args) {
55212  Py_ssize_t argc;
55213  PyObject *argv[5] = {
55214  0
55215  };
55216  Py_ssize_t ii;
55217 
55218  if (!PyTuple_Check(args)) SWIG_fail;
55219  argc = args ? PyObject_Length(args) : 0;
55220  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
55221  argv[ii] = PyTuple_GET_ITEM(args,ii);
55222  }
55223  if (argc == 0) {
55224  return _wrap_new_Index2Layer__SWIG_2(self, args);
55225  }
55226  if (argc == 3) {
55227  int _v;
55228  void *vptr = 0;
55229  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
55230  _v = SWIG_CheckState(res);
55231  if (_v) {
55232  {
55233  int res = SWIG_AsVal_size_t(argv[1], NULL);
55234  _v = SWIG_CheckState(res);
55235  }
55236  if (_v) {
55237  {
55238  int res = SWIG_AsVal_int(argv[2], NULL);
55239  _v = SWIG_CheckState(res);
55240  }
55241  if (_v) {
55242  return _wrap_new_Index2Layer__SWIG_1(self, args);
55243  }
55244  }
55245  }
55246  }
55247  if (argc == 4) {
55248  int _v;
55249  void *vptr = 0;
55250  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
55251  _v = SWIG_CheckState(res);
55252  if (_v) {
55253  {
55254  int res = SWIG_AsVal_size_t(argv[1], NULL);
55255  _v = SWIG_CheckState(res);
55256  }
55257  if (_v) {
55258  {
55259  int res = SWIG_AsVal_int(argv[2], NULL);
55260  _v = SWIG_CheckState(res);
55261  }
55262  if (_v) {
55263  {
55264  int res = SWIG_AsVal_int(argv[3], NULL);
55265  _v = SWIG_CheckState(res);
55266  }
55267  if (_v) {
55268  return _wrap_new_Index2Layer__SWIG_0(self, args);
55269  }
55270  }
55271  }
55272  }
55273  }
55274 
55275 fail:
55276  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Index2Layer'.\n"
55277  " Possible C/C++ prototypes are:\n"
55278  " faiss::Index2Layer::Index2Layer(faiss::Index *,size_t,int,faiss::MetricType)\n"
55279  " faiss::Index2Layer::Index2Layer(faiss::Index *,size_t,int)\n"
55280  " faiss::Index2Layer::Index2Layer()\n");
55281  return 0;
55282 }
55283 
55284 
55285 SWIGINTERN PyObject *_wrap_delete_Index2Layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55286  PyObject *resultobj = 0;
55287  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55288  void *argp1 = 0 ;
55289  int res1 = 0 ;
55290  PyObject * obj0 = 0 ;
55291 
55292  if (!PyArg_ParseTuple(args,(char *)"O:delete_Index2Layer",&obj0)) SWIG_fail;
55293  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_DISOWN | 0 );
55294  if (!SWIG_IsOK(res1)) {
55295  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Index2Layer" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
55296  }
55297  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55298  {
55299  Py_BEGIN_ALLOW_THREADS
55300  try {
55301  delete arg1;
55302  } catch(faiss::FaissException & e) {
55303  PyEval_RestoreThread(_save);
55304  PyErr_SetString(PyExc_RuntimeError, e.what());
55305  SWIG_fail;
55306  }
55307  Py_END_ALLOW_THREADS
55308  }
55309  resultobj = SWIG_Py_Void();
55310  return resultobj;
55311 fail:
55312  return NULL;
55313 }
55314 
55315 
55316 SWIGINTERN PyObject *_wrap_Index2Layer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55317  PyObject *resultobj = 0;
55318  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55319  faiss::Index::idx_t arg2 ;
55320  float *arg3 = (float *) 0 ;
55321  void *argp1 = 0 ;
55322  int res1 = 0 ;
55323  long val2 ;
55324  int ecode2 = 0 ;
55325  void *argp3 = 0 ;
55326  int res3 = 0 ;
55327  PyObject * obj0 = 0 ;
55328  PyObject * obj1 = 0 ;
55329  PyObject * obj2 = 0 ;
55330 
55331  if (!PyArg_ParseTuple(args,(char *)"OOO:Index2Layer_train",&obj0,&obj1,&obj2)) SWIG_fail;
55332  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55333  if (!SWIG_IsOK(res1)) {
55334  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_train" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
55335  }
55336  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55337  ecode2 = SWIG_AsVal_long(obj1, &val2);
55338  if (!SWIG_IsOK(ecode2)) {
55339  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
55340  }
55341  arg2 = static_cast< faiss::Index::idx_t >(val2);
55342  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
55343  if (!SWIG_IsOK(res3)) {
55344  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_train" "', argument " "3"" of type '" "float const *""'");
55345  }
55346  arg3 = reinterpret_cast< float * >(argp3);
55347  {
55348  Py_BEGIN_ALLOW_THREADS
55349  try {
55350  (arg1)->train(arg2,(float const *)arg3);
55351  } catch(faiss::FaissException & e) {
55352  PyEval_RestoreThread(_save);
55353  PyErr_SetString(PyExc_RuntimeError, e.what());
55354  SWIG_fail;
55355  }
55356  Py_END_ALLOW_THREADS
55357  }
55358  resultobj = SWIG_Py_Void();
55359  return resultobj;
55360 fail:
55361  return NULL;
55362 }
55363 
55364 
55365 SWIGINTERN PyObject *_wrap_Index2Layer_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55366  PyObject *resultobj = 0;
55367  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55368  faiss::Index::idx_t arg2 ;
55369  float *arg3 = (float *) 0 ;
55370  void *argp1 = 0 ;
55371  int res1 = 0 ;
55372  long val2 ;
55373  int ecode2 = 0 ;
55374  void *argp3 = 0 ;
55375  int res3 = 0 ;
55376  PyObject * obj0 = 0 ;
55377  PyObject * obj1 = 0 ;
55378  PyObject * obj2 = 0 ;
55379 
55380  if (!PyArg_ParseTuple(args,(char *)"OOO:Index2Layer_add",&obj0,&obj1,&obj2)) SWIG_fail;
55381  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55382  if (!SWIG_IsOK(res1)) {
55383  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_add" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
55384  }
55385  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55386  ecode2 = SWIG_AsVal_long(obj1, &val2);
55387  if (!SWIG_IsOK(ecode2)) {
55388  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
55389  }
55390  arg2 = static_cast< faiss::Index::idx_t >(val2);
55391  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
55392  if (!SWIG_IsOK(res3)) {
55393  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_add" "', argument " "3"" of type '" "float const *""'");
55394  }
55395  arg3 = reinterpret_cast< float * >(argp3);
55396  {
55397  Py_BEGIN_ALLOW_THREADS
55398  try {
55399  (arg1)->add(arg2,(float const *)arg3);
55400  } catch(faiss::FaissException & e) {
55401  PyEval_RestoreThread(_save);
55402  PyErr_SetString(PyExc_RuntimeError, e.what());
55403  SWIG_fail;
55404  }
55405  Py_END_ALLOW_THREADS
55406  }
55407  resultobj = SWIG_Py_Void();
55408  return resultobj;
55409 fail:
55410  return NULL;
55411 }
55412 
55413 
55414 SWIGINTERN PyObject *_wrap_Index2Layer_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55415  PyObject *resultobj = 0;
55416  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55417  faiss::Index::idx_t arg2 ;
55418  float *arg3 = (float *) 0 ;
55419  faiss::Index::idx_t arg4 ;
55420  float *arg5 = (float *) 0 ;
55422  void *argp1 = 0 ;
55423  int res1 = 0 ;
55424  long val2 ;
55425  int ecode2 = 0 ;
55426  void *argp3 = 0 ;
55427  int res3 = 0 ;
55428  long val4 ;
55429  int ecode4 = 0 ;
55430  void *argp5 = 0 ;
55431  int res5 = 0 ;
55432  void *argp6 = 0 ;
55433  int res6 = 0 ;
55434  PyObject * obj0 = 0 ;
55435  PyObject * obj1 = 0 ;
55436  PyObject * obj2 = 0 ;
55437  PyObject * obj3 = 0 ;
55438  PyObject * obj4 = 0 ;
55439  PyObject * obj5 = 0 ;
55440 
55441  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Index2Layer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
55442  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55443  if (!SWIG_IsOK(res1)) {
55444  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_search" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
55445  }
55446  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55447  ecode2 = SWIG_AsVal_long(obj1, &val2);
55448  if (!SWIG_IsOK(ecode2)) {
55449  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
55450  }
55451  arg2 = static_cast< faiss::Index::idx_t >(val2);
55452  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
55453  if (!SWIG_IsOK(res3)) {
55454  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_search" "', argument " "3"" of type '" "float const *""'");
55455  }
55456  arg3 = reinterpret_cast< float * >(argp3);
55457  ecode4 = SWIG_AsVal_long(obj3, &val4);
55458  if (!SWIG_IsOK(ecode4)) {
55459  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index2Layer_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
55460  }
55461  arg4 = static_cast< faiss::Index::idx_t >(val4);
55462  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
55463  if (!SWIG_IsOK(res5)) {
55464  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index2Layer_search" "', argument " "5"" of type '" "float *""'");
55465  }
55466  arg5 = reinterpret_cast< float * >(argp5);
55467  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
55468  if (!SWIG_IsOK(res6)) {
55469  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Index2Layer_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
55470  }
55471  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
55472  {
55473  Py_BEGIN_ALLOW_THREADS
55474  try {
55475  ((faiss::Index2Layer const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
55476  } catch(faiss::FaissException & e) {
55477  PyEval_RestoreThread(_save);
55478  PyErr_SetString(PyExc_RuntimeError, e.what());
55479  SWIG_fail;
55480  }
55481  Py_END_ALLOW_THREADS
55482  }
55483  resultobj = SWIG_Py_Void();
55484  return resultobj;
55485 fail:
55486  return NULL;
55487 }
55488 
55489 
55490 SWIGINTERN PyObject *_wrap_Index2Layer_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55491  PyObject *resultobj = 0;
55492  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55493  faiss::Index::idx_t arg2 ;
55494  faiss::Index::idx_t arg3 ;
55495  float *arg4 = (float *) 0 ;
55496  void *argp1 = 0 ;
55497  int res1 = 0 ;
55498  long val2 ;
55499  int ecode2 = 0 ;
55500  long val3 ;
55501  int ecode3 = 0 ;
55502  void *argp4 = 0 ;
55503  int res4 = 0 ;
55504  PyObject * obj0 = 0 ;
55505  PyObject * obj1 = 0 ;
55506  PyObject * obj2 = 0 ;
55507  PyObject * obj3 = 0 ;
55508 
55509  if (!PyArg_ParseTuple(args,(char *)"OOOO:Index2Layer_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
55510  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55511  if (!SWIG_IsOK(res1)) {
55512  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_reconstruct_n" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
55513  }
55514  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55515  ecode2 = SWIG_AsVal_long(obj1, &val2);
55516  if (!SWIG_IsOK(ecode2)) {
55517  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
55518  }
55519  arg2 = static_cast< faiss::Index::idx_t >(val2);
55520  ecode3 = SWIG_AsVal_long(obj2, &val3);
55521  if (!SWIG_IsOK(ecode3)) {
55522  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Index2Layer_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
55523  }
55524  arg3 = static_cast< faiss::Index::idx_t >(val3);
55525  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
55526  if (!SWIG_IsOK(res4)) {
55527  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index2Layer_reconstruct_n" "', argument " "4"" of type '" "float *""'");
55528  }
55529  arg4 = reinterpret_cast< float * >(argp4);
55530  {
55531  Py_BEGIN_ALLOW_THREADS
55532  try {
55533  ((faiss::Index2Layer const *)arg1)->reconstruct_n(arg2,arg3,arg4);
55534  } catch(faiss::FaissException & e) {
55535  PyEval_RestoreThread(_save);
55536  PyErr_SetString(PyExc_RuntimeError, e.what());
55537  SWIG_fail;
55538  }
55539  Py_END_ALLOW_THREADS
55540  }
55541  resultobj = SWIG_Py_Void();
55542  return resultobj;
55543 fail:
55544  return NULL;
55545 }
55546 
55547 
55548 SWIGINTERN PyObject *_wrap_Index2Layer_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55549  PyObject *resultobj = 0;
55550  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55551  faiss::Index::idx_t arg2 ;
55552  float *arg3 = (float *) 0 ;
55553  void *argp1 = 0 ;
55554  int res1 = 0 ;
55555  long val2 ;
55556  int ecode2 = 0 ;
55557  void *argp3 = 0 ;
55558  int res3 = 0 ;
55559  PyObject * obj0 = 0 ;
55560  PyObject * obj1 = 0 ;
55561  PyObject * obj2 = 0 ;
55562 
55563  if (!PyArg_ParseTuple(args,(char *)"OOO:Index2Layer_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
55564  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55565  if (!SWIG_IsOK(res1)) {
55566  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_reconstruct" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
55567  }
55568  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55569  ecode2 = SWIG_AsVal_long(obj1, &val2);
55570  if (!SWIG_IsOK(ecode2)) {
55571  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
55572  }
55573  arg2 = static_cast< faiss::Index::idx_t >(val2);
55574  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
55575  if (!SWIG_IsOK(res3)) {
55576  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_reconstruct" "', argument " "3"" of type '" "float *""'");
55577  }
55578  arg3 = reinterpret_cast< float * >(argp3);
55579  {
55580  Py_BEGIN_ALLOW_THREADS
55581  try {
55582  ((faiss::Index2Layer const *)arg1)->reconstruct(arg2,arg3);
55583  } catch(faiss::FaissException & e) {
55584  PyEval_RestoreThread(_save);
55585  PyErr_SetString(PyExc_RuntimeError, e.what());
55586  SWIG_fail;
55587  }
55588  Py_END_ALLOW_THREADS
55589  }
55590  resultobj = SWIG_Py_Void();
55591  return resultobj;
55592 fail:
55593  return NULL;
55594 }
55595 
55596 
55597 SWIGINTERN PyObject *_wrap_Index2Layer_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55598  PyObject *resultobj = 0;
55599  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55600  void *argp1 = 0 ;
55601  int res1 = 0 ;
55602  PyObject * obj0 = 0 ;
55603 
55604  if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_reset",&obj0)) SWIG_fail;
55605  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55606  if (!SWIG_IsOK(res1)) {
55607  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_reset" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
55608  }
55609  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55610  {
55611  Py_BEGIN_ALLOW_THREADS
55612  try {
55613  (arg1)->reset();
55614  } catch(faiss::FaissException & e) {
55615  PyEval_RestoreThread(_save);
55616  PyErr_SetString(PyExc_RuntimeError, e.what());
55617  SWIG_fail;
55618  }
55619  Py_END_ALLOW_THREADS
55620  }
55621  resultobj = SWIG_Py_Void();
55622  return resultobj;
55623 fail:
55624  return NULL;
55625 }
55626 
55627 
55628 SWIGINTERN PyObject *_wrap_Index2Layer_transfer_to_IVFPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55629  PyObject *resultobj = 0;
55630  faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
55631  faiss::IndexIVFPQ *arg2 = 0 ;
55632  void *argp1 = 0 ;
55633  int res1 = 0 ;
55634  void *argp2 = 0 ;
55635  int res2 = 0 ;
55636  PyObject * obj0 = 0 ;
55637  PyObject * obj1 = 0 ;
55638 
55639  if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_transfer_to_IVFPQ",&obj0,&obj1)) SWIG_fail;
55640  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
55641  if (!SWIG_IsOK(res1)) {
55642  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_transfer_to_IVFPQ" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
55643  }
55644  arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
55645  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVFPQ, 0 );
55646  if (!SWIG_IsOK(res2)) {
55647  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_transfer_to_IVFPQ" "', argument " "2"" of type '" "faiss::IndexIVFPQ &""'");
55648  }
55649  if (!argp2) {
55650  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index2Layer_transfer_to_IVFPQ" "', argument " "2"" of type '" "faiss::IndexIVFPQ &""'");
55651  }
55652  arg2 = reinterpret_cast< faiss::IndexIVFPQ * >(argp2);
55653  {
55654  Py_BEGIN_ALLOW_THREADS
55655  try {
55656  ((faiss::Index2Layer const *)arg1)->transfer_to_IVFPQ(*arg2);
55657  } catch(faiss::FaissException & e) {
55658  PyEval_RestoreThread(_save);
55659  PyErr_SetString(PyExc_RuntimeError, e.what());
55660  SWIG_fail;
55661  }
55662  Py_END_ALLOW_THREADS
55663  }
55664  resultobj = SWIG_Py_Void();
55665  return resultobj;
55666 fail:
55667  return NULL;
55668 }
55669 
55670 
55671 SWIGINTERN PyObject *Index2Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55672  PyObject *obj;
55673  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
55674  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Index2Layer, SWIG_NewClientData(obj));
55675  return SWIG_Py_Void();
55676 }
55677 
55678 SWIGINTERN PyObject *_wrap_IndexBinary_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55679  PyObject *resultobj = 0;
55680  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55681  int arg2 ;
55682  void *argp1 = 0 ;
55683  int res1 = 0 ;
55684  int val2 ;
55685  int ecode2 = 0 ;
55686  PyObject * obj0 = 0 ;
55687  PyObject * obj1 = 0 ;
55688 
55689  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_d_set",&obj0,&obj1)) SWIG_fail;
55690  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55691  if (!SWIG_IsOK(res1)) {
55692  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_d_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55693  }
55694  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55695  ecode2 = SWIG_AsVal_int(obj1, &val2);
55696  if (!SWIG_IsOK(ecode2)) {
55697  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_d_set" "', argument " "2"" of type '" "int""'");
55698  }
55699  arg2 = static_cast< int >(val2);
55700  if (arg1) (arg1)->d = arg2;
55701  resultobj = SWIG_Py_Void();
55702  return resultobj;
55703 fail:
55704  return NULL;
55705 }
55706 
55707 
55708 SWIGINTERN PyObject *_wrap_IndexBinary_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55709  PyObject *resultobj = 0;
55710  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55711  void *argp1 = 0 ;
55712  int res1 = 0 ;
55713  PyObject * obj0 = 0 ;
55714  int result;
55715 
55716  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_d_get",&obj0)) SWIG_fail;
55717  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55718  if (!SWIG_IsOK(res1)) {
55719  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_d_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55720  }
55721  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55722  result = (int) ((arg1)->d);
55723  resultobj = SWIG_From_int(static_cast< int >(result));
55724  return resultobj;
55725 fail:
55726  return NULL;
55727 }
55728 
55729 
55730 SWIGINTERN PyObject *_wrap_IndexBinary_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55731  PyObject *resultobj = 0;
55732  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55733  int arg2 ;
55734  void *argp1 = 0 ;
55735  int res1 = 0 ;
55736  int val2 ;
55737  int ecode2 = 0 ;
55738  PyObject * obj0 = 0 ;
55739  PyObject * obj1 = 0 ;
55740 
55741  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_code_size_set",&obj0,&obj1)) SWIG_fail;
55742  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55743  if (!SWIG_IsOK(res1)) {
55744  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_code_size_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55745  }
55746  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55747  ecode2 = SWIG_AsVal_int(obj1, &val2);
55748  if (!SWIG_IsOK(ecode2)) {
55749  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_code_size_set" "', argument " "2"" of type '" "int""'");
55750  }
55751  arg2 = static_cast< int >(val2);
55752  if (arg1) (arg1)->code_size = arg2;
55753  resultobj = SWIG_Py_Void();
55754  return resultobj;
55755 fail:
55756  return NULL;
55757 }
55758 
55759 
55760 SWIGINTERN PyObject *_wrap_IndexBinary_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55761  PyObject *resultobj = 0;
55762  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55763  void *argp1 = 0 ;
55764  int res1 = 0 ;
55765  PyObject * obj0 = 0 ;
55766  int result;
55767 
55768  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_code_size_get",&obj0)) SWIG_fail;
55769  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55770  if (!SWIG_IsOK(res1)) {
55771  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_code_size_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55772  }
55773  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55774  result = (int) ((arg1)->code_size);
55775  resultobj = SWIG_From_int(static_cast< int >(result));
55776  return resultobj;
55777 fail:
55778  return NULL;
55779 }
55780 
55781 
55782 SWIGINTERN PyObject *_wrap_IndexBinary_ntotal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55783  PyObject *resultobj = 0;
55784  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55786  void *argp1 = 0 ;
55787  int res1 = 0 ;
55788  long val2 ;
55789  int ecode2 = 0 ;
55790  PyObject * obj0 = 0 ;
55791  PyObject * obj1 = 0 ;
55792 
55793  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_ntotal_set",&obj0,&obj1)) SWIG_fail;
55794  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55795  if (!SWIG_IsOK(res1)) {
55796  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_ntotal_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55797  }
55798  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55799  ecode2 = SWIG_AsVal_long(obj1, &val2);
55800  if (!SWIG_IsOK(ecode2)) {
55801  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_ntotal_set" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55802  }
55803  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55804  if (arg1) (arg1)->ntotal = arg2;
55805  resultobj = SWIG_Py_Void();
55806  return resultobj;
55807 fail:
55808  return NULL;
55809 }
55810 
55811 
55812 SWIGINTERN PyObject *_wrap_IndexBinary_ntotal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55813  PyObject *resultobj = 0;
55814  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55815  void *argp1 = 0 ;
55816  int res1 = 0 ;
55817  PyObject * obj0 = 0 ;
55819 
55820  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_ntotal_get",&obj0)) SWIG_fail;
55821  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55822  if (!SWIG_IsOK(res1)) {
55823  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_ntotal_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55824  }
55825  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55826  result = (faiss::IndexBinary::idx_t) ((arg1)->ntotal);
55827  resultobj = SWIG_From_long(static_cast< long >(result));
55828  return resultobj;
55829 fail:
55830  return NULL;
55831 }
55832 
55833 
55834 SWIGINTERN PyObject *_wrap_IndexBinary_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55835  PyObject *resultobj = 0;
55836  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55837  bool arg2 ;
55838  void *argp1 = 0 ;
55839  int res1 = 0 ;
55840  bool val2 ;
55841  int ecode2 = 0 ;
55842  PyObject * obj0 = 0 ;
55843  PyObject * obj1 = 0 ;
55844 
55845  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_verbose_set",&obj0,&obj1)) SWIG_fail;
55846  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55847  if (!SWIG_IsOK(res1)) {
55848  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_verbose_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55849  }
55850  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55851  ecode2 = SWIG_AsVal_bool(obj1, &val2);
55852  if (!SWIG_IsOK(ecode2)) {
55853  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_verbose_set" "', argument " "2"" of type '" "bool""'");
55854  }
55855  arg2 = static_cast< bool >(val2);
55856  if (arg1) (arg1)->verbose = arg2;
55857  resultobj = SWIG_Py_Void();
55858  return resultobj;
55859 fail:
55860  return NULL;
55861 }
55862 
55863 
55864 SWIGINTERN PyObject *_wrap_IndexBinary_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55865  PyObject *resultobj = 0;
55866  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55867  void *argp1 = 0 ;
55868  int res1 = 0 ;
55869  PyObject * obj0 = 0 ;
55870  bool result;
55871 
55872  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_verbose_get",&obj0)) SWIG_fail;
55873  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55874  if (!SWIG_IsOK(res1)) {
55875  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_verbose_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55876  }
55877  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55878  result = (bool) ((arg1)->verbose);
55879  resultobj = SWIG_From_bool(static_cast< bool >(result));
55880  return resultobj;
55881 fail:
55882  return NULL;
55883 }
55884 
55885 
55886 SWIGINTERN PyObject *_wrap_IndexBinary_is_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55887  PyObject *resultobj = 0;
55888  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55889  bool arg2 ;
55890  void *argp1 = 0 ;
55891  int res1 = 0 ;
55892  bool val2 ;
55893  int ecode2 = 0 ;
55894  PyObject * obj0 = 0 ;
55895  PyObject * obj1 = 0 ;
55896 
55897  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_is_trained_set",&obj0,&obj1)) SWIG_fail;
55898  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55899  if (!SWIG_IsOK(res1)) {
55900  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_is_trained_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55901  }
55902  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55903  ecode2 = SWIG_AsVal_bool(obj1, &val2);
55904  if (!SWIG_IsOK(ecode2)) {
55905  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_is_trained_set" "', argument " "2"" of type '" "bool""'");
55906  }
55907  arg2 = static_cast< bool >(val2);
55908  if (arg1) (arg1)->is_trained = arg2;
55909  resultobj = SWIG_Py_Void();
55910  return resultobj;
55911 fail:
55912  return NULL;
55913 }
55914 
55915 
55916 SWIGINTERN PyObject *_wrap_IndexBinary_is_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55917  PyObject *resultobj = 0;
55918  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55919  void *argp1 = 0 ;
55920  int res1 = 0 ;
55921  PyObject * obj0 = 0 ;
55922  bool result;
55923 
55924  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_is_trained_get",&obj0)) SWIG_fail;
55925  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55926  if (!SWIG_IsOK(res1)) {
55927  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_is_trained_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55928  }
55929  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55930  result = (bool) ((arg1)->is_trained);
55931  resultobj = SWIG_From_bool(static_cast< bool >(result));
55932  return resultobj;
55933 fail:
55934  return NULL;
55935 }
55936 
55937 
55938 SWIGINTERN PyObject *_wrap_IndexBinary_metric_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55939  PyObject *resultobj = 0;
55940  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55941  faiss::MetricType arg2 ;
55942  void *argp1 = 0 ;
55943  int res1 = 0 ;
55944  int val2 ;
55945  int ecode2 = 0 ;
55946  PyObject * obj0 = 0 ;
55947  PyObject * obj1 = 0 ;
55948 
55949  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_metric_type_set",&obj0,&obj1)) SWIG_fail;
55950  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55951  if (!SWIG_IsOK(res1)) {
55952  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_metric_type_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55953  }
55954  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55955  ecode2 = SWIG_AsVal_int(obj1, &val2);
55956  if (!SWIG_IsOK(ecode2)) {
55957  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_metric_type_set" "', argument " "2"" of type '" "faiss::MetricType""'");
55958  }
55959  arg2 = static_cast< faiss::MetricType >(val2);
55960  if (arg1) (arg1)->metric_type = arg2;
55961  resultobj = SWIG_Py_Void();
55962  return resultobj;
55963 fail:
55964  return NULL;
55965 }
55966 
55967 
55968 SWIGINTERN PyObject *_wrap_IndexBinary_metric_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55969  PyObject *resultobj = 0;
55970  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55971  void *argp1 = 0 ;
55972  int res1 = 0 ;
55973  PyObject * obj0 = 0 ;
55974  faiss::MetricType result;
55975 
55976  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_metric_type_get",&obj0)) SWIG_fail;
55977  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55978  if (!SWIG_IsOK(res1)) {
55979  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_metric_type_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55980  }
55981  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55982  result = (faiss::MetricType) ((arg1)->metric_type);
55983  resultobj = SWIG_From_int(static_cast< int >(result));
55984  return resultobj;
55985 fail:
55986  return NULL;
55987 }
55988 
55989 
55990 SWIGINTERN PyObject *_wrap_delete_IndexBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55991  PyObject *resultobj = 0;
55992  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55993  void *argp1 = 0 ;
55994  int res1 = 0 ;
55995  PyObject * obj0 = 0 ;
55996 
55997  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinary",&obj0)) SWIG_fail;
55998  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, SWIG_POINTER_DISOWN | 0 );
55999  if (!SWIG_IsOK(res1)) {
56000  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinary" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56001  }
56002  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56003  {
56004  Py_BEGIN_ALLOW_THREADS
56005  try {
56006  delete arg1;
56007  } catch(faiss::FaissException & e) {
56008  PyEval_RestoreThread(_save);
56009  PyErr_SetString(PyExc_RuntimeError, e.what());
56010  SWIG_fail;
56011  }
56012  Py_END_ALLOW_THREADS
56013  }
56014  resultobj = SWIG_Py_Void();
56015  return resultobj;
56016 fail:
56017  return NULL;
56018 }
56019 
56020 
56021 SWIGINTERN PyObject *_wrap_IndexBinary_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56022  PyObject *resultobj = 0;
56023  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56025  uint8_t *arg3 = (uint8_t *) 0 ;
56026  void *argp1 = 0 ;
56027  int res1 = 0 ;
56028  long val2 ;
56029  int ecode2 = 0 ;
56030  void *argp3 = 0 ;
56031  int res3 = 0 ;
56032  PyObject * obj0 = 0 ;
56033  PyObject * obj1 = 0 ;
56034  PyObject * obj2 = 0 ;
56035 
56036  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinary_train",&obj0,&obj1,&obj2)) SWIG_fail;
56037  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56038  if (!SWIG_IsOK(res1)) {
56039  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_train" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56040  }
56041  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56042  ecode2 = SWIG_AsVal_long(obj1, &val2);
56043  if (!SWIG_IsOK(ecode2)) {
56044  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56045  }
56046  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56047  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56048  if (!SWIG_IsOK(res3)) {
56049  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_train" "', argument " "3"" of type '" "uint8_t const *""'");
56050  }
56051  arg3 = reinterpret_cast< uint8_t * >(argp3);
56052  {
56053  Py_BEGIN_ALLOW_THREADS
56054  try {
56055  (arg1)->train(arg2,(uint8_t const *)arg3);
56056  } catch(faiss::FaissException & e) {
56057  PyEval_RestoreThread(_save);
56058  PyErr_SetString(PyExc_RuntimeError, e.what());
56059  SWIG_fail;
56060  }
56061  Py_END_ALLOW_THREADS
56062  }
56063  resultobj = SWIG_Py_Void();
56064  return resultobj;
56065 fail:
56066  return NULL;
56067 }
56068 
56069 
56070 SWIGINTERN PyObject *_wrap_IndexBinary_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56071  PyObject *resultobj = 0;
56072  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56074  uint8_t *arg3 = (uint8_t *) 0 ;
56075  void *argp1 = 0 ;
56076  int res1 = 0 ;
56077  long val2 ;
56078  int ecode2 = 0 ;
56079  void *argp3 = 0 ;
56080  int res3 = 0 ;
56081  PyObject * obj0 = 0 ;
56082  PyObject * obj1 = 0 ;
56083  PyObject * obj2 = 0 ;
56084 
56085  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinary_add",&obj0,&obj1,&obj2)) SWIG_fail;
56086  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56087  if (!SWIG_IsOK(res1)) {
56088  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_add" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56089  }
56090  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56091  ecode2 = SWIG_AsVal_long(obj1, &val2);
56092  if (!SWIG_IsOK(ecode2)) {
56093  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56094  }
56095  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56096  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56097  if (!SWIG_IsOK(res3)) {
56098  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_add" "', argument " "3"" of type '" "uint8_t const *""'");
56099  }
56100  arg3 = reinterpret_cast< uint8_t * >(argp3);
56101  {
56102  Py_BEGIN_ALLOW_THREADS
56103  try {
56104  (arg1)->add(arg2,(uint8_t const *)arg3);
56105  } catch(faiss::FaissException & e) {
56106  PyEval_RestoreThread(_save);
56107  PyErr_SetString(PyExc_RuntimeError, e.what());
56108  SWIG_fail;
56109  }
56110  Py_END_ALLOW_THREADS
56111  }
56112  resultobj = SWIG_Py_Void();
56113  return resultobj;
56114 fail:
56115  return NULL;
56116 }
56117 
56118 
56119 SWIGINTERN PyObject *_wrap_IndexBinary_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56120  PyObject *resultobj = 0;
56121  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56123  uint8_t *arg3 = (uint8_t *) 0 ;
56124  long *arg4 = (long *) 0 ;
56125  void *argp1 = 0 ;
56126  int res1 = 0 ;
56127  long val2 ;
56128  int ecode2 = 0 ;
56129  void *argp3 = 0 ;
56130  int res3 = 0 ;
56131  void *argp4 = 0 ;
56132  int res4 = 0 ;
56133  PyObject * obj0 = 0 ;
56134  PyObject * obj1 = 0 ;
56135  PyObject * obj2 = 0 ;
56136  PyObject * obj3 = 0 ;
56137 
56138  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinary_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
56139  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56140  if (!SWIG_IsOK(res1)) {
56141  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_add_with_ids" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56142  }
56143  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56144  ecode2 = SWIG_AsVal_long(obj1, &val2);
56145  if (!SWIG_IsOK(ecode2)) {
56146  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_add_with_ids" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56147  }
56148  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56149  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56150  if (!SWIG_IsOK(res3)) {
56151  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_add_with_ids" "', argument " "3"" of type '" "uint8_t const *""'");
56152  }
56153  arg3 = reinterpret_cast< uint8_t * >(argp3);
56154  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
56155  if (!SWIG_IsOK(res4)) {
56156  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_add_with_ids" "', argument " "4"" of type '" "long const *""'");
56157  }
56158  arg4 = reinterpret_cast< long * >(argp4);
56159  {
56160  Py_BEGIN_ALLOW_THREADS
56161  try {
56162  (arg1)->add_with_ids(arg2,(uint8_t const *)arg3,(long const *)arg4);
56163  } catch(faiss::FaissException & e) {
56164  PyEval_RestoreThread(_save);
56165  PyErr_SetString(PyExc_RuntimeError, e.what());
56166  SWIG_fail;
56167  }
56168  Py_END_ALLOW_THREADS
56169  }
56170  resultobj = SWIG_Py_Void();
56171  return resultobj;
56172 fail:
56173  return NULL;
56174 }
56175 
56176 
56177 SWIGINTERN PyObject *_wrap_IndexBinary_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56178  PyObject *resultobj = 0;
56179  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56181  uint8_t *arg3 = (uint8_t *) 0 ;
56183  int32_t *arg5 = (int32_t *) 0 ;
56185  void *argp1 = 0 ;
56186  int res1 = 0 ;
56187  long val2 ;
56188  int ecode2 = 0 ;
56189  void *argp3 = 0 ;
56190  int res3 = 0 ;
56191  long val4 ;
56192  int ecode4 = 0 ;
56193  void *argp5 = 0 ;
56194  int res5 = 0 ;
56195  void *argp6 = 0 ;
56196  int res6 = 0 ;
56197  PyObject * obj0 = 0 ;
56198  PyObject * obj1 = 0 ;
56199  PyObject * obj2 = 0 ;
56200  PyObject * obj3 = 0 ;
56201  PyObject * obj4 = 0 ;
56202  PyObject * obj5 = 0 ;
56203 
56204  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinary_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
56205  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56206  if (!SWIG_IsOK(res1)) {
56207  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_search" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
56208  }
56209  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56210  ecode2 = SWIG_AsVal_long(obj1, &val2);
56211  if (!SWIG_IsOK(ecode2)) {
56212  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56213  }
56214  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56215  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56216  if (!SWIG_IsOK(res3)) {
56217  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_search" "', argument " "3"" of type '" "uint8_t const *""'");
56218  }
56219  arg3 = reinterpret_cast< uint8_t * >(argp3);
56220  ecode4 = SWIG_AsVal_long(obj3, &val4);
56221  if (!SWIG_IsOK(ecode4)) {
56222  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinary_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
56223  }
56224  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
56225  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
56226  if (!SWIG_IsOK(res5)) {
56227  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinary_search" "', argument " "5"" of type '" "int32_t *""'");
56228  }
56229  arg5 = reinterpret_cast< int32_t * >(argp5);
56230  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
56231  if (!SWIG_IsOK(res6)) {
56232  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinary_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
56233  }
56234  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
56235  {
56236  Py_BEGIN_ALLOW_THREADS
56237  try {
56238  ((faiss::IndexBinary const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
56239  } catch(faiss::FaissException & e) {
56240  PyEval_RestoreThread(_save);
56241  PyErr_SetString(PyExc_RuntimeError, e.what());
56242  SWIG_fail;
56243  }
56244  Py_END_ALLOW_THREADS
56245  }
56246  resultobj = SWIG_Py_Void();
56247  return resultobj;
56248 fail:
56249  return NULL;
56250 }
56251 
56252 
56253 SWIGINTERN PyObject *_wrap_IndexBinary_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56254  PyObject *resultobj = 0;
56255  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56257  uint8_t *arg3 = (uint8_t *) 0 ;
56258  int arg4 ;
56260  void *argp1 = 0 ;
56261  int res1 = 0 ;
56262  long val2 ;
56263  int ecode2 = 0 ;
56264  void *argp3 = 0 ;
56265  int res3 = 0 ;
56266  int val4 ;
56267  int ecode4 = 0 ;
56268  void *argp5 = 0 ;
56269  int res5 = 0 ;
56270  PyObject * obj0 = 0 ;
56271  PyObject * obj1 = 0 ;
56272  PyObject * obj2 = 0 ;
56273  PyObject * obj3 = 0 ;
56274  PyObject * obj4 = 0 ;
56275 
56276  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexBinary_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
56277  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56278  if (!SWIG_IsOK(res1)) {
56279  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_range_search" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
56280  }
56281  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56282  ecode2 = SWIG_AsVal_long(obj1, &val2);
56283  if (!SWIG_IsOK(ecode2)) {
56284  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_range_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56285  }
56286  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56287  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56288  if (!SWIG_IsOK(res3)) {
56289  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_range_search" "', argument " "3"" of type '" "uint8_t const *""'");
56290  }
56291  arg3 = reinterpret_cast< uint8_t * >(argp3);
56292  ecode4 = SWIG_AsVal_int(obj3, &val4);
56293  if (!SWIG_IsOK(ecode4)) {
56294  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinary_range_search" "', argument " "4"" of type '" "int""'");
56295  }
56296  arg4 = static_cast< int >(val4);
56297  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
56298  if (!SWIG_IsOK(res5)) {
56299  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinary_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
56300  }
56301  arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
56302  {
56303  Py_BEGIN_ALLOW_THREADS
56304  try {
56305  ((faiss::IndexBinary const *)arg1)->range_search(arg2,(uint8_t const *)arg3,arg4,arg5);
56306  } catch(faiss::FaissException & e) {
56307  PyEval_RestoreThread(_save);
56308  PyErr_SetString(PyExc_RuntimeError, e.what());
56309  SWIG_fail;
56310  }
56311  Py_END_ALLOW_THREADS
56312  }
56313  resultobj = SWIG_Py_Void();
56314  return resultobj;
56315 fail:
56316  return NULL;
56317 }
56318 
56319 
56320 SWIGINTERN PyObject *_wrap_IndexBinary_assign__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56321  PyObject *resultobj = 0;
56322  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56324  uint8_t *arg3 = (uint8_t *) 0 ;
56327  void *argp1 = 0 ;
56328  int res1 = 0 ;
56329  long val2 ;
56330  int ecode2 = 0 ;
56331  void *argp3 = 0 ;
56332  int res3 = 0 ;
56333  void *argp4 = 0 ;
56334  int res4 = 0 ;
56335  long val5 ;
56336  int ecode5 = 0 ;
56337  PyObject * obj0 = 0 ;
56338  PyObject * obj1 = 0 ;
56339  PyObject * obj2 = 0 ;
56340  PyObject * obj3 = 0 ;
56341  PyObject * obj4 = 0 ;
56342 
56343  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexBinary_assign",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
56344  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56345  if (!SWIG_IsOK(res1)) {
56346  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_assign" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56347  }
56348  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56349  ecode2 = SWIG_AsVal_long(obj1, &val2);
56350  if (!SWIG_IsOK(ecode2)) {
56351  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_assign" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56352  }
56353  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56354  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56355  if (!SWIG_IsOK(res3)) {
56356  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_assign" "', argument " "3"" of type '" "uint8_t const *""'");
56357  }
56358  arg3 = reinterpret_cast< uint8_t * >(argp3);
56359  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
56360  if (!SWIG_IsOK(res4)) {
56361  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_assign" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t *""'");
56362  }
56363  arg4 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp4);
56364  ecode5 = SWIG_AsVal_long(obj4, &val5);
56365  if (!SWIG_IsOK(ecode5)) {
56366  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IndexBinary_assign" "', argument " "5"" of type '" "faiss::IndexBinary::idx_t""'");
56367  }
56368  arg5 = static_cast< faiss::IndexBinary::idx_t >(val5);
56369  {
56370  Py_BEGIN_ALLOW_THREADS
56371  try {
56372  (arg1)->assign(arg2,(uint8_t const *)arg3,arg4,arg5);
56373  } catch(faiss::FaissException & e) {
56374  PyEval_RestoreThread(_save);
56375  PyErr_SetString(PyExc_RuntimeError, e.what());
56376  SWIG_fail;
56377  }
56378  Py_END_ALLOW_THREADS
56379  }
56380  resultobj = SWIG_Py_Void();
56381  return resultobj;
56382 fail:
56383  return NULL;
56384 }
56385 
56386 
56387 SWIGINTERN PyObject *_wrap_IndexBinary_assign__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56388  PyObject *resultobj = 0;
56389  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56391  uint8_t *arg3 = (uint8_t *) 0 ;
56393  void *argp1 = 0 ;
56394  int res1 = 0 ;
56395  long val2 ;
56396  int ecode2 = 0 ;
56397  void *argp3 = 0 ;
56398  int res3 = 0 ;
56399  void *argp4 = 0 ;
56400  int res4 = 0 ;
56401  PyObject * obj0 = 0 ;
56402  PyObject * obj1 = 0 ;
56403  PyObject * obj2 = 0 ;
56404  PyObject * obj3 = 0 ;
56405 
56406  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinary_assign",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
56407  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56408  if (!SWIG_IsOK(res1)) {
56409  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_assign" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56410  }
56411  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56412  ecode2 = SWIG_AsVal_long(obj1, &val2);
56413  if (!SWIG_IsOK(ecode2)) {
56414  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_assign" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56415  }
56416  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56417  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56418  if (!SWIG_IsOK(res3)) {
56419  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_assign" "', argument " "3"" of type '" "uint8_t const *""'");
56420  }
56421  arg3 = reinterpret_cast< uint8_t * >(argp3);
56422  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
56423  if (!SWIG_IsOK(res4)) {
56424  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_assign" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t *""'");
56425  }
56426  arg4 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp4);
56427  {
56428  Py_BEGIN_ALLOW_THREADS
56429  try {
56430  (arg1)->assign(arg2,(uint8_t const *)arg3,arg4);
56431  } catch(faiss::FaissException & e) {
56432  PyEval_RestoreThread(_save);
56433  PyErr_SetString(PyExc_RuntimeError, e.what());
56434  SWIG_fail;
56435  }
56436  Py_END_ALLOW_THREADS
56437  }
56438  resultobj = SWIG_Py_Void();
56439  return resultobj;
56440 fail:
56441  return NULL;
56442 }
56443 
56444 
56445 SWIGINTERN PyObject *_wrap_IndexBinary_assign(PyObject *self, PyObject *args) {
56446  Py_ssize_t argc;
56447  PyObject *argv[6] = {
56448  0
56449  };
56450  Py_ssize_t ii;
56451 
56452  if (!PyTuple_Check(args)) SWIG_fail;
56453  argc = args ? PyObject_Length(args) : 0;
56454  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
56455  argv[ii] = PyTuple_GET_ITEM(args,ii);
56456  }
56457  if (argc == 4) {
56458  int _v;
56459  void *vptr = 0;
56460  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
56461  _v = SWIG_CheckState(res);
56462  if (_v) {
56463  {
56464  int res = SWIG_AsVal_long(argv[1], NULL);
56465  _v = SWIG_CheckState(res);
56466  }
56467  if (_v) {
56468  void *vptr = 0;
56469  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
56470  _v = SWIG_CheckState(res);
56471  if (_v) {
56472  void *vptr = 0;
56473  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
56474  _v = SWIG_CheckState(res);
56475  if (_v) {
56476  return _wrap_IndexBinary_assign__SWIG_1(self, args);
56477  }
56478  }
56479  }
56480  }
56481  }
56482  if (argc == 5) {
56483  int _v;
56484  void *vptr = 0;
56485  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
56486  _v = SWIG_CheckState(res);
56487  if (_v) {
56488  {
56489  int res = SWIG_AsVal_long(argv[1], NULL);
56490  _v = SWIG_CheckState(res);
56491  }
56492  if (_v) {
56493  void *vptr = 0;
56494  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
56495  _v = SWIG_CheckState(res);
56496  if (_v) {
56497  void *vptr = 0;
56498  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
56499  _v = SWIG_CheckState(res);
56500  if (_v) {
56501  {
56502  int res = SWIG_AsVal_long(argv[4], NULL);
56503  _v = SWIG_CheckState(res);
56504  }
56505  if (_v) {
56506  return _wrap_IndexBinary_assign__SWIG_0(self, args);
56507  }
56508  }
56509  }
56510  }
56511  }
56512  }
56513 
56514 fail:
56515  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinary_assign'.\n"
56516  " Possible C/C++ prototypes are:\n"
56517  " faiss::IndexBinary::assign(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t *,faiss::IndexBinary::idx_t)\n"
56518  " faiss::IndexBinary::assign(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t *)\n");
56519  return 0;
56520 }
56521 
56522 
56523 SWIGINTERN PyObject *_wrap_IndexBinary_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56524  PyObject *resultobj = 0;
56525  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56526  void *argp1 = 0 ;
56527  int res1 = 0 ;
56528  PyObject * obj0 = 0 ;
56529 
56530  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_reset",&obj0)) SWIG_fail;
56531  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56532  if (!SWIG_IsOK(res1)) {
56533  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_reset" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56534  }
56535  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56536  {
56537  Py_BEGIN_ALLOW_THREADS
56538  try {
56539  (arg1)->reset();
56540  } catch(faiss::FaissException & e) {
56541  PyEval_RestoreThread(_save);
56542  PyErr_SetString(PyExc_RuntimeError, e.what());
56543  SWIG_fail;
56544  }
56545  Py_END_ALLOW_THREADS
56546  }
56547  resultobj = SWIG_Py_Void();
56548  return resultobj;
56549 fail:
56550  return NULL;
56551 }
56552 
56553 
56554 SWIGINTERN PyObject *_wrap_IndexBinary_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56555  PyObject *resultobj = 0;
56556  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56557  faiss::IDSelector *arg2 = 0 ;
56558  void *argp1 = 0 ;
56559  int res1 = 0 ;
56560  void *argp2 = 0 ;
56561  int res2 = 0 ;
56562  PyObject * obj0 = 0 ;
56563  PyObject * obj1 = 0 ;
56564  long result;
56565 
56566  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_remove_ids",&obj0,&obj1)) SWIG_fail;
56567  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56568  if (!SWIG_IsOK(res1)) {
56569  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_remove_ids" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56570  }
56571  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56572  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
56573  if (!SWIG_IsOK(res2)) {
56574  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinary_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
56575  }
56576  if (!argp2) {
56577  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinary_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
56578  }
56579  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
56580  {
56581  Py_BEGIN_ALLOW_THREADS
56582  try {
56583  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
56584  } catch(faiss::FaissException & e) {
56585  PyEval_RestoreThread(_save);
56586  PyErr_SetString(PyExc_RuntimeError, e.what());
56587  SWIG_fail;
56588  }
56589  Py_END_ALLOW_THREADS
56590  }
56591  resultobj = SWIG_From_long(static_cast< long >(result));
56592  return resultobj;
56593 fail:
56594  return NULL;
56595 }
56596 
56597 
56598 SWIGINTERN PyObject *_wrap_IndexBinary_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56599  PyObject *resultobj = 0;
56600  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56602  uint8_t *arg3 = (uint8_t *) 0 ;
56603  void *argp1 = 0 ;
56604  int res1 = 0 ;
56605  long val2 ;
56606  int ecode2 = 0 ;
56607  void *argp3 = 0 ;
56608  int res3 = 0 ;
56609  PyObject * obj0 = 0 ;
56610  PyObject * obj1 = 0 ;
56611  PyObject * obj2 = 0 ;
56612 
56613  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinary_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
56614  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56615  if (!SWIG_IsOK(res1)) {
56616  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
56617  }
56618  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56619  ecode2 = SWIG_AsVal_long(obj1, &val2);
56620  if (!SWIG_IsOK(ecode2)) {
56621  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56622  }
56623  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56624  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56625  if (!SWIG_IsOK(res3)) {
56626  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
56627  }
56628  arg3 = reinterpret_cast< uint8_t * >(argp3);
56629  {
56630  Py_BEGIN_ALLOW_THREADS
56631  try {
56632  ((faiss::IndexBinary const *)arg1)->reconstruct(arg2,arg3);
56633  } catch(faiss::FaissException & e) {
56634  PyEval_RestoreThread(_save);
56635  PyErr_SetString(PyExc_RuntimeError, e.what());
56636  SWIG_fail;
56637  }
56638  Py_END_ALLOW_THREADS
56639  }
56640  resultobj = SWIG_Py_Void();
56641  return resultobj;
56642 fail:
56643  return NULL;
56644 }
56645 
56646 
56647 SWIGINTERN PyObject *_wrap_IndexBinary_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56648  PyObject *resultobj = 0;
56649  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56652  uint8_t *arg4 = (uint8_t *) 0 ;
56653  void *argp1 = 0 ;
56654  int res1 = 0 ;
56655  long val2 ;
56656  int ecode2 = 0 ;
56657  long val3 ;
56658  int ecode3 = 0 ;
56659  void *argp4 = 0 ;
56660  int res4 = 0 ;
56661  PyObject * obj0 = 0 ;
56662  PyObject * obj1 = 0 ;
56663  PyObject * obj2 = 0 ;
56664  PyObject * obj3 = 0 ;
56665 
56666  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinary_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
56667  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56668  if (!SWIG_IsOK(res1)) {
56669  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
56670  }
56671  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56672  ecode2 = SWIG_AsVal_long(obj1, &val2);
56673  if (!SWIG_IsOK(ecode2)) {
56674  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_reconstruct_n" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56675  }
56676  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56677  ecode3 = SWIG_AsVal_long(obj2, &val3);
56678  if (!SWIG_IsOK(ecode3)) {
56679  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinary_reconstruct_n" "', argument " "3"" of type '" "faiss::IndexBinary::idx_t""'");
56680  }
56681  arg3 = static_cast< faiss::IndexBinary::idx_t >(val3);
56682  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
56683  if (!SWIG_IsOK(res4)) {
56684  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_reconstruct_n" "', argument " "4"" of type '" "uint8_t *""'");
56685  }
56686  arg4 = reinterpret_cast< uint8_t * >(argp4);
56687  {
56688  Py_BEGIN_ALLOW_THREADS
56689  try {
56690  ((faiss::IndexBinary const *)arg1)->reconstruct_n(arg2,arg3,arg4);
56691  } catch(faiss::FaissException & e) {
56692  PyEval_RestoreThread(_save);
56693  PyErr_SetString(PyExc_RuntimeError, e.what());
56694  SWIG_fail;
56695  }
56696  Py_END_ALLOW_THREADS
56697  }
56698  resultobj = SWIG_Py_Void();
56699  return resultobj;
56700 fail:
56701  return NULL;
56702 }
56703 
56704 
56705 SWIGINTERN PyObject *_wrap_IndexBinary_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56706  PyObject *resultobj = 0;
56707  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56709  uint8_t *arg3 = (uint8_t *) 0 ;
56711  int32_t *arg5 = (int32_t *) 0 ;
56713  uint8_t *arg7 = (uint8_t *) 0 ;
56714  void *argp1 = 0 ;
56715  int res1 = 0 ;
56716  long val2 ;
56717  int ecode2 = 0 ;
56718  void *argp3 = 0 ;
56719  int res3 = 0 ;
56720  long val4 ;
56721  int ecode4 = 0 ;
56722  void *argp5 = 0 ;
56723  int res5 = 0 ;
56724  void *argp6 = 0 ;
56725  int res6 = 0 ;
56726  void *argp7 = 0 ;
56727  int res7 = 0 ;
56728  PyObject * obj0 = 0 ;
56729  PyObject * obj1 = 0 ;
56730  PyObject * obj2 = 0 ;
56731  PyObject * obj3 = 0 ;
56732  PyObject * obj4 = 0 ;
56733  PyObject * obj5 = 0 ;
56734  PyObject * obj6 = 0 ;
56735 
56736  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexBinary_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
56737  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56738  if (!SWIG_IsOK(res1)) {
56739  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
56740  }
56741  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56742  ecode2 = SWIG_AsVal_long(obj1, &val2);
56743  if (!SWIG_IsOK(ecode2)) {
56744  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56745  }
56746  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56747  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56748  if (!SWIG_IsOK(res3)) {
56749  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "3"" of type '" "uint8_t const *""'");
56750  }
56751  arg3 = reinterpret_cast< uint8_t * >(argp3);
56752  ecode4 = SWIG_AsVal_long(obj3, &val4);
56753  if (!SWIG_IsOK(ecode4)) {
56754  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
56755  }
56756  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
56757  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
56758  if (!SWIG_IsOK(res5)) {
56759  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "5"" of type '" "int32_t *""'");
56760  }
56761  arg5 = reinterpret_cast< int32_t * >(argp5);
56762  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
56763  if (!SWIG_IsOK(res6)) {
56764  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
56765  }
56766  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
56767  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_unsigned_char, 0 | 0 );
56768  if (!SWIG_IsOK(res7)) {
56769  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "7"" of type '" "uint8_t *""'");
56770  }
56771  arg7 = reinterpret_cast< uint8_t * >(argp7);
56772  {
56773  Py_BEGIN_ALLOW_THREADS
56774  try {
56775  ((faiss::IndexBinary const *)arg1)->search_and_reconstruct(arg2,(uint8_t const *)arg3,arg4,arg5,arg6,arg7);
56776  } catch(faiss::FaissException & e) {
56777  PyEval_RestoreThread(_save);
56778  PyErr_SetString(PyExc_RuntimeError, e.what());
56779  SWIG_fail;
56780  }
56781  Py_END_ALLOW_THREADS
56782  }
56783  resultobj = SWIG_Py_Void();
56784  return resultobj;
56785 fail:
56786  return NULL;
56787 }
56788 
56789 
56790 SWIGINTERN PyObject *_wrap_IndexBinary_display(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56791  PyObject *resultobj = 0;
56792  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56793  void *argp1 = 0 ;
56794  int res1 = 0 ;
56795  PyObject * obj0 = 0 ;
56796 
56797  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_display",&obj0)) SWIG_fail;
56798  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56799  if (!SWIG_IsOK(res1)) {
56800  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_display" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
56801  }
56802  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56803  {
56804  Py_BEGIN_ALLOW_THREADS
56805  try {
56806  ((faiss::IndexBinary const *)arg1)->display();
56807  } catch(faiss::FaissException & e) {
56808  PyEval_RestoreThread(_save);
56809  PyErr_SetString(PyExc_RuntimeError, e.what());
56810  SWIG_fail;
56811  }
56812  Py_END_ALLOW_THREADS
56813  }
56814  resultobj = SWIG_Py_Void();
56815  return resultobj;
56816 fail:
56817  return NULL;
56818 }
56819 
56820 
56821 SWIGINTERN PyObject *IndexBinary_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56822  PyObject *obj;
56823  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
56824  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinary, SWIG_NewClientData(obj));
56825  return SWIG_Py_Void();
56826 }
56827 
56828 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_xb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56829  PyObject *resultobj = 0;
56831  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
56832  void *argp1 = 0 ;
56833  int res1 = 0 ;
56834  void *argp2 = 0 ;
56835  int res2 = 0 ;
56836  PyObject * obj0 = 0 ;
56837  PyObject * obj1 = 0 ;
56838 
56839  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_xb_set",&obj0,&obj1)) SWIG_fail;
56840  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
56841  if (!SWIG_IsOK(res1)) {
56842  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_xb_set" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
56843  }
56844  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
56845  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
56846  if (!SWIG_IsOK(res2)) {
56847  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryFlat_xb_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
56848  }
56849  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
56850  if (arg1) (arg1)->xb = *arg2;
56851  resultobj = SWIG_Py_Void();
56852  return resultobj;
56853 fail:
56854  return NULL;
56855 }
56856 
56857 
56858 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_xb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56859  PyObject *resultobj = 0;
56861  void *argp1 = 0 ;
56862  int res1 = 0 ;
56863  PyObject * obj0 = 0 ;
56864  std::vector< uint8_t > *result = 0 ;
56865 
56866  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_xb_get",&obj0)) SWIG_fail;
56867  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
56868  if (!SWIG_IsOK(res1)) {
56869  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_xb_get" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
56870  }
56871  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
56872  result = (std::vector< uint8_t > *)& ((arg1)->xb);
56873  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
56874  return resultobj;
56875 fail:
56876  return NULL;
56877 }
56878 
56879 
56880 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_use_heap_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56881  PyObject *resultobj = 0;
56883  bool arg2 ;
56884  void *argp1 = 0 ;
56885  int res1 = 0 ;
56886  bool val2 ;
56887  int ecode2 = 0 ;
56888  PyObject * obj0 = 0 ;
56889  PyObject * obj1 = 0 ;
56890 
56891  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_use_heap_set",&obj0,&obj1)) SWIG_fail;
56892  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
56893  if (!SWIG_IsOK(res1)) {
56894  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_use_heap_set" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
56895  }
56896  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
56897  ecode2 = SWIG_AsVal_bool(obj1, &val2);
56898  if (!SWIG_IsOK(ecode2)) {
56899  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_use_heap_set" "', argument " "2"" of type '" "bool""'");
56900  }
56901  arg2 = static_cast< bool >(val2);
56902  if (arg1) (arg1)->use_heap = arg2;
56903  resultobj = SWIG_Py_Void();
56904  return resultobj;
56905 fail:
56906  return NULL;
56907 }
56908 
56909 
56910 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_use_heap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56911  PyObject *resultobj = 0;
56913  void *argp1 = 0 ;
56914  int res1 = 0 ;
56915  PyObject * obj0 = 0 ;
56916  bool result;
56917 
56918  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_use_heap_get",&obj0)) SWIG_fail;
56919  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
56920  if (!SWIG_IsOK(res1)) {
56921  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_use_heap_get" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
56922  }
56923  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
56924  result = (bool) ((arg1)->use_heap);
56925  resultobj = SWIG_From_bool(static_cast< bool >(result));
56926  return resultobj;
56927 fail:
56928  return NULL;
56929 }
56930 
56931 
56932 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_query_batch_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56933  PyObject *resultobj = 0;
56935  size_t arg2 ;
56936  void *argp1 = 0 ;
56937  int res1 = 0 ;
56938  size_t val2 ;
56939  int ecode2 = 0 ;
56940  PyObject * obj0 = 0 ;
56941  PyObject * obj1 = 0 ;
56942 
56943  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_query_batch_size_set",&obj0,&obj1)) SWIG_fail;
56944  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
56945  if (!SWIG_IsOK(res1)) {
56946  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_query_batch_size_set" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
56947  }
56948  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
56949  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56950  if (!SWIG_IsOK(ecode2)) {
56951  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_query_batch_size_set" "', argument " "2"" of type '" "size_t""'");
56952  }
56953  arg2 = static_cast< size_t >(val2);
56954  if (arg1) (arg1)->query_batch_size = arg2;
56955  resultobj = SWIG_Py_Void();
56956  return resultobj;
56957 fail:
56958  return NULL;
56959 }
56960 
56961 
56962 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_query_batch_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56963  PyObject *resultobj = 0;
56965  void *argp1 = 0 ;
56966  int res1 = 0 ;
56967  PyObject * obj0 = 0 ;
56968  size_t result;
56969 
56970  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_query_batch_size_get",&obj0)) SWIG_fail;
56971  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
56972  if (!SWIG_IsOK(res1)) {
56973  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_query_batch_size_get" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
56974  }
56975  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
56976  result = (size_t) ((arg1)->query_batch_size);
56977  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
56978  return resultobj;
56979 fail:
56980  return NULL;
56981 }
56982 
56983 
56984 SWIGINTERN PyObject *_wrap_new_IndexBinaryFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56985  PyObject *resultobj = 0;
56987  long val1 ;
56988  int ecode1 = 0 ;
56989  PyObject * obj0 = 0 ;
56990  faiss::IndexBinaryFlat *result = 0 ;
56991 
56992  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryFlat",&obj0)) SWIG_fail;
56993  ecode1 = SWIG_AsVal_long(obj0, &val1);
56994  if (!SWIG_IsOK(ecode1)) {
56995  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexBinaryFlat" "', argument " "1"" of type '" "faiss::IndexBinary::idx_t""'");
56996  }
56997  arg1 = static_cast< faiss::IndexBinary::idx_t >(val1);
56998  {
56999  Py_BEGIN_ALLOW_THREADS
57000  try {
57001  result = (faiss::IndexBinaryFlat *)new faiss::IndexBinaryFlat(arg1);
57002  } catch(faiss::FaissException & e) {
57003  PyEval_RestoreThread(_save);
57004  PyErr_SetString(PyExc_RuntimeError, e.what());
57005  SWIG_fail;
57006  }
57007  Py_END_ALLOW_THREADS
57008  }
57009  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_POINTER_NEW | 0 );
57010  return resultobj;
57011 fail:
57012  return NULL;
57013 }
57014 
57015 
57016 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57017  PyObject *resultobj = 0;
57020  uint8_t *arg3 = (uint8_t *) 0 ;
57021  void *argp1 = 0 ;
57022  int res1 = 0 ;
57023  long val2 ;
57024  int ecode2 = 0 ;
57025  void *argp3 = 0 ;
57026  int res3 = 0 ;
57027  PyObject * obj0 = 0 ;
57028  PyObject * obj1 = 0 ;
57029  PyObject * obj2 = 0 ;
57030 
57031  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
57032  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
57033  if (!SWIG_IsOK(res1)) {
57034  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_add" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
57035  }
57036  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
57037  ecode2 = SWIG_AsVal_long(obj1, &val2);
57038  if (!SWIG_IsOK(ecode2)) {
57039  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57040  }
57041  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57042  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57043  if (!SWIG_IsOK(res3)) {
57044  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFlat_add" "', argument " "3"" of type '" "uint8_t const *""'");
57045  }
57046  arg3 = reinterpret_cast< uint8_t * >(argp3);
57047  {
57048  Py_BEGIN_ALLOW_THREADS
57049  try {
57050  (arg1)->add(arg2,(uint8_t const *)arg3);
57051  } catch(faiss::FaissException & e) {
57052  PyEval_RestoreThread(_save);
57053  PyErr_SetString(PyExc_RuntimeError, e.what());
57054  SWIG_fail;
57055  }
57056  Py_END_ALLOW_THREADS
57057  }
57058  resultobj = SWIG_Py_Void();
57059  return resultobj;
57060 fail:
57061  return NULL;
57062 }
57063 
57064 
57065 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57066  PyObject *resultobj = 0;
57068  void *argp1 = 0 ;
57069  int res1 = 0 ;
57070  PyObject * obj0 = 0 ;
57071 
57072  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_reset",&obj0)) SWIG_fail;
57073  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
57074  if (!SWIG_IsOK(res1)) {
57075  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_reset" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
57076  }
57077  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
57078  {
57079  Py_BEGIN_ALLOW_THREADS
57080  try {
57081  (arg1)->reset();
57082  } catch(faiss::FaissException & e) {
57083  PyEval_RestoreThread(_save);
57084  PyErr_SetString(PyExc_RuntimeError, e.what());
57085  SWIG_fail;
57086  }
57087  Py_END_ALLOW_THREADS
57088  }
57089  resultobj = SWIG_Py_Void();
57090  return resultobj;
57091 fail:
57092  return NULL;
57093 }
57094 
57095 
57096 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57097  PyObject *resultobj = 0;
57100  uint8_t *arg3 = (uint8_t *) 0 ;
57102  int32_t *arg5 = (int32_t *) 0 ;
57104  void *argp1 = 0 ;
57105  int res1 = 0 ;
57106  long val2 ;
57107  int ecode2 = 0 ;
57108  void *argp3 = 0 ;
57109  int res3 = 0 ;
57110  long val4 ;
57111  int ecode4 = 0 ;
57112  void *argp5 = 0 ;
57113  int res5 = 0 ;
57114  void *argp6 = 0 ;
57115  int res6 = 0 ;
57116  PyObject * obj0 = 0 ;
57117  PyObject * obj1 = 0 ;
57118  PyObject * obj2 = 0 ;
57119  PyObject * obj3 = 0 ;
57120  PyObject * obj4 = 0 ;
57121  PyObject * obj5 = 0 ;
57122 
57123  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
57124  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
57125  if (!SWIG_IsOK(res1)) {
57126  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_search" "', argument " "1"" of type '" "faiss::IndexBinaryFlat const *""'");
57127  }
57128  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
57129  ecode2 = SWIG_AsVal_long(obj1, &val2);
57130  if (!SWIG_IsOK(ecode2)) {
57131  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57132  }
57133  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57134  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57135  if (!SWIG_IsOK(res3)) {
57136  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFlat_search" "', argument " "3"" of type '" "uint8_t const *""'");
57137  }
57138  arg3 = reinterpret_cast< uint8_t * >(argp3);
57139  ecode4 = SWIG_AsVal_long(obj3, &val4);
57140  if (!SWIG_IsOK(ecode4)) {
57141  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryFlat_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
57142  }
57143  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
57144  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
57145  if (!SWIG_IsOK(res5)) {
57146  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryFlat_search" "', argument " "5"" of type '" "int32_t *""'");
57147  }
57148  arg5 = reinterpret_cast< int32_t * >(argp5);
57149  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
57150  if (!SWIG_IsOK(res6)) {
57151  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryFlat_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
57152  }
57153  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
57154  {
57155  Py_BEGIN_ALLOW_THREADS
57156  try {
57157  ((faiss::IndexBinaryFlat const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
57158  } catch(faiss::FaissException & e) {
57159  PyEval_RestoreThread(_save);
57160  PyErr_SetString(PyExc_RuntimeError, e.what());
57161  SWIG_fail;
57162  }
57163  Py_END_ALLOW_THREADS
57164  }
57165  resultobj = SWIG_Py_Void();
57166  return resultobj;
57167 fail:
57168  return NULL;
57169 }
57170 
57171 
57172 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57173  PyObject *resultobj = 0;
57176  uint8_t *arg3 = (uint8_t *) 0 ;
57177  void *argp1 = 0 ;
57178  int res1 = 0 ;
57179  long val2 ;
57180  int ecode2 = 0 ;
57181  void *argp3 = 0 ;
57182  int res3 = 0 ;
57183  PyObject * obj0 = 0 ;
57184  PyObject * obj1 = 0 ;
57185  PyObject * obj2 = 0 ;
57186 
57187  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFlat_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
57188  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
57189  if (!SWIG_IsOK(res1)) {
57190  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryFlat const *""'");
57191  }
57192  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
57193  ecode2 = SWIG_AsVal_long(obj1, &val2);
57194  if (!SWIG_IsOK(ecode2)) {
57195  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57196  }
57197  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57198  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57199  if (!SWIG_IsOK(res3)) {
57200  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFlat_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
57201  }
57202  arg3 = reinterpret_cast< uint8_t * >(argp3);
57203  {
57204  Py_BEGIN_ALLOW_THREADS
57205  try {
57206  ((faiss::IndexBinaryFlat const *)arg1)->reconstruct(arg2,arg3);
57207  } catch(faiss::FaissException & e) {
57208  PyEval_RestoreThread(_save);
57209  PyErr_SetString(PyExc_RuntimeError, e.what());
57210  SWIG_fail;
57211  }
57212  Py_END_ALLOW_THREADS
57213  }
57214  resultobj = SWIG_Py_Void();
57215  return resultobj;
57216 fail:
57217  return NULL;
57218 }
57219 
57220 
57221 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57222  PyObject *resultobj = 0;
57224  faiss::IDSelector *arg2 = 0 ;
57225  void *argp1 = 0 ;
57226  int res1 = 0 ;
57227  void *argp2 = 0 ;
57228  int res2 = 0 ;
57229  PyObject * obj0 = 0 ;
57230  PyObject * obj1 = 0 ;
57231  long result;
57232 
57233  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_remove_ids",&obj0,&obj1)) SWIG_fail;
57234  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
57235  if (!SWIG_IsOK(res1)) {
57236  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_remove_ids" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
57237  }
57238  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
57239  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
57240  if (!SWIG_IsOK(res2)) {
57241  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
57242  }
57243  if (!argp2) {
57244  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinaryFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
57245  }
57246  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
57247  {
57248  Py_BEGIN_ALLOW_THREADS
57249  try {
57250  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
57251  } catch(faiss::FaissException & e) {
57252  PyEval_RestoreThread(_save);
57253  PyErr_SetString(PyExc_RuntimeError, e.what());
57254  SWIG_fail;
57255  }
57256  Py_END_ALLOW_THREADS
57257  }
57258  resultobj = SWIG_From_long(static_cast< long >(result));
57259  return resultobj;
57260 fail:
57261  return NULL;
57262 }
57263 
57264 
57265 SWIGINTERN PyObject *_wrap_new_IndexBinaryFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57266  PyObject *resultobj = 0;
57267  faiss::IndexBinaryFlat *result = 0 ;
57268 
57269  if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryFlat")) SWIG_fail;
57270  {
57271  Py_BEGIN_ALLOW_THREADS
57272  try {
57274  } catch(faiss::FaissException & e) {
57275  PyEval_RestoreThread(_save);
57276  PyErr_SetString(PyExc_RuntimeError, e.what());
57277  SWIG_fail;
57278  }
57279  Py_END_ALLOW_THREADS
57280  }
57281  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_POINTER_NEW | 0 );
57282  return resultobj;
57283 fail:
57284  return NULL;
57285 }
57286 
57287 
57288 SWIGINTERN PyObject *_wrap_new_IndexBinaryFlat(PyObject *self, PyObject *args) {
57289  Py_ssize_t argc;
57290  PyObject *argv[2] = {
57291  0
57292  };
57293  Py_ssize_t ii;
57294 
57295  if (!PyTuple_Check(args)) SWIG_fail;
57296  argc = args ? PyObject_Length(args) : 0;
57297  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
57298  argv[ii] = PyTuple_GET_ITEM(args,ii);
57299  }
57300  if (argc == 0) {
57301  return _wrap_new_IndexBinaryFlat__SWIG_1(self, args);
57302  }
57303  if (argc == 1) {
57304  int _v;
57305  {
57306  int res = SWIG_AsVal_long(argv[0], NULL);
57307  _v = SWIG_CheckState(res);
57308  }
57309  if (_v) {
57310  return _wrap_new_IndexBinaryFlat__SWIG_0(self, args);
57311  }
57312  }
57313 
57314 fail:
57315  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryFlat'.\n"
57316  " Possible C/C++ prototypes are:\n"
57317  " faiss::IndexBinaryFlat::IndexBinaryFlat(faiss::IndexBinary::idx_t)\n"
57318  " faiss::IndexBinaryFlat::IndexBinaryFlat()\n");
57319  return 0;
57320 }
57321 
57322 
57323 SWIGINTERN PyObject *_wrap_delete_IndexBinaryFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57324  PyObject *resultobj = 0;
57326  void *argp1 = 0 ;
57327  int res1 = 0 ;
57328  PyObject * obj0 = 0 ;
57329 
57330  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryFlat",&obj0)) SWIG_fail;
57331  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_POINTER_DISOWN | 0 );
57332  if (!SWIG_IsOK(res1)) {
57333  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryFlat" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
57334  }
57335  arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
57336  delete arg1;
57337  resultobj = SWIG_Py_Void();
57338  return resultobj;
57339 fail:
57340  return NULL;
57341 }
57342 
57343 
57344 SWIGINTERN PyObject *IndexBinaryFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57345  PyObject *obj;
57346  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
57347  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_NewClientData(obj));
57348  return SWIG_Py_Void();
57349 }
57350 
57351 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57352  PyObject *resultobj = 0;
57355  void *argp1 = 0 ;
57356  int res1 = 0 ;
57357  void *argp2 = 0 ;
57358  int res2 = 0 ;
57359  PyObject * obj0 = 0 ;
57360  PyObject * obj1 = 0 ;
57361 
57362  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_invlists_set",&obj0,&obj1)) SWIG_fail;
57363  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57364  if (!SWIG_IsOK(res1)) {
57365  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_invlists_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57366  }
57367  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57368  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, SWIG_POINTER_DISOWN | 0 );
57369  if (!SWIG_IsOK(res2)) {
57370  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_invlists_set" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
57371  }
57372  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
57373  if (arg1) (arg1)->invlists = arg2;
57374  resultobj = SWIG_Py_Void();
57375  return resultobj;
57376 fail:
57377  return NULL;
57378 }
57379 
57380 
57381 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57382  PyObject *resultobj = 0;
57384  void *argp1 = 0 ;
57385  int res1 = 0 ;
57386  PyObject * obj0 = 0 ;
57387  faiss::InvertedLists *result = 0 ;
57388 
57389  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_invlists_get",&obj0)) SWIG_fail;
57390  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57391  if (!SWIG_IsOK(res1)) {
57392  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_invlists_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57393  }
57394  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57395  result = (faiss::InvertedLists *) ((arg1)->invlists);
57396  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
57397  return resultobj;
57398 fail:
57399  return NULL;
57400 }
57401 
57402 
57403 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57404  PyObject *resultobj = 0;
57406  bool arg2 ;
57407  void *argp1 = 0 ;
57408  int res1 = 0 ;
57409  bool val2 ;
57410  int ecode2 = 0 ;
57411  PyObject * obj0 = 0 ;
57412  PyObject * obj1 = 0 ;
57413 
57414  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_own_invlists_set",&obj0,&obj1)) SWIG_fail;
57415  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57416  if (!SWIG_IsOK(res1)) {
57417  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_invlists_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57418  }
57419  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57420  ecode2 = SWIG_AsVal_bool(obj1, &val2);
57421  if (!SWIG_IsOK(ecode2)) {
57422  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_own_invlists_set" "', argument " "2"" of type '" "bool""'");
57423  }
57424  arg2 = static_cast< bool >(val2);
57425  if (arg1) (arg1)->own_invlists = arg2;
57426  resultobj = SWIG_Py_Void();
57427  return resultobj;
57428 fail:
57429  return NULL;
57430 }
57431 
57432 
57433 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57434  PyObject *resultobj = 0;
57436  void *argp1 = 0 ;
57437  int res1 = 0 ;
57438  PyObject * obj0 = 0 ;
57439  bool result;
57440 
57441  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_own_invlists_get",&obj0)) SWIG_fail;
57442  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57443  if (!SWIG_IsOK(res1)) {
57444  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_invlists_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57445  }
57446  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57447  result = (bool) ((arg1)->own_invlists);
57448  resultobj = SWIG_From_bool(static_cast< bool >(result));
57449  return resultobj;
57450 fail:
57451  return NULL;
57452 }
57453 
57454 
57455 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nprobe_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57456  PyObject *resultobj = 0;
57458  size_t arg2 ;
57459  void *argp1 = 0 ;
57460  int res1 = 0 ;
57461  size_t val2 ;
57462  int ecode2 = 0 ;
57463  PyObject * obj0 = 0 ;
57464  PyObject * obj1 = 0 ;
57465 
57466  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_nprobe_set",&obj0,&obj1)) SWIG_fail;
57467  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57468  if (!SWIG_IsOK(res1)) {
57469  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nprobe_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57470  }
57471  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57472  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
57473  if (!SWIG_IsOK(ecode2)) {
57474  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_nprobe_set" "', argument " "2"" of type '" "size_t""'");
57475  }
57476  arg2 = static_cast< size_t >(val2);
57477  if (arg1) (arg1)->nprobe = arg2;
57478  resultobj = SWIG_Py_Void();
57479  return resultobj;
57480 fail:
57481  return NULL;
57482 }
57483 
57484 
57485 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nprobe_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57486  PyObject *resultobj = 0;
57488  void *argp1 = 0 ;
57489  int res1 = 0 ;
57490  PyObject * obj0 = 0 ;
57491  size_t result;
57492 
57493  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_nprobe_get",&obj0)) SWIG_fail;
57494  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57495  if (!SWIG_IsOK(res1)) {
57496  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nprobe_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57497  }
57498  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57499  result = (size_t) ((arg1)->nprobe);
57500  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
57501  return resultobj;
57502 fail:
57503  return NULL;
57504 }
57505 
57506 
57507 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_max_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57508  PyObject *resultobj = 0;
57510  size_t arg2 ;
57511  void *argp1 = 0 ;
57512  int res1 = 0 ;
57513  size_t val2 ;
57514  int ecode2 = 0 ;
57515  PyObject * obj0 = 0 ;
57516  PyObject * obj1 = 0 ;
57517 
57518  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_max_codes_set",&obj0,&obj1)) SWIG_fail;
57519  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57520  if (!SWIG_IsOK(res1)) {
57521  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_max_codes_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57522  }
57523  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57524  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
57525  if (!SWIG_IsOK(ecode2)) {
57526  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_max_codes_set" "', argument " "2"" of type '" "size_t""'");
57527  }
57528  arg2 = static_cast< size_t >(val2);
57529  if (arg1) (arg1)->max_codes = arg2;
57530  resultobj = SWIG_Py_Void();
57531  return resultobj;
57532 fail:
57533  return NULL;
57534 }
57535 
57536 
57537 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_max_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57538  PyObject *resultobj = 0;
57540  void *argp1 = 0 ;
57541  int res1 = 0 ;
57542  PyObject * obj0 = 0 ;
57543  size_t result;
57544 
57545  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_max_codes_get",&obj0)) SWIG_fail;
57546  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57547  if (!SWIG_IsOK(res1)) {
57548  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_max_codes_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57549  }
57550  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57551  result = (size_t) ((arg1)->max_codes);
57552  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
57553  return resultobj;
57554 fail:
57555  return NULL;
57556 }
57557 
57558 
57559 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_use_heap_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57560  PyObject *resultobj = 0;
57562  bool arg2 ;
57563  void *argp1 = 0 ;
57564  int res1 = 0 ;
57565  bool val2 ;
57566  int ecode2 = 0 ;
57567  PyObject * obj0 = 0 ;
57568  PyObject * obj1 = 0 ;
57569 
57570  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_use_heap_set",&obj0,&obj1)) SWIG_fail;
57571  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57572  if (!SWIG_IsOK(res1)) {
57573  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_use_heap_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57574  }
57575  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57576  ecode2 = SWIG_AsVal_bool(obj1, &val2);
57577  if (!SWIG_IsOK(ecode2)) {
57578  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_use_heap_set" "', argument " "2"" of type '" "bool""'");
57579  }
57580  arg2 = static_cast< bool >(val2);
57581  if (arg1) (arg1)->use_heap = arg2;
57582  resultobj = SWIG_Py_Void();
57583  return resultobj;
57584 fail:
57585  return NULL;
57586 }
57587 
57588 
57589 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_use_heap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57590  PyObject *resultobj = 0;
57592  void *argp1 = 0 ;
57593  int res1 = 0 ;
57594  PyObject * obj0 = 0 ;
57595  bool result;
57596 
57597  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_use_heap_get",&obj0)) SWIG_fail;
57598  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57599  if (!SWIG_IsOK(res1)) {
57600  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_use_heap_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57601  }
57602  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57603  result = (bool) ((arg1)->use_heap);
57604  resultobj = SWIG_From_bool(static_cast< bool >(result));
57605  return resultobj;
57606 fail:
57607  return NULL;
57608 }
57609 
57610 
57611 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_maintain_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57612  PyObject *resultobj = 0;
57614  bool arg2 ;
57615  void *argp1 = 0 ;
57616  int res1 = 0 ;
57617  bool val2 ;
57618  int ecode2 = 0 ;
57619  PyObject * obj0 = 0 ;
57620  PyObject * obj1 = 0 ;
57621 
57622  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_maintain_direct_map_set",&obj0,&obj1)) SWIG_fail;
57623  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57624  if (!SWIG_IsOK(res1)) {
57625  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_maintain_direct_map_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57626  }
57627  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57628  ecode2 = SWIG_AsVal_bool(obj1, &val2);
57629  if (!SWIG_IsOK(ecode2)) {
57630  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_maintain_direct_map_set" "', argument " "2"" of type '" "bool""'");
57631  }
57632  arg2 = static_cast< bool >(val2);
57633  if (arg1) (arg1)->maintain_direct_map = arg2;
57634  resultobj = SWIG_Py_Void();
57635  return resultobj;
57636 fail:
57637  return NULL;
57638 }
57639 
57640 
57641 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_maintain_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57642  PyObject *resultobj = 0;
57644  void *argp1 = 0 ;
57645  int res1 = 0 ;
57646  PyObject * obj0 = 0 ;
57647  bool result;
57648 
57649  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_maintain_direct_map_get",&obj0)) SWIG_fail;
57650  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57651  if (!SWIG_IsOK(res1)) {
57652  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_maintain_direct_map_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57653  }
57654  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57655  result = (bool) ((arg1)->maintain_direct_map);
57656  resultobj = SWIG_From_bool(static_cast< bool >(result));
57657  return resultobj;
57658 fail:
57659  return NULL;
57660 }
57661 
57662 
57663 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57664  PyObject *resultobj = 0;
57666  std::vector< long > *arg2 = (std::vector< long > *) 0 ;
57667  void *argp1 = 0 ;
57668  int res1 = 0 ;
57669  void *argp2 = 0 ;
57670  int res2 = 0 ;
57671  PyObject * obj0 = 0 ;
57672  PyObject * obj1 = 0 ;
57673 
57674  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_direct_map_set",&obj0,&obj1)) SWIG_fail;
57675  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57676  if (!SWIG_IsOK(res1)) {
57677  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_direct_map_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57678  }
57679  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57680  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
57681  if (!SWIG_IsOK(res2)) {
57682  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_direct_map_set" "', argument " "2"" of type '" "std::vector< long > *""'");
57683  }
57684  arg2 = reinterpret_cast< std::vector< long > * >(argp2);
57685  if (arg1) (arg1)->direct_map = *arg2;
57686  resultobj = SWIG_Py_Void();
57687  return resultobj;
57688 fail:
57689  return NULL;
57690 }
57691 
57692 
57693 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57694  PyObject *resultobj = 0;
57696  void *argp1 = 0 ;
57697  int res1 = 0 ;
57698  PyObject * obj0 = 0 ;
57699  std::vector< long > *result = 0 ;
57700 
57701  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_direct_map_get",&obj0)) SWIG_fail;
57702  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57703  if (!SWIG_IsOK(res1)) {
57704  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_direct_map_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57705  }
57706  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57707  result = (std::vector< long > *)& ((arg1)->direct_map);
57708  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
57709  return resultobj;
57710 fail:
57711  return NULL;
57712 }
57713 
57714 
57715 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_quantizer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57716  PyObject *resultobj = 0;
57718  faiss::IndexBinary *arg2 = (faiss::IndexBinary *) 0 ;
57719  void *argp1 = 0 ;
57720  int res1 = 0 ;
57721  void *argp2 = 0 ;
57722  int res2 = 0 ;
57723  PyObject * obj0 = 0 ;
57724  PyObject * obj1 = 0 ;
57725 
57726  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_quantizer_set",&obj0,&obj1)) SWIG_fail;
57727  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57728  if (!SWIG_IsOK(res1)) {
57729  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_quantizer_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57730  }
57731  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57732  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinary, SWIG_POINTER_DISOWN | 0 );
57733  if (!SWIG_IsOK(res2)) {
57734  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_quantizer_set" "', argument " "2"" of type '" "faiss::IndexBinary *""'");
57735  }
57736  arg2 = reinterpret_cast< faiss::IndexBinary * >(argp2);
57737  if (arg1) (arg1)->quantizer = arg2;
57738  resultobj = SWIG_Py_Void();
57739  return resultobj;
57740 fail:
57741  return NULL;
57742 }
57743 
57744 
57745 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_quantizer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57746  PyObject *resultobj = 0;
57748  void *argp1 = 0 ;
57749  int res1 = 0 ;
57750  PyObject * obj0 = 0 ;
57751  faiss::IndexBinary *result = 0 ;
57752 
57753  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_quantizer_get",&obj0)) SWIG_fail;
57754  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57755  if (!SWIG_IsOK(res1)) {
57756  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_quantizer_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57757  }
57758  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57759  result = (faiss::IndexBinary *) ((arg1)->quantizer);
57760  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
57761  return resultobj;
57762 fail:
57763  return NULL;
57764 }
57765 
57766 
57767 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57768  PyObject *resultobj = 0;
57770  size_t arg2 ;
57771  void *argp1 = 0 ;
57772  int res1 = 0 ;
57773  size_t val2 ;
57774  int ecode2 = 0 ;
57775  PyObject * obj0 = 0 ;
57776  PyObject * obj1 = 0 ;
57777 
57778  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_nlist_set",&obj0,&obj1)) SWIG_fail;
57779  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57780  if (!SWIG_IsOK(res1)) {
57781  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nlist_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57782  }
57783  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57784  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
57785  if (!SWIG_IsOK(ecode2)) {
57786  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_nlist_set" "', argument " "2"" of type '" "size_t""'");
57787  }
57788  arg2 = static_cast< size_t >(val2);
57789  if (arg1) (arg1)->nlist = arg2;
57790  resultobj = SWIG_Py_Void();
57791  return resultobj;
57792 fail:
57793  return NULL;
57794 }
57795 
57796 
57797 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57798  PyObject *resultobj = 0;
57800  void *argp1 = 0 ;
57801  int res1 = 0 ;
57802  PyObject * obj0 = 0 ;
57803  size_t result;
57804 
57805  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_nlist_get",&obj0)) SWIG_fail;
57806  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57807  if (!SWIG_IsOK(res1)) {
57808  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nlist_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57809  }
57810  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57811  result = (size_t) ((arg1)->nlist);
57812  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
57813  return resultobj;
57814 fail:
57815  return NULL;
57816 }
57817 
57818 
57819 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57820  PyObject *resultobj = 0;
57822  bool arg2 ;
57823  void *argp1 = 0 ;
57824  int res1 = 0 ;
57825  bool val2 ;
57826  int ecode2 = 0 ;
57827  PyObject * obj0 = 0 ;
57828  PyObject * obj1 = 0 ;
57829 
57830  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_own_fields_set",&obj0,&obj1)) SWIG_fail;
57831  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57832  if (!SWIG_IsOK(res1)) {
57833  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_fields_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57834  }
57835  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57836  ecode2 = SWIG_AsVal_bool(obj1, &val2);
57837  if (!SWIG_IsOK(ecode2)) {
57838  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_own_fields_set" "', argument " "2"" of type '" "bool""'");
57839  }
57840  arg2 = static_cast< bool >(val2);
57841  if (arg1) (arg1)->own_fields = arg2;
57842  resultobj = SWIG_Py_Void();
57843  return resultobj;
57844 fail:
57845  return NULL;
57846 }
57847 
57848 
57849 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57850  PyObject *resultobj = 0;
57852  void *argp1 = 0 ;
57853  int res1 = 0 ;
57854  PyObject * obj0 = 0 ;
57855  bool result;
57856 
57857  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_own_fields_get",&obj0)) SWIG_fail;
57858  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57859  if (!SWIG_IsOK(res1)) {
57860  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_fields_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57861  }
57862  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57863  result = (bool) ((arg1)->own_fields);
57864  resultobj = SWIG_From_bool(static_cast< bool >(result));
57865  return resultobj;
57866 fail:
57867  return NULL;
57868 }
57869 
57870 
57871 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_cp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57872  PyObject *resultobj = 0;
57875  void *argp1 = 0 ;
57876  int res1 = 0 ;
57877  void *argp2 = 0 ;
57878  int res2 = 0 ;
57879  PyObject * obj0 = 0 ;
57880  PyObject * obj1 = 0 ;
57881 
57882  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_cp_set",&obj0,&obj1)) SWIG_fail;
57883  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57884  if (!SWIG_IsOK(res1)) {
57885  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_cp_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57886  }
57887  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57888  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
57889  if (!SWIG_IsOK(res2)) {
57890  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
57891  }
57892  arg2 = reinterpret_cast< faiss::ClusteringParameters * >(argp2);
57893  if (arg1) (arg1)->cp = *arg2;
57894  resultobj = SWIG_Py_Void();
57895  return resultobj;
57896 fail:
57897  return NULL;
57898 }
57899 
57900 
57901 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_cp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57902  PyObject *resultobj = 0;
57904  void *argp1 = 0 ;
57905  int res1 = 0 ;
57906  PyObject * obj0 = 0 ;
57907  faiss::ClusteringParameters *result = 0 ;
57908 
57909  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_cp_get",&obj0)) SWIG_fail;
57910  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57911  if (!SWIG_IsOK(res1)) {
57912  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_cp_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57913  }
57914  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57915  result = (faiss::ClusteringParameters *)& ((arg1)->cp);
57916  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
57917  return resultobj;
57918 fail:
57919  return NULL;
57920 }
57921 
57922 
57923 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_clustering_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57924  PyObject *resultobj = 0;
57926  faiss::Index *arg2 = (faiss::Index *) 0 ;
57927  void *argp1 = 0 ;
57928  int res1 = 0 ;
57929  void *argp2 = 0 ;
57930  int res2 = 0 ;
57931  PyObject * obj0 = 0 ;
57932  PyObject * obj1 = 0 ;
57933 
57934  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_clustering_index_set",&obj0,&obj1)) SWIG_fail;
57935  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57936  if (!SWIG_IsOK(res1)) {
57937  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_clustering_index_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57938  }
57939  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57940  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
57941  if (!SWIG_IsOK(res2)) {
57942  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_clustering_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
57943  }
57944  arg2 = reinterpret_cast< faiss::Index * >(argp2);
57945  if (arg1) (arg1)->clustering_index = arg2;
57946  resultobj = SWIG_Py_Void();
57947  return resultobj;
57948 fail:
57949  return NULL;
57950 }
57951 
57952 
57953 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_clustering_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57954  PyObject *resultobj = 0;
57956  void *argp1 = 0 ;
57957  int res1 = 0 ;
57958  PyObject * obj0 = 0 ;
57959  faiss::Index *result = 0 ;
57960 
57961  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_clustering_index_get",&obj0)) SWIG_fail;
57962  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57963  if (!SWIG_IsOK(res1)) {
57964  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_clustering_index_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57965  }
57966  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57967  result = (faiss::Index *) ((arg1)->clustering_index);
57968  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
57969  return resultobj;
57970 fail:
57971  return NULL;
57972 }
57973 
57974 
57975 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_train_q1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57976  PyObject *resultobj = 0;
57978  size_t arg2 ;
57979  uint8_t *arg3 = (uint8_t *) 0 ;
57980  bool arg4 ;
57981  void *argp1 = 0 ;
57982  int res1 = 0 ;
57983  size_t val2 ;
57984  int ecode2 = 0 ;
57985  void *argp3 = 0 ;
57986  int res3 = 0 ;
57987  bool val4 ;
57988  int ecode4 = 0 ;
57989  PyObject * obj0 = 0 ;
57990  PyObject * obj1 = 0 ;
57991  PyObject * obj2 = 0 ;
57992  PyObject * obj3 = 0 ;
57993 
57994  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_train_q1",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
57995  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57996  if (!SWIG_IsOK(res1)) {
57997  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_train_q1" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57998  }
57999  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58000  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
58001  if (!SWIG_IsOK(ecode2)) {
58002  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_train_q1" "', argument " "2"" of type '" "size_t""'");
58003  }
58004  arg2 = static_cast< size_t >(val2);
58005  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58006  if (!SWIG_IsOK(res3)) {
58007  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_train_q1" "', argument " "3"" of type '" "uint8_t const *""'");
58008  }
58009  arg3 = reinterpret_cast< uint8_t * >(argp3);
58010  ecode4 = SWIG_AsVal_bool(obj3, &val4);
58011  if (!SWIG_IsOK(ecode4)) {
58012  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_train_q1" "', argument " "4"" of type '" "bool""'");
58013  }
58014  arg4 = static_cast< bool >(val4);
58015  {
58016  Py_BEGIN_ALLOW_THREADS
58017  try {
58018  (arg1)->train_q1(arg2,(uint8_t const *)arg3,arg4);
58019  } catch(faiss::FaissException & e) {
58020  PyEval_RestoreThread(_save);
58021  PyErr_SetString(PyExc_RuntimeError, e.what());
58022  SWIG_fail;
58023  }
58024  Py_END_ALLOW_THREADS
58025  }
58026  resultobj = SWIG_Py_Void();
58027  return resultobj;
58028 fail:
58029  return NULL;
58030 }
58031 
58032 
58033 SWIGINTERN PyObject *_wrap_new_IndexBinaryIVF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58034  PyObject *resultobj = 0;
58035  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
58036  size_t arg2 ;
58037  size_t arg3 ;
58038  void *argp1 = 0 ;
58039  int res1 = 0 ;
58040  size_t val2 ;
58041  int ecode2 = 0 ;
58042  size_t val3 ;
58043  int ecode3 = 0 ;
58044  PyObject * obj0 = 0 ;
58045  PyObject * obj1 = 0 ;
58046  PyObject * obj2 = 0 ;
58047  faiss::IndexBinaryIVF *result = 0 ;
58048 
58049  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexBinaryIVF",&obj0,&obj1,&obj2)) SWIG_fail;
58050  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
58051  if (!SWIG_IsOK(res1)) {
58052  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryIVF" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
58053  }
58054  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
58055  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
58056  if (!SWIG_IsOK(ecode2)) {
58057  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexBinaryIVF" "', argument " "2"" of type '" "size_t""'");
58058  }
58059  arg2 = static_cast< size_t >(val2);
58060  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
58061  if (!SWIG_IsOK(ecode3)) {
58062  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexBinaryIVF" "', argument " "3"" of type '" "size_t""'");
58063  }
58064  arg3 = static_cast< size_t >(val3);
58065  {
58066  Py_BEGIN_ALLOW_THREADS
58067  try {
58068  result = (faiss::IndexBinaryIVF *)new faiss::IndexBinaryIVF(arg1,arg2,arg3);
58069  } catch(faiss::FaissException & e) {
58070  PyEval_RestoreThread(_save);
58071  PyErr_SetString(PyExc_RuntimeError, e.what());
58072  SWIG_fail;
58073  }
58074  Py_END_ALLOW_THREADS
58075  }
58076  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_POINTER_NEW | 0 );
58077  return resultobj;
58078 fail:
58079  return NULL;
58080 }
58081 
58082 
58083 SWIGINTERN PyObject *_wrap_new_IndexBinaryIVF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58084  PyObject *resultobj = 0;
58085  faiss::IndexBinaryIVF *result = 0 ;
58086 
58087  if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryIVF")) SWIG_fail;
58088  {
58089  Py_BEGIN_ALLOW_THREADS
58090  try {
58091  result = (faiss::IndexBinaryIVF *)new faiss::IndexBinaryIVF();
58092  } catch(faiss::FaissException & e) {
58093  PyEval_RestoreThread(_save);
58094  PyErr_SetString(PyExc_RuntimeError, e.what());
58095  SWIG_fail;
58096  }
58097  Py_END_ALLOW_THREADS
58098  }
58099  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_POINTER_NEW | 0 );
58100  return resultobj;
58101 fail:
58102  return NULL;
58103 }
58104 
58105 
58106 SWIGINTERN PyObject *_wrap_new_IndexBinaryIVF(PyObject *self, PyObject *args) {
58107  Py_ssize_t argc;
58108  PyObject *argv[4] = {
58109  0
58110  };
58111  Py_ssize_t ii;
58112 
58113  if (!PyTuple_Check(args)) SWIG_fail;
58114  argc = args ? PyObject_Length(args) : 0;
58115  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
58116  argv[ii] = PyTuple_GET_ITEM(args,ii);
58117  }
58118  if (argc == 0) {
58119  return _wrap_new_IndexBinaryIVF__SWIG_1(self, args);
58120  }
58121  if (argc == 3) {
58122  int _v;
58123  void *vptr = 0;
58124  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
58125  _v = SWIG_CheckState(res);
58126  if (_v) {
58127  {
58128  int res = SWIG_AsVal_size_t(argv[1], NULL);
58129  _v = SWIG_CheckState(res);
58130  }
58131  if (_v) {
58132  {
58133  int res = SWIG_AsVal_size_t(argv[2], NULL);
58134  _v = SWIG_CheckState(res);
58135  }
58136  if (_v) {
58137  return _wrap_new_IndexBinaryIVF__SWIG_0(self, args);
58138  }
58139  }
58140  }
58141  }
58142 
58143 fail:
58144  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryIVF'.\n"
58145  " Possible C/C++ prototypes are:\n"
58146  " faiss::IndexBinaryIVF::IndexBinaryIVF(faiss::IndexBinary *,size_t,size_t)\n"
58147  " faiss::IndexBinaryIVF::IndexBinaryIVF()\n");
58148  return 0;
58149 }
58150 
58151 
58152 SWIGINTERN PyObject *_wrap_delete_IndexBinaryIVF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58153  PyObject *resultobj = 0;
58155  void *argp1 = 0 ;
58156  int res1 = 0 ;
58157  PyObject * obj0 = 0 ;
58158 
58159  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryIVF",&obj0)) SWIG_fail;
58160  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_POINTER_DISOWN | 0 );
58161  if (!SWIG_IsOK(res1)) {
58162  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryIVF" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58163  }
58164  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58165  {
58166  Py_BEGIN_ALLOW_THREADS
58167  try {
58168  delete arg1;
58169  } catch(faiss::FaissException & e) {
58170  PyEval_RestoreThread(_save);
58171  PyErr_SetString(PyExc_RuntimeError, e.what());
58172  SWIG_fail;
58173  }
58174  Py_END_ALLOW_THREADS
58175  }
58176  resultobj = SWIG_Py_Void();
58177  return resultobj;
58178 fail:
58179  return NULL;
58180 }
58181 
58182 
58183 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58184  PyObject *resultobj = 0;
58186  void *argp1 = 0 ;
58187  int res1 = 0 ;
58188  PyObject * obj0 = 0 ;
58189 
58190  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_reset",&obj0)) SWIG_fail;
58191  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58192  if (!SWIG_IsOK(res1)) {
58193  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reset" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58194  }
58195  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58196  {
58197  Py_BEGIN_ALLOW_THREADS
58198  try {
58199  (arg1)->reset();
58200  } catch(faiss::FaissException & e) {
58201  PyEval_RestoreThread(_save);
58202  PyErr_SetString(PyExc_RuntimeError, e.what());
58203  SWIG_fail;
58204  }
58205  Py_END_ALLOW_THREADS
58206  }
58207  resultobj = SWIG_Py_Void();
58208  return resultobj;
58209 fail:
58210  return NULL;
58211 }
58212 
58213 
58214 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58215  PyObject *resultobj = 0;
58218  uint8_t *arg3 = (uint8_t *) 0 ;
58219  void *argp1 = 0 ;
58220  int res1 = 0 ;
58221  long val2 ;
58222  int ecode2 = 0 ;
58223  void *argp3 = 0 ;
58224  int res3 = 0 ;
58225  PyObject * obj0 = 0 ;
58226  PyObject * obj1 = 0 ;
58227  PyObject * obj2 = 0 ;
58228 
58229  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_train",&obj0,&obj1,&obj2)) SWIG_fail;
58230  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58231  if (!SWIG_IsOK(res1)) {
58232  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_train" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58233  }
58234  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58235  ecode2 = SWIG_AsVal_long(obj1, &val2);
58236  if (!SWIG_IsOK(ecode2)) {
58237  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58238  }
58239  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58240  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58241  if (!SWIG_IsOK(res3)) {
58242  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_train" "', argument " "3"" of type '" "uint8_t const *""'");
58243  }
58244  arg3 = reinterpret_cast< uint8_t * >(argp3);
58245  {
58246  Py_BEGIN_ALLOW_THREADS
58247  try {
58248  (arg1)->train(arg2,(uint8_t const *)arg3);
58249  } catch(faiss::FaissException & e) {
58250  PyEval_RestoreThread(_save);
58251  PyErr_SetString(PyExc_RuntimeError, e.what());
58252  SWIG_fail;
58253  }
58254  Py_END_ALLOW_THREADS
58255  }
58256  resultobj = SWIG_Py_Void();
58257  return resultobj;
58258 fail:
58259  return NULL;
58260 }
58261 
58262 
58263 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58264  PyObject *resultobj = 0;
58267  uint8_t *arg3 = (uint8_t *) 0 ;
58268  void *argp1 = 0 ;
58269  int res1 = 0 ;
58270  long val2 ;
58271  int ecode2 = 0 ;
58272  void *argp3 = 0 ;
58273  int res3 = 0 ;
58274  PyObject * obj0 = 0 ;
58275  PyObject * obj1 = 0 ;
58276  PyObject * obj2 = 0 ;
58277 
58278  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_add",&obj0,&obj1,&obj2)) SWIG_fail;
58279  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58280  if (!SWIG_IsOK(res1)) {
58281  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_add" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58282  }
58283  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58284  ecode2 = SWIG_AsVal_long(obj1, &val2);
58285  if (!SWIG_IsOK(ecode2)) {
58286  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58287  }
58288  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58289  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58290  if (!SWIG_IsOK(res3)) {
58291  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_add" "', argument " "3"" of type '" "uint8_t const *""'");
58292  }
58293  arg3 = reinterpret_cast< uint8_t * >(argp3);
58294  {
58295  Py_BEGIN_ALLOW_THREADS
58296  try {
58297  (arg1)->add(arg2,(uint8_t const *)arg3);
58298  } catch(faiss::FaissException & e) {
58299  PyEval_RestoreThread(_save);
58300  PyErr_SetString(PyExc_RuntimeError, e.what());
58301  SWIG_fail;
58302  }
58303  Py_END_ALLOW_THREADS
58304  }
58305  resultobj = SWIG_Py_Void();
58306  return resultobj;
58307 fail:
58308  return NULL;
58309 }
58310 
58311 
58312 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58313  PyObject *resultobj = 0;
58316  uint8_t *arg3 = (uint8_t *) 0 ;
58317  long *arg4 = (long *) 0 ;
58318  void *argp1 = 0 ;
58319  int res1 = 0 ;
58320  long val2 ;
58321  int ecode2 = 0 ;
58322  void *argp3 = 0 ;
58323  int res3 = 0 ;
58324  void *argp4 = 0 ;
58325  int res4 = 0 ;
58326  PyObject * obj0 = 0 ;
58327  PyObject * obj1 = 0 ;
58328  PyObject * obj2 = 0 ;
58329  PyObject * obj3 = 0 ;
58330 
58331  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
58332  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58333  if (!SWIG_IsOK(res1)) {
58334  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58335  }
58336  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58337  ecode2 = SWIG_AsVal_long(obj1, &val2);
58338  if (!SWIG_IsOK(ecode2)) {
58339  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58340  }
58341  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58342  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58343  if (!SWIG_IsOK(res3)) {
58344  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "3"" of type '" "uint8_t const *""'");
58345  }
58346  arg3 = reinterpret_cast< uint8_t * >(argp3);
58347  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
58348  if (!SWIG_IsOK(res4)) {
58349  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "4"" of type '" "long const *""'");
58350  }
58351  arg4 = reinterpret_cast< long * >(argp4);
58352  {
58353  Py_BEGIN_ALLOW_THREADS
58354  try {
58355  (arg1)->add_with_ids(arg2,(uint8_t const *)arg3,(long const *)arg4);
58356  } catch(faiss::FaissException & e) {
58357  PyEval_RestoreThread(_save);
58358  PyErr_SetString(PyExc_RuntimeError, e.what());
58359  SWIG_fail;
58360  }
58361  Py_END_ALLOW_THREADS
58362  }
58363  resultobj = SWIG_Py_Void();
58364  return resultobj;
58365 fail:
58366  return NULL;
58367 }
58368 
58369 
58370 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_add_core(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58371  PyObject *resultobj = 0;
58374  uint8_t *arg3 = (uint8_t *) 0 ;
58375  long *arg4 = (long *) 0 ;
58376  long *arg5 = (long *) 0 ;
58377  void *argp1 = 0 ;
58378  int res1 = 0 ;
58379  long val2 ;
58380  int ecode2 = 0 ;
58381  void *argp3 = 0 ;
58382  int res3 = 0 ;
58383  void *argp4 = 0 ;
58384  int res4 = 0 ;
58385  void *argp5 = 0 ;
58386  int res5 = 0 ;
58387  PyObject * obj0 = 0 ;
58388  PyObject * obj1 = 0 ;
58389  PyObject * obj2 = 0 ;
58390  PyObject * obj3 = 0 ;
58391  PyObject * obj4 = 0 ;
58392 
58393  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexBinaryIVF_add_core",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
58394  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58395  if (!SWIG_IsOK(res1)) {
58396  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_add_core" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58397  }
58398  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58399  ecode2 = SWIG_AsVal_long(obj1, &val2);
58400  if (!SWIG_IsOK(ecode2)) {
58401  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_add_core" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58402  }
58403  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58404  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58405  if (!SWIG_IsOK(res3)) {
58406  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_add_core" "', argument " "3"" of type '" "uint8_t const *""'");
58407  }
58408  arg3 = reinterpret_cast< uint8_t * >(argp3);
58409  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
58410  if (!SWIG_IsOK(res4)) {
58411  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_add_core" "', argument " "4"" of type '" "long const *""'");
58412  }
58413  arg4 = reinterpret_cast< long * >(argp4);
58414  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
58415  if (!SWIG_IsOK(res5)) {
58416  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_add_core" "', argument " "5"" of type '" "long const *""'");
58417  }
58418  arg5 = reinterpret_cast< long * >(argp5);
58419  {
58420  Py_BEGIN_ALLOW_THREADS
58421  try {
58422  (arg1)->add_core(arg2,(uint8_t const *)arg3,(long const *)arg4,(long const *)arg5);
58423  } catch(faiss::FaissException & e) {
58424  PyEval_RestoreThread(_save);
58425  PyErr_SetString(PyExc_RuntimeError, e.what());
58426  SWIG_fail;
58427  }
58428  Py_END_ALLOW_THREADS
58429  }
58430  resultobj = SWIG_Py_Void();
58431  return resultobj;
58432 fail:
58433  return NULL;
58434 }
58435 
58436 
58437 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58438  PyObject *resultobj = 0;
58441  uint8_t *arg3 = (uint8_t *) 0 ;
58444  int32_t *arg6 = (int32_t *) 0 ;
58445  int32_t *arg7 = (int32_t *) 0 ;
58447  bool arg9 ;
58449  void *argp1 = 0 ;
58450  int res1 = 0 ;
58451  long val2 ;
58452  int ecode2 = 0 ;
58453  void *argp3 = 0 ;
58454  int res3 = 0 ;
58455  long val4 ;
58456  int ecode4 = 0 ;
58457  void *argp5 = 0 ;
58458  int res5 = 0 ;
58459  void *argp6 = 0 ;
58460  int res6 = 0 ;
58461  void *argp7 = 0 ;
58462  int res7 = 0 ;
58463  void *argp8 = 0 ;
58464  int res8 = 0 ;
58465  bool val9 ;
58466  int ecode9 = 0 ;
58467  void *argp10 = 0 ;
58468  int res10 = 0 ;
58469  PyObject * obj0 = 0 ;
58470  PyObject * obj1 = 0 ;
58471  PyObject * obj2 = 0 ;
58472  PyObject * obj3 = 0 ;
58473  PyObject * obj4 = 0 ;
58474  PyObject * obj5 = 0 ;
58475  PyObject * obj6 = 0 ;
58476  PyObject * obj7 = 0 ;
58477  PyObject * obj8 = 0 ;
58478  PyObject * obj9 = 0 ;
58479 
58480  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexBinaryIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
58481  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58482  if (!SWIG_IsOK(res1)) {
58483  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58484  }
58485  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58486  ecode2 = SWIG_AsVal_long(obj1, &val2);
58487  if (!SWIG_IsOK(ecode2)) {
58488  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58489  }
58490  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58491  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58492  if (!SWIG_IsOK(res3)) {
58493  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "3"" of type '" "uint8_t const *""'");
58494  }
58495  arg3 = reinterpret_cast< uint8_t * >(argp3);
58496  ecode4 = SWIG_AsVal_long(obj3, &val4);
58497  if (!SWIG_IsOK(ecode4)) {
58498  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
58499  }
58500  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
58501  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
58502  if (!SWIG_IsOK(res5)) {
58503  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "5"" of type '" "faiss::IndexBinary::idx_t const *""'");
58504  }
58505  arg5 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp5);
58506  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 );
58507  if (!SWIG_IsOK(res6)) {
58508  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "6"" of type '" "int32_t const *""'");
58509  }
58510  arg6 = reinterpret_cast< int32_t * >(argp6);
58511  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 );
58512  if (!SWIG_IsOK(res7)) {
58513  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "7"" of type '" "int32_t *""'");
58514  }
58515  arg7 = reinterpret_cast< int32_t * >(argp7);
58516  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
58517  if (!SWIG_IsOK(res8)) {
58518  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "8"" of type '" "faiss::IndexBinary::idx_t *""'");
58519  }
58520  arg8 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp8);
58521  ecode9 = SWIG_AsVal_bool(obj8, &val9);
58522  if (!SWIG_IsOK(ecode9)) {
58523  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
58524  }
58525  arg9 = static_cast< bool >(val9);
58526  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
58527  if (!SWIG_IsOK(res10)) {
58528  SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
58529  }
58530  arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
58531  {
58532  Py_BEGIN_ALLOW_THREADS
58533  try {
58534  ((faiss::IndexBinaryIVF const *)arg1)->search_preassigned(arg2,(uint8_t const *)arg3,arg4,(faiss::IndexBinary::idx_t const *)arg5,(int32_t const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
58535  } catch(faiss::FaissException & e) {
58536  PyEval_RestoreThread(_save);
58537  PyErr_SetString(PyExc_RuntimeError, e.what());
58538  SWIG_fail;
58539  }
58540  Py_END_ALLOW_THREADS
58541  }
58542  resultobj = SWIG_Py_Void();
58543  return resultobj;
58544 fail:
58545  return NULL;
58546 }
58547 
58548 
58549 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58550  PyObject *resultobj = 0;
58553  uint8_t *arg3 = (uint8_t *) 0 ;
58556  int32_t *arg6 = (int32_t *) 0 ;
58557  int32_t *arg7 = (int32_t *) 0 ;
58559  bool arg9 ;
58560  void *argp1 = 0 ;
58561  int res1 = 0 ;
58562  long val2 ;
58563  int ecode2 = 0 ;
58564  void *argp3 = 0 ;
58565  int res3 = 0 ;
58566  long val4 ;
58567  int ecode4 = 0 ;
58568  void *argp5 = 0 ;
58569  int res5 = 0 ;
58570  void *argp6 = 0 ;
58571  int res6 = 0 ;
58572  void *argp7 = 0 ;
58573  int res7 = 0 ;
58574  void *argp8 = 0 ;
58575  int res8 = 0 ;
58576  bool val9 ;
58577  int ecode9 = 0 ;
58578  PyObject * obj0 = 0 ;
58579  PyObject * obj1 = 0 ;
58580  PyObject * obj2 = 0 ;
58581  PyObject * obj3 = 0 ;
58582  PyObject * obj4 = 0 ;
58583  PyObject * obj5 = 0 ;
58584  PyObject * obj6 = 0 ;
58585  PyObject * obj7 = 0 ;
58586  PyObject * obj8 = 0 ;
58587 
58588  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexBinaryIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
58589  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58590  if (!SWIG_IsOK(res1)) {
58591  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58592  }
58593  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58594  ecode2 = SWIG_AsVal_long(obj1, &val2);
58595  if (!SWIG_IsOK(ecode2)) {
58596  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58597  }
58598  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58599  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58600  if (!SWIG_IsOK(res3)) {
58601  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "3"" of type '" "uint8_t const *""'");
58602  }
58603  arg3 = reinterpret_cast< uint8_t * >(argp3);
58604  ecode4 = SWIG_AsVal_long(obj3, &val4);
58605  if (!SWIG_IsOK(ecode4)) {
58606  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
58607  }
58608  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
58609  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
58610  if (!SWIG_IsOK(res5)) {
58611  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "5"" of type '" "faiss::IndexBinary::idx_t const *""'");
58612  }
58613  arg5 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp5);
58614  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 );
58615  if (!SWIG_IsOK(res6)) {
58616  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "6"" of type '" "int32_t const *""'");
58617  }
58618  arg6 = reinterpret_cast< int32_t * >(argp6);
58619  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 );
58620  if (!SWIG_IsOK(res7)) {
58621  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "7"" of type '" "int32_t *""'");
58622  }
58623  arg7 = reinterpret_cast< int32_t * >(argp7);
58624  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
58625  if (!SWIG_IsOK(res8)) {
58626  SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "8"" of type '" "faiss::IndexBinary::idx_t *""'");
58627  }
58628  arg8 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp8);
58629  ecode9 = SWIG_AsVal_bool(obj8, &val9);
58630  if (!SWIG_IsOK(ecode9)) {
58631  SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
58632  }
58633  arg9 = static_cast< bool >(val9);
58634  {
58635  Py_BEGIN_ALLOW_THREADS
58636  try {
58637  ((faiss::IndexBinaryIVF const *)arg1)->search_preassigned(arg2,(uint8_t const *)arg3,arg4,(faiss::IndexBinary::idx_t const *)arg5,(int32_t const *)arg6,arg7,arg8,arg9);
58638  } catch(faiss::FaissException & e) {
58639  PyEval_RestoreThread(_save);
58640  PyErr_SetString(PyExc_RuntimeError, e.what());
58641  SWIG_fail;
58642  }
58643  Py_END_ALLOW_THREADS
58644  }
58645  resultobj = SWIG_Py_Void();
58646  return resultobj;
58647 fail:
58648  return NULL;
58649 }
58650 
58651 
58652 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_preassigned(PyObject *self, PyObject *args) {
58653  Py_ssize_t argc;
58654  PyObject *argv[11] = {
58655  0
58656  };
58657  Py_ssize_t ii;
58658 
58659  if (!PyTuple_Check(args)) SWIG_fail;
58660  argc = args ? PyObject_Length(args) : 0;
58661  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
58662  argv[ii] = PyTuple_GET_ITEM(args,ii);
58663  }
58664  if (argc == 9) {
58665  int _v;
58666  void *vptr = 0;
58667  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58668  _v = SWIG_CheckState(res);
58669  if (_v) {
58670  {
58671  int res = SWIG_AsVal_long(argv[1], NULL);
58672  _v = SWIG_CheckState(res);
58673  }
58674  if (_v) {
58675  void *vptr = 0;
58676  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
58677  _v = SWIG_CheckState(res);
58678  if (_v) {
58679  {
58680  int res = SWIG_AsVal_long(argv[3], NULL);
58681  _v = SWIG_CheckState(res);
58682  }
58683  if (_v) {
58684  void *vptr = 0;
58685  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
58686  _v = SWIG_CheckState(res);
58687  if (_v) {
58688  void *vptr = 0;
58689  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_int, 0);
58690  _v = SWIG_CheckState(res);
58691  if (_v) {
58692  void *vptr = 0;
58693  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_int, 0);
58694  _v = SWIG_CheckState(res);
58695  if (_v) {
58696  void *vptr = 0;
58697  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
58698  _v = SWIG_CheckState(res);
58699  if (_v) {
58700  {
58701  int res = SWIG_AsVal_bool(argv[8], NULL);
58702  _v = SWIG_CheckState(res);
58703  }
58704  if (_v) {
58705  return _wrap_IndexBinaryIVF_search_preassigned__SWIG_1(self, args);
58706  }
58707  }
58708  }
58709  }
58710  }
58711  }
58712  }
58713  }
58714  }
58715  }
58716  if (argc == 10) {
58717  int _v;
58718  void *vptr = 0;
58719  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58720  _v = SWIG_CheckState(res);
58721  if (_v) {
58722  {
58723  int res = SWIG_AsVal_long(argv[1], NULL);
58724  _v = SWIG_CheckState(res);
58725  }
58726  if (_v) {
58727  void *vptr = 0;
58728  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
58729  _v = SWIG_CheckState(res);
58730  if (_v) {
58731  {
58732  int res = SWIG_AsVal_long(argv[3], NULL);
58733  _v = SWIG_CheckState(res);
58734  }
58735  if (_v) {
58736  void *vptr = 0;
58737  int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
58738  _v = SWIG_CheckState(res);
58739  if (_v) {
58740  void *vptr = 0;
58741  int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_int, 0);
58742  _v = SWIG_CheckState(res);
58743  if (_v) {
58744  void *vptr = 0;
58745  int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_int, 0);
58746  _v = SWIG_CheckState(res);
58747  if (_v) {
58748  void *vptr = 0;
58749  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
58750  _v = SWIG_CheckState(res);
58751  if (_v) {
58752  {
58753  int res = SWIG_AsVal_bool(argv[8], NULL);
58754  _v = SWIG_CheckState(res);
58755  }
58756  if (_v) {
58757  void *vptr = 0;
58758  int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
58759  _v = SWIG_CheckState(res);
58760  if (_v) {
58761  return _wrap_IndexBinaryIVF_search_preassigned__SWIG_0(self, args);
58762  }
58763  }
58764  }
58765  }
58766  }
58767  }
58768  }
58769  }
58770  }
58771  }
58772  }
58773 
58774 fail:
58775  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_search_preassigned'.\n"
58776  " Possible C/C++ prototypes are:\n"
58777  " faiss::IndexBinaryIVF::search_preassigned(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t,faiss::IndexBinary::idx_t const *,int32_t const *,int32_t *,faiss::IndexBinary::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
58778  " faiss::IndexBinaryIVF::search_preassigned(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t,faiss::IndexBinary::idx_t const *,int32_t const *,int32_t *,faiss::IndexBinary::idx_t *,bool) const\n");
58779  return 0;
58780 }
58781 
58782 
58783 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58784  PyObject *resultobj = 0;
58786  bool arg2 ;
58787  void *argp1 = 0 ;
58788  int res1 = 0 ;
58789  bool val2 ;
58790  int ecode2 = 0 ;
58791  PyObject * obj0 = 0 ;
58792  PyObject * obj1 = 0 ;
58793  faiss::BinaryInvertedListScanner *result = 0 ;
58794 
58795  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
58796  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58797  if (!SWIG_IsOK(res1)) {
58798  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58799  }
58800  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58801  ecode2 = SWIG_AsVal_bool(obj1, &val2);
58802  if (!SWIG_IsOK(ecode2)) {
58803  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
58804  }
58805  arg2 = static_cast< bool >(val2);
58806  {
58807  Py_BEGIN_ALLOW_THREADS
58808  try {
58809  result = (faiss::BinaryInvertedListScanner *)((faiss::IndexBinaryIVF const *)arg1)->get_InvertedListScanner(arg2);
58810  } catch(faiss::FaissException & e) {
58811  PyEval_RestoreThread(_save);
58812  PyErr_SetString(PyExc_RuntimeError, e.what());
58813  SWIG_fail;
58814  }
58815  Py_END_ALLOW_THREADS
58816  }
58817  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__BinaryInvertedListScanner, 0 | 0 );
58818  return resultobj;
58819 fail:
58820  return NULL;
58821 }
58822 
58823 
58824 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58825  PyObject *resultobj = 0;
58827  void *argp1 = 0 ;
58828  int res1 = 0 ;
58829  PyObject * obj0 = 0 ;
58830  faiss::BinaryInvertedListScanner *result = 0 ;
58831 
58832  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_get_InvertedListScanner",&obj0)) SWIG_fail;
58833  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58834  if (!SWIG_IsOK(res1)) {
58835  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58836  }
58837  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58838  {
58839  Py_BEGIN_ALLOW_THREADS
58840  try {
58841  result = (faiss::BinaryInvertedListScanner *)((faiss::IndexBinaryIVF const *)arg1)->get_InvertedListScanner();
58842  } catch(faiss::FaissException & e) {
58843  PyEval_RestoreThread(_save);
58844  PyErr_SetString(PyExc_RuntimeError, e.what());
58845  SWIG_fail;
58846  }
58847  Py_END_ALLOW_THREADS
58848  }
58849  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__BinaryInvertedListScanner, 0 | 0 );
58850  return resultobj;
58851 fail:
58852  return NULL;
58853 }
58854 
58855 
58856 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_InvertedListScanner(PyObject *self, PyObject *args) {
58857  Py_ssize_t argc;
58858  PyObject *argv[3] = {
58859  0
58860  };
58861  Py_ssize_t ii;
58862 
58863  if (!PyTuple_Check(args)) SWIG_fail;
58864  argc = args ? PyObject_Length(args) : 0;
58865  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
58866  argv[ii] = PyTuple_GET_ITEM(args,ii);
58867  }
58868  if (argc == 1) {
58869  int _v;
58870  void *vptr = 0;
58871  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58872  _v = SWIG_CheckState(res);
58873  if (_v) {
58874  return _wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_1(self, args);
58875  }
58876  }
58877  if (argc == 2) {
58878  int _v;
58879  void *vptr = 0;
58880  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58881  _v = SWIG_CheckState(res);
58882  if (_v) {
58883  {
58884  int res = SWIG_AsVal_bool(argv[1], NULL);
58885  _v = SWIG_CheckState(res);
58886  }
58887  if (_v) {
58888  return _wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_0(self, args);
58889  }
58890  }
58891  }
58892 
58893 fail:
58894  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_get_InvertedListScanner'.\n"
58895  " Possible C/C++ prototypes are:\n"
58896  " faiss::IndexBinaryIVF::get_InvertedListScanner(bool) const\n"
58897  " faiss::IndexBinaryIVF::get_InvertedListScanner() const\n");
58898  return 0;
58899 }
58900 
58901 
58902 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58903  PyObject *resultobj = 0;
58906  uint8_t *arg3 = (uint8_t *) 0 ;
58908  int32_t *arg5 = (int32_t *) 0 ;
58910  void *argp1 = 0 ;
58911  int res1 = 0 ;
58912  long val2 ;
58913  int ecode2 = 0 ;
58914  void *argp3 = 0 ;
58915  int res3 = 0 ;
58916  long val4 ;
58917  int ecode4 = 0 ;
58918  void *argp5 = 0 ;
58919  int res5 = 0 ;
58920  void *argp6 = 0 ;
58921  int res6 = 0 ;
58922  PyObject * obj0 = 0 ;
58923  PyObject * obj1 = 0 ;
58924  PyObject * obj2 = 0 ;
58925  PyObject * obj3 = 0 ;
58926  PyObject * obj4 = 0 ;
58927  PyObject * obj5 = 0 ;
58928 
58929  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryIVF_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
58930  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58931  if (!SWIG_IsOK(res1)) {
58932  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58933  }
58934  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58935  ecode2 = SWIG_AsVal_long(obj1, &val2);
58936  if (!SWIG_IsOK(ecode2)) {
58937  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58938  }
58939  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58940  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58941  if (!SWIG_IsOK(res3)) {
58942  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search" "', argument " "3"" of type '" "uint8_t const *""'");
58943  }
58944  arg3 = reinterpret_cast< uint8_t * >(argp3);
58945  ecode4 = SWIG_AsVal_long(obj3, &val4);
58946  if (!SWIG_IsOK(ecode4)) {
58947  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
58948  }
58949  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
58950  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
58951  if (!SWIG_IsOK(res5)) {
58952  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search" "', argument " "5"" of type '" "int32_t *""'");
58953  }
58954  arg5 = reinterpret_cast< int32_t * >(argp5);
58955  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
58956  if (!SWIG_IsOK(res6)) {
58957  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
58958  }
58959  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
58960  {
58961  Py_BEGIN_ALLOW_THREADS
58962  try {
58963  ((faiss::IndexBinaryIVF const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
58964  } catch(faiss::FaissException & e) {
58965  PyEval_RestoreThread(_save);
58966  PyErr_SetString(PyExc_RuntimeError, e.what());
58967  SWIG_fail;
58968  }
58969  Py_END_ALLOW_THREADS
58970  }
58971  resultobj = SWIG_Py_Void();
58972  return resultobj;
58973 fail:
58974  return NULL;
58975 }
58976 
58977 
58978 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58979  PyObject *resultobj = 0;
58982  uint8_t *arg3 = (uint8_t *) 0 ;
58983  void *argp1 = 0 ;
58984  int res1 = 0 ;
58985  long val2 ;
58986  int ecode2 = 0 ;
58987  void *argp3 = 0 ;
58988  int res3 = 0 ;
58989  PyObject * obj0 = 0 ;
58990  PyObject * obj1 = 0 ;
58991  PyObject * obj2 = 0 ;
58992 
58993  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
58994  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58995  if (!SWIG_IsOK(res1)) {
58996  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58997  }
58998  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58999  ecode2 = SWIG_AsVal_long(obj1, &val2);
59000  if (!SWIG_IsOK(ecode2)) {
59001  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59002  }
59003  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59004  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
59005  if (!SWIG_IsOK(res3)) {
59006  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
59007  }
59008  arg3 = reinterpret_cast< uint8_t * >(argp3);
59009  {
59010  Py_BEGIN_ALLOW_THREADS
59011  try {
59012  ((faiss::IndexBinaryIVF const *)arg1)->reconstruct(arg2,arg3);
59013  } catch(faiss::FaissException & e) {
59014  PyEval_RestoreThread(_save);
59015  PyErr_SetString(PyExc_RuntimeError, e.what());
59016  SWIG_fail;
59017  }
59018  Py_END_ALLOW_THREADS
59019  }
59020  resultobj = SWIG_Py_Void();
59021  return resultobj;
59022 fail:
59023  return NULL;
59024 }
59025 
59026 
59027 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59028  PyObject *resultobj = 0;
59032  uint8_t *arg4 = (uint8_t *) 0 ;
59033  void *argp1 = 0 ;
59034  int res1 = 0 ;
59035  long val2 ;
59036  int ecode2 = 0 ;
59037  long val3 ;
59038  int ecode3 = 0 ;
59039  void *argp4 = 0 ;
59040  int res4 = 0 ;
59041  PyObject * obj0 = 0 ;
59042  PyObject * obj1 = 0 ;
59043  PyObject * obj2 = 0 ;
59044  PyObject * obj3 = 0 ;
59045 
59046  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
59047  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59048  if (!SWIG_IsOK(res1)) {
59049  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
59050  }
59051  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59052  ecode2 = SWIG_AsVal_long(obj1, &val2);
59053  if (!SWIG_IsOK(ecode2)) {
59054  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59055  }
59056  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59057  ecode3 = SWIG_AsVal_long(obj2, &val3);
59058  if (!SWIG_IsOK(ecode3)) {
59059  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "3"" of type '" "faiss::IndexBinary::idx_t""'");
59060  }
59061  arg3 = static_cast< faiss::IndexBinary::idx_t >(val3);
59062  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
59063  if (!SWIG_IsOK(res4)) {
59064  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "4"" of type '" "uint8_t *""'");
59065  }
59066  arg4 = reinterpret_cast< uint8_t * >(argp4);
59067  {
59068  Py_BEGIN_ALLOW_THREADS
59069  try {
59070  ((faiss::IndexBinaryIVF const *)arg1)->reconstruct_n(arg2,arg3,arg4);
59071  } catch(faiss::FaissException & e) {
59072  PyEval_RestoreThread(_save);
59073  PyErr_SetString(PyExc_RuntimeError, e.what());
59074  SWIG_fail;
59075  }
59076  Py_END_ALLOW_THREADS
59077  }
59078  resultobj = SWIG_Py_Void();
59079  return resultobj;
59080 fail:
59081  return NULL;
59082 }
59083 
59084 
59085 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59086  PyObject *resultobj = 0;
59089  uint8_t *arg3 = (uint8_t *) 0 ;
59091  int32_t *arg5 = (int32_t *) 0 ;
59093  uint8_t *arg7 = (uint8_t *) 0 ;
59094  void *argp1 = 0 ;
59095  int res1 = 0 ;
59096  long val2 ;
59097  int ecode2 = 0 ;
59098  void *argp3 = 0 ;
59099  int res3 = 0 ;
59100  long val4 ;
59101  int ecode4 = 0 ;
59102  void *argp5 = 0 ;
59103  int res5 = 0 ;
59104  void *argp6 = 0 ;
59105  int res6 = 0 ;
59106  void *argp7 = 0 ;
59107  int res7 = 0 ;
59108  PyObject * obj0 = 0 ;
59109  PyObject * obj1 = 0 ;
59110  PyObject * obj2 = 0 ;
59111  PyObject * obj3 = 0 ;
59112  PyObject * obj4 = 0 ;
59113  PyObject * obj5 = 0 ;
59114  PyObject * obj6 = 0 ;
59115 
59116  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexBinaryIVF_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
59117  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59118  if (!SWIG_IsOK(res1)) {
59119  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
59120  }
59121  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59122  ecode2 = SWIG_AsVal_long(obj1, &val2);
59123  if (!SWIG_IsOK(ecode2)) {
59124  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59125  }
59126  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59127  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
59128  if (!SWIG_IsOK(res3)) {
59129  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "3"" of type '" "uint8_t const *""'");
59130  }
59131  arg3 = reinterpret_cast< uint8_t * >(argp3);
59132  ecode4 = SWIG_AsVal_long(obj3, &val4);
59133  if (!SWIG_IsOK(ecode4)) {
59134  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
59135  }
59136  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
59137  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
59138  if (!SWIG_IsOK(res5)) {
59139  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "5"" of type '" "int32_t *""'");
59140  }
59141  arg5 = reinterpret_cast< int32_t * >(argp5);
59142  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
59143  if (!SWIG_IsOK(res6)) {
59144  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
59145  }
59146  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
59147  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_unsigned_char, 0 | 0 );
59148  if (!SWIG_IsOK(res7)) {
59149  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "7"" of type '" "uint8_t *""'");
59150  }
59151  arg7 = reinterpret_cast< uint8_t * >(argp7);
59152  {
59153  Py_BEGIN_ALLOW_THREADS
59154  try {
59155  ((faiss::IndexBinaryIVF const *)arg1)->search_and_reconstruct(arg2,(uint8_t const *)arg3,arg4,arg5,arg6,arg7);
59156  } catch(faiss::FaissException & e) {
59157  PyEval_RestoreThread(_save);
59158  PyErr_SetString(PyExc_RuntimeError, e.what());
59159  SWIG_fail;
59160  }
59161  Py_END_ALLOW_THREADS
59162  }
59163  resultobj = SWIG_Py_Void();
59164  return resultobj;
59165 fail:
59166  return NULL;
59167 }
59168 
59169 
59170 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59171  PyObject *resultobj = 0;
59173  long arg2 ;
59174  long arg3 ;
59175  uint8_t *arg4 = (uint8_t *) 0 ;
59176  void *argp1 = 0 ;
59177  int res1 = 0 ;
59178  long val2 ;
59179  int ecode2 = 0 ;
59180  long val3 ;
59181  int ecode3 = 0 ;
59182  void *argp4 = 0 ;
59183  int res4 = 0 ;
59184  PyObject * obj0 = 0 ;
59185  PyObject * obj1 = 0 ;
59186  PyObject * obj2 = 0 ;
59187  PyObject * obj3 = 0 ;
59188 
59189  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
59190  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59191  if (!SWIG_IsOK(res1)) {
59192  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
59193  }
59194  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59195  ecode2 = SWIG_AsVal_long(obj1, &val2);
59196  if (!SWIG_IsOK(ecode2)) {
59197  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
59198  }
59199  arg2 = static_cast< long >(val2);
59200  ecode3 = SWIG_AsVal_long(obj2, &val3);
59201  if (!SWIG_IsOK(ecode3)) {
59202  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
59203  }
59204  arg3 = static_cast< long >(val3);
59205  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
59206  if (!SWIG_IsOK(res4)) {
59207  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "4"" of type '" "uint8_t *""'");
59208  }
59209  arg4 = reinterpret_cast< uint8_t * >(argp4);
59210  {
59211  Py_BEGIN_ALLOW_THREADS
59212  try {
59213  ((faiss::IndexBinaryIVF const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
59214  } catch(faiss::FaissException & e) {
59215  PyEval_RestoreThread(_save);
59216  PyErr_SetString(PyExc_RuntimeError, e.what());
59217  SWIG_fail;
59218  }
59219  Py_END_ALLOW_THREADS
59220  }
59221  resultobj = SWIG_Py_Void();
59222  return resultobj;
59223 fail:
59224  return NULL;
59225 }
59226 
59227 
59228 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59229  PyObject *resultobj = 0;
59231  faiss::IDSelector *arg2 = 0 ;
59232  void *argp1 = 0 ;
59233  int res1 = 0 ;
59234  void *argp2 = 0 ;
59235  int res2 = 0 ;
59236  PyObject * obj0 = 0 ;
59237  PyObject * obj1 = 0 ;
59238  long result;
59239 
59240  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_remove_ids",&obj0,&obj1)) SWIG_fail;
59241  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59242  if (!SWIG_IsOK(res1)) {
59243  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_remove_ids" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
59244  }
59245  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59246  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
59247  if (!SWIG_IsOK(res2)) {
59248  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
59249  }
59250  if (!argp2) {
59251  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinaryIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
59252  }
59253  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
59254  {
59255  Py_BEGIN_ALLOW_THREADS
59256  try {
59257  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
59258  } catch(faiss::FaissException & e) {
59259  PyEval_RestoreThread(_save);
59260  PyErr_SetString(PyExc_RuntimeError, e.what());
59261  SWIG_fail;
59262  }
59263  Py_END_ALLOW_THREADS
59264  }
59265  resultobj = SWIG_From_long(static_cast< long >(result));
59266  return resultobj;
59267 fail:
59268  return NULL;
59269 }
59270 
59271 
59272 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59273  PyObject *resultobj = 0;
59275  faiss::IndexBinaryIVF *arg2 = 0 ;
59277  void *argp1 = 0 ;
59278  int res1 = 0 ;
59279  void *argp2 = 0 ;
59280  int res2 = 0 ;
59281  long val3 ;
59282  int ecode3 = 0 ;
59283  PyObject * obj0 = 0 ;
59284  PyObject * obj1 = 0 ;
59285  PyObject * obj2 = 0 ;
59286 
59287  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
59288  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59289  if (!SWIG_IsOK(res1)) {
59290  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_merge_from" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
59291  }
59292  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59293  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexBinaryIVF, 0 );
59294  if (!SWIG_IsOK(res2)) {
59295  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexBinaryIVF &""'");
59296  }
59297  if (!argp2) {
59298  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinaryIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexBinaryIVF &""'");
59299  }
59300  arg2 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp2);
59301  ecode3 = SWIG_AsVal_long(obj2, &val3);
59302  if (!SWIG_IsOK(ecode3)) {
59303  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_merge_from" "', argument " "3"" of type '" "faiss::IndexBinary::idx_t""'");
59304  }
59305  arg3 = static_cast< faiss::IndexBinary::idx_t >(val3);
59306  {
59307  Py_BEGIN_ALLOW_THREADS
59308  try {
59309  (arg1)->merge_from(*arg2,arg3);
59310  } catch(faiss::FaissException & e) {
59311  PyEval_RestoreThread(_save);
59312  PyErr_SetString(PyExc_RuntimeError, e.what());
59313  SWIG_fail;
59314  }
59315  Py_END_ALLOW_THREADS
59316  }
59317  resultobj = SWIG_Py_Void();
59318  return resultobj;
59319 fail:
59320  return NULL;
59321 }
59322 
59323 
59324 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59325  PyObject *resultobj = 0;
59327  size_t arg2 ;
59328  void *argp1 = 0 ;
59329  int res1 = 0 ;
59330  size_t val2 ;
59331  int ecode2 = 0 ;
59332  PyObject * obj0 = 0 ;
59333  PyObject * obj1 = 0 ;
59334  size_t result;
59335 
59336  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_get_list_size",&obj0,&obj1)) SWIG_fail;
59337  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59338  if (!SWIG_IsOK(res1)) {
59339  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_get_list_size" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
59340  }
59341  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59342  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
59343  if (!SWIG_IsOK(ecode2)) {
59344  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_get_list_size" "', argument " "2"" of type '" "size_t""'");
59345  }
59346  arg2 = static_cast< size_t >(val2);
59347  {
59348  Py_BEGIN_ALLOW_THREADS
59349  try {
59350  result = (size_t)((faiss::IndexBinaryIVF const *)arg1)->get_list_size(arg2);
59351  } catch(faiss::FaissException & e) {
59352  PyEval_RestoreThread(_save);
59353  PyErr_SetString(PyExc_RuntimeError, e.what());
59354  SWIG_fail;
59355  }
59356  Py_END_ALLOW_THREADS
59357  }
59358  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
59359  return resultobj;
59360 fail:
59361  return NULL;
59362 }
59363 
59364 
59365 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_make_direct_map__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59366  PyObject *resultobj = 0;
59368  bool arg2 ;
59369  void *argp1 = 0 ;
59370  int res1 = 0 ;
59371  bool val2 ;
59372  int ecode2 = 0 ;
59373  PyObject * obj0 = 0 ;
59374  PyObject * obj1 = 0 ;
59375 
59376  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_make_direct_map",&obj0,&obj1)) SWIG_fail;
59377  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59378  if (!SWIG_IsOK(res1)) {
59379  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
59380  }
59381  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59382  ecode2 = SWIG_AsVal_bool(obj1, &val2);
59383  if (!SWIG_IsOK(ecode2)) {
59384  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_make_direct_map" "', argument " "2"" of type '" "bool""'");
59385  }
59386  arg2 = static_cast< bool >(val2);
59387  {
59388  Py_BEGIN_ALLOW_THREADS
59389  try {
59390  (arg1)->make_direct_map(arg2);
59391  } catch(faiss::FaissException & e) {
59392  PyEval_RestoreThread(_save);
59393  PyErr_SetString(PyExc_RuntimeError, e.what());
59394  SWIG_fail;
59395  }
59396  Py_END_ALLOW_THREADS
59397  }
59398  resultobj = SWIG_Py_Void();
59399  return resultobj;
59400 fail:
59401  return NULL;
59402 }
59403 
59404 
59405 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_make_direct_map__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59406  PyObject *resultobj = 0;
59408  void *argp1 = 0 ;
59409  int res1 = 0 ;
59410  PyObject * obj0 = 0 ;
59411 
59412  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_make_direct_map",&obj0)) SWIG_fail;
59413  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59414  if (!SWIG_IsOK(res1)) {
59415  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
59416  }
59417  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59418  {
59419  Py_BEGIN_ALLOW_THREADS
59420  try {
59421  (arg1)->make_direct_map();
59422  } catch(faiss::FaissException & e) {
59423  PyEval_RestoreThread(_save);
59424  PyErr_SetString(PyExc_RuntimeError, e.what());
59425  SWIG_fail;
59426  }
59427  Py_END_ALLOW_THREADS
59428  }
59429  resultobj = SWIG_Py_Void();
59430  return resultobj;
59431 fail:
59432  return NULL;
59433 }
59434 
59435 
59436 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_make_direct_map(PyObject *self, PyObject *args) {
59437  Py_ssize_t argc;
59438  PyObject *argv[3] = {
59439  0
59440  };
59441  Py_ssize_t ii;
59442 
59443  if (!PyTuple_Check(args)) SWIG_fail;
59444  argc = args ? PyObject_Length(args) : 0;
59445  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
59446  argv[ii] = PyTuple_GET_ITEM(args,ii);
59447  }
59448  if (argc == 1) {
59449  int _v;
59450  void *vptr = 0;
59451  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
59452  _v = SWIG_CheckState(res);
59453  if (_v) {
59454  return _wrap_IndexBinaryIVF_make_direct_map__SWIG_1(self, args);
59455  }
59456  }
59457  if (argc == 2) {
59458  int _v;
59459  void *vptr = 0;
59460  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
59461  _v = SWIG_CheckState(res);
59462  if (_v) {
59463  {
59464  int res = SWIG_AsVal_bool(argv[1], NULL);
59465  _v = SWIG_CheckState(res);
59466  }
59467  if (_v) {
59468  return _wrap_IndexBinaryIVF_make_direct_map__SWIG_0(self, args);
59469  }
59470  }
59471  }
59472 
59473 fail:
59474  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_make_direct_map'.\n"
59475  " Possible C/C++ prototypes are:\n"
59476  " faiss::IndexBinaryIVF::make_direct_map(bool)\n"
59477  " faiss::IndexBinaryIVF::make_direct_map()\n");
59478  return 0;
59479 }
59480 
59481 
59482 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_imbalance_factor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59483  PyObject *resultobj = 0;
59485  void *argp1 = 0 ;
59486  int res1 = 0 ;
59487  PyObject * obj0 = 0 ;
59488  double result;
59489 
59490  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_imbalance_factor",&obj0)) SWIG_fail;
59491  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59492  if (!SWIG_IsOK(res1)) {
59493  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_imbalance_factor" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
59494  }
59495  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59496  {
59497  Py_BEGIN_ALLOW_THREADS
59498  try {
59499  result = (double)((faiss::IndexBinaryIVF const *)arg1)->imbalance_factor();
59500  } catch(faiss::FaissException & e) {
59501  PyEval_RestoreThread(_save);
59502  PyErr_SetString(PyExc_RuntimeError, e.what());
59503  SWIG_fail;
59504  }
59505  Py_END_ALLOW_THREADS
59506  }
59507  resultobj = SWIG_From_double(static_cast< double >(result));
59508  return resultobj;
59509 fail:
59510  return NULL;
59511 }
59512 
59513 
59514 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_print_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59515  PyObject *resultobj = 0;
59517  void *argp1 = 0 ;
59518  int res1 = 0 ;
59519  PyObject * obj0 = 0 ;
59520 
59521  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_print_stats",&obj0)) SWIG_fail;
59522  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59523  if (!SWIG_IsOK(res1)) {
59524  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_print_stats" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
59525  }
59526  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59527  {
59528  Py_BEGIN_ALLOW_THREADS
59529  try {
59530  ((faiss::IndexBinaryIVF const *)arg1)->print_stats();
59531  } catch(faiss::FaissException & e) {
59532  PyEval_RestoreThread(_save);
59533  PyErr_SetString(PyExc_RuntimeError, e.what());
59534  SWIG_fail;
59535  }
59536  Py_END_ALLOW_THREADS
59537  }
59538  resultobj = SWIG_Py_Void();
59539  return resultobj;
59540 fail:
59541  return NULL;
59542 }
59543 
59544 
59545 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_replace_invlists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59546  PyObject *resultobj = 0;
59549  bool arg3 ;
59550  void *argp1 = 0 ;
59551  int res1 = 0 ;
59552  void *argp2 = 0 ;
59553  int res2 = 0 ;
59554  bool val3 ;
59555  int ecode3 = 0 ;
59556  PyObject * obj0 = 0 ;
59557  PyObject * obj1 = 0 ;
59558  PyObject * obj2 = 0 ;
59559 
59560  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_replace_invlists",&obj0,&obj1,&obj2)) SWIG_fail;
59561  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59562  if (!SWIG_IsOK(res1)) {
59563  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
59564  }
59565  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59566  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
59567  if (!SWIG_IsOK(res2)) {
59568  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
59569  }
59570  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
59571  ecode3 = SWIG_AsVal_bool(obj2, &val3);
59572  if (!SWIG_IsOK(ecode3)) {
59573  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "3"" of type '" "bool""'");
59574  }
59575  arg3 = static_cast< bool >(val3);
59576  {
59577  Py_BEGIN_ALLOW_THREADS
59578  try {
59579  (arg1)->replace_invlists(arg2,arg3);
59580  } catch(faiss::FaissException & e) {
59581  PyEval_RestoreThread(_save);
59582  PyErr_SetString(PyExc_RuntimeError, e.what());
59583  SWIG_fail;
59584  }
59585  Py_END_ALLOW_THREADS
59586  }
59587  resultobj = SWIG_Py_Void();
59588  return resultobj;
59589 fail:
59590  return NULL;
59591 }
59592 
59593 
59594 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_replace_invlists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59595  PyObject *resultobj = 0;
59598  void *argp1 = 0 ;
59599  int res1 = 0 ;
59600  void *argp2 = 0 ;
59601  int res2 = 0 ;
59602  PyObject * obj0 = 0 ;
59603  PyObject * obj1 = 0 ;
59604 
59605  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_replace_invlists",&obj0,&obj1)) SWIG_fail;
59606  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
59607  if (!SWIG_IsOK(res1)) {
59608  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
59609  }
59610  arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
59611  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
59612  if (!SWIG_IsOK(res2)) {
59613  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
59614  }
59615  arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
59616  {
59617  Py_BEGIN_ALLOW_THREADS
59618  try {
59619  (arg1)->replace_invlists(arg2);
59620  } catch(faiss::FaissException & e) {
59621  PyEval_RestoreThread(_save);
59622  PyErr_SetString(PyExc_RuntimeError, e.what());
59623  SWIG_fail;
59624  }
59625  Py_END_ALLOW_THREADS
59626  }
59627  resultobj = SWIG_Py_Void();
59628  return resultobj;
59629 fail:
59630  return NULL;
59631 }
59632 
59633 
59634 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_replace_invlists(PyObject *self, PyObject *args) {
59635  Py_ssize_t argc;
59636  PyObject *argv[4] = {
59637  0
59638  };
59639  Py_ssize_t ii;
59640 
59641  if (!PyTuple_Check(args)) SWIG_fail;
59642  argc = args ? PyObject_Length(args) : 0;
59643  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
59644  argv[ii] = PyTuple_GET_ITEM(args,ii);
59645  }
59646  if (argc == 2) {
59647  int _v;
59648  void *vptr = 0;
59649  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
59650  _v = SWIG_CheckState(res);
59651  if (_v) {
59652  void *vptr = 0;
59653  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
59654  _v = SWIG_CheckState(res);
59655  if (_v) {
59656  return _wrap_IndexBinaryIVF_replace_invlists__SWIG_1(self, args);
59657  }
59658  }
59659  }
59660  if (argc == 3) {
59661  int _v;
59662  void *vptr = 0;
59663  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
59664  _v = SWIG_CheckState(res);
59665  if (_v) {
59666  void *vptr = 0;
59667  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
59668  _v = SWIG_CheckState(res);
59669  if (_v) {
59670  {
59671  int res = SWIG_AsVal_bool(argv[2], NULL);
59672  _v = SWIG_CheckState(res);
59673  }
59674  if (_v) {
59675  return _wrap_IndexBinaryIVF_replace_invlists__SWIG_0(self, args);
59676  }
59677  }
59678  }
59679  }
59680 
59681 fail:
59682  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_replace_invlists'.\n"
59683  " Possible C/C++ prototypes are:\n"
59684  " faiss::IndexBinaryIVF::replace_invlists(faiss::InvertedLists *,bool)\n"
59685  " faiss::IndexBinaryIVF::replace_invlists(faiss::InvertedLists *)\n");
59686  return 0;
59687 }
59688 
59689 
59690 SWIGINTERN PyObject *IndexBinaryIVF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59691  PyObject *obj;
59692  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
59693  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_NewClientData(obj));
59694  return SWIG_Py_Void();
59695 }
59696 
59697 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59698  PyObject *resultobj = 0;
59700  faiss::Index *arg2 = (faiss::Index *) 0 ;
59701  void *argp1 = 0 ;
59702  int res1 = 0 ;
59703  void *argp2 = 0 ;
59704  int res2 = 0 ;
59705  PyObject * obj0 = 0 ;
59706  PyObject * obj1 = 0 ;
59707 
59708  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFromFloat_index_set",&obj0,&obj1)) SWIG_fail;
59709  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
59710  if (!SWIG_IsOK(res1)) {
59711  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_index_set" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
59712  }
59713  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
59714  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
59715  if (!SWIG_IsOK(res2)) {
59716  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryFromFloat_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
59717  }
59718  arg2 = reinterpret_cast< faiss::Index * >(argp2);
59719  if (arg1) (arg1)->index = arg2;
59720  resultobj = SWIG_Py_Void();
59721  return resultobj;
59722 fail:
59723  return NULL;
59724 }
59725 
59726 
59727 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59728  PyObject *resultobj = 0;
59730  void *argp1 = 0 ;
59731  int res1 = 0 ;
59732  PyObject * obj0 = 0 ;
59733  faiss::Index *result = 0 ;
59734 
59735  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFromFloat_index_get",&obj0)) SWIG_fail;
59736  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
59737  if (!SWIG_IsOK(res1)) {
59738  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_index_get" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
59739  }
59740  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
59741  result = (faiss::Index *) ((arg1)->index);
59742  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
59743  return resultobj;
59744 fail:
59745  return NULL;
59746 }
59747 
59748 
59749 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59750  PyObject *resultobj = 0;
59752  bool arg2 ;
59753  void *argp1 = 0 ;
59754  int res1 = 0 ;
59755  bool val2 ;
59756  int ecode2 = 0 ;
59757  PyObject * obj0 = 0 ;
59758  PyObject * obj1 = 0 ;
59759 
59760  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFromFloat_own_fields_set",&obj0,&obj1)) SWIG_fail;
59761  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
59762  if (!SWIG_IsOK(res1)) {
59763  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_own_fields_set" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
59764  }
59765  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
59766  ecode2 = SWIG_AsVal_bool(obj1, &val2);
59767  if (!SWIG_IsOK(ecode2)) {
59768  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_own_fields_set" "', argument " "2"" of type '" "bool""'");
59769  }
59770  arg2 = static_cast< bool >(val2);
59771  if (arg1) (arg1)->own_fields = arg2;
59772  resultobj = SWIG_Py_Void();
59773  return resultobj;
59774 fail:
59775  return NULL;
59776 }
59777 
59778 
59779 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59780  PyObject *resultobj = 0;
59782  void *argp1 = 0 ;
59783  int res1 = 0 ;
59784  PyObject * obj0 = 0 ;
59785  bool result;
59786 
59787  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFromFloat_own_fields_get",&obj0)) SWIG_fail;
59788  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
59789  if (!SWIG_IsOK(res1)) {
59790  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_own_fields_get" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
59791  }
59792  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
59793  result = (bool) ((arg1)->own_fields);
59794  resultobj = SWIG_From_bool(static_cast< bool >(result));
59795  return resultobj;
59796 fail:
59797  return NULL;
59798 }
59799 
59800 
59801 SWIGINTERN PyObject *_wrap_new_IndexBinaryFromFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59802  PyObject *resultobj = 0;
59803  faiss::IndexBinaryFromFloat *result = 0 ;
59804 
59805  if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryFromFloat")) SWIG_fail;
59806  {
59807  Py_BEGIN_ALLOW_THREADS
59808  try {
59810  } catch(faiss::FaissException & e) {
59811  PyEval_RestoreThread(_save);
59812  PyErr_SetString(PyExc_RuntimeError, e.what());
59813  SWIG_fail;
59814  }
59815  Py_END_ALLOW_THREADS
59816  }
59817  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_POINTER_NEW | 0 );
59818  return resultobj;
59819 fail:
59820  return NULL;
59821 }
59822 
59823 
59824 SWIGINTERN PyObject *_wrap_new_IndexBinaryFromFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59825  PyObject *resultobj = 0;
59826  faiss::Index *arg1 = (faiss::Index *) 0 ;
59827  void *argp1 = 0 ;
59828  int res1 = 0 ;
59829  PyObject * obj0 = 0 ;
59830  faiss::IndexBinaryFromFloat *result = 0 ;
59831 
59832  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryFromFloat",&obj0)) SWIG_fail;
59833  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
59834  if (!SWIG_IsOK(res1)) {
59835  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryFromFloat" "', argument " "1"" of type '" "faiss::Index *""'");
59836  }
59837  arg1 = reinterpret_cast< faiss::Index * >(argp1);
59838  {
59839  Py_BEGIN_ALLOW_THREADS
59840  try {
59842  } catch(faiss::FaissException & e) {
59843  PyEval_RestoreThread(_save);
59844  PyErr_SetString(PyExc_RuntimeError, e.what());
59845  SWIG_fail;
59846  }
59847  Py_END_ALLOW_THREADS
59848  }
59849  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_POINTER_NEW | 0 );
59850  return resultobj;
59851 fail:
59852  return NULL;
59853 }
59854 
59855 
59856 SWIGINTERN PyObject *_wrap_new_IndexBinaryFromFloat(PyObject *self, PyObject *args) {
59857  Py_ssize_t argc;
59858  PyObject *argv[2] = {
59859  0
59860  };
59861  Py_ssize_t ii;
59862 
59863  if (!PyTuple_Check(args)) SWIG_fail;
59864  argc = args ? PyObject_Length(args) : 0;
59865  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
59866  argv[ii] = PyTuple_GET_ITEM(args,ii);
59867  }
59868  if (argc == 0) {
59869  return _wrap_new_IndexBinaryFromFloat__SWIG_0(self, args);
59870  }
59871  if (argc == 1) {
59872  int _v;
59873  void *vptr = 0;
59874  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
59875  _v = SWIG_CheckState(res);
59876  if (_v) {
59877  return _wrap_new_IndexBinaryFromFloat__SWIG_1(self, args);
59878  }
59879  }
59880 
59881 fail:
59882  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryFromFloat'.\n"
59883  " Possible C/C++ prototypes are:\n"
59884  " faiss::IndexBinaryFromFloat::IndexBinaryFromFloat()\n"
59885  " faiss::IndexBinaryFromFloat::IndexBinaryFromFloat(faiss::Index *)\n");
59886  return 0;
59887 }
59888 
59889 
59890 SWIGINTERN PyObject *_wrap_delete_IndexBinaryFromFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59891  PyObject *resultobj = 0;
59893  void *argp1 = 0 ;
59894  int res1 = 0 ;
59895  PyObject * obj0 = 0 ;
59896 
59897  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryFromFloat",&obj0)) SWIG_fail;
59898  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_POINTER_DISOWN | 0 );
59899  if (!SWIG_IsOK(res1)) {
59900  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryFromFloat" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
59901  }
59902  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
59903  {
59904  Py_BEGIN_ALLOW_THREADS
59905  try {
59906  delete arg1;
59907  } catch(faiss::FaissException & e) {
59908  PyEval_RestoreThread(_save);
59909  PyErr_SetString(PyExc_RuntimeError, e.what());
59910  SWIG_fail;
59911  }
59912  Py_END_ALLOW_THREADS
59913  }
59914  resultobj = SWIG_Py_Void();
59915  return resultobj;
59916 fail:
59917  return NULL;
59918 }
59919 
59920 
59921 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59922  PyObject *resultobj = 0;
59925  uint8_t *arg3 = (uint8_t *) 0 ;
59926  void *argp1 = 0 ;
59927  int res1 = 0 ;
59928  long val2 ;
59929  int ecode2 = 0 ;
59930  void *argp3 = 0 ;
59931  int res3 = 0 ;
59932  PyObject * obj0 = 0 ;
59933  PyObject * obj1 = 0 ;
59934  PyObject * obj2 = 0 ;
59935 
59936  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFromFloat_add",&obj0,&obj1,&obj2)) SWIG_fail;
59937  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
59938  if (!SWIG_IsOK(res1)) {
59939  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_add" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
59940  }
59941  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
59942  ecode2 = SWIG_AsVal_long(obj1, &val2);
59943  if (!SWIG_IsOK(ecode2)) {
59944  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59945  }
59946  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59947  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
59948  if (!SWIG_IsOK(res3)) {
59949  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFromFloat_add" "', argument " "3"" of type '" "uint8_t const *""'");
59950  }
59951  arg3 = reinterpret_cast< uint8_t * >(argp3);
59952  {
59953  Py_BEGIN_ALLOW_THREADS
59954  try {
59955  (arg1)->add(arg2,(uint8_t const *)arg3);
59956  } catch(faiss::FaissException & e) {
59957  PyEval_RestoreThread(_save);
59958  PyErr_SetString(PyExc_RuntimeError, e.what());
59959  SWIG_fail;
59960  }
59961  Py_END_ALLOW_THREADS
59962  }
59963  resultobj = SWIG_Py_Void();
59964  return resultobj;
59965 fail:
59966  return NULL;
59967 }
59968 
59969 
59970 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59971  PyObject *resultobj = 0;
59973  void *argp1 = 0 ;
59974  int res1 = 0 ;
59975  PyObject * obj0 = 0 ;
59976 
59977  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFromFloat_reset",&obj0)) SWIG_fail;
59978  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
59979  if (!SWIG_IsOK(res1)) {
59980  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_reset" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
59981  }
59982  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
59983  {
59984  Py_BEGIN_ALLOW_THREADS
59985  try {
59986  (arg1)->reset();
59987  } catch(faiss::FaissException & e) {
59988  PyEval_RestoreThread(_save);
59989  PyErr_SetString(PyExc_RuntimeError, e.what());
59990  SWIG_fail;
59991  }
59992  Py_END_ALLOW_THREADS
59993  }
59994  resultobj = SWIG_Py_Void();
59995  return resultobj;
59996 fail:
59997  return NULL;
59998 }
59999 
60000 
60001 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60002  PyObject *resultobj = 0;
60005  uint8_t *arg3 = (uint8_t *) 0 ;
60007  int32_t *arg5 = (int32_t *) 0 ;
60009  void *argp1 = 0 ;
60010  int res1 = 0 ;
60011  long val2 ;
60012  int ecode2 = 0 ;
60013  void *argp3 = 0 ;
60014  int res3 = 0 ;
60015  long val4 ;
60016  int ecode4 = 0 ;
60017  void *argp5 = 0 ;
60018  int res5 = 0 ;
60019  void *argp6 = 0 ;
60020  int res6 = 0 ;
60021  PyObject * obj0 = 0 ;
60022  PyObject * obj1 = 0 ;
60023  PyObject * obj2 = 0 ;
60024  PyObject * obj3 = 0 ;
60025  PyObject * obj4 = 0 ;
60026  PyObject * obj5 = 0 ;
60027 
60028  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryFromFloat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
60029  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
60030  if (!SWIG_IsOK(res1)) {
60031  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_search" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat const *""'");
60032  }
60033  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
60034  ecode2 = SWIG_AsVal_long(obj1, &val2);
60035  if (!SWIG_IsOK(ecode2)) {
60036  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
60037  }
60038  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
60039  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
60040  if (!SWIG_IsOK(res3)) {
60041  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFromFloat_search" "', argument " "3"" of type '" "uint8_t const *""'");
60042  }
60043  arg3 = reinterpret_cast< uint8_t * >(argp3);
60044  ecode4 = SWIG_AsVal_long(obj3, &val4);
60045  if (!SWIG_IsOK(ecode4)) {
60046  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryFromFloat_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
60047  }
60048  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
60049  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
60050  if (!SWIG_IsOK(res5)) {
60051  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryFromFloat_search" "', argument " "5"" of type '" "int32_t *""'");
60052  }
60053  arg5 = reinterpret_cast< int32_t * >(argp5);
60054  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
60055  if (!SWIG_IsOK(res6)) {
60056  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryFromFloat_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
60057  }
60058  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
60059  {
60060  Py_BEGIN_ALLOW_THREADS
60061  try {
60062  ((faiss::IndexBinaryFromFloat const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
60063  } catch(faiss::FaissException & e) {
60064  PyEval_RestoreThread(_save);
60065  PyErr_SetString(PyExc_RuntimeError, e.what());
60066  SWIG_fail;
60067  }
60068  Py_END_ALLOW_THREADS
60069  }
60070  resultobj = SWIG_Py_Void();
60071  return resultobj;
60072 fail:
60073  return NULL;
60074 }
60075 
60076 
60077 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60078  PyObject *resultobj = 0;
60081  uint8_t *arg3 = (uint8_t *) 0 ;
60082  void *argp1 = 0 ;
60083  int res1 = 0 ;
60084  long val2 ;
60085  int ecode2 = 0 ;
60086  void *argp3 = 0 ;
60087  int res3 = 0 ;
60088  PyObject * obj0 = 0 ;
60089  PyObject * obj1 = 0 ;
60090  PyObject * obj2 = 0 ;
60091 
60092  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFromFloat_train",&obj0,&obj1,&obj2)) SWIG_fail;
60093  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
60094  if (!SWIG_IsOK(res1)) {
60095  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_train" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
60096  }
60097  arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
60098  ecode2 = SWIG_AsVal_long(obj1, &val2);
60099  if (!SWIG_IsOK(ecode2)) {
60100  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
60101  }
60102  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
60103  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
60104  if (!SWIG_IsOK(res3)) {
60105  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFromFloat_train" "', argument " "3"" of type '" "uint8_t const *""'");
60106  }
60107  arg3 = reinterpret_cast< uint8_t * >(argp3);
60108  {
60109  Py_BEGIN_ALLOW_THREADS
60110  try {
60111  (arg1)->train(arg2,(uint8_t const *)arg3);
60112  } catch(faiss::FaissException & e) {
60113  PyEval_RestoreThread(_save);
60114  PyErr_SetString(PyExc_RuntimeError, e.what());
60115  SWIG_fail;
60116  }
60117  Py_END_ALLOW_THREADS
60118  }
60119  resultobj = SWIG_Py_Void();
60120  return resultobj;
60121 fail:
60122  return NULL;
60123 }
60124 
60125 
60126 SWIGINTERN PyObject *IndexBinaryFromFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60127  PyObject *obj;
60128  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
60129  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_NewClientData(obj));
60130  return SWIG_Py_Void();
60131 }
60132 
60133 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_hnsw_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60134  PyObject *resultobj = 0;
60136  faiss::HNSW *arg2 = (faiss::HNSW *) 0 ;
60137  void *argp1 = 0 ;
60138  int res1 = 0 ;
60139  void *argp2 = 0 ;
60140  int res2 = 0 ;
60141  PyObject * obj0 = 0 ;
60142  PyObject * obj1 = 0 ;
60143 
60144  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryHNSW_hnsw_set",&obj0,&obj1)) SWIG_fail;
60145  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60146  if (!SWIG_IsOK(res1)) {
60147  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_hnsw_set" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60148  }
60149  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60150  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
60151  if (!SWIG_IsOK(res2)) {
60152  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryHNSW_hnsw_set" "', argument " "2"" of type '" "faiss::HNSW *""'");
60153  }
60154  arg2 = reinterpret_cast< faiss::HNSW * >(argp2);
60155  if (arg1) (arg1)->hnsw = *arg2;
60156  resultobj = SWIG_Py_Void();
60157  return resultobj;
60158 fail:
60159  return NULL;
60160 }
60161 
60162 
60163 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_hnsw_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60164  PyObject *resultobj = 0;
60166  void *argp1 = 0 ;
60167  int res1 = 0 ;
60168  PyObject * obj0 = 0 ;
60169  faiss::HNSW *result = 0 ;
60170 
60171  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_hnsw_get",&obj0)) SWIG_fail;
60172  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60173  if (!SWIG_IsOK(res1)) {
60174  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_hnsw_get" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60175  }
60176  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60177  result = (faiss::HNSW *)& ((arg1)->hnsw);
60178  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, 0 | 0 );
60179  return resultobj;
60180 fail:
60181  return NULL;
60182 }
60183 
60184 
60185 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60186  PyObject *resultobj = 0;
60188  bool arg2 ;
60189  void *argp1 = 0 ;
60190  int res1 = 0 ;
60191  bool val2 ;
60192  int ecode2 = 0 ;
60193  PyObject * obj0 = 0 ;
60194  PyObject * obj1 = 0 ;
60195 
60196  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryHNSW_own_fields_set",&obj0,&obj1)) SWIG_fail;
60197  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60198  if (!SWIG_IsOK(res1)) {
60199  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_own_fields_set" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60200  }
60201  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60202  ecode2 = SWIG_AsVal_bool(obj1, &val2);
60203  if (!SWIG_IsOK(ecode2)) {
60204  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_own_fields_set" "', argument " "2"" of type '" "bool""'");
60205  }
60206  arg2 = static_cast< bool >(val2);
60207  if (arg1) (arg1)->own_fields = arg2;
60208  resultobj = SWIG_Py_Void();
60209  return resultobj;
60210 fail:
60211  return NULL;
60212 }
60213 
60214 
60215 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60216  PyObject *resultobj = 0;
60218  void *argp1 = 0 ;
60219  int res1 = 0 ;
60220  PyObject * obj0 = 0 ;
60221  bool result;
60222 
60223  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_own_fields_get",&obj0)) SWIG_fail;
60224  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60225  if (!SWIG_IsOK(res1)) {
60226  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_own_fields_get" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60227  }
60228  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60229  result = (bool) ((arg1)->own_fields);
60230  resultobj = SWIG_From_bool(static_cast< bool >(result));
60231  return resultobj;
60232 fail:
60233  return NULL;
60234 }
60235 
60236 
60237 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_storage_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60238  PyObject *resultobj = 0;
60240  faiss::IndexBinary *arg2 = (faiss::IndexBinary *) 0 ;
60241  void *argp1 = 0 ;
60242  int res1 = 0 ;
60243  void *argp2 = 0 ;
60244  int res2 = 0 ;
60245  PyObject * obj0 = 0 ;
60246  PyObject * obj1 = 0 ;
60247 
60248  if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryHNSW_storage_set",&obj0,&obj1)) SWIG_fail;
60249  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60250  if (!SWIG_IsOK(res1)) {
60251  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_storage_set" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60252  }
60253  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60254  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinary, SWIG_POINTER_DISOWN | 0 );
60255  if (!SWIG_IsOK(res2)) {
60256  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryHNSW_storage_set" "', argument " "2"" of type '" "faiss::IndexBinary *""'");
60257  }
60258  arg2 = reinterpret_cast< faiss::IndexBinary * >(argp2);
60259  if (arg1) (arg1)->storage = arg2;
60260  resultobj = SWIG_Py_Void();
60261  return resultobj;
60262 fail:
60263  return NULL;
60264 }
60265 
60266 
60267 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_storage_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60268  PyObject *resultobj = 0;
60270  void *argp1 = 0 ;
60271  int res1 = 0 ;
60272  PyObject * obj0 = 0 ;
60273  faiss::IndexBinary *result = 0 ;
60274 
60275  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_storage_get",&obj0)) SWIG_fail;
60276  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60277  if (!SWIG_IsOK(res1)) {
60278  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_storage_get" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60279  }
60280  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60281  result = (faiss::IndexBinary *) ((arg1)->storage);
60282  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
60283  return resultobj;
60284 fail:
60285  return NULL;
60286 }
60287 
60288 
60289 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60290  PyObject *resultobj = 0;
60291  faiss::IndexBinaryHNSW *result = 0 ;
60292 
60293  if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryHNSW")) SWIG_fail;
60294  {
60295  Py_BEGIN_ALLOW_THREADS
60296  try {
60298  } catch(faiss::FaissException & e) {
60299  PyEval_RestoreThread(_save);
60300  PyErr_SetString(PyExc_RuntimeError, e.what());
60301  SWIG_fail;
60302  }
60303  Py_END_ALLOW_THREADS
60304  }
60305  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
60306  return resultobj;
60307 fail:
60308  return NULL;
60309 }
60310 
60311 
60312 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60313  PyObject *resultobj = 0;
60314  int arg1 ;
60315  int arg2 ;
60316  int val1 ;
60317  int ecode1 = 0 ;
60318  int val2 ;
60319  int ecode2 = 0 ;
60320  PyObject * obj0 = 0 ;
60321  PyObject * obj1 = 0 ;
60322  faiss::IndexBinaryHNSW *result = 0 ;
60323 
60324  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexBinaryHNSW",&obj0,&obj1)) SWIG_fail;
60325  ecode1 = SWIG_AsVal_int(obj0, &val1);
60326  if (!SWIG_IsOK(ecode1)) {
60327  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "int""'");
60328  }
60329  arg1 = static_cast< int >(val1);
60330  ecode2 = SWIG_AsVal_int(obj1, &val2);
60331  if (!SWIG_IsOK(ecode2)) {
60332  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexBinaryHNSW" "', argument " "2"" of type '" "int""'");
60333  }
60334  arg2 = static_cast< int >(val2);
60335  {
60336  Py_BEGIN_ALLOW_THREADS
60337  try {
60338  result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1,arg2);
60339  } catch(faiss::FaissException & e) {
60340  PyEval_RestoreThread(_save);
60341  PyErr_SetString(PyExc_RuntimeError, e.what());
60342  SWIG_fail;
60343  }
60344  Py_END_ALLOW_THREADS
60345  }
60346  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
60347  return resultobj;
60348 fail:
60349  return NULL;
60350 }
60351 
60352 
60353 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60354  PyObject *resultobj = 0;
60355  int arg1 ;
60356  int val1 ;
60357  int ecode1 = 0 ;
60358  PyObject * obj0 = 0 ;
60359  faiss::IndexBinaryHNSW *result = 0 ;
60360 
60361  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryHNSW",&obj0)) SWIG_fail;
60362  ecode1 = SWIG_AsVal_int(obj0, &val1);
60363  if (!SWIG_IsOK(ecode1)) {
60364  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "int""'");
60365  }
60366  arg1 = static_cast< int >(val1);
60367  {
60368  Py_BEGIN_ALLOW_THREADS
60369  try {
60370  result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1);
60371  } catch(faiss::FaissException & e) {
60372  PyEval_RestoreThread(_save);
60373  PyErr_SetString(PyExc_RuntimeError, e.what());
60374  SWIG_fail;
60375  }
60376  Py_END_ALLOW_THREADS
60377  }
60378  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
60379  return resultobj;
60380 fail:
60381  return NULL;
60382 }
60383 
60384 
60385 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60386  PyObject *resultobj = 0;
60387  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
60388  int arg2 ;
60389  void *argp1 = 0 ;
60390  int res1 = 0 ;
60391  int val2 ;
60392  int ecode2 = 0 ;
60393  PyObject * obj0 = 0 ;
60394  PyObject * obj1 = 0 ;
60395  faiss::IndexBinaryHNSW *result = 0 ;
60396 
60397  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexBinaryHNSW",&obj0,&obj1)) SWIG_fail;
60398  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
60399  if (!SWIG_IsOK(res1)) {
60400  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
60401  }
60402  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
60403  ecode2 = SWIG_AsVal_int(obj1, &val2);
60404  if (!SWIG_IsOK(ecode2)) {
60405  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexBinaryHNSW" "', argument " "2"" of type '" "int""'");
60406  }
60407  arg2 = static_cast< int >(val2);
60408  {
60409  Py_BEGIN_ALLOW_THREADS
60410  try {
60411  result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1,arg2);
60412  } catch(faiss::FaissException & e) {
60413  PyEval_RestoreThread(_save);
60414  PyErr_SetString(PyExc_RuntimeError, e.what());
60415  SWIG_fail;
60416  }
60417  Py_END_ALLOW_THREADS
60418  }
60419  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
60420  return resultobj;
60421 fail:
60422  return NULL;
60423 }
60424 
60425 
60426 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60427  PyObject *resultobj = 0;
60428  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
60429  void *argp1 = 0 ;
60430  int res1 = 0 ;
60431  PyObject * obj0 = 0 ;
60432  faiss::IndexBinaryHNSW *result = 0 ;
60433 
60434  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryHNSW",&obj0)) SWIG_fail;
60435  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
60436  if (!SWIG_IsOK(res1)) {
60437  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
60438  }
60439  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
60440  {
60441  Py_BEGIN_ALLOW_THREADS
60442  try {
60443  result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1);
60444  } catch(faiss::FaissException & e) {
60445  PyEval_RestoreThread(_save);
60446  PyErr_SetString(PyExc_RuntimeError, e.what());
60447  SWIG_fail;
60448  }
60449  Py_END_ALLOW_THREADS
60450  }
60451  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
60452  return resultobj;
60453 fail:
60454  return NULL;
60455 }
60456 
60457 
60458 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW(PyObject *self, PyObject *args) {
60459  Py_ssize_t argc;
60460  PyObject *argv[3] = {
60461  0
60462  };
60463  Py_ssize_t ii;
60464 
60465  if (!PyTuple_Check(args)) SWIG_fail;
60466  argc = args ? PyObject_Length(args) : 0;
60467  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
60468  argv[ii] = PyTuple_GET_ITEM(args,ii);
60469  }
60470  if (argc == 0) {
60471  return _wrap_new_IndexBinaryHNSW__SWIG_0(self, args);
60472  }
60473  if (argc == 1) {
60474  int _v;
60475  void *vptr = 0;
60476  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
60477  _v = SWIG_CheckState(res);
60478  if (_v) {
60479  return _wrap_new_IndexBinaryHNSW__SWIG_4(self, args);
60480  }
60481  }
60482  if (argc == 1) {
60483  int _v;
60484  {
60485  int res = SWIG_AsVal_int(argv[0], NULL);
60486  _v = SWIG_CheckState(res);
60487  }
60488  if (_v) {
60489  return _wrap_new_IndexBinaryHNSW__SWIG_2(self, args);
60490  }
60491  }
60492  if (argc == 2) {
60493  int _v;
60494  void *vptr = 0;
60495  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
60496  _v = SWIG_CheckState(res);
60497  if (_v) {
60498  {
60499  int res = SWIG_AsVal_int(argv[1], NULL);
60500  _v = SWIG_CheckState(res);
60501  }
60502  if (_v) {
60503  return _wrap_new_IndexBinaryHNSW__SWIG_3(self, args);
60504  }
60505  }
60506  }
60507  if (argc == 2) {
60508  int _v;
60509  {
60510  int res = SWIG_AsVal_int(argv[0], NULL);
60511  _v = SWIG_CheckState(res);
60512  }
60513  if (_v) {
60514  {
60515  int res = SWIG_AsVal_int(argv[1], NULL);
60516  _v = SWIG_CheckState(res);
60517  }
60518  if (_v) {
60519  return _wrap_new_IndexBinaryHNSW__SWIG_1(self, args);
60520  }
60521  }
60522  }
60523 
60524 fail:
60525  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryHNSW'.\n"
60526  " Possible C/C++ prototypes are:\n"
60527  " faiss::IndexBinaryHNSW::IndexBinaryHNSW()\n"
60528  " faiss::IndexBinaryHNSW::IndexBinaryHNSW(int,int)\n"
60529  " faiss::IndexBinaryHNSW::IndexBinaryHNSW(int)\n"
60530  " faiss::IndexBinaryHNSW::IndexBinaryHNSW(faiss::IndexBinary *,int)\n"
60531  " faiss::IndexBinaryHNSW::IndexBinaryHNSW(faiss::IndexBinary *)\n");
60532  return 0;
60533 }
60534 
60535 
60536 SWIGINTERN PyObject *_wrap_delete_IndexBinaryHNSW(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60537  PyObject *resultobj = 0;
60539  void *argp1 = 0 ;
60540  int res1 = 0 ;
60541  PyObject * obj0 = 0 ;
60542 
60543  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryHNSW",&obj0)) SWIG_fail;
60544  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_DISOWN | 0 );
60545  if (!SWIG_IsOK(res1)) {
60546  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryHNSW" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60547  }
60548  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60549  {
60550  Py_BEGIN_ALLOW_THREADS
60551  try {
60552  delete arg1;
60553  } catch(faiss::FaissException & e) {
60554  PyEval_RestoreThread(_save);
60555  PyErr_SetString(PyExc_RuntimeError, e.what());
60556  SWIG_fail;
60557  }
60558  Py_END_ALLOW_THREADS
60559  }
60560  resultobj = SWIG_Py_Void();
60561  return resultobj;
60562 fail:
60563  return NULL;
60564 }
60565 
60566 
60567 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60568  PyObject *resultobj = 0;
60570  void *argp1 = 0 ;
60571  int res1 = 0 ;
60572  PyObject * obj0 = 0 ;
60573  faiss::HNSW::DistanceComputer *result = 0 ;
60574 
60575  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_get_distance_computer",&obj0)) SWIG_fail;
60576  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60577  if (!SWIG_IsOK(res1)) {
60578  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW const *""'");
60579  }
60580  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60581  {
60582  Py_BEGIN_ALLOW_THREADS
60583  try {
60584  result = (faiss::HNSW::DistanceComputer *)((faiss::IndexBinaryHNSW const *)arg1)->get_distance_computer();
60585  } catch(faiss::FaissException & e) {
60586  PyEval_RestoreThread(_save);
60587  PyErr_SetString(PyExc_RuntimeError, e.what());
60588  SWIG_fail;
60589  }
60590  Py_END_ALLOW_THREADS
60591  }
60592  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
60593  return resultobj;
60594 fail:
60595  return NULL;
60596 }
60597 
60598 
60599 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60600  PyObject *resultobj = 0;
60603  uint8_t *arg3 = (uint8_t *) 0 ;
60604  void *argp1 = 0 ;
60605  int res1 = 0 ;
60606  long val2 ;
60607  int ecode2 = 0 ;
60608  void *argp3 = 0 ;
60609  int res3 = 0 ;
60610  PyObject * obj0 = 0 ;
60611  PyObject * obj1 = 0 ;
60612  PyObject * obj2 = 0 ;
60613 
60614  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryHNSW_add",&obj0,&obj1,&obj2)) SWIG_fail;
60615  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60616  if (!SWIG_IsOK(res1)) {
60617  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_add" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60618  }
60619  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60620  ecode2 = SWIG_AsVal_long(obj1, &val2);
60621  if (!SWIG_IsOK(ecode2)) {
60622  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
60623  }
60624  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
60625  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
60626  if (!SWIG_IsOK(res3)) {
60627  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_add" "', argument " "3"" of type '" "uint8_t const *""'");
60628  }
60629  arg3 = reinterpret_cast< uint8_t * >(argp3);
60630  {
60631  Py_BEGIN_ALLOW_THREADS
60632  try {
60633  (arg1)->add(arg2,(uint8_t const *)arg3);
60634  } catch(faiss::FaissException & e) {
60635  PyEval_RestoreThread(_save);
60636  PyErr_SetString(PyExc_RuntimeError, e.what());
60637  SWIG_fail;
60638  }
60639  Py_END_ALLOW_THREADS
60640  }
60641  resultobj = SWIG_Py_Void();
60642  return resultobj;
60643 fail:
60644  return NULL;
60645 }
60646 
60647 
60648 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60649  PyObject *resultobj = 0;
60652  uint8_t *arg3 = (uint8_t *) 0 ;
60653  void *argp1 = 0 ;
60654  int res1 = 0 ;
60655  long val2 ;
60656  int ecode2 = 0 ;
60657  void *argp3 = 0 ;
60658  int res3 = 0 ;
60659  PyObject * obj0 = 0 ;
60660  PyObject * obj1 = 0 ;
60661  PyObject * obj2 = 0 ;
60662 
60663  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryHNSW_train",&obj0,&obj1,&obj2)) SWIG_fail;
60664  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60665  if (!SWIG_IsOK(res1)) {
60666  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_train" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60667  }
60668  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60669  ecode2 = SWIG_AsVal_long(obj1, &val2);
60670  if (!SWIG_IsOK(ecode2)) {
60671  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
60672  }
60673  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
60674  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
60675  if (!SWIG_IsOK(res3)) {
60676  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_train" "', argument " "3"" of type '" "uint8_t const *""'");
60677  }
60678  arg3 = reinterpret_cast< uint8_t * >(argp3);
60679  {
60680  Py_BEGIN_ALLOW_THREADS
60681  try {
60682  (arg1)->train(arg2,(uint8_t const *)arg3);
60683  } catch(faiss::FaissException & e) {
60684  PyEval_RestoreThread(_save);
60685  PyErr_SetString(PyExc_RuntimeError, e.what());
60686  SWIG_fail;
60687  }
60688  Py_END_ALLOW_THREADS
60689  }
60690  resultobj = SWIG_Py_Void();
60691  return resultobj;
60692 fail:
60693  return NULL;
60694 }
60695 
60696 
60697 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60698  PyObject *resultobj = 0;
60701  uint8_t *arg3 = (uint8_t *) 0 ;
60703  int32_t *arg5 = (int32_t *) 0 ;
60705  void *argp1 = 0 ;
60706  int res1 = 0 ;
60707  long val2 ;
60708  int ecode2 = 0 ;
60709  void *argp3 = 0 ;
60710  int res3 = 0 ;
60711  long val4 ;
60712  int ecode4 = 0 ;
60713  void *argp5 = 0 ;
60714  int res5 = 0 ;
60715  void *argp6 = 0 ;
60716  int res6 = 0 ;
60717  PyObject * obj0 = 0 ;
60718  PyObject * obj1 = 0 ;
60719  PyObject * obj2 = 0 ;
60720  PyObject * obj3 = 0 ;
60721  PyObject * obj4 = 0 ;
60722  PyObject * obj5 = 0 ;
60723 
60724  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryHNSW_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
60725  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60726  if (!SWIG_IsOK(res1)) {
60727  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_search" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW const *""'");
60728  }
60729  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60730  ecode2 = SWIG_AsVal_long(obj1, &val2);
60731  if (!SWIG_IsOK(ecode2)) {
60732  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
60733  }
60734  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
60735  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
60736  if (!SWIG_IsOK(res3)) {
60737  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_search" "', argument " "3"" of type '" "uint8_t const *""'");
60738  }
60739  arg3 = reinterpret_cast< uint8_t * >(argp3);
60740  ecode4 = SWIG_AsVal_long(obj3, &val4);
60741  if (!SWIG_IsOK(ecode4)) {
60742  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryHNSW_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
60743  }
60744  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
60745  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
60746  if (!SWIG_IsOK(res5)) {
60747  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryHNSW_search" "', argument " "5"" of type '" "int32_t *""'");
60748  }
60749  arg5 = reinterpret_cast< int32_t * >(argp5);
60750  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
60751  if (!SWIG_IsOK(res6)) {
60752  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryHNSW_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
60753  }
60754  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
60755  {
60756  Py_BEGIN_ALLOW_THREADS
60757  try {
60758  ((faiss::IndexBinaryHNSW const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
60759  } catch(faiss::FaissException & e) {
60760  PyEval_RestoreThread(_save);
60761  PyErr_SetString(PyExc_RuntimeError, e.what());
60762  SWIG_fail;
60763  }
60764  Py_END_ALLOW_THREADS
60765  }
60766  resultobj = SWIG_Py_Void();
60767  return resultobj;
60768 fail:
60769  return NULL;
60770 }
60771 
60772 
60773 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60774  PyObject *resultobj = 0;
60777  uint8_t *arg3 = (uint8_t *) 0 ;
60778  void *argp1 = 0 ;
60779  int res1 = 0 ;
60780  long val2 ;
60781  int ecode2 = 0 ;
60782  void *argp3 = 0 ;
60783  int res3 = 0 ;
60784  PyObject * obj0 = 0 ;
60785  PyObject * obj1 = 0 ;
60786  PyObject * obj2 = 0 ;
60787 
60788  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryHNSW_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
60789  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60790  if (!SWIG_IsOK(res1)) {
60791  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW const *""'");
60792  }
60793  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60794  ecode2 = SWIG_AsVal_long(obj1, &val2);
60795  if (!SWIG_IsOK(ecode2)) {
60796  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
60797  }
60798  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
60799  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
60800  if (!SWIG_IsOK(res3)) {
60801  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
60802  }
60803  arg3 = reinterpret_cast< uint8_t * >(argp3);
60804  {
60805  Py_BEGIN_ALLOW_THREADS
60806  try {
60807  ((faiss::IndexBinaryHNSW const *)arg1)->reconstruct(arg2,arg3);
60808  } catch(faiss::FaissException & e) {
60809  PyEval_RestoreThread(_save);
60810  PyErr_SetString(PyExc_RuntimeError, e.what());
60811  SWIG_fail;
60812  }
60813  Py_END_ALLOW_THREADS
60814  }
60815  resultobj = SWIG_Py_Void();
60816  return resultobj;
60817 fail:
60818  return NULL;
60819 }
60820 
60821 
60822 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60823  PyObject *resultobj = 0;
60825  void *argp1 = 0 ;
60826  int res1 = 0 ;
60827  PyObject * obj0 = 0 ;
60828 
60829  if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_reset",&obj0)) SWIG_fail;
60830  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
60831  if (!SWIG_IsOK(res1)) {
60832  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_reset" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
60833  }
60834  arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
60835  {
60836  Py_BEGIN_ALLOW_THREADS
60837  try {
60838  (arg1)->reset();
60839  } catch(faiss::FaissException & e) {
60840  PyEval_RestoreThread(_save);
60841  PyErr_SetString(PyExc_RuntimeError, e.what());
60842  SWIG_fail;
60843  }
60844  Py_END_ALLOW_THREADS
60845  }
60846  resultobj = SWIG_Py_Void();
60847  return resultobj;
60848 fail:
60849  return NULL;
60850 }
60851 
60852 
60853 SWIGINTERN PyObject *IndexBinaryHNSW_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60854  PyObject *obj;
60855  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
60856  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_NewClientData(obj));
60857  return SWIG_Py_Void();
60858 }
60859 
60860 SWIGINTERN PyObject *_wrap_IndexIDMap_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60861  PyObject *resultobj = 0;
60862  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60863  faiss::Index *arg2 = (faiss::Index *) 0 ;
60864  void *argp1 = 0 ;
60865  int res1 = 0 ;
60866  void *argp2 = 0 ;
60867  int res2 = 0 ;
60868  PyObject * obj0 = 0 ;
60869  PyObject * obj1 = 0 ;
60870 
60871  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_index_set",&obj0,&obj1)) SWIG_fail;
60872  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
60873  if (!SWIG_IsOK(res1)) {
60874  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_index_set" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
60875  }
60876  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
60877  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
60878  if (!SWIG_IsOK(res2)) {
60879  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
60880  }
60881  arg2 = reinterpret_cast< faiss::Index * >(argp2);
60882  if (arg1) (arg1)->index = arg2;
60883  resultobj = SWIG_Py_Void();
60884  return resultobj;
60885 fail:
60886  return NULL;
60887 }
60888 
60889 
60890 SWIGINTERN PyObject *_wrap_IndexIDMap_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60891  PyObject *resultobj = 0;
60892  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60893  void *argp1 = 0 ;
60894  int res1 = 0 ;
60895  PyObject * obj0 = 0 ;
60896  faiss::Index *result = 0 ;
60897 
60898  if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_index_get",&obj0)) SWIG_fail;
60899  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
60900  if (!SWIG_IsOK(res1)) {
60901  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_index_get" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
60902  }
60903  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
60904  result = (faiss::Index *) ((arg1)->index);
60905  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
60906  return resultobj;
60907 fail:
60908  return NULL;
60909 }
60910 
60911 
60912 SWIGINTERN PyObject *_wrap_IndexIDMap_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60913  PyObject *resultobj = 0;
60914  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60915  bool arg2 ;
60916  void *argp1 = 0 ;
60917  int res1 = 0 ;
60918  bool val2 ;
60919  int ecode2 = 0 ;
60920  PyObject * obj0 = 0 ;
60921  PyObject * obj1 = 0 ;
60922 
60923  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_own_fields_set",&obj0,&obj1)) SWIG_fail;
60924  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
60925  if (!SWIG_IsOK(res1)) {
60926  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_own_fields_set" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
60927  }
60928  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
60929  ecode2 = SWIG_AsVal_bool(obj1, &val2);
60930  if (!SWIG_IsOK(ecode2)) {
60931  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_own_fields_set" "', argument " "2"" of type '" "bool""'");
60932  }
60933  arg2 = static_cast< bool >(val2);
60934  if (arg1) (arg1)->own_fields = arg2;
60935  resultobj = SWIG_Py_Void();
60936  return resultobj;
60937 fail:
60938  return NULL;
60939 }
60940 
60941 
60942 SWIGINTERN PyObject *_wrap_IndexIDMap_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60943  PyObject *resultobj = 0;
60944  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60945  void *argp1 = 0 ;
60946  int res1 = 0 ;
60947  PyObject * obj0 = 0 ;
60948  bool result;
60949 
60950  if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_own_fields_get",&obj0)) SWIG_fail;
60951  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
60952  if (!SWIG_IsOK(res1)) {
60953  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_own_fields_get" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
60954  }
60955  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
60956  result = (bool) ((arg1)->own_fields);
60957  resultobj = SWIG_From_bool(static_cast< bool >(result));
60958  return resultobj;
60959 fail:
60960  return NULL;
60961 }
60962 
60963 
60964 SWIGINTERN PyObject *_wrap_IndexIDMap_id_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60965  PyObject *resultobj = 0;
60966  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60967  std::vector< long > *arg2 = (std::vector< long > *) 0 ;
60968  void *argp1 = 0 ;
60969  int res1 = 0 ;
60970  void *argp2 = 0 ;
60971  int res2 = 0 ;
60972  PyObject * obj0 = 0 ;
60973  PyObject * obj1 = 0 ;
60974 
60975  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_id_map_set",&obj0,&obj1)) SWIG_fail;
60976  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
60977  if (!SWIG_IsOK(res1)) {
60978  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_id_map_set" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
60979  }
60980  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
60981  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
60982  if (!SWIG_IsOK(res2)) {
60983  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap_id_map_set" "', argument " "2"" of type '" "std::vector< long > *""'");
60984  }
60985  arg2 = reinterpret_cast< std::vector< long > * >(argp2);
60986  if (arg1) (arg1)->id_map = *arg2;
60987  resultobj = SWIG_Py_Void();
60988  return resultobj;
60989 fail:
60990  return NULL;
60991 }
60992 
60993 
60994 SWIGINTERN PyObject *_wrap_IndexIDMap_id_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60995  PyObject *resultobj = 0;
60996  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60997  void *argp1 = 0 ;
60998  int res1 = 0 ;
60999  PyObject * obj0 = 0 ;
61000  std::vector< long > *result = 0 ;
61001 
61002  if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_id_map_get",&obj0)) SWIG_fail;
61003  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61004  if (!SWIG_IsOK(res1)) {
61005  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_id_map_get" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
61006  }
61007  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61008  result = (std::vector< long > *)& ((arg1)->id_map);
61009  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
61010  return resultobj;
61011 fail:
61012  return NULL;
61013 }
61014 
61015 
61016 SWIGINTERN PyObject *_wrap_new_IndexIDMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61017  PyObject *resultobj = 0;
61018  faiss::Index *arg1 = (faiss::Index *) 0 ;
61019  void *argp1 = 0 ;
61020  int res1 = 0 ;
61021  PyObject * obj0 = 0 ;
61022  faiss::IndexIDMap *result = 0 ;
61023 
61024  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexIDMap",&obj0)) SWIG_fail;
61025  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
61026  if (!SWIG_IsOK(res1)) {
61027  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIDMap" "', argument " "1"" of type '" "faiss::Index *""'");
61028  }
61029  arg1 = reinterpret_cast< faiss::Index * >(argp1);
61030  {
61031  Py_BEGIN_ALLOW_THREADS
61032  try {
61033  result = (faiss::IndexIDMap *)new faiss::IndexIDMap(arg1);
61034  } catch(faiss::FaissException & e) {
61035  PyEval_RestoreThread(_save);
61036  PyErr_SetString(PyExc_RuntimeError, e.what());
61037  SWIG_fail;
61038  }
61039  Py_END_ALLOW_THREADS
61040  }
61041  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap, SWIG_POINTER_NEW | 0 );
61042  return resultobj;
61043 fail:
61044  return NULL;
61045 }
61046 
61047 
61048 SWIGINTERN PyObject *_wrap_IndexIDMap_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61049  PyObject *resultobj = 0;
61050  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61051  faiss::Index::idx_t arg2 ;
61052  float *arg3 = (float *) 0 ;
61053  long *arg4 = (long *) 0 ;
61054  void *argp1 = 0 ;
61055  int res1 = 0 ;
61056  long val2 ;
61057  int ecode2 = 0 ;
61058  void *argp3 = 0 ;
61059  int res3 = 0 ;
61060  void *argp4 = 0 ;
61061  int res4 = 0 ;
61062  PyObject * obj0 = 0 ;
61063  PyObject * obj1 = 0 ;
61064  PyObject * obj2 = 0 ;
61065  PyObject * obj3 = 0 ;
61066 
61067  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIDMap_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
61068  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61069  if (!SWIG_IsOK(res1)) {
61070  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
61071  }
61072  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61073  ecode2 = SWIG_AsVal_long(obj1, &val2);
61074  if (!SWIG_IsOK(ecode2)) {
61075  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61076  }
61077  arg2 = static_cast< faiss::Index::idx_t >(val2);
61078  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61079  if (!SWIG_IsOK(res3)) {
61080  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_add_with_ids" "', argument " "3"" of type '" "float const *""'");
61081  }
61082  arg3 = reinterpret_cast< float * >(argp3);
61083  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
61084  if (!SWIG_IsOK(res4)) {
61085  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIDMap_add_with_ids" "', argument " "4"" of type '" "long const *""'");
61086  }
61087  arg4 = reinterpret_cast< long * >(argp4);
61088  {
61089  Py_BEGIN_ALLOW_THREADS
61090  try {
61091  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
61092  } catch(faiss::FaissException & e) {
61093  PyEval_RestoreThread(_save);
61094  PyErr_SetString(PyExc_RuntimeError, e.what());
61095  SWIG_fail;
61096  }
61097  Py_END_ALLOW_THREADS
61098  }
61099  resultobj = SWIG_Py_Void();
61100  return resultobj;
61101 fail:
61102  return NULL;
61103 }
61104 
61105 
61106 SWIGINTERN PyObject *_wrap_IndexIDMap_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61107  PyObject *resultobj = 0;
61108  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61109  faiss::Index::idx_t arg2 ;
61110  float *arg3 = (float *) 0 ;
61111  void *argp1 = 0 ;
61112  int res1 = 0 ;
61113  long val2 ;
61114  int ecode2 = 0 ;
61115  void *argp3 = 0 ;
61116  int res3 = 0 ;
61117  PyObject * obj0 = 0 ;
61118  PyObject * obj1 = 0 ;
61119  PyObject * obj2 = 0 ;
61120 
61121  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIDMap_add",&obj0,&obj1,&obj2)) SWIG_fail;
61122  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61123  if (!SWIG_IsOK(res1)) {
61124  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_add" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
61125  }
61126  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61127  ecode2 = SWIG_AsVal_long(obj1, &val2);
61128  if (!SWIG_IsOK(ecode2)) {
61129  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61130  }
61131  arg2 = static_cast< faiss::Index::idx_t >(val2);
61132  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61133  if (!SWIG_IsOK(res3)) {
61134  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_add" "', argument " "3"" of type '" "float const *""'");
61135  }
61136  arg3 = reinterpret_cast< float * >(argp3);
61137  {
61138  Py_BEGIN_ALLOW_THREADS
61139  try {
61140  (arg1)->add(arg2,(float const *)arg3);
61141  } catch(faiss::FaissException & e) {
61142  PyEval_RestoreThread(_save);
61143  PyErr_SetString(PyExc_RuntimeError, e.what());
61144  SWIG_fail;
61145  }
61146  Py_END_ALLOW_THREADS
61147  }
61148  resultobj = SWIG_Py_Void();
61149  return resultobj;
61150 fail:
61151  return NULL;
61152 }
61153 
61154 
61155 SWIGINTERN PyObject *_wrap_IndexIDMap_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61156  PyObject *resultobj = 0;
61157  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61158  faiss::Index::idx_t arg2 ;
61159  float *arg3 = (float *) 0 ;
61160  faiss::Index::idx_t arg4 ;
61161  float *arg5 = (float *) 0 ;
61163  void *argp1 = 0 ;
61164  int res1 = 0 ;
61165  long val2 ;
61166  int ecode2 = 0 ;
61167  void *argp3 = 0 ;
61168  int res3 = 0 ;
61169  long val4 ;
61170  int ecode4 = 0 ;
61171  void *argp5 = 0 ;
61172  int res5 = 0 ;
61173  void *argp6 = 0 ;
61174  int res6 = 0 ;
61175  PyObject * obj0 = 0 ;
61176  PyObject * obj1 = 0 ;
61177  PyObject * obj2 = 0 ;
61178  PyObject * obj3 = 0 ;
61179  PyObject * obj4 = 0 ;
61180  PyObject * obj5 = 0 ;
61181 
61182  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIDMap_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
61183  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61184  if (!SWIG_IsOK(res1)) {
61185  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_search" "', argument " "1"" of type '" "faiss::IndexIDMap const *""'");
61186  }
61187  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61188  ecode2 = SWIG_AsVal_long(obj1, &val2);
61189  if (!SWIG_IsOK(ecode2)) {
61190  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61191  }
61192  arg2 = static_cast< faiss::Index::idx_t >(val2);
61193  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61194  if (!SWIG_IsOK(res3)) {
61195  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_search" "', argument " "3"" of type '" "float const *""'");
61196  }
61197  arg3 = reinterpret_cast< float * >(argp3);
61198  ecode4 = SWIG_AsVal_long(obj3, &val4);
61199  if (!SWIG_IsOK(ecode4)) {
61200  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIDMap_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
61201  }
61202  arg4 = static_cast< faiss::Index::idx_t >(val4);
61203  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
61204  if (!SWIG_IsOK(res5)) {
61205  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIDMap_search" "', argument " "5"" of type '" "float *""'");
61206  }
61207  arg5 = reinterpret_cast< float * >(argp5);
61208  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
61209  if (!SWIG_IsOK(res6)) {
61210  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIDMap_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
61211  }
61212  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
61213  {
61214  Py_BEGIN_ALLOW_THREADS
61215  try {
61216  ((faiss::IndexIDMap const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
61217  } catch(faiss::FaissException & e) {
61218  PyEval_RestoreThread(_save);
61219  PyErr_SetString(PyExc_RuntimeError, e.what());
61220  SWIG_fail;
61221  }
61222  Py_END_ALLOW_THREADS
61223  }
61224  resultobj = SWIG_Py_Void();
61225  return resultobj;
61226 fail:
61227  return NULL;
61228 }
61229 
61230 
61231 SWIGINTERN PyObject *_wrap_IndexIDMap_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61232  PyObject *resultobj = 0;
61233  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61234  faiss::Index::idx_t arg2 ;
61235  float *arg3 = (float *) 0 ;
61236  void *argp1 = 0 ;
61237  int res1 = 0 ;
61238  long val2 ;
61239  int ecode2 = 0 ;
61240  void *argp3 = 0 ;
61241  int res3 = 0 ;
61242  PyObject * obj0 = 0 ;
61243  PyObject * obj1 = 0 ;
61244  PyObject * obj2 = 0 ;
61245 
61246  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIDMap_train",&obj0,&obj1,&obj2)) SWIG_fail;
61247  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61248  if (!SWIG_IsOK(res1)) {
61249  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_train" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
61250  }
61251  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61252  ecode2 = SWIG_AsVal_long(obj1, &val2);
61253  if (!SWIG_IsOK(ecode2)) {
61254  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61255  }
61256  arg2 = static_cast< faiss::Index::idx_t >(val2);
61257  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61258  if (!SWIG_IsOK(res3)) {
61259  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_train" "', argument " "3"" of type '" "float const *""'");
61260  }
61261  arg3 = reinterpret_cast< float * >(argp3);
61262  {
61263  Py_BEGIN_ALLOW_THREADS
61264  try {
61265  (arg1)->train(arg2,(float const *)arg3);
61266  } catch(faiss::FaissException & e) {
61267  PyEval_RestoreThread(_save);
61268  PyErr_SetString(PyExc_RuntimeError, e.what());
61269  SWIG_fail;
61270  }
61271  Py_END_ALLOW_THREADS
61272  }
61273  resultobj = SWIG_Py_Void();
61274  return resultobj;
61275 fail:
61276  return NULL;
61277 }
61278 
61279 
61280 SWIGINTERN PyObject *_wrap_IndexIDMap_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61281  PyObject *resultobj = 0;
61282  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61283  void *argp1 = 0 ;
61284  int res1 = 0 ;
61285  PyObject * obj0 = 0 ;
61286 
61287  if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_reset",&obj0)) SWIG_fail;
61288  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61289  if (!SWIG_IsOK(res1)) {
61290  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_reset" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
61291  }
61292  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61293  {
61294  Py_BEGIN_ALLOW_THREADS
61295  try {
61296  (arg1)->reset();
61297  } catch(faiss::FaissException & e) {
61298  PyEval_RestoreThread(_save);
61299  PyErr_SetString(PyExc_RuntimeError, e.what());
61300  SWIG_fail;
61301  }
61302  Py_END_ALLOW_THREADS
61303  }
61304  resultobj = SWIG_Py_Void();
61305  return resultobj;
61306 fail:
61307  return NULL;
61308 }
61309 
61310 
61311 SWIGINTERN PyObject *_wrap_IndexIDMap_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61312  PyObject *resultobj = 0;
61313  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61314  faiss::IDSelector *arg2 = 0 ;
61315  void *argp1 = 0 ;
61316  int res1 = 0 ;
61317  void *argp2 = 0 ;
61318  int res2 = 0 ;
61319  PyObject * obj0 = 0 ;
61320  PyObject * obj1 = 0 ;
61321  long result;
61322 
61323  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_remove_ids",&obj0,&obj1)) SWIG_fail;
61324  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61325  if (!SWIG_IsOK(res1)) {
61326  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_remove_ids" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
61327  }
61328  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61329  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
61330  if (!SWIG_IsOK(res2)) {
61331  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
61332  }
61333  if (!argp2) {
61334  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIDMap_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
61335  }
61336  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
61337  {
61338  Py_BEGIN_ALLOW_THREADS
61339  try {
61340  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
61341  } catch(faiss::FaissException & e) {
61342  PyEval_RestoreThread(_save);
61343  PyErr_SetString(PyExc_RuntimeError, e.what());
61344  SWIG_fail;
61345  }
61346  Py_END_ALLOW_THREADS
61347  }
61348  resultobj = SWIG_From_long(static_cast< long >(result));
61349  return resultobj;
61350 fail:
61351  return NULL;
61352 }
61353 
61354 
61355 SWIGINTERN PyObject *_wrap_IndexIDMap_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61356  PyObject *resultobj = 0;
61357  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61358  faiss::Index::idx_t arg2 ;
61359  float *arg3 = (float *) 0 ;
61360  float arg4 ;
61362  void *argp1 = 0 ;
61363  int res1 = 0 ;
61364  long val2 ;
61365  int ecode2 = 0 ;
61366  void *argp3 = 0 ;
61367  int res3 = 0 ;
61368  float val4 ;
61369  int ecode4 = 0 ;
61370  void *argp5 = 0 ;
61371  int res5 = 0 ;
61372  PyObject * obj0 = 0 ;
61373  PyObject * obj1 = 0 ;
61374  PyObject * obj2 = 0 ;
61375  PyObject * obj3 = 0 ;
61376  PyObject * obj4 = 0 ;
61377 
61378  if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIDMap_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
61379  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
61380  if (!SWIG_IsOK(res1)) {
61381  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_range_search" "', argument " "1"" of type '" "faiss::IndexIDMap const *""'");
61382  }
61383  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61384  ecode2 = SWIG_AsVal_long(obj1, &val2);
61385  if (!SWIG_IsOK(ecode2)) {
61386  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61387  }
61388  arg2 = static_cast< faiss::Index::idx_t >(val2);
61389  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61390  if (!SWIG_IsOK(res3)) {
61391  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_range_search" "', argument " "3"" of type '" "float const *""'");
61392  }
61393  arg3 = reinterpret_cast< float * >(argp3);
61394  ecode4 = SWIG_AsVal_float(obj3, &val4);
61395  if (!SWIG_IsOK(ecode4)) {
61396  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIDMap_range_search" "', argument " "4"" of type '" "float""'");
61397  }
61398  arg4 = static_cast< float >(val4);
61399  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
61400  if (!SWIG_IsOK(res5)) {
61401  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIDMap_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
61402  }
61403  arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
61404  {
61405  Py_BEGIN_ALLOW_THREADS
61406  try {
61407  ((faiss::IndexIDMap const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
61408  } catch(faiss::FaissException & e) {
61409  PyEval_RestoreThread(_save);
61410  PyErr_SetString(PyExc_RuntimeError, e.what());
61411  SWIG_fail;
61412  }
61413  Py_END_ALLOW_THREADS
61414  }
61415  resultobj = SWIG_Py_Void();
61416  return resultobj;
61417 fail:
61418  return NULL;
61419 }
61420 
61421 
61422 SWIGINTERN PyObject *_wrap_delete_IndexIDMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61423  PyObject *resultobj = 0;
61424  faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
61425  void *argp1 = 0 ;
61426  int res1 = 0 ;
61427  PyObject * obj0 = 0 ;
61428 
61429  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIDMap",&obj0)) SWIG_fail;
61430  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, SWIG_POINTER_DISOWN | 0 );
61431  if (!SWIG_IsOK(res1)) {
61432  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIDMap" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
61433  }
61434  arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
61435  {
61436  Py_BEGIN_ALLOW_THREADS
61437  try {
61438  delete arg1;
61439  } catch(faiss::FaissException & e) {
61440  PyEval_RestoreThread(_save);
61441  PyErr_SetString(PyExc_RuntimeError, e.what());
61442  SWIG_fail;
61443  }
61444  Py_END_ALLOW_THREADS
61445  }
61446  resultobj = SWIG_Py_Void();
61447  return resultobj;
61448 fail:
61449  return NULL;
61450 }
61451 
61452 
61453 SWIGINTERN PyObject *_wrap_new_IndexIDMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61454  PyObject *resultobj = 0;
61455  faiss::IndexIDMap *result = 0 ;
61456 
61457  if (!PyArg_ParseTuple(args,(char *)":new_IndexIDMap")) SWIG_fail;
61458  {
61459  Py_BEGIN_ALLOW_THREADS
61460  try {
61461  result = (faiss::IndexIDMap *)new faiss::IndexIDMap();
61462  } catch(faiss::FaissException & e) {
61463  PyEval_RestoreThread(_save);
61464  PyErr_SetString(PyExc_RuntimeError, e.what());
61465  SWIG_fail;
61466  }
61467  Py_END_ALLOW_THREADS
61468  }
61469  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap, SWIG_POINTER_NEW | 0 );
61470  return resultobj;
61471 fail:
61472  return NULL;
61473 }
61474 
61475 
61476 SWIGINTERN PyObject *_wrap_new_IndexIDMap(PyObject *self, PyObject *args) {
61477  Py_ssize_t argc;
61478  PyObject *argv[2] = {
61479  0
61480  };
61481  Py_ssize_t ii;
61482 
61483  if (!PyTuple_Check(args)) SWIG_fail;
61484  argc = args ? PyObject_Length(args) : 0;
61485  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
61486  argv[ii] = PyTuple_GET_ITEM(args,ii);
61487  }
61488  if (argc == 0) {
61489  return _wrap_new_IndexIDMap__SWIG_1(self, args);
61490  }
61491  if (argc == 1) {
61492  int _v;
61493  void *vptr = 0;
61494  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
61495  _v = SWIG_CheckState(res);
61496  if (_v) {
61497  return _wrap_new_IndexIDMap__SWIG_0(self, args);
61498  }
61499  }
61500 
61501 fail:
61502  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIDMap'.\n"
61503  " Possible C/C++ prototypes are:\n"
61504  " faiss::IndexIDMap::IndexIDMap(faiss::Index *)\n"
61505  " faiss::IndexIDMap::IndexIDMap()\n");
61506  return 0;
61507 }
61508 
61509 
61510 SWIGINTERN PyObject *IndexIDMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61511  PyObject *obj;
61512  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
61513  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIDMap, SWIG_NewClientData(obj));
61514  return SWIG_Py_Void();
61515 }
61516 
61517 SWIGINTERN PyObject *_wrap_IndexIDMap2_rev_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61518  PyObject *resultobj = 0;
61519  faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
61520  std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > arg2 ;
61521  void *argp1 = 0 ;
61522  int res1 = 0 ;
61523  void *argp2 ;
61524  int res2 = 0 ;
61525  PyObject * obj0 = 0 ;
61526  PyObject * obj1 = 0 ;
61527 
61528  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap2_rev_map_set",&obj0,&obj1)) SWIG_fail;
61529  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
61530  if (!SWIG_IsOK(res1)) {
61531  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_rev_map_set" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
61532  }
61533  arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
61534  {
61535  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__unordered_mapT_long_long_t, 0 | 0);
61536  if (!SWIG_IsOK(res2)) {
61537  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap2_rev_map_set" "', argument " "2"" of type '" "std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >""'");
61538  }
61539  if (!argp2) {
61540  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIDMap2_rev_map_set" "', argument " "2"" of type '" "std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >""'");
61541  } else {
61542  std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > * temp = reinterpret_cast< std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > * >(argp2);
61543  arg2 = *temp;
61544  if (SWIG_IsNewObj(res2)) delete temp;
61545  }
61546  }
61547  if (arg1) (arg1)->rev_map = arg2;
61548  resultobj = SWIG_Py_Void();
61549  return resultobj;
61550 fail:
61551  return NULL;
61552 }
61553 
61554 
61555 SWIGINTERN PyObject *_wrap_IndexIDMap2_rev_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61556  PyObject *resultobj = 0;
61557  faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
61558  void *argp1 = 0 ;
61559  int res1 = 0 ;
61560  PyObject * obj0 = 0 ;
61561  std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > result;
61562 
61563  if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap2_rev_map_get",&obj0)) SWIG_fail;
61564  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
61565  if (!SWIG_IsOK(res1)) {
61566  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_rev_map_get" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
61567  }
61568  arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
61569  result = ((arg1)->rev_map);
61570  resultobj = SWIG_NewPointerObj((new std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >(static_cast< const std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >& >(result))), SWIGTYPE_p_std__unordered_mapT_long_long_t, SWIG_POINTER_OWN | 0 );
61571  return resultobj;
61572 fail:
61573  return NULL;
61574 }
61575 
61576 
61577 SWIGINTERN PyObject *_wrap_new_IndexIDMap2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61578  PyObject *resultobj = 0;
61579  faiss::Index *arg1 = (faiss::Index *) 0 ;
61580  void *argp1 = 0 ;
61581  int res1 = 0 ;
61582  PyObject * obj0 = 0 ;
61583  faiss::IndexIDMap2 *result = 0 ;
61584 
61585  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexIDMap2",&obj0)) SWIG_fail;
61586  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
61587  if (!SWIG_IsOK(res1)) {
61588  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIDMap2" "', argument " "1"" of type '" "faiss::Index *""'");
61589  }
61590  arg1 = reinterpret_cast< faiss::Index * >(argp1);
61591  {
61592  Py_BEGIN_ALLOW_THREADS
61593  try {
61594  result = (faiss::IndexIDMap2 *)new faiss::IndexIDMap2(arg1);
61595  } catch(faiss::FaissException & e) {
61596  PyEval_RestoreThread(_save);
61597  PyErr_SetString(PyExc_RuntimeError, e.what());
61598  SWIG_fail;
61599  }
61600  Py_END_ALLOW_THREADS
61601  }
61602  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap2, SWIG_POINTER_NEW | 0 );
61603  return resultobj;
61604 fail:
61605  return NULL;
61606 }
61607 
61608 
61609 SWIGINTERN PyObject *_wrap_IndexIDMap2_construct_rev_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61610  PyObject *resultobj = 0;
61611  faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
61612  void *argp1 = 0 ;
61613  int res1 = 0 ;
61614  PyObject * obj0 = 0 ;
61615 
61616  if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap2_construct_rev_map",&obj0)) SWIG_fail;
61617  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
61618  if (!SWIG_IsOK(res1)) {
61619  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_construct_rev_map" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
61620  }
61621  arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
61622  {
61623  Py_BEGIN_ALLOW_THREADS
61624  try {
61625  (arg1)->construct_rev_map();
61626  } catch(faiss::FaissException & e) {
61627  PyEval_RestoreThread(_save);
61628  PyErr_SetString(PyExc_RuntimeError, e.what());
61629  SWIG_fail;
61630  }
61631  Py_END_ALLOW_THREADS
61632  }
61633  resultobj = SWIG_Py_Void();
61634  return resultobj;
61635 fail:
61636  return NULL;
61637 }
61638 
61639 
61640 SWIGINTERN PyObject *_wrap_IndexIDMap2_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61641  PyObject *resultobj = 0;
61642  faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
61643  faiss::Index::idx_t arg2 ;
61644  float *arg3 = (float *) 0 ;
61645  long *arg4 = (long *) 0 ;
61646  void *argp1 = 0 ;
61647  int res1 = 0 ;
61648  long val2 ;
61649  int ecode2 = 0 ;
61650  void *argp3 = 0 ;
61651  int res3 = 0 ;
61652  void *argp4 = 0 ;
61653  int res4 = 0 ;
61654  PyObject * obj0 = 0 ;
61655  PyObject * obj1 = 0 ;
61656  PyObject * obj2 = 0 ;
61657  PyObject * obj3 = 0 ;
61658 
61659  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIDMap2_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
61660  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
61661  if (!SWIG_IsOK(res1)) {
61662  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
61663  }
61664  arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
61665  ecode2 = SWIG_AsVal_long(obj1, &val2);
61666  if (!SWIG_IsOK(ecode2)) {
61667  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap2_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61668  }
61669  arg2 = static_cast< faiss::Index::idx_t >(val2);
61670  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61671  if (!SWIG_IsOK(res3)) {
61672  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap2_add_with_ids" "', argument " "3"" of type '" "float const *""'");
61673  }
61674  arg3 = reinterpret_cast< float * >(argp3);
61675  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
61676  if (!SWIG_IsOK(res4)) {
61677  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIDMap2_add_with_ids" "', argument " "4"" of type '" "long const *""'");
61678  }
61679  arg4 = reinterpret_cast< long * >(argp4);
61680  {
61681  Py_BEGIN_ALLOW_THREADS
61682  try {
61683  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
61684  } catch(faiss::FaissException & e) {
61685  PyEval_RestoreThread(_save);
61686  PyErr_SetString(PyExc_RuntimeError, e.what());
61687  SWIG_fail;
61688  }
61689  Py_END_ALLOW_THREADS
61690  }
61691  resultobj = SWIG_Py_Void();
61692  return resultobj;
61693 fail:
61694  return NULL;
61695 }
61696 
61697 
61698 SWIGINTERN PyObject *_wrap_IndexIDMap2_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61699  PyObject *resultobj = 0;
61700  faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
61701  faiss::IDSelector *arg2 = 0 ;
61702  void *argp1 = 0 ;
61703  int res1 = 0 ;
61704  void *argp2 = 0 ;
61705  int res2 = 0 ;
61706  PyObject * obj0 = 0 ;
61707  PyObject * obj1 = 0 ;
61708  long result;
61709 
61710  if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap2_remove_ids",&obj0,&obj1)) SWIG_fail;
61711  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
61712  if (!SWIG_IsOK(res1)) {
61713  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_remove_ids" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
61714  }
61715  arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
61716  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
61717  if (!SWIG_IsOK(res2)) {
61718  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap2_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
61719  }
61720  if (!argp2) {
61721  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIDMap2_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
61722  }
61723  arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
61724  {
61725  Py_BEGIN_ALLOW_THREADS
61726  try {
61727  result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
61728  } catch(faiss::FaissException & e) {
61729  PyEval_RestoreThread(_save);
61730  PyErr_SetString(PyExc_RuntimeError, e.what());
61731  SWIG_fail;
61732  }
61733  Py_END_ALLOW_THREADS
61734  }
61735  resultobj = SWIG_From_long(static_cast< long >(result));
61736  return resultobj;
61737 fail:
61738  return NULL;
61739 }
61740 
61741 
61742 SWIGINTERN PyObject *_wrap_IndexIDMap2_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61743  PyObject *resultobj = 0;
61744  faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
61745  faiss::Index::idx_t arg2 ;
61746  float *arg3 = (float *) 0 ;
61747  void *argp1 = 0 ;
61748  int res1 = 0 ;
61749  long val2 ;
61750  int ecode2 = 0 ;
61751  void *argp3 = 0 ;
61752  int res3 = 0 ;
61753  PyObject * obj0 = 0 ;
61754  PyObject * obj1 = 0 ;
61755  PyObject * obj2 = 0 ;
61756 
61757  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIDMap2_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
61758  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
61759  if (!SWIG_IsOK(res1)) {
61760  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_reconstruct" "', argument " "1"" of type '" "faiss::IndexIDMap2 const *""'");
61761  }
61762  arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
61763  ecode2 = SWIG_AsVal_long(obj1, &val2);
61764  if (!SWIG_IsOK(ecode2)) {
61765  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap2_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61766  }
61767  arg2 = static_cast< faiss::Index::idx_t >(val2);
61768  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61769  if (!SWIG_IsOK(res3)) {
61770  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap2_reconstruct" "', argument " "3"" of type '" "float *""'");
61771  }
61772  arg3 = reinterpret_cast< float * >(argp3);
61773  {
61774  Py_BEGIN_ALLOW_THREADS
61775  try {
61776  ((faiss::IndexIDMap2 const *)arg1)->reconstruct(arg2,arg3);
61777  } catch(faiss::FaissException & e) {
61778  PyEval_RestoreThread(_save);
61779  PyErr_SetString(PyExc_RuntimeError, e.what());
61780  SWIG_fail;
61781  }
61782  Py_END_ALLOW_THREADS
61783  }
61784  resultobj = SWIG_Py_Void();
61785  return resultobj;
61786 fail:
61787  return NULL;
61788 }
61789 
61790 
61791 SWIGINTERN PyObject *_wrap_delete_IndexIDMap2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61792  PyObject *resultobj = 0;
61793  faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
61794  void *argp1 = 0 ;
61795  int res1 = 0 ;
61796  PyObject * obj0 = 0 ;
61797 
61798  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIDMap2",&obj0)) SWIG_fail;
61799  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, SWIG_POINTER_DISOWN | 0 );
61800  if (!SWIG_IsOK(res1)) {
61801  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIDMap2" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
61802  }
61803  arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
61804  {
61805  Py_BEGIN_ALLOW_THREADS
61806  try {
61807  delete arg1;
61808  } catch(faiss::FaissException & e) {
61809  PyEval_RestoreThread(_save);
61810  PyErr_SetString(PyExc_RuntimeError, e.what());
61811  SWIG_fail;
61812  }
61813  Py_END_ALLOW_THREADS
61814  }
61815  resultobj = SWIG_Py_Void();
61816  return resultobj;
61817 fail:
61818  return NULL;
61819 }
61820 
61821 
61822 SWIGINTERN PyObject *_wrap_new_IndexIDMap2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61823  PyObject *resultobj = 0;
61824  faiss::IndexIDMap2 *result = 0 ;
61825 
61826  if (!PyArg_ParseTuple(args,(char *)":new_IndexIDMap2")) SWIG_fail;
61827  {
61828  Py_BEGIN_ALLOW_THREADS
61829  try {
61830  result = (faiss::IndexIDMap2 *)new faiss::IndexIDMap2();
61831  } catch(faiss::FaissException & e) {
61832  PyEval_RestoreThread(_save);
61833  PyErr_SetString(PyExc_RuntimeError, e.what());
61834  SWIG_fail;
61835  }
61836  Py_END_ALLOW_THREADS
61837  }
61838  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap2, SWIG_POINTER_NEW | 0 );
61839  return resultobj;
61840 fail:
61841  return NULL;
61842 }
61843 
61844 
61845 SWIGINTERN PyObject *_wrap_new_IndexIDMap2(PyObject *self, PyObject *args) {
61846  Py_ssize_t argc;
61847  PyObject *argv[2] = {
61848  0
61849  };
61850  Py_ssize_t ii;
61851 
61852  if (!PyTuple_Check(args)) SWIG_fail;
61853  argc = args ? PyObject_Length(args) : 0;
61854  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
61855  argv[ii] = PyTuple_GET_ITEM(args,ii);
61856  }
61857  if (argc == 0) {
61858  return _wrap_new_IndexIDMap2__SWIG_1(self, args);
61859  }
61860  if (argc == 1) {
61861  int _v;
61862  void *vptr = 0;
61863  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
61864  _v = SWIG_CheckState(res);
61865  if (_v) {
61866  return _wrap_new_IndexIDMap2__SWIG_0(self, args);
61867  }
61868  }
61869 
61870 fail:
61871  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIDMap2'.\n"
61872  " Possible C/C++ prototypes are:\n"
61873  " faiss::IndexIDMap2::IndexIDMap2(faiss::Index *)\n"
61874  " faiss::IndexIDMap2::IndexIDMap2()\n");
61875  return 0;
61876 }
61877 
61878 
61879 SWIGINTERN PyObject *IndexIDMap2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61880  PyObject *obj;
61881  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
61882  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIDMap2, SWIG_NewClientData(obj));
61883  return SWIG_Py_Void();
61884 }
61885 
61886 SWIGINTERN PyObject *_wrap_IndexShards_shard_indexes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61887  PyObject *resultobj = 0;
61888  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61889  std::vector< faiss::Index * > *arg2 = (std::vector< faiss::Index * > *) 0 ;
61890  void *argp1 = 0 ;
61891  int res1 = 0 ;
61892  void *argp2 = 0 ;
61893  int res2 = 0 ;
61894  PyObject * obj0 = 0 ;
61895  PyObject * obj1 = 0 ;
61896 
61897  if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_shard_indexes_set",&obj0,&obj1)) SWIG_fail;
61898  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61899  if (!SWIG_IsOK(res1)) {
61900  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_shard_indexes_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61901  }
61902  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61903  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
61904  if (!SWIG_IsOK(res2)) {
61905  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexShards_shard_indexes_set" "', argument " "2"" of type '" "std::vector< faiss::Index * > *""'");
61906  }
61907  arg2 = reinterpret_cast< std::vector< faiss::Index * > * >(argp2);
61908  if (arg1) (arg1)->shard_indexes = *arg2;
61909  resultobj = SWIG_Py_Void();
61910  return resultobj;
61911 fail:
61912  return NULL;
61913 }
61914 
61915 
61916 SWIGINTERN PyObject *_wrap_IndexShards_shard_indexes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61917  PyObject *resultobj = 0;
61918  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61919  void *argp1 = 0 ;
61920  int res1 = 0 ;
61921  PyObject * obj0 = 0 ;
61922  std::vector< faiss::Index * > *result = 0 ;
61923 
61924  if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_shard_indexes_get",&obj0)) SWIG_fail;
61925  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61926  if (!SWIG_IsOK(res1)) {
61927  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_shard_indexes_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61928  }
61929  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61930  result = (std::vector< faiss::Index * > *)& ((arg1)->shard_indexes);
61931  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
61932  return resultobj;
61933 fail:
61934  return NULL;
61935 }
61936 
61937 
61938 SWIGINTERN PyObject *_wrap_IndexShards_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61939  PyObject *resultobj = 0;
61940  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61941  bool arg2 ;
61942  void *argp1 = 0 ;
61943  int res1 = 0 ;
61944  bool val2 ;
61945  int ecode2 = 0 ;
61946  PyObject * obj0 = 0 ;
61947  PyObject * obj1 = 0 ;
61948 
61949  if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_own_fields_set",&obj0,&obj1)) SWIG_fail;
61950  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61951  if (!SWIG_IsOK(res1)) {
61952  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_own_fields_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61953  }
61954  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61955  ecode2 = SWIG_AsVal_bool(obj1, &val2);
61956  if (!SWIG_IsOK(ecode2)) {
61957  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_own_fields_set" "', argument " "2"" of type '" "bool""'");
61958  }
61959  arg2 = static_cast< bool >(val2);
61960  if (arg1) (arg1)->own_fields = arg2;
61961  resultobj = SWIG_Py_Void();
61962  return resultobj;
61963 fail:
61964  return NULL;
61965 }
61966 
61967 
61968 SWIGINTERN PyObject *_wrap_IndexShards_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61969  PyObject *resultobj = 0;
61970  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61971  void *argp1 = 0 ;
61972  int res1 = 0 ;
61973  PyObject * obj0 = 0 ;
61974  bool result;
61975 
61976  if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_own_fields_get",&obj0)) SWIG_fail;
61977  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61978  if (!SWIG_IsOK(res1)) {
61979  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_own_fields_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61980  }
61981  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61982  result = (bool) ((arg1)->own_fields);
61983  resultobj = SWIG_From_bool(static_cast< bool >(result));
61984  return resultobj;
61985 fail:
61986  return NULL;
61987 }
61988 
61989 
61990 SWIGINTERN PyObject *_wrap_IndexShards_threaded_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61991  PyObject *resultobj = 0;
61992  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61993  bool arg2 ;
61994  void *argp1 = 0 ;
61995  int res1 = 0 ;
61996  bool val2 ;
61997  int ecode2 = 0 ;
61998  PyObject * obj0 = 0 ;
61999  PyObject * obj1 = 0 ;
62000 
62001  if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_threaded_set",&obj0,&obj1)) SWIG_fail;
62002  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62003  if (!SWIG_IsOK(res1)) {
62004  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_threaded_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62005  }
62006  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62007  ecode2 = SWIG_AsVal_bool(obj1, &val2);
62008  if (!SWIG_IsOK(ecode2)) {
62009  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_threaded_set" "', argument " "2"" of type '" "bool""'");
62010  }
62011  arg2 = static_cast< bool >(val2);
62012  if (arg1) (arg1)->threaded = arg2;
62013  resultobj = SWIG_Py_Void();
62014  return resultobj;
62015 fail:
62016  return NULL;
62017 }
62018 
62019 
62020 SWIGINTERN PyObject *_wrap_IndexShards_threaded_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62021  PyObject *resultobj = 0;
62022  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62023  void *argp1 = 0 ;
62024  int res1 = 0 ;
62025  PyObject * obj0 = 0 ;
62026  bool result;
62027 
62028  if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_threaded_get",&obj0)) SWIG_fail;
62029  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62030  if (!SWIG_IsOK(res1)) {
62031  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_threaded_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62032  }
62033  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62034  result = (bool) ((arg1)->threaded);
62035  resultobj = SWIG_From_bool(static_cast< bool >(result));
62036  return resultobj;
62037 fail:
62038  return NULL;
62039 }
62040 
62041 
62042 SWIGINTERN PyObject *_wrap_IndexShards_successive_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62043  PyObject *resultobj = 0;
62044  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62045  bool arg2 ;
62046  void *argp1 = 0 ;
62047  int res1 = 0 ;
62048  bool val2 ;
62049  int ecode2 = 0 ;
62050  PyObject * obj0 = 0 ;
62051  PyObject * obj1 = 0 ;
62052 
62053  if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_successive_ids_set",&obj0,&obj1)) SWIG_fail;
62054  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62055  if (!SWIG_IsOK(res1)) {
62056  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_successive_ids_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62057  }
62058  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62059  ecode2 = SWIG_AsVal_bool(obj1, &val2);
62060  if (!SWIG_IsOK(ecode2)) {
62061  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_successive_ids_set" "', argument " "2"" of type '" "bool""'");
62062  }
62063  arg2 = static_cast< bool >(val2);
62064  if (arg1) (arg1)->successive_ids = arg2;
62065  resultobj = SWIG_Py_Void();
62066  return resultobj;
62067 fail:
62068  return NULL;
62069 }
62070 
62071 
62072 SWIGINTERN PyObject *_wrap_IndexShards_successive_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62073  PyObject *resultobj = 0;
62074  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62075  void *argp1 = 0 ;
62076  int res1 = 0 ;
62077  PyObject * obj0 = 0 ;
62078  bool result;
62079 
62080  if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_successive_ids_get",&obj0)) SWIG_fail;
62081  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62082  if (!SWIG_IsOK(res1)) {
62083  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_successive_ids_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62084  }
62085  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62086  result = (bool) ((arg1)->successive_ids);
62087  resultobj = SWIG_From_bool(static_cast< bool >(result));
62088  return resultobj;
62089 fail:
62090  return NULL;
62091 }
62092 
62093 
62094 SWIGINTERN PyObject *_wrap_new_IndexShards__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62095  PyObject *resultobj = 0;
62096  faiss::Index::idx_t arg1 ;
62097  bool arg2 ;
62098  bool arg3 ;
62099  long val1 ;
62100  int ecode1 = 0 ;
62101  bool val2 ;
62102  int ecode2 = 0 ;
62103  bool val3 ;
62104  int ecode3 = 0 ;
62105  PyObject * obj0 = 0 ;
62106  PyObject * obj1 = 0 ;
62107  PyObject * obj2 = 0 ;
62108  faiss::IndexShards *result = 0 ;
62109 
62110  if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexShards",&obj0,&obj1,&obj2)) SWIG_fail;
62111  ecode1 = SWIG_AsVal_long(obj0, &val1);
62112  if (!SWIG_IsOK(ecode1)) {
62113  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexShards" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
62114  }
62115  arg1 = static_cast< faiss::Index::idx_t >(val1);
62116  ecode2 = SWIG_AsVal_bool(obj1, &val2);
62117  if (!SWIG_IsOK(ecode2)) {
62118  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexShards" "', argument " "2"" of type '" "bool""'");
62119  }
62120  arg2 = static_cast< bool >(val2);
62121  ecode3 = SWIG_AsVal_bool(obj2, &val3);
62122  if (!SWIG_IsOK(ecode3)) {
62123  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexShards" "', argument " "3"" of type '" "bool""'");
62124  }
62125  arg3 = static_cast< bool >(val3);
62126  {
62127  Py_BEGIN_ALLOW_THREADS
62128  try {
62129  result = (faiss::IndexShards *)new faiss::IndexShards(arg1,arg2,arg3);
62130  } catch(faiss::FaissException & e) {
62131  PyEval_RestoreThread(_save);
62132  PyErr_SetString(PyExc_RuntimeError, e.what());
62133  SWIG_fail;
62134  }
62135  Py_END_ALLOW_THREADS
62136  }
62137  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_NEW | 0 );
62138  return resultobj;
62139 fail:
62140  return NULL;
62141 }
62142 
62143 
62144 SWIGINTERN PyObject *_wrap_new_IndexShards__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62145  PyObject *resultobj = 0;
62146  faiss::Index::idx_t arg1 ;
62147  bool arg2 ;
62148  long val1 ;
62149  int ecode1 = 0 ;
62150  bool val2 ;
62151  int ecode2 = 0 ;
62152  PyObject * obj0 = 0 ;
62153  PyObject * obj1 = 0 ;
62154  faiss::IndexShards *result = 0 ;
62155 
62156  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexShards",&obj0,&obj1)) SWIG_fail;
62157  ecode1 = SWIG_AsVal_long(obj0, &val1);
62158  if (!SWIG_IsOK(ecode1)) {
62159  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexShards" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
62160  }
62161  arg1 = static_cast< faiss::Index::idx_t >(val1);
62162  ecode2 = SWIG_AsVal_bool(obj1, &val2);
62163  if (!SWIG_IsOK(ecode2)) {
62164  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexShards" "', argument " "2"" of type '" "bool""'");
62165  }
62166  arg2 = static_cast< bool >(val2);
62167  {
62168  Py_BEGIN_ALLOW_THREADS
62169  try {
62170  result = (faiss::IndexShards *)new faiss::IndexShards(arg1,arg2);
62171  } catch(faiss::FaissException & e) {
62172  PyEval_RestoreThread(_save);
62173  PyErr_SetString(PyExc_RuntimeError, e.what());
62174  SWIG_fail;
62175  }
62176  Py_END_ALLOW_THREADS
62177  }
62178  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_NEW | 0 );
62179  return resultobj;
62180 fail:
62181  return NULL;
62182 }
62183 
62184 
62185 SWIGINTERN PyObject *_wrap_new_IndexShards__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62186  PyObject *resultobj = 0;
62187  faiss::Index::idx_t arg1 ;
62188  long val1 ;
62189  int ecode1 = 0 ;
62190  PyObject * obj0 = 0 ;
62191  faiss::IndexShards *result = 0 ;
62192 
62193  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexShards",&obj0)) SWIG_fail;
62194  ecode1 = SWIG_AsVal_long(obj0, &val1);
62195  if (!SWIG_IsOK(ecode1)) {
62196  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexShards" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
62197  }
62198  arg1 = static_cast< faiss::Index::idx_t >(val1);
62199  {
62200  Py_BEGIN_ALLOW_THREADS
62201  try {
62202  result = (faiss::IndexShards *)new faiss::IndexShards(arg1);
62203  } catch(faiss::FaissException & e) {
62204  PyEval_RestoreThread(_save);
62205  PyErr_SetString(PyExc_RuntimeError, e.what());
62206  SWIG_fail;
62207  }
62208  Py_END_ALLOW_THREADS
62209  }
62210  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_NEW | 0 );
62211  return resultobj;
62212 fail:
62213  return NULL;
62214 }
62215 
62216 
62217 SWIGINTERN PyObject *_wrap_new_IndexShards(PyObject *self, PyObject *args) {
62218  Py_ssize_t argc;
62219  PyObject *argv[4] = {
62220  0
62221  };
62222  Py_ssize_t ii;
62223 
62224  if (!PyTuple_Check(args)) SWIG_fail;
62225  argc = args ? PyObject_Length(args) : 0;
62226  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
62227  argv[ii] = PyTuple_GET_ITEM(args,ii);
62228  }
62229  if (argc == 1) {
62230  int _v;
62231  {
62232  int res = SWIG_AsVal_long(argv[0], NULL);
62233  _v = SWIG_CheckState(res);
62234  }
62235  if (_v) {
62236  return _wrap_new_IndexShards__SWIG_2(self, args);
62237  }
62238  }
62239  if (argc == 2) {
62240  int _v;
62241  {
62242  int res = SWIG_AsVal_long(argv[0], NULL);
62243  _v = SWIG_CheckState(res);
62244  }
62245  if (_v) {
62246  {
62247  int res = SWIG_AsVal_bool(argv[1], NULL);
62248  _v = SWIG_CheckState(res);
62249  }
62250  if (_v) {
62251  return _wrap_new_IndexShards__SWIG_1(self, args);
62252  }
62253  }
62254  }
62255  if (argc == 3) {
62256  int _v;
62257  {
62258  int res = SWIG_AsVal_long(argv[0], NULL);
62259  _v = SWIG_CheckState(res);
62260  }
62261  if (_v) {
62262  {
62263  int res = SWIG_AsVal_bool(argv[1], NULL);
62264  _v = SWIG_CheckState(res);
62265  }
62266  if (_v) {
62267  {
62268  int res = SWIG_AsVal_bool(argv[2], NULL);
62269  _v = SWIG_CheckState(res);
62270  }
62271  if (_v) {
62272  return _wrap_new_IndexShards__SWIG_0(self, args);
62273  }
62274  }
62275  }
62276  }
62277 
62278 fail:
62279  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexShards'.\n"
62280  " Possible C/C++ prototypes are:\n"
62281  " faiss::IndexShards::IndexShards(faiss::Index::idx_t,bool,bool)\n"
62282  " faiss::IndexShards::IndexShards(faiss::Index::idx_t,bool)\n"
62283  " faiss::IndexShards::IndexShards(faiss::Index::idx_t)\n");
62284  return 0;
62285 }
62286 
62287 
62288 SWIGINTERN PyObject *_wrap_IndexShards_add_shard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62289  PyObject *resultobj = 0;
62290  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62291  faiss::Index *arg2 = (faiss::Index *) 0 ;
62292  void *argp1 = 0 ;
62293  int res1 = 0 ;
62294  void *argp2 = 0 ;
62295  int res2 = 0 ;
62296  PyObject * obj0 = 0 ;
62297  PyObject * obj1 = 0 ;
62298 
62299  if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_add_shard",&obj0,&obj1)) SWIG_fail;
62300  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62301  if (!SWIG_IsOK(res1)) {
62302  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_add_shard" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62303  }
62304  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62305  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
62306  if (!SWIG_IsOK(res2)) {
62307  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexShards_add_shard" "', argument " "2"" of type '" "faiss::Index *""'");
62308  }
62309  arg2 = reinterpret_cast< faiss::Index * >(argp2);
62310  {
62311  Py_BEGIN_ALLOW_THREADS
62312  try {
62313  (arg1)->add_shard(arg2);
62314  } catch(faiss::FaissException & e) {
62315  PyEval_RestoreThread(_save);
62316  PyErr_SetString(PyExc_RuntimeError, e.what());
62317  SWIG_fail;
62318  }
62319  Py_END_ALLOW_THREADS
62320  }
62321  resultobj = SWIG_Py_Void();
62322  return resultobj;
62323 fail:
62324  return NULL;
62325 }
62326 
62327 
62328 SWIGINTERN PyObject *_wrap_IndexShards_sync_with_shard_indexes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62329  PyObject *resultobj = 0;
62330  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62331  void *argp1 = 0 ;
62332  int res1 = 0 ;
62333  PyObject * obj0 = 0 ;
62334 
62335  if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_sync_with_shard_indexes",&obj0)) SWIG_fail;
62336  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62337  if (!SWIG_IsOK(res1)) {
62338  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_sync_with_shard_indexes" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62339  }
62340  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62341  {
62342  Py_BEGIN_ALLOW_THREADS
62343  try {
62344  (arg1)->sync_with_shard_indexes();
62345  } catch(faiss::FaissException & e) {
62346  PyEval_RestoreThread(_save);
62347  PyErr_SetString(PyExc_RuntimeError, e.what());
62348  SWIG_fail;
62349  }
62350  Py_END_ALLOW_THREADS
62351  }
62352  resultobj = SWIG_Py_Void();
62353  return resultobj;
62354 fail:
62355  return NULL;
62356 }
62357 
62358 
62359 SWIGINTERN PyObject *_wrap_IndexShards_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62360  PyObject *resultobj = 0;
62361  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62362  int arg2 ;
62363  void *argp1 = 0 ;
62364  int res1 = 0 ;
62365  int val2 ;
62366  int ecode2 = 0 ;
62367  PyObject * obj0 = 0 ;
62368  PyObject * obj1 = 0 ;
62369  faiss::Index *result = 0 ;
62370 
62371  if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_at",&obj0,&obj1)) SWIG_fail;
62372  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62373  if (!SWIG_IsOK(res1)) {
62374  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_at" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62375  }
62376  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62377  ecode2 = SWIG_AsVal_int(obj1, &val2);
62378  if (!SWIG_IsOK(ecode2)) {
62379  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_at" "', argument " "2"" of type '" "int""'");
62380  }
62381  arg2 = static_cast< int >(val2);
62382  {
62383  Py_BEGIN_ALLOW_THREADS
62384  try {
62385  result = (faiss::Index *)(arg1)->at(arg2);
62386  } catch(faiss::FaissException & e) {
62387  PyEval_RestoreThread(_save);
62388  PyErr_SetString(PyExc_RuntimeError, e.what());
62389  SWIG_fail;
62390  }
62391  Py_END_ALLOW_THREADS
62392  }
62393  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
62394  return resultobj;
62395 fail:
62396  return NULL;
62397 }
62398 
62399 
62400 SWIGINTERN PyObject *_wrap_IndexShards_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62401  PyObject *resultobj = 0;
62402  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62403  faiss::Index::idx_t arg2 ;
62404  float *arg3 = (float *) 0 ;
62405  void *argp1 = 0 ;
62406  int res1 = 0 ;
62407  long val2 ;
62408  int ecode2 = 0 ;
62409  void *argp3 = 0 ;
62410  int res3 = 0 ;
62411  PyObject * obj0 = 0 ;
62412  PyObject * obj1 = 0 ;
62413  PyObject * obj2 = 0 ;
62414 
62415  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexShards_add",&obj0,&obj1,&obj2)) SWIG_fail;
62416  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62417  if (!SWIG_IsOK(res1)) {
62418  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_add" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62419  }
62420  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62421  ecode2 = SWIG_AsVal_long(obj1, &val2);
62422  if (!SWIG_IsOK(ecode2)) {
62423  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
62424  }
62425  arg2 = static_cast< faiss::Index::idx_t >(val2);
62426  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
62427  if (!SWIG_IsOK(res3)) {
62428  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_add" "', argument " "3"" of type '" "float const *""'");
62429  }
62430  arg3 = reinterpret_cast< float * >(argp3);
62431  {
62432  Py_BEGIN_ALLOW_THREADS
62433  try {
62434  (arg1)->add(arg2,(float const *)arg3);
62435  } catch(faiss::FaissException & e) {
62436  PyEval_RestoreThread(_save);
62437  PyErr_SetString(PyExc_RuntimeError, e.what());
62438  SWIG_fail;
62439  }
62440  Py_END_ALLOW_THREADS
62441  }
62442  resultobj = SWIG_Py_Void();
62443  return resultobj;
62444 fail:
62445  return NULL;
62446 }
62447 
62448 
62449 SWIGINTERN PyObject *_wrap_IndexShards_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62450  PyObject *resultobj = 0;
62451  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62452  faiss::Index::idx_t arg2 ;
62453  float *arg3 = (float *) 0 ;
62454  long *arg4 = (long *) 0 ;
62455  void *argp1 = 0 ;
62456  int res1 = 0 ;
62457  long val2 ;
62458  int ecode2 = 0 ;
62459  void *argp3 = 0 ;
62460  int res3 = 0 ;
62461  void *argp4 = 0 ;
62462  int res4 = 0 ;
62463  PyObject * obj0 = 0 ;
62464  PyObject * obj1 = 0 ;
62465  PyObject * obj2 = 0 ;
62466  PyObject * obj3 = 0 ;
62467 
62468  if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexShards_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
62469  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62470  if (!SWIG_IsOK(res1)) {
62471  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_add_with_ids" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62472  }
62473  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62474  ecode2 = SWIG_AsVal_long(obj1, &val2);
62475  if (!SWIG_IsOK(ecode2)) {
62476  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
62477  }
62478  arg2 = static_cast< faiss::Index::idx_t >(val2);
62479  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
62480  if (!SWIG_IsOK(res3)) {
62481  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_add_with_ids" "', argument " "3"" of type '" "float const *""'");
62482  }
62483  arg3 = reinterpret_cast< float * >(argp3);
62484  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
62485  if (!SWIG_IsOK(res4)) {
62486  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexShards_add_with_ids" "', argument " "4"" of type '" "long const *""'");
62487  }
62488  arg4 = reinterpret_cast< long * >(argp4);
62489  {
62490  Py_BEGIN_ALLOW_THREADS
62491  try {
62492  (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
62493  } catch(faiss::FaissException & e) {
62494  PyEval_RestoreThread(_save);
62495  PyErr_SetString(PyExc_RuntimeError, e.what());
62496  SWIG_fail;
62497  }
62498  Py_END_ALLOW_THREADS
62499  }
62500  resultobj = SWIG_Py_Void();
62501  return resultobj;
62502 fail:
62503  return NULL;
62504 }
62505 
62506 
62507 SWIGINTERN PyObject *_wrap_IndexShards_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62508  PyObject *resultobj = 0;
62509  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62510  faiss::Index::idx_t arg2 ;
62511  float *arg3 = (float *) 0 ;
62512  faiss::Index::idx_t arg4 ;
62513  float *arg5 = (float *) 0 ;
62515  void *argp1 = 0 ;
62516  int res1 = 0 ;
62517  long val2 ;
62518  int ecode2 = 0 ;
62519  void *argp3 = 0 ;
62520  int res3 = 0 ;
62521  long val4 ;
62522  int ecode4 = 0 ;
62523  void *argp5 = 0 ;
62524  int res5 = 0 ;
62525  void *argp6 = 0 ;
62526  int res6 = 0 ;
62527  PyObject * obj0 = 0 ;
62528  PyObject * obj1 = 0 ;
62529  PyObject * obj2 = 0 ;
62530  PyObject * obj3 = 0 ;
62531  PyObject * obj4 = 0 ;
62532  PyObject * obj5 = 0 ;
62533 
62534  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexShards_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
62535  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62536  if (!SWIG_IsOK(res1)) {
62537  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_search" "', argument " "1"" of type '" "faiss::IndexShards const *""'");
62538  }
62539  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62540  ecode2 = SWIG_AsVal_long(obj1, &val2);
62541  if (!SWIG_IsOK(ecode2)) {
62542  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
62543  }
62544  arg2 = static_cast< faiss::Index::idx_t >(val2);
62545  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
62546  if (!SWIG_IsOK(res3)) {
62547  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_search" "', argument " "3"" of type '" "float const *""'");
62548  }
62549  arg3 = reinterpret_cast< float * >(argp3);
62550  ecode4 = SWIG_AsVal_long(obj3, &val4);
62551  if (!SWIG_IsOK(ecode4)) {
62552  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexShards_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
62553  }
62554  arg4 = static_cast< faiss::Index::idx_t >(val4);
62555  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
62556  if (!SWIG_IsOK(res5)) {
62557  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexShards_search" "', argument " "5"" of type '" "float *""'");
62558  }
62559  arg5 = reinterpret_cast< float * >(argp5);
62560  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
62561  if (!SWIG_IsOK(res6)) {
62562  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexShards_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
62563  }
62564  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
62565  {
62566  Py_BEGIN_ALLOW_THREADS
62567  try {
62568  ((faiss::IndexShards const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
62569  } catch(faiss::FaissException & e) {
62570  PyEval_RestoreThread(_save);
62571  PyErr_SetString(PyExc_RuntimeError, e.what());
62572  SWIG_fail;
62573  }
62574  Py_END_ALLOW_THREADS
62575  }
62576  resultobj = SWIG_Py_Void();
62577  return resultobj;
62578 fail:
62579  return NULL;
62580 }
62581 
62582 
62583 SWIGINTERN PyObject *_wrap_IndexShards_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62584  PyObject *resultobj = 0;
62585  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62586  faiss::Index::idx_t arg2 ;
62587  float *arg3 = (float *) 0 ;
62588  void *argp1 = 0 ;
62589  int res1 = 0 ;
62590  long val2 ;
62591  int ecode2 = 0 ;
62592  void *argp3 = 0 ;
62593  int res3 = 0 ;
62594  PyObject * obj0 = 0 ;
62595  PyObject * obj1 = 0 ;
62596  PyObject * obj2 = 0 ;
62597 
62598  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexShards_train",&obj0,&obj1,&obj2)) SWIG_fail;
62599  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62600  if (!SWIG_IsOK(res1)) {
62601  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_train" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62602  }
62603  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62604  ecode2 = SWIG_AsVal_long(obj1, &val2);
62605  if (!SWIG_IsOK(ecode2)) {
62606  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
62607  }
62608  arg2 = static_cast< faiss::Index::idx_t >(val2);
62609  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
62610  if (!SWIG_IsOK(res3)) {
62611  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_train" "', argument " "3"" of type '" "float const *""'");
62612  }
62613  arg3 = reinterpret_cast< float * >(argp3);
62614  {
62615  Py_BEGIN_ALLOW_THREADS
62616  try {
62617  (arg1)->train(arg2,(float const *)arg3);
62618  } catch(faiss::FaissException & e) {
62619  PyEval_RestoreThread(_save);
62620  PyErr_SetString(PyExc_RuntimeError, e.what());
62621  SWIG_fail;
62622  }
62623  Py_END_ALLOW_THREADS
62624  }
62625  resultobj = SWIG_Py_Void();
62626  return resultobj;
62627 fail:
62628  return NULL;
62629 }
62630 
62631 
62632 SWIGINTERN PyObject *_wrap_IndexShards_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62633  PyObject *resultobj = 0;
62634  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62635  void *argp1 = 0 ;
62636  int res1 = 0 ;
62637  PyObject * obj0 = 0 ;
62638 
62639  if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_reset",&obj0)) SWIG_fail;
62640  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
62641  if (!SWIG_IsOK(res1)) {
62642  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_reset" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62643  }
62644  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62645  {
62646  Py_BEGIN_ALLOW_THREADS
62647  try {
62648  (arg1)->reset();
62649  } catch(faiss::FaissException & e) {
62650  PyEval_RestoreThread(_save);
62651  PyErr_SetString(PyExc_RuntimeError, e.what());
62652  SWIG_fail;
62653  }
62654  Py_END_ALLOW_THREADS
62655  }
62656  resultobj = SWIG_Py_Void();
62657  return resultobj;
62658 fail:
62659  return NULL;
62660 }
62661 
62662 
62663 SWIGINTERN PyObject *_wrap_delete_IndexShards(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62664  PyObject *resultobj = 0;
62665  faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
62666  void *argp1 = 0 ;
62667  int res1 = 0 ;
62668  PyObject * obj0 = 0 ;
62669 
62670  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexShards",&obj0)) SWIG_fail;
62671  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_DISOWN | 0 );
62672  if (!SWIG_IsOK(res1)) {
62673  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexShards" "', argument " "1"" of type '" "faiss::IndexShards *""'");
62674  }
62675  arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
62676  {
62677  Py_BEGIN_ALLOW_THREADS
62678  try {
62679  delete arg1;
62680  } catch(faiss::FaissException & e) {
62681  PyEval_RestoreThread(_save);
62682  PyErr_SetString(PyExc_RuntimeError, e.what());
62683  SWIG_fail;
62684  }
62685  Py_END_ALLOW_THREADS
62686  }
62687  resultobj = SWIG_Py_Void();
62688  return resultobj;
62689 fail:
62690  return NULL;
62691 }
62692 
62693 
62694 SWIGINTERN PyObject *IndexShards_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62695  PyObject *obj;
62696  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
62697  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexShards, SWIG_NewClientData(obj));
62698  return SWIG_Py_Void();
62699 }
62700 
62701 SWIGINTERN PyObject *_wrap_IndexSplitVectors_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62702  PyObject *resultobj = 0;
62704  bool arg2 ;
62705  void *argp1 = 0 ;
62706  int res1 = 0 ;
62707  bool val2 ;
62708  int ecode2 = 0 ;
62709  PyObject * obj0 = 0 ;
62710  PyObject * obj1 = 0 ;
62711 
62712  if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_own_fields_set",&obj0,&obj1)) SWIG_fail;
62713  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62714  if (!SWIG_IsOK(res1)) {
62715  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_own_fields_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62716  }
62717  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62718  ecode2 = SWIG_AsVal_bool(obj1, &val2);
62719  if (!SWIG_IsOK(ecode2)) {
62720  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_own_fields_set" "', argument " "2"" of type '" "bool""'");
62721  }
62722  arg2 = static_cast< bool >(val2);
62723  if (arg1) (arg1)->own_fields = arg2;
62724  resultobj = SWIG_Py_Void();
62725  return resultobj;
62726 fail:
62727  return NULL;
62728 }
62729 
62730 
62731 SWIGINTERN PyObject *_wrap_IndexSplitVectors_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62732  PyObject *resultobj = 0;
62734  void *argp1 = 0 ;
62735  int res1 = 0 ;
62736  PyObject * obj0 = 0 ;
62737  bool result;
62738 
62739  if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_own_fields_get",&obj0)) SWIG_fail;
62740  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62741  if (!SWIG_IsOK(res1)) {
62742  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_own_fields_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62743  }
62744  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62745  result = (bool) ((arg1)->own_fields);
62746  resultobj = SWIG_From_bool(static_cast< bool >(result));
62747  return resultobj;
62748 fail:
62749  return NULL;
62750 }
62751 
62752 
62753 SWIGINTERN PyObject *_wrap_IndexSplitVectors_threaded_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62754  PyObject *resultobj = 0;
62756  bool arg2 ;
62757  void *argp1 = 0 ;
62758  int res1 = 0 ;
62759  bool val2 ;
62760  int ecode2 = 0 ;
62761  PyObject * obj0 = 0 ;
62762  PyObject * obj1 = 0 ;
62763 
62764  if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_threaded_set",&obj0,&obj1)) SWIG_fail;
62765  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62766  if (!SWIG_IsOK(res1)) {
62767  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_threaded_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62768  }
62769  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62770  ecode2 = SWIG_AsVal_bool(obj1, &val2);
62771  if (!SWIG_IsOK(ecode2)) {
62772  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_threaded_set" "', argument " "2"" of type '" "bool""'");
62773  }
62774  arg2 = static_cast< bool >(val2);
62775  if (arg1) (arg1)->threaded = arg2;
62776  resultobj = SWIG_Py_Void();
62777  return resultobj;
62778 fail:
62779  return NULL;
62780 }
62781 
62782 
62783 SWIGINTERN PyObject *_wrap_IndexSplitVectors_threaded_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62784  PyObject *resultobj = 0;
62786  void *argp1 = 0 ;
62787  int res1 = 0 ;
62788  PyObject * obj0 = 0 ;
62789  bool result;
62790 
62791  if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_threaded_get",&obj0)) SWIG_fail;
62792  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62793  if (!SWIG_IsOK(res1)) {
62794  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_threaded_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62795  }
62796  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62797  result = (bool) ((arg1)->threaded);
62798  resultobj = SWIG_From_bool(static_cast< bool >(result));
62799  return resultobj;
62800 fail:
62801  return NULL;
62802 }
62803 
62804 
62805 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sub_indexes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62806  PyObject *resultobj = 0;
62808  std::vector< faiss::Index * > *arg2 = (std::vector< faiss::Index * > *) 0 ;
62809  void *argp1 = 0 ;
62810  int res1 = 0 ;
62811  void *argp2 = 0 ;
62812  int res2 = 0 ;
62813  PyObject * obj0 = 0 ;
62814  PyObject * obj1 = 0 ;
62815 
62816  if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_sub_indexes_set",&obj0,&obj1)) SWIG_fail;
62817  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62818  if (!SWIG_IsOK(res1)) {
62819  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sub_indexes_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62820  }
62821  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62822  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
62823  if (!SWIG_IsOK(res2)) {
62824  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexSplitVectors_sub_indexes_set" "', argument " "2"" of type '" "std::vector< faiss::Index * > *""'");
62825  }
62826  arg2 = reinterpret_cast< std::vector< faiss::Index * > * >(argp2);
62827  if (arg1) (arg1)->sub_indexes = *arg2;
62828  resultobj = SWIG_Py_Void();
62829  return resultobj;
62830 fail:
62831  return NULL;
62832 }
62833 
62834 
62835 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sub_indexes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62836  PyObject *resultobj = 0;
62838  void *argp1 = 0 ;
62839  int res1 = 0 ;
62840  PyObject * obj0 = 0 ;
62841  std::vector< faiss::Index * > *result = 0 ;
62842 
62843  if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_sub_indexes_get",&obj0)) SWIG_fail;
62844  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62845  if (!SWIG_IsOK(res1)) {
62846  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sub_indexes_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62847  }
62848  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62849  result = (std::vector< faiss::Index * > *)& ((arg1)->sub_indexes);
62850  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
62851  return resultobj;
62852 fail:
62853  return NULL;
62854 }
62855 
62856 
62857 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sum_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62858  PyObject *resultobj = 0;
62860  faiss::Index::idx_t arg2 ;
62861  void *argp1 = 0 ;
62862  int res1 = 0 ;
62863  long val2 ;
62864  int ecode2 = 0 ;
62865  PyObject * obj0 = 0 ;
62866  PyObject * obj1 = 0 ;
62867 
62868  if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_sum_d_set",&obj0,&obj1)) SWIG_fail;
62869  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62870  if (!SWIG_IsOK(res1)) {
62871  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sum_d_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62872  }
62873  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62874  ecode2 = SWIG_AsVal_long(obj1, &val2);
62875  if (!SWIG_IsOK(ecode2)) {
62876  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_sum_d_set" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
62877  }
62878  arg2 = static_cast< faiss::Index::idx_t >(val2);
62879  if (arg1) (arg1)->sum_d = arg2;
62880  resultobj = SWIG_Py_Void();
62881  return resultobj;
62882 fail:
62883  return NULL;
62884 }
62885 
62886 
62887 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sum_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62888  PyObject *resultobj = 0;
62890  void *argp1 = 0 ;
62891  int res1 = 0 ;
62892  PyObject * obj0 = 0 ;
62893  faiss::Index::idx_t result;
62894 
62895  if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_sum_d_get",&obj0)) SWIG_fail;
62896  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
62897  if (!SWIG_IsOK(res1)) {
62898  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sum_d_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
62899  }
62900  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
62901  result = (faiss::Index::idx_t) ((arg1)->sum_d);
62902  resultobj = SWIG_From_long(static_cast< long >(result));
62903  return resultobj;
62904 fail:
62905  return NULL;
62906 }
62907 
62908 
62909 SWIGINTERN PyObject *_wrap_new_IndexSplitVectors__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62910  PyObject *resultobj = 0;
62911  faiss::Index::idx_t arg1 ;
62912  bool arg2 ;
62913  long val1 ;
62914  int ecode1 = 0 ;
62915  bool val2 ;
62916  int ecode2 = 0 ;
62917  PyObject * obj0 = 0 ;
62918  PyObject * obj1 = 0 ;
62919  faiss::IndexSplitVectors *result = 0 ;
62920 
62921  if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexSplitVectors",&obj0,&obj1)) SWIG_fail;
62922  ecode1 = SWIG_AsVal_long(obj0, &val1);
62923  if (!SWIG_IsOK(ecode1)) {
62924  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexSplitVectors" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
62925  }
62926  arg1 = static_cast< faiss::Index::idx_t >(val1);
62927  ecode2 = SWIG_AsVal_bool(obj1, &val2);
62928  if (!SWIG_IsOK(ecode2)) {
62929  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexSplitVectors" "', argument " "2"" of type '" "bool""'");
62930  }
62931  arg2 = static_cast< bool >(val2);
62932  {
62933  Py_BEGIN_ALLOW_THREADS
62934  try {
62935  result = (faiss::IndexSplitVectors *)new faiss::IndexSplitVectors(arg1,arg2);
62936  } catch(faiss::FaissException & e) {
62937  PyEval_RestoreThread(_save);
62938  PyErr_SetString(PyExc_RuntimeError, e.what());
62939  SWIG_fail;
62940  }
62941  Py_END_ALLOW_THREADS
62942  }
62943  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_POINTER_NEW | 0 );
62944  return resultobj;
62945 fail:
62946  return NULL;
62947 }
62948 
62949 
62950 SWIGINTERN PyObject *_wrap_new_IndexSplitVectors__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62951  PyObject *resultobj = 0;
62952  faiss::Index::idx_t arg1 ;
62953  long val1 ;
62954  int ecode1 = 0 ;
62955  PyObject * obj0 = 0 ;
62956  faiss::IndexSplitVectors *result = 0 ;
62957 
62958  if (!PyArg_ParseTuple(args,(char *)"O:new_IndexSplitVectors",&obj0)) SWIG_fail;
62959  ecode1 = SWIG_AsVal_long(obj0, &val1);
62960  if (!SWIG_IsOK(ecode1)) {
62961  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexSplitVectors" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
62962  }
62963  arg1 = static_cast< faiss::Index::idx_t >(val1);
62964  {
62965  Py_BEGIN_ALLOW_THREADS
62966  try {
62967  result = (faiss::IndexSplitVectors *)new faiss::IndexSplitVectors(arg1);
62968  } catch(faiss::FaissException & e) {
62969  PyEval_RestoreThread(_save);
62970  PyErr_SetString(PyExc_RuntimeError, e.what());
62971  SWIG_fail;
62972  }
62973  Py_END_ALLOW_THREADS
62974  }
62975  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_POINTER_NEW | 0 );
62976  return resultobj;
62977 fail:
62978  return NULL;
62979 }
62980 
62981 
62982 SWIGINTERN PyObject *_wrap_new_IndexSplitVectors(PyObject *self, PyObject *args) {
62983  Py_ssize_t argc;
62984  PyObject *argv[3] = {
62985  0
62986  };
62987  Py_ssize_t ii;
62988 
62989  if (!PyTuple_Check(args)) SWIG_fail;
62990  argc = args ? PyObject_Length(args) : 0;
62991  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
62992  argv[ii] = PyTuple_GET_ITEM(args,ii);
62993  }
62994  if (argc == 1) {
62995  int _v;
62996  {
62997  int res = SWIG_AsVal_long(argv[0], NULL);
62998  _v = SWIG_CheckState(res);
62999  }
63000  if (_v) {
63001  return _wrap_new_IndexSplitVectors__SWIG_1(self, args);
63002  }
63003  }
63004  if (argc == 2) {
63005  int _v;
63006  {
63007  int res = SWIG_AsVal_long(argv[0], NULL);
63008  _v = SWIG_CheckState(res);
63009  }
63010  if (_v) {
63011  {
63012  int res = SWIG_AsVal_bool(argv[1], NULL);
63013  _v = SWIG_CheckState(res);
63014  }
63015  if (_v) {
63016  return _wrap_new_IndexSplitVectors__SWIG_0(self, args);
63017  }
63018  }
63019  }
63020 
63021 fail:
63022  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexSplitVectors'.\n"
63023  " Possible C/C++ prototypes are:\n"
63024  " faiss::IndexSplitVectors::IndexSplitVectors(faiss::Index::idx_t,bool)\n"
63025  " faiss::IndexSplitVectors::IndexSplitVectors(faiss::Index::idx_t)\n");
63026  return 0;
63027 }
63028 
63029 
63030 SWIGINTERN PyObject *_wrap_IndexSplitVectors_add_sub_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63031  PyObject *resultobj = 0;
63033  faiss::Index *arg2 = (faiss::Index *) 0 ;
63034  void *argp1 = 0 ;
63035  int res1 = 0 ;
63036  void *argp2 = 0 ;
63037  int res2 = 0 ;
63038  PyObject * obj0 = 0 ;
63039  PyObject * obj1 = 0 ;
63040 
63041  if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_add_sub_index",&obj0,&obj1)) SWIG_fail;
63042  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
63043  if (!SWIG_IsOK(res1)) {
63044  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_add_sub_index" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
63045  }
63046  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
63047  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
63048  if (!SWIG_IsOK(res2)) {
63049  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexSplitVectors_add_sub_index" "', argument " "2"" of type '" "faiss::Index *""'");
63050  }
63051  arg2 = reinterpret_cast< faiss::Index * >(argp2);
63052  {
63053  Py_BEGIN_ALLOW_THREADS
63054  try {
63055  (arg1)->add_sub_index(arg2);
63056  } catch(faiss::FaissException & e) {
63057  PyEval_RestoreThread(_save);
63058  PyErr_SetString(PyExc_RuntimeError, e.what());
63059  SWIG_fail;
63060  }
63061  Py_END_ALLOW_THREADS
63062  }
63063  resultobj = SWIG_Py_Void();
63064  return resultobj;
63065 fail:
63066  return NULL;
63067 }
63068 
63069 
63070 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sync_with_sub_indexes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63071  PyObject *resultobj = 0;
63073  void *argp1 = 0 ;
63074  int res1 = 0 ;
63075  PyObject * obj0 = 0 ;
63076 
63077  if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_sync_with_sub_indexes",&obj0)) SWIG_fail;
63078  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
63079  if (!SWIG_IsOK(res1)) {
63080  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sync_with_sub_indexes" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
63081  }
63082  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
63083  {
63084  Py_BEGIN_ALLOW_THREADS
63085  try {
63086  (arg1)->sync_with_sub_indexes();
63087  } catch(faiss::FaissException & e) {
63088  PyEval_RestoreThread(_save);
63089  PyErr_SetString(PyExc_RuntimeError, e.what());
63090  SWIG_fail;
63091  }
63092  Py_END_ALLOW_THREADS
63093  }
63094  resultobj = SWIG_Py_Void();
63095  return resultobj;
63096 fail:
63097  return NULL;
63098 }
63099 
63100 
63101 SWIGINTERN PyObject *_wrap_IndexSplitVectors_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63102  PyObject *resultobj = 0;
63104  faiss::Index::idx_t arg2 ;
63105  float *arg3 = (float *) 0 ;
63106  void *argp1 = 0 ;
63107  int res1 = 0 ;
63108  long val2 ;
63109  int ecode2 = 0 ;
63110  void *argp3 = 0 ;
63111  int res3 = 0 ;
63112  PyObject * obj0 = 0 ;
63113  PyObject * obj1 = 0 ;
63114  PyObject * obj2 = 0 ;
63115 
63116  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexSplitVectors_add",&obj0,&obj1,&obj2)) SWIG_fail;
63117  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
63118  if (!SWIG_IsOK(res1)) {
63119  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_add" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
63120  }
63121  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
63122  ecode2 = SWIG_AsVal_long(obj1, &val2);
63123  if (!SWIG_IsOK(ecode2)) {
63124  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
63125  }
63126  arg2 = static_cast< faiss::Index::idx_t >(val2);
63127  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
63128  if (!SWIG_IsOK(res3)) {
63129  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexSplitVectors_add" "', argument " "3"" of type '" "float const *""'");
63130  }
63131  arg3 = reinterpret_cast< float * >(argp3);
63132  {
63133  Py_BEGIN_ALLOW_THREADS
63134  try {
63135  (arg1)->add(arg2,(float const *)arg3);
63136  } catch(faiss::FaissException & e) {
63137  PyEval_RestoreThread(_save);
63138  PyErr_SetString(PyExc_RuntimeError, e.what());
63139  SWIG_fail;
63140  }
63141  Py_END_ALLOW_THREADS
63142  }
63143  resultobj = SWIG_Py_Void();
63144  return resultobj;
63145 fail:
63146  return NULL;
63147 }
63148 
63149 
63150 SWIGINTERN PyObject *_wrap_IndexSplitVectors_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63151  PyObject *resultobj = 0;
63153  faiss::Index::idx_t arg2 ;
63154  float *arg3 = (float *) 0 ;
63155  faiss::Index::idx_t arg4 ;
63156  float *arg5 = (float *) 0 ;
63158  void *argp1 = 0 ;
63159  int res1 = 0 ;
63160  long val2 ;
63161  int ecode2 = 0 ;
63162  void *argp3 = 0 ;
63163  int res3 = 0 ;
63164  long val4 ;
63165  int ecode4 = 0 ;
63166  void *argp5 = 0 ;
63167  int res5 = 0 ;
63168  void *argp6 = 0 ;
63169  int res6 = 0 ;
63170  PyObject * obj0 = 0 ;
63171  PyObject * obj1 = 0 ;
63172  PyObject * obj2 = 0 ;
63173  PyObject * obj3 = 0 ;
63174  PyObject * obj4 = 0 ;
63175  PyObject * obj5 = 0 ;
63176 
63177  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexSplitVectors_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
63178  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
63179  if (!SWIG_IsOK(res1)) {
63180  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_search" "', argument " "1"" of type '" "faiss::IndexSplitVectors const *""'");
63181  }
63182  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
63183  ecode2 = SWIG_AsVal_long(obj1, &val2);
63184  if (!SWIG_IsOK(ecode2)) {
63185  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
63186  }
63187  arg2 = static_cast< faiss::Index::idx_t >(val2);
63188  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
63189  if (!SWIG_IsOK(res3)) {
63190  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexSplitVectors_search" "', argument " "3"" of type '" "float const *""'");
63191  }
63192  arg3 = reinterpret_cast< float * >(argp3);
63193  ecode4 = SWIG_AsVal_long(obj3, &val4);
63194  if (!SWIG_IsOK(ecode4)) {
63195  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexSplitVectors_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
63196  }
63197  arg4 = static_cast< faiss::Index::idx_t >(val4);
63198  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
63199  if (!SWIG_IsOK(res5)) {
63200  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexSplitVectors_search" "', argument " "5"" of type '" "float *""'");
63201  }
63202  arg5 = reinterpret_cast< float * >(argp5);
63203  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
63204  if (!SWIG_IsOK(res6)) {
63205  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexSplitVectors_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
63206  }
63207  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
63208  {
63209  Py_BEGIN_ALLOW_THREADS
63210  try {
63211  ((faiss::IndexSplitVectors const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
63212  } catch(faiss::FaissException & e) {
63213  PyEval_RestoreThread(_save);
63214  PyErr_SetString(PyExc_RuntimeError, e.what());
63215  SWIG_fail;
63216  }
63217  Py_END_ALLOW_THREADS
63218  }
63219  resultobj = SWIG_Py_Void();
63220  return resultobj;
63221 fail:
63222  return NULL;
63223 }
63224 
63225 
63226 SWIGINTERN PyObject *_wrap_IndexSplitVectors_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63227  PyObject *resultobj = 0;
63229  faiss::Index::idx_t arg2 ;
63230  float *arg3 = (float *) 0 ;
63231  void *argp1 = 0 ;
63232  int res1 = 0 ;
63233  long val2 ;
63234  int ecode2 = 0 ;
63235  void *argp3 = 0 ;
63236  int res3 = 0 ;
63237  PyObject * obj0 = 0 ;
63238  PyObject * obj1 = 0 ;
63239  PyObject * obj2 = 0 ;
63240 
63241  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexSplitVectors_train",&obj0,&obj1,&obj2)) SWIG_fail;
63242  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
63243  if (!SWIG_IsOK(res1)) {
63244  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_train" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
63245  }
63246  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
63247  ecode2 = SWIG_AsVal_long(obj1, &val2);
63248  if (!SWIG_IsOK(ecode2)) {
63249  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
63250  }
63251  arg2 = static_cast< faiss::Index::idx_t >(val2);
63252  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
63253  if (!SWIG_IsOK(res3)) {
63254  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexSplitVectors_train" "', argument " "3"" of type '" "float const *""'");
63255  }
63256  arg3 = reinterpret_cast< float * >(argp3);
63257  {
63258  Py_BEGIN_ALLOW_THREADS
63259  try {
63260  (arg1)->train(arg2,(float const *)arg3);
63261  } catch(faiss::FaissException & e) {
63262  PyEval_RestoreThread(_save);
63263  PyErr_SetString(PyExc_RuntimeError, e.what());
63264  SWIG_fail;
63265  }
63266  Py_END_ALLOW_THREADS
63267  }
63268  resultobj = SWIG_Py_Void();
63269  return resultobj;
63270 fail:
63271  return NULL;
63272 }
63273 
63274 
63275 SWIGINTERN PyObject *_wrap_IndexSplitVectors_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63276  PyObject *resultobj = 0;
63278  void *argp1 = 0 ;
63279  int res1 = 0 ;
63280  PyObject * obj0 = 0 ;
63281 
63282  if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_reset",&obj0)) SWIG_fail;
63283  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
63284  if (!SWIG_IsOK(res1)) {
63285  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_reset" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
63286  }
63287  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
63288  {
63289  Py_BEGIN_ALLOW_THREADS
63290  try {
63291  (arg1)->reset();
63292  } catch(faiss::FaissException & e) {
63293  PyEval_RestoreThread(_save);
63294  PyErr_SetString(PyExc_RuntimeError, e.what());
63295  SWIG_fail;
63296  }
63297  Py_END_ALLOW_THREADS
63298  }
63299  resultobj = SWIG_Py_Void();
63300  return resultobj;
63301 fail:
63302  return NULL;
63303 }
63304 
63305 
63306 SWIGINTERN PyObject *_wrap_delete_IndexSplitVectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63307  PyObject *resultobj = 0;
63309  void *argp1 = 0 ;
63310  int res1 = 0 ;
63311  PyObject * obj0 = 0 ;
63312 
63313  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexSplitVectors",&obj0)) SWIG_fail;
63314  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_POINTER_DISOWN | 0 );
63315  if (!SWIG_IsOK(res1)) {
63316  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexSplitVectors" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
63317  }
63318  arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
63319  {
63320  Py_BEGIN_ALLOW_THREADS
63321  try {
63322  delete arg1;
63323  } catch(faiss::FaissException & e) {
63324  PyEval_RestoreThread(_save);
63325  PyErr_SetString(PyExc_RuntimeError, e.what());
63326  SWIG_fail;
63327  }
63328  Py_END_ALLOW_THREADS
63329  }
63330  resultobj = SWIG_Py_Void();
63331  return resultobj;
63332 fail:
63333  return NULL;
63334 }
63335 
63336 
63337 SWIGINTERN PyObject *IndexSplitVectors_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63338  PyObject *obj;
63339  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
63340  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_NewClientData(obj));
63341  return SWIG_Py_Void();
63342 }
63343 
63344 SWIGINTERN PyObject *_wrap_new_GpuClonerOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63345  PyObject *resultobj = 0;
63346  faiss::gpu::GpuClonerOptions *result = 0 ;
63347 
63348  if (!PyArg_ParseTuple(args,(char *)":new_GpuClonerOptions")) SWIG_fail;
63349  {
63350  Py_BEGIN_ALLOW_THREADS
63351  try {
63353  } catch(faiss::FaissException & e) {
63354  PyEval_RestoreThread(_save);
63355  PyErr_SetString(PyExc_RuntimeError, e.what());
63356  SWIG_fail;
63357  }
63358  Py_END_ALLOW_THREADS
63359  }
63360  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuClonerOptions, SWIG_POINTER_NEW | 0 );
63361  return resultobj;
63362 fail:
63363  return NULL;
63364 }
63365 
63366 
63367 SWIGINTERN PyObject *_wrap_GpuClonerOptions_indicesOptions_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63368  PyObject *resultobj = 0;
63370  faiss::gpu::IndicesOptions arg2 ;
63371  void *argp1 = 0 ;
63372  int res1 = 0 ;
63373  int val2 ;
63374  int ecode2 = 0 ;
63375  PyObject * obj0 = 0 ;
63376  PyObject * obj1 = 0 ;
63377 
63378  if (!PyArg_ParseTuple(args,(char *)"OO:GpuClonerOptions_indicesOptions_set",&obj0,&obj1)) SWIG_fail;
63379  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63380  if (!SWIG_IsOK(res1)) {
63381  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_indicesOptions_set" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63382  }
63383  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63384  ecode2 = SWIG_AsVal_int(obj1, &val2);
63385  if (!SWIG_IsOK(ecode2)) {
63386  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuClonerOptions_indicesOptions_set" "', argument " "2"" of type '" "faiss::gpu::IndicesOptions""'");
63387  }
63388  arg2 = static_cast< faiss::gpu::IndicesOptions >(val2);
63389  if (arg1) (arg1)->indicesOptions = arg2;
63390  resultobj = SWIG_Py_Void();
63391  return resultobj;
63392 fail:
63393  return NULL;
63394 }
63395 
63396 
63397 SWIGINTERN PyObject *_wrap_GpuClonerOptions_indicesOptions_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63398  PyObject *resultobj = 0;
63400  void *argp1 = 0 ;
63401  int res1 = 0 ;
63402  PyObject * obj0 = 0 ;
63403  faiss::gpu::IndicesOptions result;
63404 
63405  if (!PyArg_ParseTuple(args,(char *)"O:GpuClonerOptions_indicesOptions_get",&obj0)) SWIG_fail;
63406  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63407  if (!SWIG_IsOK(res1)) {
63408  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_indicesOptions_get" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63409  }
63410  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63411  result = (faiss::gpu::IndicesOptions) ((arg1)->indicesOptions);
63412  resultobj = SWIG_From_int(static_cast< int >(result));
63413  return resultobj;
63414 fail:
63415  return NULL;
63416 }
63417 
63418 
63419 SWIGINTERN PyObject *_wrap_GpuClonerOptions_useFloat16CoarseQuantizer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63420  PyObject *resultobj = 0;
63422  bool arg2 ;
63423  void *argp1 = 0 ;
63424  int res1 = 0 ;
63425  bool val2 ;
63426  int ecode2 = 0 ;
63427  PyObject * obj0 = 0 ;
63428  PyObject * obj1 = 0 ;
63429 
63430  if (!PyArg_ParseTuple(args,(char *)"OO:GpuClonerOptions_useFloat16CoarseQuantizer_set",&obj0,&obj1)) SWIG_fail;
63431  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63432  if (!SWIG_IsOK(res1)) {
63433  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_useFloat16CoarseQuantizer_set" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63434  }
63435  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63436  ecode2 = SWIG_AsVal_bool(obj1, &val2);
63437  if (!SWIG_IsOK(ecode2)) {
63438  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuClonerOptions_useFloat16CoarseQuantizer_set" "', argument " "2"" of type '" "bool""'");
63439  }
63440  arg2 = static_cast< bool >(val2);
63441  if (arg1) (arg1)->useFloat16CoarseQuantizer = arg2;
63442  resultobj = SWIG_Py_Void();
63443  return resultobj;
63444 fail:
63445  return NULL;
63446 }
63447 
63448 
63449 SWIGINTERN PyObject *_wrap_GpuClonerOptions_useFloat16CoarseQuantizer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63450  PyObject *resultobj = 0;
63452  void *argp1 = 0 ;
63453  int res1 = 0 ;
63454  PyObject * obj0 = 0 ;
63455  bool result;
63456 
63457  if (!PyArg_ParseTuple(args,(char *)"O:GpuClonerOptions_useFloat16CoarseQuantizer_get",&obj0)) SWIG_fail;
63458  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63459  if (!SWIG_IsOK(res1)) {
63460  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_useFloat16CoarseQuantizer_get" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63461  }
63462  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63463  result = (bool) ((arg1)->useFloat16CoarseQuantizer);
63464  resultobj = SWIG_From_bool(static_cast< bool >(result));
63465  return resultobj;
63466 fail:
63467  return NULL;
63468 }
63469 
63470 
63471 SWIGINTERN PyObject *_wrap_GpuClonerOptions_useFloat16_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63472  PyObject *resultobj = 0;
63474  bool arg2 ;
63475  void *argp1 = 0 ;
63476  int res1 = 0 ;
63477  bool val2 ;
63478  int ecode2 = 0 ;
63479  PyObject * obj0 = 0 ;
63480  PyObject * obj1 = 0 ;
63481 
63482  if (!PyArg_ParseTuple(args,(char *)"OO:GpuClonerOptions_useFloat16_set",&obj0,&obj1)) SWIG_fail;
63483  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63484  if (!SWIG_IsOK(res1)) {
63485  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_useFloat16_set" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63486  }
63487  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63488  ecode2 = SWIG_AsVal_bool(obj1, &val2);
63489  if (!SWIG_IsOK(ecode2)) {
63490  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuClonerOptions_useFloat16_set" "', argument " "2"" of type '" "bool""'");
63491  }
63492  arg2 = static_cast< bool >(val2);
63493  if (arg1) (arg1)->useFloat16 = arg2;
63494  resultobj = SWIG_Py_Void();
63495  return resultobj;
63496 fail:
63497  return NULL;
63498 }
63499 
63500 
63501 SWIGINTERN PyObject *_wrap_GpuClonerOptions_useFloat16_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63502  PyObject *resultobj = 0;
63504  void *argp1 = 0 ;
63505  int res1 = 0 ;
63506  PyObject * obj0 = 0 ;
63507  bool result;
63508 
63509  if (!PyArg_ParseTuple(args,(char *)"O:GpuClonerOptions_useFloat16_get",&obj0)) SWIG_fail;
63510  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63511  if (!SWIG_IsOK(res1)) {
63512  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_useFloat16_get" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63513  }
63514  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63515  result = (bool) ((arg1)->useFloat16);
63516  resultobj = SWIG_From_bool(static_cast< bool >(result));
63517  return resultobj;
63518 fail:
63519  return NULL;
63520 }
63521 
63522 
63523 SWIGINTERN PyObject *_wrap_GpuClonerOptions_usePrecomputed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63524  PyObject *resultobj = 0;
63526  bool arg2 ;
63527  void *argp1 = 0 ;
63528  int res1 = 0 ;
63529  bool val2 ;
63530  int ecode2 = 0 ;
63531  PyObject * obj0 = 0 ;
63532  PyObject * obj1 = 0 ;
63533 
63534  if (!PyArg_ParseTuple(args,(char *)"OO:GpuClonerOptions_usePrecomputed_set",&obj0,&obj1)) SWIG_fail;
63535  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63536  if (!SWIG_IsOK(res1)) {
63537  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_usePrecomputed_set" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63538  }
63539  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63540  ecode2 = SWIG_AsVal_bool(obj1, &val2);
63541  if (!SWIG_IsOK(ecode2)) {
63542  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuClonerOptions_usePrecomputed_set" "', argument " "2"" of type '" "bool""'");
63543  }
63544  arg2 = static_cast< bool >(val2);
63545  if (arg1) (arg1)->usePrecomputed = arg2;
63546  resultobj = SWIG_Py_Void();
63547  return resultobj;
63548 fail:
63549  return NULL;
63550 }
63551 
63552 
63553 SWIGINTERN PyObject *_wrap_GpuClonerOptions_usePrecomputed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63554  PyObject *resultobj = 0;
63556  void *argp1 = 0 ;
63557  int res1 = 0 ;
63558  PyObject * obj0 = 0 ;
63559  bool result;
63560 
63561  if (!PyArg_ParseTuple(args,(char *)"O:GpuClonerOptions_usePrecomputed_get",&obj0)) SWIG_fail;
63562  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63563  if (!SWIG_IsOK(res1)) {
63564  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_usePrecomputed_get" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63565  }
63566  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63567  result = (bool) ((arg1)->usePrecomputed);
63568  resultobj = SWIG_From_bool(static_cast< bool >(result));
63569  return resultobj;
63570 fail:
63571  return NULL;
63572 }
63573 
63574 
63575 SWIGINTERN PyObject *_wrap_GpuClonerOptions_reserveVecs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63576  PyObject *resultobj = 0;
63578  long arg2 ;
63579  void *argp1 = 0 ;
63580  int res1 = 0 ;
63581  long val2 ;
63582  int ecode2 = 0 ;
63583  PyObject * obj0 = 0 ;
63584  PyObject * obj1 = 0 ;
63585 
63586  if (!PyArg_ParseTuple(args,(char *)"OO:GpuClonerOptions_reserveVecs_set",&obj0,&obj1)) SWIG_fail;
63587  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63588  if (!SWIG_IsOK(res1)) {
63589  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_reserveVecs_set" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63590  }
63591  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63592  ecode2 = SWIG_AsVal_long(obj1, &val2);
63593  if (!SWIG_IsOK(ecode2)) {
63594  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuClonerOptions_reserveVecs_set" "', argument " "2"" of type '" "long""'");
63595  }
63596  arg2 = static_cast< long >(val2);
63597  if (arg1) (arg1)->reserveVecs = arg2;
63598  resultobj = SWIG_Py_Void();
63599  return resultobj;
63600 fail:
63601  return NULL;
63602 }
63603 
63604 
63605 SWIGINTERN PyObject *_wrap_GpuClonerOptions_reserveVecs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63606  PyObject *resultobj = 0;
63608  void *argp1 = 0 ;
63609  int res1 = 0 ;
63610  PyObject * obj0 = 0 ;
63611  long result;
63612 
63613  if (!PyArg_ParseTuple(args,(char *)"O:GpuClonerOptions_reserveVecs_get",&obj0)) SWIG_fail;
63614  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63615  if (!SWIG_IsOK(res1)) {
63616  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_reserveVecs_get" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63617  }
63618  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63619  result = (long) ((arg1)->reserveVecs);
63620  resultobj = SWIG_From_long(static_cast< long >(result));
63621  return resultobj;
63622 fail:
63623  return NULL;
63624 }
63625 
63626 
63627 SWIGINTERN PyObject *_wrap_GpuClonerOptions_storeTransposed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63628  PyObject *resultobj = 0;
63630  bool arg2 ;
63631  void *argp1 = 0 ;
63632  int res1 = 0 ;
63633  bool val2 ;
63634  int ecode2 = 0 ;
63635  PyObject * obj0 = 0 ;
63636  PyObject * obj1 = 0 ;
63637 
63638  if (!PyArg_ParseTuple(args,(char *)"OO:GpuClonerOptions_storeTransposed_set",&obj0,&obj1)) SWIG_fail;
63639  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63640  if (!SWIG_IsOK(res1)) {
63641  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_storeTransposed_set" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63642  }
63643  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63644  ecode2 = SWIG_AsVal_bool(obj1, &val2);
63645  if (!SWIG_IsOK(ecode2)) {
63646  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuClonerOptions_storeTransposed_set" "', argument " "2"" of type '" "bool""'");
63647  }
63648  arg2 = static_cast< bool >(val2);
63649  if (arg1) (arg1)->storeTransposed = arg2;
63650  resultobj = SWIG_Py_Void();
63651  return resultobj;
63652 fail:
63653  return NULL;
63654 }
63655 
63656 
63657 SWIGINTERN PyObject *_wrap_GpuClonerOptions_storeTransposed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63658  PyObject *resultobj = 0;
63660  void *argp1 = 0 ;
63661  int res1 = 0 ;
63662  PyObject * obj0 = 0 ;
63663  bool result;
63664 
63665  if (!PyArg_ParseTuple(args,(char *)"O:GpuClonerOptions_storeTransposed_get",&obj0)) SWIG_fail;
63666  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63667  if (!SWIG_IsOK(res1)) {
63668  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_storeTransposed_get" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63669  }
63670  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63671  result = (bool) ((arg1)->storeTransposed);
63672  resultobj = SWIG_From_bool(static_cast< bool >(result));
63673  return resultobj;
63674 fail:
63675  return NULL;
63676 }
63677 
63678 
63679 SWIGINTERN PyObject *_wrap_GpuClonerOptions_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63680  PyObject *resultobj = 0;
63682  bool arg2 ;
63683  void *argp1 = 0 ;
63684  int res1 = 0 ;
63685  bool val2 ;
63686  int ecode2 = 0 ;
63687  PyObject * obj0 = 0 ;
63688  PyObject * obj1 = 0 ;
63689 
63690  if (!PyArg_ParseTuple(args,(char *)"OO:GpuClonerOptions_verbose_set",&obj0,&obj1)) SWIG_fail;
63691  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63692  if (!SWIG_IsOK(res1)) {
63693  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_verbose_set" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63694  }
63695  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63696  ecode2 = SWIG_AsVal_bool(obj1, &val2);
63697  if (!SWIG_IsOK(ecode2)) {
63698  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuClonerOptions_verbose_set" "', argument " "2"" of type '" "bool""'");
63699  }
63700  arg2 = static_cast< bool >(val2);
63701  if (arg1) (arg1)->verbose = arg2;
63702  resultobj = SWIG_Py_Void();
63703  return resultobj;
63704 fail:
63705  return NULL;
63706 }
63707 
63708 
63709 SWIGINTERN PyObject *_wrap_GpuClonerOptions_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63710  PyObject *resultobj = 0;
63712  void *argp1 = 0 ;
63713  int res1 = 0 ;
63714  PyObject * obj0 = 0 ;
63715  bool result;
63716 
63717  if (!PyArg_ParseTuple(args,(char *)"O:GpuClonerOptions_verbose_get",&obj0)) SWIG_fail;
63718  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
63719  if (!SWIG_IsOK(res1)) {
63720  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuClonerOptions_verbose_get" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63721  }
63722  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63723  result = (bool) ((arg1)->verbose);
63724  resultobj = SWIG_From_bool(static_cast< bool >(result));
63725  return resultobj;
63726 fail:
63727  return NULL;
63728 }
63729 
63730 
63731 SWIGINTERN PyObject *_wrap_delete_GpuClonerOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63732  PyObject *resultobj = 0;
63734  void *argp1 = 0 ;
63735  int res1 = 0 ;
63736  PyObject * obj0 = 0 ;
63737 
63738  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuClonerOptions",&obj0)) SWIG_fail;
63739  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, SWIG_POINTER_DISOWN | 0 );
63740  if (!SWIG_IsOK(res1)) {
63741  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuClonerOptions" "', argument " "1"" of type '" "faiss::gpu::GpuClonerOptions *""'");
63742  }
63743  arg1 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp1);
63744  delete arg1;
63745  resultobj = SWIG_Py_Void();
63746  return resultobj;
63747 fail:
63748  return NULL;
63749 }
63750 
63751 
63752 SWIGINTERN PyObject *GpuClonerOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63753  PyObject *obj;
63754  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
63755  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuClonerOptions, SWIG_NewClientData(obj));
63756  return SWIG_Py_Void();
63757 }
63758 
63759 SWIGINTERN PyObject *_wrap_new_GpuMultipleClonerOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63760  PyObject *resultobj = 0;
63762 
63763  if (!PyArg_ParseTuple(args,(char *)":new_GpuMultipleClonerOptions")) SWIG_fail;
63764  {
63765  Py_BEGIN_ALLOW_THREADS
63766  try {
63768  } catch(faiss::FaissException & e) {
63769  PyEval_RestoreThread(_save);
63770  PyErr_SetString(PyExc_RuntimeError, e.what());
63771  SWIG_fail;
63772  }
63773  Py_END_ALLOW_THREADS
63774  }
63775  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, SWIG_POINTER_NEW | 0 );
63776  return resultobj;
63777 fail:
63778  return NULL;
63779 }
63780 
63781 
63782 SWIGINTERN PyObject *_wrap_GpuMultipleClonerOptions_shard_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63783  PyObject *resultobj = 0;
63785  bool arg2 ;
63786  void *argp1 = 0 ;
63787  int res1 = 0 ;
63788  bool val2 ;
63789  int ecode2 = 0 ;
63790  PyObject * obj0 = 0 ;
63791  PyObject * obj1 = 0 ;
63792 
63793  if (!PyArg_ParseTuple(args,(char *)"OO:GpuMultipleClonerOptions_shard_set",&obj0,&obj1)) SWIG_fail;
63794  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, 0 | 0 );
63795  if (!SWIG_IsOK(res1)) {
63796  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuMultipleClonerOptions_shard_set" "', argument " "1"" of type '" "faiss::gpu::GpuMultipleClonerOptions *""'");
63797  }
63798  arg1 = reinterpret_cast< faiss::gpu::GpuMultipleClonerOptions * >(argp1);
63799  ecode2 = SWIG_AsVal_bool(obj1, &val2);
63800  if (!SWIG_IsOK(ecode2)) {
63801  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuMultipleClonerOptions_shard_set" "', argument " "2"" of type '" "bool""'");
63802  }
63803  arg2 = static_cast< bool >(val2);
63804  if (arg1) (arg1)->shard = arg2;
63805  resultobj = SWIG_Py_Void();
63806  return resultobj;
63807 fail:
63808  return NULL;
63809 }
63810 
63811 
63812 SWIGINTERN PyObject *_wrap_GpuMultipleClonerOptions_shard_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63813  PyObject *resultobj = 0;
63815  void *argp1 = 0 ;
63816  int res1 = 0 ;
63817  PyObject * obj0 = 0 ;
63818  bool result;
63819 
63820  if (!PyArg_ParseTuple(args,(char *)"O:GpuMultipleClonerOptions_shard_get",&obj0)) SWIG_fail;
63821  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, 0 | 0 );
63822  if (!SWIG_IsOK(res1)) {
63823  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuMultipleClonerOptions_shard_get" "', argument " "1"" of type '" "faiss::gpu::GpuMultipleClonerOptions *""'");
63824  }
63825  arg1 = reinterpret_cast< faiss::gpu::GpuMultipleClonerOptions * >(argp1);
63826  result = (bool) ((arg1)->shard);
63827  resultobj = SWIG_From_bool(static_cast< bool >(result));
63828  return resultobj;
63829 fail:
63830  return NULL;
63831 }
63832 
63833 
63834 SWIGINTERN PyObject *_wrap_GpuMultipleClonerOptions_shard_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63835  PyObject *resultobj = 0;
63837  int arg2 ;
63838  void *argp1 = 0 ;
63839  int res1 = 0 ;
63840  int val2 ;
63841  int ecode2 = 0 ;
63842  PyObject * obj0 = 0 ;
63843  PyObject * obj1 = 0 ;
63844 
63845  if (!PyArg_ParseTuple(args,(char *)"OO:GpuMultipleClonerOptions_shard_type_set",&obj0,&obj1)) SWIG_fail;
63846  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, 0 | 0 );
63847  if (!SWIG_IsOK(res1)) {
63848  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuMultipleClonerOptions_shard_type_set" "', argument " "1"" of type '" "faiss::gpu::GpuMultipleClonerOptions *""'");
63849  }
63850  arg1 = reinterpret_cast< faiss::gpu::GpuMultipleClonerOptions * >(argp1);
63851  ecode2 = SWIG_AsVal_int(obj1, &val2);
63852  if (!SWIG_IsOK(ecode2)) {
63853  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuMultipleClonerOptions_shard_type_set" "', argument " "2"" of type '" "int""'");
63854  }
63855  arg2 = static_cast< int >(val2);
63856  if (arg1) (arg1)->shard_type = arg2;
63857  resultobj = SWIG_Py_Void();
63858  return resultobj;
63859 fail:
63860  return NULL;
63861 }
63862 
63863 
63864 SWIGINTERN PyObject *_wrap_GpuMultipleClonerOptions_shard_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63865  PyObject *resultobj = 0;
63867  void *argp1 = 0 ;
63868  int res1 = 0 ;
63869  PyObject * obj0 = 0 ;
63870  int result;
63871 
63872  if (!PyArg_ParseTuple(args,(char *)"O:GpuMultipleClonerOptions_shard_type_get",&obj0)) SWIG_fail;
63873  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, 0 | 0 );
63874  if (!SWIG_IsOK(res1)) {
63875  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuMultipleClonerOptions_shard_type_get" "', argument " "1"" of type '" "faiss::gpu::GpuMultipleClonerOptions *""'");
63876  }
63877  arg1 = reinterpret_cast< faiss::gpu::GpuMultipleClonerOptions * >(argp1);
63878  result = (int) ((arg1)->shard_type);
63879  resultobj = SWIG_From_int(static_cast< int >(result));
63880  return resultobj;
63881 fail:
63882  return NULL;
63883 }
63884 
63885 
63886 SWIGINTERN PyObject *_wrap_delete_GpuMultipleClonerOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63887  PyObject *resultobj = 0;
63889  void *argp1 = 0 ;
63890  int res1 = 0 ;
63891  PyObject * obj0 = 0 ;
63892 
63893  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuMultipleClonerOptions",&obj0)) SWIG_fail;
63894  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, SWIG_POINTER_DISOWN | 0 );
63895  if (!SWIG_IsOK(res1)) {
63896  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuMultipleClonerOptions" "', argument " "1"" of type '" "faiss::gpu::GpuMultipleClonerOptions *""'");
63897  }
63898  arg1 = reinterpret_cast< faiss::gpu::GpuMultipleClonerOptions * >(argp1);
63899  delete arg1;
63900  resultobj = SWIG_Py_Void();
63901  return resultobj;
63902 fail:
63903  return NULL;
63904 }
63905 
63906 
63907 SWIGINTERN PyObject *GpuMultipleClonerOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63908  PyObject *obj;
63909  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
63910  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, SWIG_NewClientData(obj));
63911  return SWIG_Py_Void();
63912 }
63913 
63914 SWIGINTERN PyObject *_wrap_allocMemorySpace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63915  PyObject *resultobj = 0;
63916  faiss::gpu::MemorySpace arg1 ;
63917  void **arg2 = (void **) 0 ;
63918  size_t arg3 ;
63919  int val1 ;
63920  int ecode1 = 0 ;
63921  void *argp2 = 0 ;
63922  int res2 = 0 ;
63923  size_t val3 ;
63924  int ecode3 = 0 ;
63925  PyObject * obj0 = 0 ;
63926  PyObject * obj1 = 0 ;
63927  PyObject * obj2 = 0 ;
63928 
63929  if (!PyArg_ParseTuple(args,(char *)"OOO:allocMemorySpace",&obj0,&obj1,&obj2)) SWIG_fail;
63930  ecode1 = SWIG_AsVal_int(obj0, &val1);
63931  if (!SWIG_IsOK(ecode1)) {
63932  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "allocMemorySpace" "', argument " "1"" of type '" "faiss::gpu::MemorySpace""'");
63933  }
63934  arg1 = static_cast< faiss::gpu::MemorySpace >(val1);
63935  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_void, 0 | 0 );
63936  if (!SWIG_IsOK(res2)) {
63937  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "allocMemorySpace" "', argument " "2"" of type '" "void **""'");
63938  }
63939  arg2 = reinterpret_cast< void ** >(argp2);
63940  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
63941  if (!SWIG_IsOK(ecode3)) {
63942  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "allocMemorySpace" "', argument " "3"" of type '" "size_t""'");
63943  }
63944  arg3 = static_cast< size_t >(val3);
63945  {
63946  Py_BEGIN_ALLOW_THREADS
63947  try {
63948  faiss::gpu::allocMemorySpace(arg1,arg2,arg3);
63949  } catch(faiss::FaissException & e) {
63950  PyEval_RestoreThread(_save);
63951  PyErr_SetString(PyExc_RuntimeError, e.what());
63952  SWIG_fail;
63953  }
63954  Py_END_ALLOW_THREADS
63955  }
63956  resultobj = SWIG_Py_Void();
63957  return resultobj;
63958 fail:
63959  return NULL;
63960 }
63961 
63962 
63963 SWIGINTERN PyObject *_wrap_new_GpuIndexConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63964  PyObject *resultobj = 0;
63965  faiss::gpu::GpuIndexConfig *result = 0 ;
63966 
63967  if (!PyArg_ParseTuple(args,(char *)":new_GpuIndexConfig")) SWIG_fail;
63968  {
63969  Py_BEGIN_ALLOW_THREADS
63970  try {
63972  } catch(faiss::FaissException & e) {
63973  PyEval_RestoreThread(_save);
63974  PyErr_SetString(PyExc_RuntimeError, e.what());
63975  SWIG_fail;
63976  }
63977  Py_END_ALLOW_THREADS
63978  }
63979  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexConfig, SWIG_POINTER_NEW | 0 );
63980  return resultobj;
63981 fail:
63982  return NULL;
63983 }
63984 
63985 
63986 SWIGINTERN PyObject *_wrap_GpuIndexConfig_device_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63987  PyObject *resultobj = 0;
63989  int arg2 ;
63990  void *argp1 = 0 ;
63991  int res1 = 0 ;
63992  int val2 ;
63993  int ecode2 = 0 ;
63994  PyObject * obj0 = 0 ;
63995  PyObject * obj1 = 0 ;
63996 
63997  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexConfig_device_set",&obj0,&obj1)) SWIG_fail;
63998  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexConfig, 0 | 0 );
63999  if (!SWIG_IsOK(res1)) {
64000  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexConfig_device_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexConfig *""'");
64001  }
64002  arg1 = reinterpret_cast< faiss::gpu::GpuIndexConfig * >(argp1);
64003  ecode2 = SWIG_AsVal_int(obj1, &val2);
64004  if (!SWIG_IsOK(ecode2)) {
64005  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexConfig_device_set" "', argument " "2"" of type '" "int""'");
64006  }
64007  arg2 = static_cast< int >(val2);
64008  if (arg1) (arg1)->device = arg2;
64009  resultobj = SWIG_Py_Void();
64010  return resultobj;
64011 fail:
64012  return NULL;
64013 }
64014 
64015 
64016 SWIGINTERN PyObject *_wrap_GpuIndexConfig_device_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64017  PyObject *resultobj = 0;
64019  void *argp1 = 0 ;
64020  int res1 = 0 ;
64021  PyObject * obj0 = 0 ;
64022  int result;
64023 
64024  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexConfig_device_get",&obj0)) SWIG_fail;
64025  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexConfig, 0 | 0 );
64026  if (!SWIG_IsOK(res1)) {
64027  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexConfig_device_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexConfig *""'");
64028  }
64029  arg1 = reinterpret_cast< faiss::gpu::GpuIndexConfig * >(argp1);
64030  result = (int) ((arg1)->device);
64031  resultobj = SWIG_From_int(static_cast< int >(result));
64032  return resultobj;
64033 fail:
64034  return NULL;
64035 }
64036 
64037 
64038 SWIGINTERN PyObject *_wrap_GpuIndexConfig_memorySpace_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64039  PyObject *resultobj = 0;
64041  faiss::gpu::MemorySpace arg2 ;
64042  void *argp1 = 0 ;
64043  int res1 = 0 ;
64044  int val2 ;
64045  int ecode2 = 0 ;
64046  PyObject * obj0 = 0 ;
64047  PyObject * obj1 = 0 ;
64048 
64049  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexConfig_memorySpace_set",&obj0,&obj1)) SWIG_fail;
64050  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexConfig, 0 | 0 );
64051  if (!SWIG_IsOK(res1)) {
64052  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexConfig_memorySpace_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexConfig *""'");
64053  }
64054  arg1 = reinterpret_cast< faiss::gpu::GpuIndexConfig * >(argp1);
64055  ecode2 = SWIG_AsVal_int(obj1, &val2);
64056  if (!SWIG_IsOK(ecode2)) {
64057  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexConfig_memorySpace_set" "', argument " "2"" of type '" "faiss::gpu::MemorySpace""'");
64058  }
64059  arg2 = static_cast< faiss::gpu::MemorySpace >(val2);
64060  if (arg1) (arg1)->memorySpace = arg2;
64061  resultobj = SWIG_Py_Void();
64062  return resultobj;
64063 fail:
64064  return NULL;
64065 }
64066 
64067 
64068 SWIGINTERN PyObject *_wrap_GpuIndexConfig_memorySpace_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64069  PyObject *resultobj = 0;
64071  void *argp1 = 0 ;
64072  int res1 = 0 ;
64073  PyObject * obj0 = 0 ;
64074  faiss::gpu::MemorySpace result;
64075 
64076  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexConfig_memorySpace_get",&obj0)) SWIG_fail;
64077  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexConfig, 0 | 0 );
64078  if (!SWIG_IsOK(res1)) {
64079  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexConfig_memorySpace_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexConfig *""'");
64080  }
64081  arg1 = reinterpret_cast< faiss::gpu::GpuIndexConfig * >(argp1);
64082  result = (faiss::gpu::MemorySpace) ((arg1)->memorySpace);
64083  resultobj = SWIG_From_int(static_cast< int >(result));
64084  return resultobj;
64085 fail:
64086  return NULL;
64087 }
64088 
64089 
64090 SWIGINTERN PyObject *_wrap_delete_GpuIndexConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64091  PyObject *resultobj = 0;
64093  void *argp1 = 0 ;
64094  int res1 = 0 ;
64095  PyObject * obj0 = 0 ;
64096 
64097  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexConfig",&obj0)) SWIG_fail;
64098  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexConfig, SWIG_POINTER_DISOWN | 0 );
64099  if (!SWIG_IsOK(res1)) {
64100  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexConfig" "', argument " "1"" of type '" "faiss::gpu::GpuIndexConfig *""'");
64101  }
64102  arg1 = reinterpret_cast< faiss::gpu::GpuIndexConfig * >(argp1);
64103  delete arg1;
64104  resultobj = SWIG_Py_Void();
64105  return resultobj;
64106 fail:
64107  return NULL;
64108 }
64109 
64110 
64111 SWIGINTERN PyObject *GpuIndexConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64112  PyObject *obj;
64113  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
64114  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexConfig, SWIG_NewClientData(obj));
64115  return SWIG_Py_Void();
64116 }
64117 
64118 SWIGINTERN PyObject *_wrap_GpuIndex_getDevice(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64119  PyObject *resultobj = 0;
64121  void *argp1 = 0 ;
64122  int res1 = 0 ;
64123  PyObject * obj0 = 0 ;
64124  int result;
64125 
64126  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndex_getDevice",&obj0)) SWIG_fail;
64127  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndex, 0 | 0 );
64128  if (!SWIG_IsOK(res1)) {
64129  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndex_getDevice" "', argument " "1"" of type '" "faiss::gpu::GpuIndex const *""'");
64130  }
64131  arg1 = reinterpret_cast< faiss::gpu::GpuIndex * >(argp1);
64132  {
64133  Py_BEGIN_ALLOW_THREADS
64134  try {
64135  result = (int)((faiss::gpu::GpuIndex const *)arg1)->getDevice();
64136  } catch(faiss::FaissException & e) {
64137  PyEval_RestoreThread(_save);
64138  PyErr_SetString(PyExc_RuntimeError, e.what());
64139  SWIG_fail;
64140  }
64141  Py_END_ALLOW_THREADS
64142  }
64143  resultobj = SWIG_From_int(static_cast< int >(result));
64144  return resultobj;
64145 fail:
64146  return NULL;
64147 }
64148 
64149 
64150 SWIGINTERN PyObject *_wrap_GpuIndex_getResources(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64151  PyObject *resultobj = 0;
64153  void *argp1 = 0 ;
64154  int res1 = 0 ;
64155  PyObject * obj0 = 0 ;
64156  faiss::gpu::GpuResources *result = 0 ;
64157 
64158  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndex_getResources",&obj0)) SWIG_fail;
64159  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndex, 0 | 0 );
64160  if (!SWIG_IsOK(res1)) {
64161  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndex_getResources" "', argument " "1"" of type '" "faiss::gpu::GpuIndex *""'");
64162  }
64163  arg1 = reinterpret_cast< faiss::gpu::GpuIndex * >(argp1);
64164  {
64165  Py_BEGIN_ALLOW_THREADS
64166  try {
64167  result = (faiss::gpu::GpuResources *)(arg1)->getResources();
64168  } catch(faiss::FaissException & e) {
64169  PyEval_RestoreThread(_save);
64170  PyErr_SetString(PyExc_RuntimeError, e.what());
64171  SWIG_fail;
64172  }
64173  Py_END_ALLOW_THREADS
64174  }
64175  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
64176  return resultobj;
64177 fail:
64178  return NULL;
64179 }
64180 
64181 
64182 SWIGINTERN PyObject *_wrap_GpuIndex_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64183  PyObject *resultobj = 0;
64185  faiss::Index::idx_t arg2 ;
64186  float *arg3 = (float *) 0 ;
64187  void *argp1 = 0 ;
64188  int res1 = 0 ;
64189  long val2 ;
64190  int ecode2 = 0 ;
64191  void *argp3 = 0 ;
64192  int res3 = 0 ;
64193  PyObject * obj0 = 0 ;
64194  PyObject * obj1 = 0 ;
64195  PyObject * obj2 = 0 ;
64196 
64197  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndex_add",&obj0,&obj1,&obj2)) SWIG_fail;
64198  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndex, 0 | 0 );
64199  if (!SWIG_IsOK(res1)) {
64200  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndex_add" "', argument " "1"" of type '" "faiss::gpu::GpuIndex *""'");
64201  }
64202  arg1 = reinterpret_cast< faiss::gpu::GpuIndex * >(argp1);
64203  ecode2 = SWIG_AsVal_long(obj1, &val2);
64204  if (!SWIG_IsOK(ecode2)) {
64205  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndex_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
64206  }
64207  arg2 = static_cast< faiss::Index::idx_t >(val2);
64208  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
64209  if (!SWIG_IsOK(res3)) {
64210  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndex_add" "', argument " "3"" of type '" "float const *""'");
64211  }
64212  arg3 = reinterpret_cast< float * >(argp3);
64213  {
64214  Py_BEGIN_ALLOW_THREADS
64215  try {
64216  (arg1)->add(arg2,(float const *)arg3);
64217  } catch(faiss::FaissException & e) {
64218  PyEval_RestoreThread(_save);
64219  PyErr_SetString(PyExc_RuntimeError, e.what());
64220  SWIG_fail;
64221  }
64222  Py_END_ALLOW_THREADS
64223  }
64224  resultobj = SWIG_Py_Void();
64225  return resultobj;
64226 fail:
64227  return NULL;
64228 }
64229 
64230 
64231 SWIGINTERN PyObject *_wrap_GpuIndex_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64232  PyObject *resultobj = 0;
64234  faiss::Index::idx_t arg2 ;
64235  float *arg3 = (float *) 0 ;
64237  void *argp1 = 0 ;
64238  int res1 = 0 ;
64239  long val2 ;
64240  int ecode2 = 0 ;
64241  void *argp3 = 0 ;
64242  int res3 = 0 ;
64243  void *argp4 = 0 ;
64244  int res4 = 0 ;
64245  PyObject * obj0 = 0 ;
64246  PyObject * obj1 = 0 ;
64247  PyObject * obj2 = 0 ;
64248  PyObject * obj3 = 0 ;
64249 
64250  if (!PyArg_ParseTuple(args,(char *)"OOOO:GpuIndex_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
64251  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndex, 0 | 0 );
64252  if (!SWIG_IsOK(res1)) {
64253  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndex_add_with_ids" "', argument " "1"" of type '" "faiss::gpu::GpuIndex *""'");
64254  }
64255  arg1 = reinterpret_cast< faiss::gpu::GpuIndex * >(argp1);
64256  ecode2 = SWIG_AsVal_long(obj1, &val2);
64257  if (!SWIG_IsOK(ecode2)) {
64258  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndex_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
64259  }
64260  arg2 = static_cast< faiss::Index::idx_t >(val2);
64261  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
64262  if (!SWIG_IsOK(res3)) {
64263  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndex_add_with_ids" "', argument " "3"" of type '" "float const *""'");
64264  }
64265  arg3 = reinterpret_cast< float * >(argp3);
64266  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
64267  if (!SWIG_IsOK(res4)) {
64268  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GpuIndex_add_with_ids" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
64269  }
64270  arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
64271  {
64272  Py_BEGIN_ALLOW_THREADS
64273  try {
64274  (arg1)->add_with_ids(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4);
64275  } catch(faiss::FaissException & e) {
64276  PyEval_RestoreThread(_save);
64277  PyErr_SetString(PyExc_RuntimeError, e.what());
64278  SWIG_fail;
64279  }
64280  Py_END_ALLOW_THREADS
64281  }
64282  resultobj = SWIG_Py_Void();
64283  return resultobj;
64284 fail:
64285  return NULL;
64286 }
64287 
64288 
64289 SWIGINTERN PyObject *_wrap_GpuIndex_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64290  PyObject *resultobj = 0;
64292  faiss::Index::idx_t arg2 ;
64293  float *arg3 = (float *) 0 ;
64294  faiss::Index::idx_t arg4 ;
64295  float *arg5 = (float *) 0 ;
64297  void *argp1 = 0 ;
64298  int res1 = 0 ;
64299  long val2 ;
64300  int ecode2 = 0 ;
64301  void *argp3 = 0 ;
64302  int res3 = 0 ;
64303  long val4 ;
64304  int ecode4 = 0 ;
64305  void *argp5 = 0 ;
64306  int res5 = 0 ;
64307  void *argp6 = 0 ;
64308  int res6 = 0 ;
64309  PyObject * obj0 = 0 ;
64310  PyObject * obj1 = 0 ;
64311  PyObject * obj2 = 0 ;
64312  PyObject * obj3 = 0 ;
64313  PyObject * obj4 = 0 ;
64314  PyObject * obj5 = 0 ;
64315 
64316  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:GpuIndex_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
64317  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndex, 0 | 0 );
64318  if (!SWIG_IsOK(res1)) {
64319  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndex_search" "', argument " "1"" of type '" "faiss::gpu::GpuIndex const *""'");
64320  }
64321  arg1 = reinterpret_cast< faiss::gpu::GpuIndex * >(argp1);
64322  ecode2 = SWIG_AsVal_long(obj1, &val2);
64323  if (!SWIG_IsOK(ecode2)) {
64324  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndex_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
64325  }
64326  arg2 = static_cast< faiss::Index::idx_t >(val2);
64327  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
64328  if (!SWIG_IsOK(res3)) {
64329  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndex_search" "', argument " "3"" of type '" "float const *""'");
64330  }
64331  arg3 = reinterpret_cast< float * >(argp3);
64332  ecode4 = SWIG_AsVal_long(obj3, &val4);
64333  if (!SWIG_IsOK(ecode4)) {
64334  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GpuIndex_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
64335  }
64336  arg4 = static_cast< faiss::Index::idx_t >(val4);
64337  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
64338  if (!SWIG_IsOK(res5)) {
64339  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GpuIndex_search" "', argument " "5"" of type '" "float *""'");
64340  }
64341  arg5 = reinterpret_cast< float * >(argp5);
64342  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
64343  if (!SWIG_IsOK(res6)) {
64344  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "GpuIndex_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
64345  }
64346  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
64347  {
64348  Py_BEGIN_ALLOW_THREADS
64349  try {
64350  ((faiss::gpu::GpuIndex const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
64351  } catch(faiss::FaissException & e) {
64352  PyEval_RestoreThread(_save);
64353  PyErr_SetString(PyExc_RuntimeError, e.what());
64354  SWIG_fail;
64355  }
64356  Py_END_ALLOW_THREADS
64357  }
64358  resultobj = SWIG_Py_Void();
64359  return resultobj;
64360 fail:
64361  return NULL;
64362 }
64363 
64364 
64365 SWIGINTERN PyObject *_wrap_delete_GpuIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64366  PyObject *resultobj = 0;
64368  void *argp1 = 0 ;
64369  int res1 = 0 ;
64370  PyObject * obj0 = 0 ;
64371 
64372  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndex",&obj0)) SWIG_fail;
64373  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndex, SWIG_POINTER_DISOWN | 0 );
64374  if (!SWIG_IsOK(res1)) {
64375  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndex" "', argument " "1"" of type '" "faiss::gpu::GpuIndex *""'");
64376  }
64377  arg1 = reinterpret_cast< faiss::gpu::GpuIndex * >(argp1);
64378  delete arg1;
64379  resultobj = SWIG_Py_Void();
64380  return resultobj;
64381 fail:
64382  return NULL;
64383 }
64384 
64385 
64386 SWIGINTERN PyObject *GpuIndex_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64387  PyObject *obj;
64388  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
64389  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndex, SWIG_NewClientData(obj));
64390  return SWIG_Py_Void();
64391 }
64392 
64393 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64394  PyObject *resultobj = 0;
64395  faiss::gpu::GpuIndexFlatConfig *result = 0 ;
64396 
64397  if (!PyArg_ParseTuple(args,(char *)":new_GpuIndexFlatConfig")) SWIG_fail;
64398  {
64399  Py_BEGIN_ALLOW_THREADS
64400  try {
64402  } catch(faiss::FaissException & e) {
64403  PyEval_RestoreThread(_save);
64404  PyErr_SetString(PyExc_RuntimeError, e.what());
64405  SWIG_fail;
64406  }
64407  Py_END_ALLOW_THREADS
64408  }
64409  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, SWIG_POINTER_NEW | 0 );
64410  return resultobj;
64411 fail:
64412  return NULL;
64413 }
64414 
64415 
64416 SWIGINTERN PyObject *_wrap_GpuIndexFlatConfig_useFloat16_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64417  PyObject *resultobj = 0;
64419  bool arg2 ;
64420  void *argp1 = 0 ;
64421  int res1 = 0 ;
64422  bool val2 ;
64423  int ecode2 = 0 ;
64424  PyObject * obj0 = 0 ;
64425  PyObject * obj1 = 0 ;
64426 
64427  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlatConfig_useFloat16_set",&obj0,&obj1)) SWIG_fail;
64428  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
64429  if (!SWIG_IsOK(res1)) {
64430  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatConfig_useFloat16_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
64431  }
64432  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp1);
64433  ecode2 = SWIG_AsVal_bool(obj1, &val2);
64434  if (!SWIG_IsOK(ecode2)) {
64435  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlatConfig_useFloat16_set" "', argument " "2"" of type '" "bool""'");
64436  }
64437  arg2 = static_cast< bool >(val2);
64438  if (arg1) (arg1)->useFloat16 = arg2;
64439  resultobj = SWIG_Py_Void();
64440  return resultobj;
64441 fail:
64442  return NULL;
64443 }
64444 
64445 
64446 SWIGINTERN PyObject *_wrap_GpuIndexFlatConfig_useFloat16_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64447  PyObject *resultobj = 0;
64449  void *argp1 = 0 ;
64450  int res1 = 0 ;
64451  PyObject * obj0 = 0 ;
64452  bool result;
64453 
64454  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexFlatConfig_useFloat16_get",&obj0)) SWIG_fail;
64455  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
64456  if (!SWIG_IsOK(res1)) {
64457  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatConfig_useFloat16_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
64458  }
64459  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp1);
64460  result = (bool) ((arg1)->useFloat16);
64461  resultobj = SWIG_From_bool(static_cast< bool >(result));
64462  return resultobj;
64463 fail:
64464  return NULL;
64465 }
64466 
64467 
64468 SWIGINTERN PyObject *_wrap_GpuIndexFlatConfig_useFloat16Accumulator_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64469  PyObject *resultobj = 0;
64471  bool arg2 ;
64472  void *argp1 = 0 ;
64473  int res1 = 0 ;
64474  bool val2 ;
64475  int ecode2 = 0 ;
64476  PyObject * obj0 = 0 ;
64477  PyObject * obj1 = 0 ;
64478 
64479  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlatConfig_useFloat16Accumulator_set",&obj0,&obj1)) SWIG_fail;
64480  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
64481  if (!SWIG_IsOK(res1)) {
64482  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatConfig_useFloat16Accumulator_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
64483  }
64484  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp1);
64485  ecode2 = SWIG_AsVal_bool(obj1, &val2);
64486  if (!SWIG_IsOK(ecode2)) {
64487  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlatConfig_useFloat16Accumulator_set" "', argument " "2"" of type '" "bool""'");
64488  }
64489  arg2 = static_cast< bool >(val2);
64490  if (arg1) (arg1)->useFloat16Accumulator = arg2;
64491  resultobj = SWIG_Py_Void();
64492  return resultobj;
64493 fail:
64494  return NULL;
64495 }
64496 
64497 
64498 SWIGINTERN PyObject *_wrap_GpuIndexFlatConfig_useFloat16Accumulator_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64499  PyObject *resultobj = 0;
64501  void *argp1 = 0 ;
64502  int res1 = 0 ;
64503  PyObject * obj0 = 0 ;
64504  bool result;
64505 
64506  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexFlatConfig_useFloat16Accumulator_get",&obj0)) SWIG_fail;
64507  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
64508  if (!SWIG_IsOK(res1)) {
64509  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatConfig_useFloat16Accumulator_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
64510  }
64511  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp1);
64512  result = (bool) ((arg1)->useFloat16Accumulator);
64513  resultobj = SWIG_From_bool(static_cast< bool >(result));
64514  return resultobj;
64515 fail:
64516  return NULL;
64517 }
64518 
64519 
64520 SWIGINTERN PyObject *_wrap_GpuIndexFlatConfig_storeTransposed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64521  PyObject *resultobj = 0;
64523  bool arg2 ;
64524  void *argp1 = 0 ;
64525  int res1 = 0 ;
64526  bool val2 ;
64527  int ecode2 = 0 ;
64528  PyObject * obj0 = 0 ;
64529  PyObject * obj1 = 0 ;
64530 
64531  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlatConfig_storeTransposed_set",&obj0,&obj1)) SWIG_fail;
64532  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
64533  if (!SWIG_IsOK(res1)) {
64534  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatConfig_storeTransposed_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
64535  }
64536  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp1);
64537  ecode2 = SWIG_AsVal_bool(obj1, &val2);
64538  if (!SWIG_IsOK(ecode2)) {
64539  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlatConfig_storeTransposed_set" "', argument " "2"" of type '" "bool""'");
64540  }
64541  arg2 = static_cast< bool >(val2);
64542  if (arg1) (arg1)->storeTransposed = arg2;
64543  resultobj = SWIG_Py_Void();
64544  return resultobj;
64545 fail:
64546  return NULL;
64547 }
64548 
64549 
64550 SWIGINTERN PyObject *_wrap_GpuIndexFlatConfig_storeTransposed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64551  PyObject *resultobj = 0;
64553  void *argp1 = 0 ;
64554  int res1 = 0 ;
64555  PyObject * obj0 = 0 ;
64556  bool result;
64557 
64558  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexFlatConfig_storeTransposed_get",&obj0)) SWIG_fail;
64559  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
64560  if (!SWIG_IsOK(res1)) {
64561  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatConfig_storeTransposed_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
64562  }
64563  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp1);
64564  result = (bool) ((arg1)->storeTransposed);
64565  resultobj = SWIG_From_bool(static_cast< bool >(result));
64566  return resultobj;
64567 fail:
64568  return NULL;
64569 }
64570 
64571 
64572 SWIGINTERN PyObject *_wrap_delete_GpuIndexFlatConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64573  PyObject *resultobj = 0;
64575  void *argp1 = 0 ;
64576  int res1 = 0 ;
64577  PyObject * obj0 = 0 ;
64578 
64579  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexFlatConfig",&obj0)) SWIG_fail;
64580  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, SWIG_POINTER_DISOWN | 0 );
64581  if (!SWIG_IsOK(res1)) {
64582  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexFlatConfig" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
64583  }
64584  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp1);
64585  delete arg1;
64586  resultobj = SWIG_Py_Void();
64587  return resultobj;
64588 fail:
64589  return NULL;
64590 }
64591 
64592 
64593 SWIGINTERN PyObject *GpuIndexFlatConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64594  PyObject *obj;
64595  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
64596  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, SWIG_NewClientData(obj));
64597  return SWIG_Py_Void();
64598 }
64599 
64600 SWIGINTERN PyObject *_wrap_new_GpuIndexFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64601  PyObject *resultobj = 0;
64603  faiss::IndexFlat *arg2 = (faiss::IndexFlat *) 0 ;
64605  void *argp1 = 0 ;
64606  int res1 = 0 ;
64607  void *argp2 = 0 ;
64608  int res2 = 0 ;
64609  void *argp3 ;
64610  int res3 = 0 ;
64611  PyObject * obj0 = 0 ;
64612  PyObject * obj1 = 0 ;
64613  PyObject * obj2 = 0 ;
64614  faiss::gpu::GpuIndexFlat *result = 0 ;
64615 
64616  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexFlat",&obj0,&obj1,&obj2)) SWIG_fail;
64617  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
64618  if (!SWIG_IsOK(res1)) {
64619  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
64620  }
64621  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
64622  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
64623  if (!SWIG_IsOK(res2)) {
64624  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexFlat" "', argument " "2"" of type '" "faiss::IndexFlat const *""'");
64625  }
64626  arg2 = reinterpret_cast< faiss::IndexFlat * >(argp2);
64627  {
64628  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0);
64629  if (!SWIG_IsOK(res3)) {
64630  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
64631  }
64632  if (!argp3) {
64633  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
64634  } else {
64635  faiss::gpu::GpuIndexFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp3);
64636  arg3 = *temp;
64637  if (SWIG_IsNewObj(res3)) delete temp;
64638  }
64639  }
64640  {
64641  Py_BEGIN_ALLOW_THREADS
64642  try {
64643  result = (faiss::gpu::GpuIndexFlat *)new faiss::gpu::GpuIndexFlat(arg1,(faiss::IndexFlat const *)arg2,arg3);
64644  } catch(faiss::FaissException & e) {
64645  PyEval_RestoreThread(_save);
64646  PyErr_SetString(PyExc_RuntimeError, e.what());
64647  SWIG_fail;
64648  }
64649  Py_END_ALLOW_THREADS
64650  }
64651  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlat, SWIG_POINTER_NEW | 0 );
64652  return resultobj;
64653 fail:
64654  return NULL;
64655 }
64656 
64657 
64658 SWIGINTERN PyObject *_wrap_new_GpuIndexFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64659  PyObject *resultobj = 0;
64661  faiss::IndexFlat *arg2 = (faiss::IndexFlat *) 0 ;
64662  void *argp1 = 0 ;
64663  int res1 = 0 ;
64664  void *argp2 = 0 ;
64665  int res2 = 0 ;
64666  PyObject * obj0 = 0 ;
64667  PyObject * obj1 = 0 ;
64668  faiss::gpu::GpuIndexFlat *result = 0 ;
64669 
64670  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexFlat",&obj0,&obj1)) SWIG_fail;
64671  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
64672  if (!SWIG_IsOK(res1)) {
64673  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
64674  }
64675  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
64676  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
64677  if (!SWIG_IsOK(res2)) {
64678  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexFlat" "', argument " "2"" of type '" "faiss::IndexFlat const *""'");
64679  }
64680  arg2 = reinterpret_cast< faiss::IndexFlat * >(argp2);
64681  {
64682  Py_BEGIN_ALLOW_THREADS
64683  try {
64684  result = (faiss::gpu::GpuIndexFlat *)new faiss::gpu::GpuIndexFlat(arg1,(faiss::IndexFlat const *)arg2);
64685  } catch(faiss::FaissException & e) {
64686  PyEval_RestoreThread(_save);
64687  PyErr_SetString(PyExc_RuntimeError, e.what());
64688  SWIG_fail;
64689  }
64690  Py_END_ALLOW_THREADS
64691  }
64692  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlat, SWIG_POINTER_NEW | 0 );
64693  return resultobj;
64694 fail:
64695  return NULL;
64696 }
64697 
64698 
64699 SWIGINTERN PyObject *_wrap_new_GpuIndexFlat__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64700  PyObject *resultobj = 0;
64702  int arg2 ;
64703  faiss::MetricType arg3 ;
64705  void *argp1 = 0 ;
64706  int res1 = 0 ;
64707  int val2 ;
64708  int ecode2 = 0 ;
64709  int val3 ;
64710  int ecode3 = 0 ;
64711  void *argp4 ;
64712  int res4 = 0 ;
64713  PyObject * obj0 = 0 ;
64714  PyObject * obj1 = 0 ;
64715  PyObject * obj2 = 0 ;
64716  PyObject * obj3 = 0 ;
64717  faiss::gpu::GpuIndexFlat *result = 0 ;
64718 
64719  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_GpuIndexFlat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
64720  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
64721  if (!SWIG_IsOK(res1)) {
64722  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
64723  }
64724  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
64725  ecode2 = SWIG_AsVal_int(obj1, &val2);
64726  if (!SWIG_IsOK(ecode2)) {
64727  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexFlat" "', argument " "2"" of type '" "int""'");
64728  }
64729  arg2 = static_cast< int >(val2);
64730  ecode3 = SWIG_AsVal_int(obj2, &val3);
64731  if (!SWIG_IsOK(ecode3)) {
64732  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GpuIndexFlat" "', argument " "3"" of type '" "faiss::MetricType""'");
64733  }
64734  arg3 = static_cast< faiss::MetricType >(val3);
64735  {
64736  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0);
64737  if (!SWIG_IsOK(res4)) {
64738  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_GpuIndexFlat" "', argument " "4"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
64739  }
64740  if (!argp4) {
64741  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexFlat" "', argument " "4"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
64742  } else {
64743  faiss::gpu::GpuIndexFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp4);
64744  arg4 = *temp;
64745  if (SWIG_IsNewObj(res4)) delete temp;
64746  }
64747  }
64748  {
64749  Py_BEGIN_ALLOW_THREADS
64750  try {
64751  result = (faiss::gpu::GpuIndexFlat *)new faiss::gpu::GpuIndexFlat(arg1,arg2,arg3,arg4);
64752  } catch(faiss::FaissException & e) {
64753  PyEval_RestoreThread(_save);
64754  PyErr_SetString(PyExc_RuntimeError, e.what());
64755  SWIG_fail;
64756  }
64757  Py_END_ALLOW_THREADS
64758  }
64759  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlat, SWIG_POINTER_NEW | 0 );
64760  return resultobj;
64761 fail:
64762  return NULL;
64763 }
64764 
64765 
64766 SWIGINTERN PyObject *_wrap_new_GpuIndexFlat__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64767  PyObject *resultobj = 0;
64769  int arg2 ;
64770  faiss::MetricType arg3 ;
64771  void *argp1 = 0 ;
64772  int res1 = 0 ;
64773  int val2 ;
64774  int ecode2 = 0 ;
64775  int val3 ;
64776  int ecode3 = 0 ;
64777  PyObject * obj0 = 0 ;
64778  PyObject * obj1 = 0 ;
64779  PyObject * obj2 = 0 ;
64780  faiss::gpu::GpuIndexFlat *result = 0 ;
64781 
64782  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexFlat",&obj0,&obj1,&obj2)) SWIG_fail;
64783  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
64784  if (!SWIG_IsOK(res1)) {
64785  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
64786  }
64787  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
64788  ecode2 = SWIG_AsVal_int(obj1, &val2);
64789  if (!SWIG_IsOK(ecode2)) {
64790  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexFlat" "', argument " "2"" of type '" "int""'");
64791  }
64792  arg2 = static_cast< int >(val2);
64793  ecode3 = SWIG_AsVal_int(obj2, &val3);
64794  if (!SWIG_IsOK(ecode3)) {
64795  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GpuIndexFlat" "', argument " "3"" of type '" "faiss::MetricType""'");
64796  }
64797  arg3 = static_cast< faiss::MetricType >(val3);
64798  {
64799  Py_BEGIN_ALLOW_THREADS
64800  try {
64801  result = (faiss::gpu::GpuIndexFlat *)new faiss::gpu::GpuIndexFlat(arg1,arg2,arg3);
64802  } catch(faiss::FaissException & e) {
64803  PyEval_RestoreThread(_save);
64804  PyErr_SetString(PyExc_RuntimeError, e.what());
64805  SWIG_fail;
64806  }
64807  Py_END_ALLOW_THREADS
64808  }
64809  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlat, SWIG_POINTER_NEW | 0 );
64810  return resultobj;
64811 fail:
64812  return NULL;
64813 }
64814 
64815 
64816 SWIGINTERN PyObject *_wrap_new_GpuIndexFlat(PyObject *self, PyObject *args) {
64817  Py_ssize_t argc;
64818  PyObject *argv[5] = {
64819  0
64820  };
64821  Py_ssize_t ii;
64822 
64823  if (!PyTuple_Check(args)) SWIG_fail;
64824  argc = args ? PyObject_Length(args) : 0;
64825  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
64826  argv[ii] = PyTuple_GET_ITEM(args,ii);
64827  }
64828  if (argc == 2) {
64829  int _v;
64830  void *vptr = 0;
64831  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
64832  _v = SWIG_CheckState(res);
64833  if (_v) {
64834  void *vptr = 0;
64835  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexFlat, 0);
64836  _v = SWIG_CheckState(res);
64837  if (_v) {
64838  return _wrap_new_GpuIndexFlat__SWIG_1(self, args);
64839  }
64840  }
64841  }
64842  if (argc == 3) {
64843  int _v;
64844  void *vptr = 0;
64845  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
64846  _v = SWIG_CheckState(res);
64847  if (_v) {
64848  void *vptr = 0;
64849  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexFlat, 0);
64850  _v = SWIG_CheckState(res);
64851  if (_v) {
64852  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0);
64853  _v = SWIG_CheckState(res);
64854  if (_v) {
64855  return _wrap_new_GpuIndexFlat__SWIG_0(self, args);
64856  }
64857  }
64858  }
64859  }
64860  if (argc == 3) {
64861  int _v;
64862  void *vptr = 0;
64863  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
64864  _v = SWIG_CheckState(res);
64865  if (_v) {
64866  {
64867  int res = SWIG_AsVal_int(argv[1], NULL);
64868  _v = SWIG_CheckState(res);
64869  }
64870  if (_v) {
64871  {
64872  int res = SWIG_AsVal_int(argv[2], NULL);
64873  _v = SWIG_CheckState(res);
64874  }
64875  if (_v) {
64876  return _wrap_new_GpuIndexFlat__SWIG_3(self, args);
64877  }
64878  }
64879  }
64880  }
64881  if (argc == 4) {
64882  int _v;
64883  void *vptr = 0;
64884  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
64885  _v = SWIG_CheckState(res);
64886  if (_v) {
64887  {
64888  int res = SWIG_AsVal_int(argv[1], NULL);
64889  _v = SWIG_CheckState(res);
64890  }
64891  if (_v) {
64892  {
64893  int res = SWIG_AsVal_int(argv[2], NULL);
64894  _v = SWIG_CheckState(res);
64895  }
64896  if (_v) {
64897  int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0);
64898  _v = SWIG_CheckState(res);
64899  if (_v) {
64900  return _wrap_new_GpuIndexFlat__SWIG_2(self, args);
64901  }
64902  }
64903  }
64904  }
64905  }
64906 
64907 fail:
64908  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_GpuIndexFlat'.\n"
64909  " Possible C/C++ prototypes are:\n"
64910  " faiss::gpu::GpuIndexFlat::GpuIndexFlat(faiss::gpu::GpuResources *,faiss::IndexFlat const *,faiss::gpu::GpuIndexFlatConfig)\n"
64911  " faiss::gpu::GpuIndexFlat::GpuIndexFlat(faiss::gpu::GpuResources *,faiss::IndexFlat const *)\n"
64912  " faiss::gpu::GpuIndexFlat::GpuIndexFlat(faiss::gpu::GpuResources *,int,faiss::MetricType,faiss::gpu::GpuIndexFlatConfig)\n"
64913  " faiss::gpu::GpuIndexFlat::GpuIndexFlat(faiss::gpu::GpuResources *,int,faiss::MetricType)\n");
64914  return 0;
64915 }
64916 
64917 
64918 SWIGINTERN PyObject *_wrap_delete_GpuIndexFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64919  PyObject *resultobj = 0;
64921  void *argp1 = 0 ;
64922  int res1 = 0 ;
64923  PyObject * obj0 = 0 ;
64924 
64925  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexFlat",&obj0)) SWIG_fail;
64926  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, SWIG_POINTER_DISOWN | 0 );
64927  if (!SWIG_IsOK(res1)) {
64928  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexFlat" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat *""'");
64929  }
64930  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
64931  {
64932  Py_BEGIN_ALLOW_THREADS
64933  try {
64934  delete arg1;
64935  } catch(faiss::FaissException & e) {
64936  PyEval_RestoreThread(_save);
64937  PyErr_SetString(PyExc_RuntimeError, e.what());
64938  SWIG_fail;
64939  }
64940  Py_END_ALLOW_THREADS
64941  }
64942  resultobj = SWIG_Py_Void();
64943  return resultobj;
64944 fail:
64945  return NULL;
64946 }
64947 
64948 
64949 SWIGINTERN PyObject *_wrap_GpuIndexFlat_setMinPagingSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64950  PyObject *resultobj = 0;
64952  size_t arg2 ;
64953  void *argp1 = 0 ;
64954  int res1 = 0 ;
64955  size_t val2 ;
64956  int ecode2 = 0 ;
64957  PyObject * obj0 = 0 ;
64958  PyObject * obj1 = 0 ;
64959 
64960  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlat_setMinPagingSize",&obj0,&obj1)) SWIG_fail;
64961  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
64962  if (!SWIG_IsOK(res1)) {
64963  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_setMinPagingSize" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat *""'");
64964  }
64965  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
64966  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
64967  if (!SWIG_IsOK(ecode2)) {
64968  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlat_setMinPagingSize" "', argument " "2"" of type '" "size_t""'");
64969  }
64970  arg2 = static_cast< size_t >(val2);
64971  {
64972  Py_BEGIN_ALLOW_THREADS
64973  try {
64974  (arg1)->setMinPagingSize(arg2);
64975  } catch(faiss::FaissException & e) {
64976  PyEval_RestoreThread(_save);
64977  PyErr_SetString(PyExc_RuntimeError, e.what());
64978  SWIG_fail;
64979  }
64980  Py_END_ALLOW_THREADS
64981  }
64982  resultobj = SWIG_Py_Void();
64983  return resultobj;
64984 fail:
64985  return NULL;
64986 }
64987 
64988 
64989 SWIGINTERN PyObject *_wrap_GpuIndexFlat_getMinPagingSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64990  PyObject *resultobj = 0;
64992  void *argp1 = 0 ;
64993  int res1 = 0 ;
64994  PyObject * obj0 = 0 ;
64995  size_t result;
64996 
64997  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexFlat_getMinPagingSize",&obj0)) SWIG_fail;
64998  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
64999  if (!SWIG_IsOK(res1)) {
65000  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_getMinPagingSize" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat const *""'");
65001  }
65002  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65003  {
65004  Py_BEGIN_ALLOW_THREADS
65005  try {
65006  result = (size_t)((faiss::gpu::GpuIndexFlat const *)arg1)->getMinPagingSize();
65007  } catch(faiss::FaissException & e) {
65008  PyEval_RestoreThread(_save);
65009  PyErr_SetString(PyExc_RuntimeError, e.what());
65010  SWIG_fail;
65011  }
65012  Py_END_ALLOW_THREADS
65013  }
65014  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
65015  return resultobj;
65016 fail:
65017  return NULL;
65018 }
65019 
65020 
65021 SWIGINTERN PyObject *_wrap_GpuIndexFlat_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65022  PyObject *resultobj = 0;
65024  faiss::IndexFlat *arg2 = (faiss::IndexFlat *) 0 ;
65025  void *argp1 = 0 ;
65026  int res1 = 0 ;
65027  void *argp2 = 0 ;
65028  int res2 = 0 ;
65029  PyObject * obj0 = 0 ;
65030  PyObject * obj1 = 0 ;
65031 
65032  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlat_copyFrom",&obj0,&obj1)) SWIG_fail;
65033  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65034  if (!SWIG_IsOK(res1)) {
65035  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_copyFrom" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat *""'");
65036  }
65037  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65038  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
65039  if (!SWIG_IsOK(res2)) {
65040  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexFlat_copyFrom" "', argument " "2"" of type '" "faiss::IndexFlat const *""'");
65041  }
65042  arg2 = reinterpret_cast< faiss::IndexFlat * >(argp2);
65043  {
65044  Py_BEGIN_ALLOW_THREADS
65045  try {
65046  (arg1)->copyFrom((faiss::IndexFlat const *)arg2);
65047  } catch(faiss::FaissException & e) {
65048  PyEval_RestoreThread(_save);
65049  PyErr_SetString(PyExc_RuntimeError, e.what());
65050  SWIG_fail;
65051  }
65052  Py_END_ALLOW_THREADS
65053  }
65054  resultobj = SWIG_Py_Void();
65055  return resultobj;
65056 fail:
65057  return NULL;
65058 }
65059 
65060 
65061 SWIGINTERN PyObject *_wrap_GpuIndexFlat_copyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65062  PyObject *resultobj = 0;
65064  faiss::IndexFlat *arg2 = (faiss::IndexFlat *) 0 ;
65065  void *argp1 = 0 ;
65066  int res1 = 0 ;
65067  void *argp2 = 0 ;
65068  int res2 = 0 ;
65069  PyObject * obj0 = 0 ;
65070  PyObject * obj1 = 0 ;
65071 
65072  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlat_copyTo",&obj0,&obj1)) SWIG_fail;
65073  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65074  if (!SWIG_IsOK(res1)) {
65075  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_copyTo" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat const *""'");
65076  }
65077  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65078  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
65079  if (!SWIG_IsOK(res2)) {
65080  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexFlat_copyTo" "', argument " "2"" of type '" "faiss::IndexFlat *""'");
65081  }
65082  arg2 = reinterpret_cast< faiss::IndexFlat * >(argp2);
65083  {
65084  Py_BEGIN_ALLOW_THREADS
65085  try {
65086  ((faiss::gpu::GpuIndexFlat const *)arg1)->copyTo(arg2);
65087  } catch(faiss::FaissException & e) {
65088  PyEval_RestoreThread(_save);
65089  PyErr_SetString(PyExc_RuntimeError, e.what());
65090  SWIG_fail;
65091  }
65092  Py_END_ALLOW_THREADS
65093  }
65094  resultobj = SWIG_Py_Void();
65095  return resultobj;
65096 fail:
65097  return NULL;
65098 }
65099 
65100 
65101 SWIGINTERN PyObject *_wrap_GpuIndexFlat_getNumVecs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65102  PyObject *resultobj = 0;
65104  void *argp1 = 0 ;
65105  int res1 = 0 ;
65106  PyObject * obj0 = 0 ;
65107  size_t result;
65108 
65109  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexFlat_getNumVecs",&obj0)) SWIG_fail;
65110  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65111  if (!SWIG_IsOK(res1)) {
65112  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_getNumVecs" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat const *""'");
65113  }
65114  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65115  {
65116  Py_BEGIN_ALLOW_THREADS
65117  try {
65118  result = (size_t)((faiss::gpu::GpuIndexFlat const *)arg1)->getNumVecs();
65119  } catch(faiss::FaissException & e) {
65120  PyEval_RestoreThread(_save);
65121  PyErr_SetString(PyExc_RuntimeError, e.what());
65122  SWIG_fail;
65123  }
65124  Py_END_ALLOW_THREADS
65125  }
65126  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
65127  return resultobj;
65128 fail:
65129  return NULL;
65130 }
65131 
65132 
65133 SWIGINTERN PyObject *_wrap_GpuIndexFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65134  PyObject *resultobj = 0;
65136  void *argp1 = 0 ;
65137  int res1 = 0 ;
65138  PyObject * obj0 = 0 ;
65139 
65140  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexFlat_reset",&obj0)) SWIG_fail;
65141  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65142  if (!SWIG_IsOK(res1)) {
65143  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_reset" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat *""'");
65144  }
65145  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65146  {
65147  Py_BEGIN_ALLOW_THREADS
65148  try {
65149  (arg1)->reset();
65150  } catch(faiss::FaissException & e) {
65151  PyEval_RestoreThread(_save);
65152  PyErr_SetString(PyExc_RuntimeError, e.what());
65153  SWIG_fail;
65154  }
65155  Py_END_ALLOW_THREADS
65156  }
65157  resultobj = SWIG_Py_Void();
65158  return resultobj;
65159 fail:
65160  return NULL;
65161 }
65162 
65163 
65164 SWIGINTERN PyObject *_wrap_GpuIndexFlat_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65165  PyObject *resultobj = 0;
65167  faiss::Index::idx_t arg2 ;
65168  float *arg3 = (float *) 0 ;
65169  void *argp1 = 0 ;
65170  int res1 = 0 ;
65171  long val2 ;
65172  int ecode2 = 0 ;
65173  void *argp3 = 0 ;
65174  int res3 = 0 ;
65175  PyObject * obj0 = 0 ;
65176  PyObject * obj1 = 0 ;
65177  PyObject * obj2 = 0 ;
65178 
65179  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexFlat_train",&obj0,&obj1,&obj2)) SWIG_fail;
65180  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65181  if (!SWIG_IsOK(res1)) {
65182  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_train" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat *""'");
65183  }
65184  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65185  ecode2 = SWIG_AsVal_long(obj1, &val2);
65186  if (!SWIG_IsOK(ecode2)) {
65187  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlat_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
65188  }
65189  arg2 = static_cast< faiss::Index::idx_t >(val2);
65190  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
65191  if (!SWIG_IsOK(res3)) {
65192  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexFlat_train" "', argument " "3"" of type '" "float const *""'");
65193  }
65194  arg3 = reinterpret_cast< float * >(argp3);
65195  {
65196  Py_BEGIN_ALLOW_THREADS
65197  try {
65198  (arg1)->train(arg2,(float const *)arg3);
65199  } catch(faiss::FaissException & e) {
65200  PyEval_RestoreThread(_save);
65201  PyErr_SetString(PyExc_RuntimeError, e.what());
65202  SWIG_fail;
65203  }
65204  Py_END_ALLOW_THREADS
65205  }
65206  resultobj = SWIG_Py_Void();
65207  return resultobj;
65208 fail:
65209  return NULL;
65210 }
65211 
65212 
65213 SWIGINTERN PyObject *_wrap_GpuIndexFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65214  PyObject *resultobj = 0;
65216  faiss::Index::idx_t arg2 ;
65217  float *arg3 = (float *) 0 ;
65218  void *argp1 = 0 ;
65219  int res1 = 0 ;
65220  long val2 ;
65221  int ecode2 = 0 ;
65222  void *argp3 = 0 ;
65223  int res3 = 0 ;
65224  PyObject * obj0 = 0 ;
65225  PyObject * obj1 = 0 ;
65226  PyObject * obj2 = 0 ;
65227 
65228  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
65229  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65230  if (!SWIG_IsOK(res1)) {
65231  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_add" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat *""'");
65232  }
65233  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65234  ecode2 = SWIG_AsVal_long(obj1, &val2);
65235  if (!SWIG_IsOK(ecode2)) {
65236  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlat_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
65237  }
65238  arg2 = static_cast< faiss::Index::idx_t >(val2);
65239  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
65240  if (!SWIG_IsOK(res3)) {
65241  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexFlat_add" "', argument " "3"" of type '" "float const *""'");
65242  }
65243  arg3 = reinterpret_cast< float * >(argp3);
65244  {
65245  Py_BEGIN_ALLOW_THREADS
65246  try {
65247  (arg1)->add(arg2,(float const *)arg3);
65248  } catch(faiss::FaissException & e) {
65249  PyEval_RestoreThread(_save);
65250  PyErr_SetString(PyExc_RuntimeError, e.what());
65251  SWIG_fail;
65252  }
65253  Py_END_ALLOW_THREADS
65254  }
65255  resultobj = SWIG_Py_Void();
65256  return resultobj;
65257 fail:
65258  return NULL;
65259 }
65260 
65261 
65262 SWIGINTERN PyObject *_wrap_GpuIndexFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65263  PyObject *resultobj = 0;
65265  faiss::Index::idx_t arg2 ;
65266  float *arg3 = (float *) 0 ;
65267  faiss::Index::idx_t arg4 ;
65268  float *arg5 = (float *) 0 ;
65270  void *argp1 = 0 ;
65271  int res1 = 0 ;
65272  long val2 ;
65273  int ecode2 = 0 ;
65274  void *argp3 = 0 ;
65275  int res3 = 0 ;
65276  long val4 ;
65277  int ecode4 = 0 ;
65278  void *argp5 = 0 ;
65279  int res5 = 0 ;
65280  void *argp6 = 0 ;
65281  int res6 = 0 ;
65282  PyObject * obj0 = 0 ;
65283  PyObject * obj1 = 0 ;
65284  PyObject * obj2 = 0 ;
65285  PyObject * obj3 = 0 ;
65286  PyObject * obj4 = 0 ;
65287  PyObject * obj5 = 0 ;
65288 
65289  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:GpuIndexFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
65290  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65291  if (!SWIG_IsOK(res1)) {
65292  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_search" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat const *""'");
65293  }
65294  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65295  ecode2 = SWIG_AsVal_long(obj1, &val2);
65296  if (!SWIG_IsOK(ecode2)) {
65297  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlat_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
65298  }
65299  arg2 = static_cast< faiss::Index::idx_t >(val2);
65300  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
65301  if (!SWIG_IsOK(res3)) {
65302  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexFlat_search" "', argument " "3"" of type '" "float const *""'");
65303  }
65304  arg3 = reinterpret_cast< float * >(argp3);
65305  ecode4 = SWIG_AsVal_long(obj3, &val4);
65306  if (!SWIG_IsOK(ecode4)) {
65307  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GpuIndexFlat_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
65308  }
65309  arg4 = static_cast< faiss::Index::idx_t >(val4);
65310  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
65311  if (!SWIG_IsOK(res5)) {
65312  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GpuIndexFlat_search" "', argument " "5"" of type '" "float *""'");
65313  }
65314  arg5 = reinterpret_cast< float * >(argp5);
65315  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
65316  if (!SWIG_IsOK(res6)) {
65317  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "GpuIndexFlat_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
65318  }
65319  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
65320  {
65321  Py_BEGIN_ALLOW_THREADS
65322  try {
65323  ((faiss::gpu::GpuIndexFlat const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
65324  } catch(faiss::FaissException & e) {
65325  PyEval_RestoreThread(_save);
65326  PyErr_SetString(PyExc_RuntimeError, e.what());
65327  SWIG_fail;
65328  }
65329  Py_END_ALLOW_THREADS
65330  }
65331  resultobj = SWIG_Py_Void();
65332  return resultobj;
65333 fail:
65334  return NULL;
65335 }
65336 
65337 
65338 SWIGINTERN PyObject *_wrap_GpuIndexFlat_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65339  PyObject *resultobj = 0;
65341  faiss::Index::idx_t arg2 ;
65342  float *arg3 = (float *) 0 ;
65343  void *argp1 = 0 ;
65344  int res1 = 0 ;
65345  long val2 ;
65346  int ecode2 = 0 ;
65347  void *argp3 = 0 ;
65348  int res3 = 0 ;
65349  PyObject * obj0 = 0 ;
65350  PyObject * obj1 = 0 ;
65351  PyObject * obj2 = 0 ;
65352 
65353  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexFlat_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
65354  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65355  if (!SWIG_IsOK(res1)) {
65356  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_reconstruct" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat const *""'");
65357  }
65358  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65359  ecode2 = SWIG_AsVal_long(obj1, &val2);
65360  if (!SWIG_IsOK(ecode2)) {
65361  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlat_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
65362  }
65363  arg2 = static_cast< faiss::Index::idx_t >(val2);
65364  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
65365  if (!SWIG_IsOK(res3)) {
65366  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexFlat_reconstruct" "', argument " "3"" of type '" "float *""'");
65367  }
65368  arg3 = reinterpret_cast< float * >(argp3);
65369  {
65370  Py_BEGIN_ALLOW_THREADS
65371  try {
65372  ((faiss::gpu::GpuIndexFlat const *)arg1)->reconstruct(arg2,arg3);
65373  } catch(faiss::FaissException & e) {
65374  PyEval_RestoreThread(_save);
65375  PyErr_SetString(PyExc_RuntimeError, e.what());
65376  SWIG_fail;
65377  }
65378  Py_END_ALLOW_THREADS
65379  }
65380  resultobj = SWIG_Py_Void();
65381  return resultobj;
65382 fail:
65383  return NULL;
65384 }
65385 
65386 
65387 SWIGINTERN PyObject *_wrap_GpuIndexFlat_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65388  PyObject *resultobj = 0;
65390  faiss::Index::idx_t arg2 ;
65391  faiss::Index::idx_t arg3 ;
65392  float *arg4 = (float *) 0 ;
65393  void *argp1 = 0 ;
65394  int res1 = 0 ;
65395  long val2 ;
65396  int ecode2 = 0 ;
65397  long val3 ;
65398  int ecode3 = 0 ;
65399  void *argp4 = 0 ;
65400  int res4 = 0 ;
65401  PyObject * obj0 = 0 ;
65402  PyObject * obj1 = 0 ;
65403  PyObject * obj2 = 0 ;
65404  PyObject * obj3 = 0 ;
65405 
65406  if (!PyArg_ParseTuple(args,(char *)"OOOO:GpuIndexFlat_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
65407  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65408  if (!SWIG_IsOK(res1)) {
65409  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_reconstruct_n" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat const *""'");
65410  }
65411  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65412  ecode2 = SWIG_AsVal_long(obj1, &val2);
65413  if (!SWIG_IsOK(ecode2)) {
65414  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexFlat_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
65415  }
65416  arg2 = static_cast< faiss::Index::idx_t >(val2);
65417  ecode3 = SWIG_AsVal_long(obj2, &val3);
65418  if (!SWIG_IsOK(ecode3)) {
65419  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GpuIndexFlat_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
65420  }
65421  arg3 = static_cast< faiss::Index::idx_t >(val3);
65422  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
65423  if (!SWIG_IsOK(res4)) {
65424  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GpuIndexFlat_reconstruct_n" "', argument " "4"" of type '" "float *""'");
65425  }
65426  arg4 = reinterpret_cast< float * >(argp4);
65427  {
65428  Py_BEGIN_ALLOW_THREADS
65429  try {
65430  ((faiss::gpu::GpuIndexFlat const *)arg1)->reconstruct_n(arg2,arg3,arg4);
65431  } catch(faiss::FaissException & e) {
65432  PyEval_RestoreThread(_save);
65433  PyErr_SetString(PyExc_RuntimeError, e.what());
65434  SWIG_fail;
65435  }
65436  Py_END_ALLOW_THREADS
65437  }
65438  resultobj = SWIG_Py_Void();
65439  return resultobj;
65440 fail:
65441  return NULL;
65442 }
65443 
65444 
65445 SWIGINTERN PyObject *_wrap_GpuIndexFlat_getGpuData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65446  PyObject *resultobj = 0;
65448  void *argp1 = 0 ;
65449  int res1 = 0 ;
65450  PyObject * obj0 = 0 ;
65451  faiss::gpu::FlatIndex *result = 0 ;
65452 
65453  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexFlat_getGpuData",&obj0)) SWIG_fail;
65454  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
65455  if (!SWIG_IsOK(res1)) {
65456  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlat_getGpuData" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlat *""'");
65457  }
65458  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlat * >(argp1);
65459  {
65460  Py_BEGIN_ALLOW_THREADS
65461  try {
65462  result = (faiss::gpu::FlatIndex *)(arg1)->getGpuData();
65463  } catch(faiss::FaissException & e) {
65464  PyEval_RestoreThread(_save);
65465  PyErr_SetString(PyExc_RuntimeError, e.what());
65466  SWIG_fail;
65467  }
65468  Py_END_ALLOW_THREADS
65469  }
65470  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__FlatIndex, 0 | 0 );
65471  return resultobj;
65472 fail:
65473  return NULL;
65474 }
65475 
65476 
65477 SWIGINTERN PyObject *GpuIndexFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65478  PyObject *obj;
65479  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
65480  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexFlat, SWIG_NewClientData(obj));
65481  return SWIG_Py_Void();
65482 }
65483 
65484 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatL2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65485  PyObject *resultobj = 0;
65487  faiss::IndexFlatL2 *arg2 = (faiss::IndexFlatL2 *) 0 ;
65489  void *argp1 = 0 ;
65490  int res1 = 0 ;
65491  void *argp2 = 0 ;
65492  int res2 = 0 ;
65493  void *argp3 ;
65494  int res3 = 0 ;
65495  PyObject * obj0 = 0 ;
65496  PyObject * obj1 = 0 ;
65497  PyObject * obj2 = 0 ;
65498  faiss::gpu::GpuIndexFlatL2 *result = 0 ;
65499 
65500  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexFlatL2",&obj0,&obj1,&obj2)) SWIG_fail;
65501  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
65502  if (!SWIG_IsOK(res1)) {
65503  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatL2" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
65504  }
65505  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
65506  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatL2, 0 | 0 );
65507  if (!SWIG_IsOK(res2)) {
65508  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexFlatL2" "', argument " "2"" of type '" "faiss::IndexFlatL2 *""'");
65509  }
65510  arg2 = reinterpret_cast< faiss::IndexFlatL2 * >(argp2);
65511  {
65512  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0);
65513  if (!SWIG_IsOK(res3)) {
65514  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexFlatL2" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
65515  }
65516  if (!argp3) {
65517  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexFlatL2" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
65518  } else {
65519  faiss::gpu::GpuIndexFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp3);
65520  arg3 = *temp;
65521  if (SWIG_IsNewObj(res3)) delete temp;
65522  }
65523  }
65524  {
65525  Py_BEGIN_ALLOW_THREADS
65526  try {
65527  result = (faiss::gpu::GpuIndexFlatL2 *)new faiss::gpu::GpuIndexFlatL2(arg1,arg2,arg3);
65528  } catch(faiss::FaissException & e) {
65529  PyEval_RestoreThread(_save);
65530  PyErr_SetString(PyExc_RuntimeError, e.what());
65531  SWIG_fail;
65532  }
65533  Py_END_ALLOW_THREADS
65534  }
65535  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, SWIG_POINTER_NEW | 0 );
65536  return resultobj;
65537 fail:
65538  return NULL;
65539 }
65540 
65541 
65542 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatL2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65543  PyObject *resultobj = 0;
65545  faiss::IndexFlatL2 *arg2 = (faiss::IndexFlatL2 *) 0 ;
65546  void *argp1 = 0 ;
65547  int res1 = 0 ;
65548  void *argp2 = 0 ;
65549  int res2 = 0 ;
65550  PyObject * obj0 = 0 ;
65551  PyObject * obj1 = 0 ;
65552  faiss::gpu::GpuIndexFlatL2 *result = 0 ;
65553 
65554  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexFlatL2",&obj0,&obj1)) SWIG_fail;
65555  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
65556  if (!SWIG_IsOK(res1)) {
65557  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatL2" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
65558  }
65559  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
65560  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatL2, 0 | 0 );
65561  if (!SWIG_IsOK(res2)) {
65562  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexFlatL2" "', argument " "2"" of type '" "faiss::IndexFlatL2 *""'");
65563  }
65564  arg2 = reinterpret_cast< faiss::IndexFlatL2 * >(argp2);
65565  {
65566  Py_BEGIN_ALLOW_THREADS
65567  try {
65568  result = (faiss::gpu::GpuIndexFlatL2 *)new faiss::gpu::GpuIndexFlatL2(arg1,arg2);
65569  } catch(faiss::FaissException & e) {
65570  PyEval_RestoreThread(_save);
65571  PyErr_SetString(PyExc_RuntimeError, e.what());
65572  SWIG_fail;
65573  }
65574  Py_END_ALLOW_THREADS
65575  }
65576  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, SWIG_POINTER_NEW | 0 );
65577  return resultobj;
65578 fail:
65579  return NULL;
65580 }
65581 
65582 
65583 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatL2__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65584  PyObject *resultobj = 0;
65586  int arg2 ;
65588  void *argp1 = 0 ;
65589  int res1 = 0 ;
65590  int val2 ;
65591  int ecode2 = 0 ;
65592  void *argp3 ;
65593  int res3 = 0 ;
65594  PyObject * obj0 = 0 ;
65595  PyObject * obj1 = 0 ;
65596  PyObject * obj2 = 0 ;
65597  faiss::gpu::GpuIndexFlatL2 *result = 0 ;
65598 
65599  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexFlatL2",&obj0,&obj1,&obj2)) SWIG_fail;
65600  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
65601  if (!SWIG_IsOK(res1)) {
65602  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatL2" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
65603  }
65604  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
65605  ecode2 = SWIG_AsVal_int(obj1, &val2);
65606  if (!SWIG_IsOK(ecode2)) {
65607  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexFlatL2" "', argument " "2"" of type '" "int""'");
65608  }
65609  arg2 = static_cast< int >(val2);
65610  {
65611  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0);
65612  if (!SWIG_IsOK(res3)) {
65613  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexFlatL2" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
65614  }
65615  if (!argp3) {
65616  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexFlatL2" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
65617  } else {
65618  faiss::gpu::GpuIndexFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp3);
65619  arg3 = *temp;
65620  if (SWIG_IsNewObj(res3)) delete temp;
65621  }
65622  }
65623  {
65624  Py_BEGIN_ALLOW_THREADS
65625  try {
65626  result = (faiss::gpu::GpuIndexFlatL2 *)new faiss::gpu::GpuIndexFlatL2(arg1,arg2,arg3);
65627  } catch(faiss::FaissException & e) {
65628  PyEval_RestoreThread(_save);
65629  PyErr_SetString(PyExc_RuntimeError, e.what());
65630  SWIG_fail;
65631  }
65632  Py_END_ALLOW_THREADS
65633  }
65634  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, SWIG_POINTER_NEW | 0 );
65635  return resultobj;
65636 fail:
65637  return NULL;
65638 }
65639 
65640 
65641 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatL2__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65642  PyObject *resultobj = 0;
65644  int arg2 ;
65645  void *argp1 = 0 ;
65646  int res1 = 0 ;
65647  int val2 ;
65648  int ecode2 = 0 ;
65649  PyObject * obj0 = 0 ;
65650  PyObject * obj1 = 0 ;
65651  faiss::gpu::GpuIndexFlatL2 *result = 0 ;
65652 
65653  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexFlatL2",&obj0,&obj1)) SWIG_fail;
65654  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
65655  if (!SWIG_IsOK(res1)) {
65656  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatL2" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
65657  }
65658  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
65659  ecode2 = SWIG_AsVal_int(obj1, &val2);
65660  if (!SWIG_IsOK(ecode2)) {
65661  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexFlatL2" "', argument " "2"" of type '" "int""'");
65662  }
65663  arg2 = static_cast< int >(val2);
65664  {
65665  Py_BEGIN_ALLOW_THREADS
65666  try {
65667  result = (faiss::gpu::GpuIndexFlatL2 *)new faiss::gpu::GpuIndexFlatL2(arg1,arg2);
65668  } catch(faiss::FaissException & e) {
65669  PyEval_RestoreThread(_save);
65670  PyErr_SetString(PyExc_RuntimeError, e.what());
65671  SWIG_fail;
65672  }
65673  Py_END_ALLOW_THREADS
65674  }
65675  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, SWIG_POINTER_NEW | 0 );
65676  return resultobj;
65677 fail:
65678  return NULL;
65679 }
65680 
65681 
65682 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatL2(PyObject *self, PyObject *args) {
65683  Py_ssize_t argc;
65684  PyObject *argv[4] = {
65685  0
65686  };
65687  Py_ssize_t ii;
65688 
65689  if (!PyTuple_Check(args)) SWIG_fail;
65690  argc = args ? PyObject_Length(args) : 0;
65691  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
65692  argv[ii] = PyTuple_GET_ITEM(args,ii);
65693  }
65694  if (argc == 2) {
65695  int _v;
65696  void *vptr = 0;
65697  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
65698  _v = SWIG_CheckState(res);
65699  if (_v) {
65700  void *vptr = 0;
65701  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexFlatL2, 0);
65702  _v = SWIG_CheckState(res);
65703  if (_v) {
65704  return _wrap_new_GpuIndexFlatL2__SWIG_1(self, args);
65705  }
65706  }
65707  }
65708  if (argc == 2) {
65709  int _v;
65710  void *vptr = 0;
65711  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
65712  _v = SWIG_CheckState(res);
65713  if (_v) {
65714  {
65715  int res = SWIG_AsVal_int(argv[1], NULL);
65716  _v = SWIG_CheckState(res);
65717  }
65718  if (_v) {
65719  return _wrap_new_GpuIndexFlatL2__SWIG_3(self, args);
65720  }
65721  }
65722  }
65723  if (argc == 3) {
65724  int _v;
65725  void *vptr = 0;
65726  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
65727  _v = SWIG_CheckState(res);
65728  if (_v) {
65729  void *vptr = 0;
65730  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexFlatL2, 0);
65731  _v = SWIG_CheckState(res);
65732  if (_v) {
65733  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0);
65734  _v = SWIG_CheckState(res);
65735  if (_v) {
65736  return _wrap_new_GpuIndexFlatL2__SWIG_0(self, args);
65737  }
65738  }
65739  }
65740  }
65741  if (argc == 3) {
65742  int _v;
65743  void *vptr = 0;
65744  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
65745  _v = SWIG_CheckState(res);
65746  if (_v) {
65747  {
65748  int res = SWIG_AsVal_int(argv[1], NULL);
65749  _v = SWIG_CheckState(res);
65750  }
65751  if (_v) {
65752  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0);
65753  _v = SWIG_CheckState(res);
65754  if (_v) {
65755  return _wrap_new_GpuIndexFlatL2__SWIG_2(self, args);
65756  }
65757  }
65758  }
65759  }
65760 
65761 fail:
65762  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_GpuIndexFlatL2'.\n"
65763  " Possible C/C++ prototypes are:\n"
65764  " faiss::gpu::GpuIndexFlatL2::GpuIndexFlatL2(faiss::gpu::GpuResources *,faiss::IndexFlatL2 *,faiss::gpu::GpuIndexFlatConfig)\n"
65765  " faiss::gpu::GpuIndexFlatL2::GpuIndexFlatL2(faiss::gpu::GpuResources *,faiss::IndexFlatL2 *)\n"
65766  " faiss::gpu::GpuIndexFlatL2::GpuIndexFlatL2(faiss::gpu::GpuResources *,int,faiss::gpu::GpuIndexFlatConfig)\n"
65767  " faiss::gpu::GpuIndexFlatL2::GpuIndexFlatL2(faiss::gpu::GpuResources *,int)\n");
65768  return 0;
65769 }
65770 
65771 
65772 SWIGINTERN PyObject *_wrap_GpuIndexFlatL2_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65773  PyObject *resultobj = 0;
65775  faiss::IndexFlatL2 *arg2 = (faiss::IndexFlatL2 *) 0 ;
65776  void *argp1 = 0 ;
65777  int res1 = 0 ;
65778  void *argp2 = 0 ;
65779  int res2 = 0 ;
65780  PyObject * obj0 = 0 ;
65781  PyObject * obj1 = 0 ;
65782 
65783  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlatL2_copyFrom",&obj0,&obj1)) SWIG_fail;
65784  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, 0 | 0 );
65785  if (!SWIG_IsOK(res1)) {
65786  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatL2_copyFrom" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatL2 *""'");
65787  }
65788  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatL2 * >(argp1);
65789  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatL2, 0 | 0 );
65790  if (!SWIG_IsOK(res2)) {
65791  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexFlatL2_copyFrom" "', argument " "2"" of type '" "faiss::IndexFlatL2 *""'");
65792  }
65793  arg2 = reinterpret_cast< faiss::IndexFlatL2 * >(argp2);
65794  {
65795  Py_BEGIN_ALLOW_THREADS
65796  try {
65797  (arg1)->copyFrom(arg2);
65798  } catch(faiss::FaissException & e) {
65799  PyEval_RestoreThread(_save);
65800  PyErr_SetString(PyExc_RuntimeError, e.what());
65801  SWIG_fail;
65802  }
65803  Py_END_ALLOW_THREADS
65804  }
65805  resultobj = SWIG_Py_Void();
65806  return resultobj;
65807 fail:
65808  return NULL;
65809 }
65810 
65811 
65812 SWIGINTERN PyObject *_wrap_GpuIndexFlatL2_copyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65813  PyObject *resultobj = 0;
65815  faiss::IndexFlatL2 *arg2 = (faiss::IndexFlatL2 *) 0 ;
65816  void *argp1 = 0 ;
65817  int res1 = 0 ;
65818  void *argp2 = 0 ;
65819  int res2 = 0 ;
65820  PyObject * obj0 = 0 ;
65821  PyObject * obj1 = 0 ;
65822 
65823  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlatL2_copyTo",&obj0,&obj1)) SWIG_fail;
65824  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, 0 | 0 );
65825  if (!SWIG_IsOK(res1)) {
65826  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatL2_copyTo" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatL2 *""'");
65827  }
65828  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatL2 * >(argp1);
65829  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatL2, 0 | 0 );
65830  if (!SWIG_IsOK(res2)) {
65831  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexFlatL2_copyTo" "', argument " "2"" of type '" "faiss::IndexFlatL2 *""'");
65832  }
65833  arg2 = reinterpret_cast< faiss::IndexFlatL2 * >(argp2);
65834  {
65835  Py_BEGIN_ALLOW_THREADS
65836  try {
65837  (arg1)->copyTo(arg2);
65838  } catch(faiss::FaissException & e) {
65839  PyEval_RestoreThread(_save);
65840  PyErr_SetString(PyExc_RuntimeError, e.what());
65841  SWIG_fail;
65842  }
65843  Py_END_ALLOW_THREADS
65844  }
65845  resultobj = SWIG_Py_Void();
65846  return resultobj;
65847 fail:
65848  return NULL;
65849 }
65850 
65851 
65852 SWIGINTERN PyObject *_wrap_delete_GpuIndexFlatL2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65853  PyObject *resultobj = 0;
65855  void *argp1 = 0 ;
65856  int res1 = 0 ;
65857  PyObject * obj0 = 0 ;
65858 
65859  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexFlatL2",&obj0)) SWIG_fail;
65860  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, SWIG_POINTER_DISOWN | 0 );
65861  if (!SWIG_IsOK(res1)) {
65862  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexFlatL2" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatL2 *""'");
65863  }
65864  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatL2 * >(argp1);
65865  delete arg1;
65866  resultobj = SWIG_Py_Void();
65867  return resultobj;
65868 fail:
65869  return NULL;
65870 }
65871 
65872 
65873 SWIGINTERN PyObject *GpuIndexFlatL2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65874  PyObject *obj;
65875  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
65876  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexFlatL2, SWIG_NewClientData(obj));
65877  return SWIG_Py_Void();
65878 }
65879 
65880 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatIP__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65881  PyObject *resultobj = 0;
65883  faiss::IndexFlatIP *arg2 = (faiss::IndexFlatIP *) 0 ;
65885  void *argp1 = 0 ;
65886  int res1 = 0 ;
65887  void *argp2 = 0 ;
65888  int res2 = 0 ;
65889  void *argp3 ;
65890  int res3 = 0 ;
65891  PyObject * obj0 = 0 ;
65892  PyObject * obj1 = 0 ;
65893  PyObject * obj2 = 0 ;
65894  faiss::gpu::GpuIndexFlatIP *result = 0 ;
65895 
65896  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexFlatIP",&obj0,&obj1,&obj2)) SWIG_fail;
65897  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
65898  if (!SWIG_IsOK(res1)) {
65899  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatIP" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
65900  }
65901  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
65902  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatIP, 0 | 0 );
65903  if (!SWIG_IsOK(res2)) {
65904  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexFlatIP" "', argument " "2"" of type '" "faiss::IndexFlatIP *""'");
65905  }
65906  arg2 = reinterpret_cast< faiss::IndexFlatIP * >(argp2);
65907  {
65908  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0);
65909  if (!SWIG_IsOK(res3)) {
65910  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexFlatIP" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
65911  }
65912  if (!argp3) {
65913  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexFlatIP" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
65914  } else {
65915  faiss::gpu::GpuIndexFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp3);
65916  arg3 = *temp;
65917  if (SWIG_IsNewObj(res3)) delete temp;
65918  }
65919  }
65920  {
65921  Py_BEGIN_ALLOW_THREADS
65922  try {
65923  result = (faiss::gpu::GpuIndexFlatIP *)new faiss::gpu::GpuIndexFlatIP(arg1,arg2,arg3);
65924  } catch(faiss::FaissException & e) {
65925  PyEval_RestoreThread(_save);
65926  PyErr_SetString(PyExc_RuntimeError, e.what());
65927  SWIG_fail;
65928  }
65929  Py_END_ALLOW_THREADS
65930  }
65931  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, SWIG_POINTER_NEW | 0 );
65932  return resultobj;
65933 fail:
65934  return NULL;
65935 }
65936 
65937 
65938 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatIP__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65939  PyObject *resultobj = 0;
65941  faiss::IndexFlatIP *arg2 = (faiss::IndexFlatIP *) 0 ;
65942  void *argp1 = 0 ;
65943  int res1 = 0 ;
65944  void *argp2 = 0 ;
65945  int res2 = 0 ;
65946  PyObject * obj0 = 0 ;
65947  PyObject * obj1 = 0 ;
65948  faiss::gpu::GpuIndexFlatIP *result = 0 ;
65949 
65950  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexFlatIP",&obj0,&obj1)) SWIG_fail;
65951  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
65952  if (!SWIG_IsOK(res1)) {
65953  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatIP" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
65954  }
65955  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
65956  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatIP, 0 | 0 );
65957  if (!SWIG_IsOK(res2)) {
65958  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexFlatIP" "', argument " "2"" of type '" "faiss::IndexFlatIP *""'");
65959  }
65960  arg2 = reinterpret_cast< faiss::IndexFlatIP * >(argp2);
65961  {
65962  Py_BEGIN_ALLOW_THREADS
65963  try {
65964  result = (faiss::gpu::GpuIndexFlatIP *)new faiss::gpu::GpuIndexFlatIP(arg1,arg2);
65965  } catch(faiss::FaissException & e) {
65966  PyEval_RestoreThread(_save);
65967  PyErr_SetString(PyExc_RuntimeError, e.what());
65968  SWIG_fail;
65969  }
65970  Py_END_ALLOW_THREADS
65971  }
65972  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, SWIG_POINTER_NEW | 0 );
65973  return resultobj;
65974 fail:
65975  return NULL;
65976 }
65977 
65978 
65979 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatIP__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65980  PyObject *resultobj = 0;
65982  int arg2 ;
65984  void *argp1 = 0 ;
65985  int res1 = 0 ;
65986  int val2 ;
65987  int ecode2 = 0 ;
65988  void *argp3 ;
65989  int res3 = 0 ;
65990  PyObject * obj0 = 0 ;
65991  PyObject * obj1 = 0 ;
65992  PyObject * obj2 = 0 ;
65993  faiss::gpu::GpuIndexFlatIP *result = 0 ;
65994 
65995  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexFlatIP",&obj0,&obj1,&obj2)) SWIG_fail;
65996  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
65997  if (!SWIG_IsOK(res1)) {
65998  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatIP" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
65999  }
66000  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
66001  ecode2 = SWIG_AsVal_int(obj1, &val2);
66002  if (!SWIG_IsOK(ecode2)) {
66003  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexFlatIP" "', argument " "2"" of type '" "int""'");
66004  }
66005  arg2 = static_cast< int >(val2);
66006  {
66007  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0);
66008  if (!SWIG_IsOK(res3)) {
66009  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexFlatIP" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
66010  }
66011  if (!argp3) {
66012  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexFlatIP" "', argument " "3"" of type '" "faiss::gpu::GpuIndexFlatConfig""'");
66013  } else {
66014  faiss::gpu::GpuIndexFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp3);
66015  arg3 = *temp;
66016  if (SWIG_IsNewObj(res3)) delete temp;
66017  }
66018  }
66019  {
66020  Py_BEGIN_ALLOW_THREADS
66021  try {
66022  result = (faiss::gpu::GpuIndexFlatIP *)new faiss::gpu::GpuIndexFlatIP(arg1,arg2,arg3);
66023  } catch(faiss::FaissException & e) {
66024  PyEval_RestoreThread(_save);
66025  PyErr_SetString(PyExc_RuntimeError, e.what());
66026  SWIG_fail;
66027  }
66028  Py_END_ALLOW_THREADS
66029  }
66030  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, SWIG_POINTER_NEW | 0 );
66031  return resultobj;
66032 fail:
66033  return NULL;
66034 }
66035 
66036 
66037 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatIP__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66038  PyObject *resultobj = 0;
66040  int arg2 ;
66041  void *argp1 = 0 ;
66042  int res1 = 0 ;
66043  int val2 ;
66044  int ecode2 = 0 ;
66045  PyObject * obj0 = 0 ;
66046  PyObject * obj1 = 0 ;
66047  faiss::gpu::GpuIndexFlatIP *result = 0 ;
66048 
66049  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexFlatIP",&obj0,&obj1)) SWIG_fail;
66050  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
66051  if (!SWIG_IsOK(res1)) {
66052  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexFlatIP" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
66053  }
66054  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
66055  ecode2 = SWIG_AsVal_int(obj1, &val2);
66056  if (!SWIG_IsOK(ecode2)) {
66057  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexFlatIP" "', argument " "2"" of type '" "int""'");
66058  }
66059  arg2 = static_cast< int >(val2);
66060  {
66061  Py_BEGIN_ALLOW_THREADS
66062  try {
66063  result = (faiss::gpu::GpuIndexFlatIP *)new faiss::gpu::GpuIndexFlatIP(arg1,arg2);
66064  } catch(faiss::FaissException & e) {
66065  PyEval_RestoreThread(_save);
66066  PyErr_SetString(PyExc_RuntimeError, e.what());
66067  SWIG_fail;
66068  }
66069  Py_END_ALLOW_THREADS
66070  }
66071  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, SWIG_POINTER_NEW | 0 );
66072  return resultobj;
66073 fail:
66074  return NULL;
66075 }
66076 
66077 
66078 SWIGINTERN PyObject *_wrap_new_GpuIndexFlatIP(PyObject *self, PyObject *args) {
66079  Py_ssize_t argc;
66080  PyObject *argv[4] = {
66081  0
66082  };
66083  Py_ssize_t ii;
66084 
66085  if (!PyTuple_Check(args)) SWIG_fail;
66086  argc = args ? PyObject_Length(args) : 0;
66087  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
66088  argv[ii] = PyTuple_GET_ITEM(args,ii);
66089  }
66090  if (argc == 2) {
66091  int _v;
66092  void *vptr = 0;
66093  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
66094  _v = SWIG_CheckState(res);
66095  if (_v) {
66096  void *vptr = 0;
66097  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexFlatIP, 0);
66098  _v = SWIG_CheckState(res);
66099  if (_v) {
66100  return _wrap_new_GpuIndexFlatIP__SWIG_1(self, args);
66101  }
66102  }
66103  }
66104  if (argc == 2) {
66105  int _v;
66106  void *vptr = 0;
66107  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
66108  _v = SWIG_CheckState(res);
66109  if (_v) {
66110  {
66111  int res = SWIG_AsVal_int(argv[1], NULL);
66112  _v = SWIG_CheckState(res);
66113  }
66114  if (_v) {
66115  return _wrap_new_GpuIndexFlatIP__SWIG_3(self, args);
66116  }
66117  }
66118  }
66119  if (argc == 3) {
66120  int _v;
66121  void *vptr = 0;
66122  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
66123  _v = SWIG_CheckState(res);
66124  if (_v) {
66125  void *vptr = 0;
66126  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexFlatIP, 0);
66127  _v = SWIG_CheckState(res);
66128  if (_v) {
66129  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0);
66130  _v = SWIG_CheckState(res);
66131  if (_v) {
66132  return _wrap_new_GpuIndexFlatIP__SWIG_0(self, args);
66133  }
66134  }
66135  }
66136  }
66137  if (argc == 3) {
66138  int _v;
66139  void *vptr = 0;
66140  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
66141  _v = SWIG_CheckState(res);
66142  if (_v) {
66143  {
66144  int res = SWIG_AsVal_int(argv[1], NULL);
66145  _v = SWIG_CheckState(res);
66146  }
66147  if (_v) {
66148  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0);
66149  _v = SWIG_CheckState(res);
66150  if (_v) {
66151  return _wrap_new_GpuIndexFlatIP__SWIG_2(self, args);
66152  }
66153  }
66154  }
66155  }
66156 
66157 fail:
66158  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_GpuIndexFlatIP'.\n"
66159  " Possible C/C++ prototypes are:\n"
66160  " faiss::gpu::GpuIndexFlatIP::GpuIndexFlatIP(faiss::gpu::GpuResources *,faiss::IndexFlatIP *,faiss::gpu::GpuIndexFlatConfig)\n"
66161  " faiss::gpu::GpuIndexFlatIP::GpuIndexFlatIP(faiss::gpu::GpuResources *,faiss::IndexFlatIP *)\n"
66162  " faiss::gpu::GpuIndexFlatIP::GpuIndexFlatIP(faiss::gpu::GpuResources *,int,faiss::gpu::GpuIndexFlatConfig)\n"
66163  " faiss::gpu::GpuIndexFlatIP::GpuIndexFlatIP(faiss::gpu::GpuResources *,int)\n");
66164  return 0;
66165 }
66166 
66167 
66168 SWIGINTERN PyObject *_wrap_GpuIndexFlatIP_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66169  PyObject *resultobj = 0;
66171  faiss::IndexFlatIP *arg2 = (faiss::IndexFlatIP *) 0 ;
66172  void *argp1 = 0 ;
66173  int res1 = 0 ;
66174  void *argp2 = 0 ;
66175  int res2 = 0 ;
66176  PyObject * obj0 = 0 ;
66177  PyObject * obj1 = 0 ;
66178 
66179  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlatIP_copyFrom",&obj0,&obj1)) SWIG_fail;
66180  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, 0 | 0 );
66181  if (!SWIG_IsOK(res1)) {
66182  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatIP_copyFrom" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatIP *""'");
66183  }
66184  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatIP * >(argp1);
66185  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatIP, 0 | 0 );
66186  if (!SWIG_IsOK(res2)) {
66187  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexFlatIP_copyFrom" "', argument " "2"" of type '" "faiss::IndexFlatIP *""'");
66188  }
66189  arg2 = reinterpret_cast< faiss::IndexFlatIP * >(argp2);
66190  {
66191  Py_BEGIN_ALLOW_THREADS
66192  try {
66193  (arg1)->copyFrom(arg2);
66194  } catch(faiss::FaissException & e) {
66195  PyEval_RestoreThread(_save);
66196  PyErr_SetString(PyExc_RuntimeError, e.what());
66197  SWIG_fail;
66198  }
66199  Py_END_ALLOW_THREADS
66200  }
66201  resultobj = SWIG_Py_Void();
66202  return resultobj;
66203 fail:
66204  return NULL;
66205 }
66206 
66207 
66208 SWIGINTERN PyObject *_wrap_GpuIndexFlatIP_copyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66209  PyObject *resultobj = 0;
66211  faiss::IndexFlatIP *arg2 = (faiss::IndexFlatIP *) 0 ;
66212  void *argp1 = 0 ;
66213  int res1 = 0 ;
66214  void *argp2 = 0 ;
66215  int res2 = 0 ;
66216  PyObject * obj0 = 0 ;
66217  PyObject * obj1 = 0 ;
66218 
66219  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexFlatIP_copyTo",&obj0,&obj1)) SWIG_fail;
66220  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, 0 | 0 );
66221  if (!SWIG_IsOK(res1)) {
66222  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexFlatIP_copyTo" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatIP *""'");
66223  }
66224  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatIP * >(argp1);
66225  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlatIP, 0 | 0 );
66226  if (!SWIG_IsOK(res2)) {
66227  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexFlatIP_copyTo" "', argument " "2"" of type '" "faiss::IndexFlatIP *""'");
66228  }
66229  arg2 = reinterpret_cast< faiss::IndexFlatIP * >(argp2);
66230  {
66231  Py_BEGIN_ALLOW_THREADS
66232  try {
66233  (arg1)->copyTo(arg2);
66234  } catch(faiss::FaissException & e) {
66235  PyEval_RestoreThread(_save);
66236  PyErr_SetString(PyExc_RuntimeError, e.what());
66237  SWIG_fail;
66238  }
66239  Py_END_ALLOW_THREADS
66240  }
66241  resultobj = SWIG_Py_Void();
66242  return resultobj;
66243 fail:
66244  return NULL;
66245 }
66246 
66247 
66248 SWIGINTERN PyObject *_wrap_delete_GpuIndexFlatIP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66249  PyObject *resultobj = 0;
66251  void *argp1 = 0 ;
66252  int res1 = 0 ;
66253  PyObject * obj0 = 0 ;
66254 
66255  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexFlatIP",&obj0)) SWIG_fail;
66256  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, SWIG_POINTER_DISOWN | 0 );
66257  if (!SWIG_IsOK(res1)) {
66258  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexFlatIP" "', argument " "1"" of type '" "faiss::gpu::GpuIndexFlatIP *""'");
66259  }
66260  arg1 = reinterpret_cast< faiss::gpu::GpuIndexFlatIP * >(argp1);
66261  delete arg1;
66262  resultobj = SWIG_Py_Void();
66263  return resultobj;
66264 fail:
66265  return NULL;
66266 }
66267 
66268 
66269 SWIGINTERN PyObject *GpuIndexFlatIP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66270  PyObject *obj;
66271  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
66272  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexFlatIP, SWIG_NewClientData(obj));
66273  return SWIG_Py_Void();
66274 }
66275 
66276 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66277  PyObject *resultobj = 0;
66278  faiss::gpu::GpuIndexIVFConfig *result = 0 ;
66279 
66280  if (!PyArg_ParseTuple(args,(char *)":new_GpuIndexIVFConfig")) SWIG_fail;
66281  {
66282  Py_BEGIN_ALLOW_THREADS
66283  try {
66285  } catch(faiss::FaissException & e) {
66286  PyEval_RestoreThread(_save);
66287  PyErr_SetString(PyExc_RuntimeError, e.what());
66288  SWIG_fail;
66289  }
66290  Py_END_ALLOW_THREADS
66291  }
66292  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig, SWIG_POINTER_NEW | 0 );
66293  return resultobj;
66294 fail:
66295  return NULL;
66296 }
66297 
66298 
66299 SWIGINTERN PyObject *_wrap_GpuIndexIVFConfig_indicesOptions_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66300  PyObject *resultobj = 0;
66302  faiss::gpu::IndicesOptions arg2 ;
66303  void *argp1 = 0 ;
66304  int res1 = 0 ;
66305  int val2 ;
66306  int ecode2 = 0 ;
66307  PyObject * obj0 = 0 ;
66308  PyObject * obj1 = 0 ;
66309 
66310  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFConfig_indicesOptions_set",&obj0,&obj1)) SWIG_fail;
66311  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig, 0 | 0 );
66312  if (!SWIG_IsOK(res1)) {
66313  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFConfig_indicesOptions_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFConfig *""'");
66314  }
66315  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFConfig * >(argp1);
66316  ecode2 = SWIG_AsVal_int(obj1, &val2);
66317  if (!SWIG_IsOK(ecode2)) {
66318  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFConfig_indicesOptions_set" "', argument " "2"" of type '" "faiss::gpu::IndicesOptions""'");
66319  }
66320  arg2 = static_cast< faiss::gpu::IndicesOptions >(val2);
66321  if (arg1) (arg1)->indicesOptions = arg2;
66322  resultobj = SWIG_Py_Void();
66323  return resultobj;
66324 fail:
66325  return NULL;
66326 }
66327 
66328 
66329 SWIGINTERN PyObject *_wrap_GpuIndexIVFConfig_indicesOptions_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66330  PyObject *resultobj = 0;
66332  void *argp1 = 0 ;
66333  int res1 = 0 ;
66334  PyObject * obj0 = 0 ;
66335  faiss::gpu::IndicesOptions result;
66336 
66337  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFConfig_indicesOptions_get",&obj0)) SWIG_fail;
66338  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig, 0 | 0 );
66339  if (!SWIG_IsOK(res1)) {
66340  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFConfig_indicesOptions_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFConfig *""'");
66341  }
66342  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFConfig * >(argp1);
66343  result = (faiss::gpu::IndicesOptions) ((arg1)->indicesOptions);
66344  resultobj = SWIG_From_int(static_cast< int >(result));
66345  return resultobj;
66346 fail:
66347  return NULL;
66348 }
66349 
66350 
66351 SWIGINTERN PyObject *_wrap_GpuIndexIVFConfig_flatConfig_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66352  PyObject *resultobj = 0;
66355  void *argp1 = 0 ;
66356  int res1 = 0 ;
66357  void *argp2 = 0 ;
66358  int res2 = 0 ;
66359  PyObject * obj0 = 0 ;
66360  PyObject * obj1 = 0 ;
66361 
66362  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFConfig_flatConfig_set",&obj0,&obj1)) SWIG_fail;
66363  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig, 0 | 0 );
66364  if (!SWIG_IsOK(res1)) {
66365  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFConfig_flatConfig_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFConfig *""'");
66366  }
66367  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFConfig * >(argp1);
66368  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
66369  if (!SWIG_IsOK(res2)) {
66370  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVFConfig_flatConfig_set" "', argument " "2"" of type '" "faiss::gpu::GpuIndexFlatConfig *""'");
66371  }
66372  arg2 = reinterpret_cast< faiss::gpu::GpuIndexFlatConfig * >(argp2);
66373  if (arg1) (arg1)->flatConfig = *arg2;
66374  resultobj = SWIG_Py_Void();
66375  return resultobj;
66376 fail:
66377  return NULL;
66378 }
66379 
66380 
66381 SWIGINTERN PyObject *_wrap_GpuIndexIVFConfig_flatConfig_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66382  PyObject *resultobj = 0;
66384  void *argp1 = 0 ;
66385  int res1 = 0 ;
66386  PyObject * obj0 = 0 ;
66387  faiss::gpu::GpuIndexFlatConfig *result = 0 ;
66388 
66389  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFConfig_flatConfig_get",&obj0)) SWIG_fail;
66390  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig, 0 | 0 );
66391  if (!SWIG_IsOK(res1)) {
66392  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFConfig_flatConfig_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFConfig *""'");
66393  }
66394  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFConfig * >(argp1);
66395  result = (faiss::gpu::GpuIndexFlatConfig *)& ((arg1)->flatConfig);
66396  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlatConfig, 0 | 0 );
66397  return resultobj;
66398 fail:
66399  return NULL;
66400 }
66401 
66402 
66403 SWIGINTERN PyObject *_wrap_delete_GpuIndexIVFConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66404  PyObject *resultobj = 0;
66406  void *argp1 = 0 ;
66407  int res1 = 0 ;
66408  PyObject * obj0 = 0 ;
66409 
66410  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexIVFConfig",&obj0)) SWIG_fail;
66411  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig, SWIG_POINTER_DISOWN | 0 );
66412  if (!SWIG_IsOK(res1)) {
66413  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexIVFConfig" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFConfig *""'");
66414  }
66415  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFConfig * >(argp1);
66416  delete arg1;
66417  resultobj = SWIG_Py_Void();
66418  return resultobj;
66419 fail:
66420  return NULL;
66421 }
66422 
66423 
66424 SWIGINTERN PyObject *GpuIndexIVFConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66425  PyObject *obj;
66426  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
66427  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexIVFConfig, SWIG_NewClientData(obj));
66428  return SWIG_Py_Void();
66429 }
66430 
66431 SWIGINTERN PyObject *_wrap_delete_GpuIndexIVF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66432  PyObject *resultobj = 0;
66434  void *argp1 = 0 ;
66435  int res1 = 0 ;
66436  PyObject * obj0 = 0 ;
66437 
66438  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexIVF",&obj0)) SWIG_fail;
66439  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, SWIG_POINTER_DISOWN | 0 );
66440  if (!SWIG_IsOK(res1)) {
66441  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexIVF" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF *""'");
66442  }
66443  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66444  {
66445  Py_BEGIN_ALLOW_THREADS
66446  try {
66447  delete arg1;
66448  } catch(faiss::FaissException & e) {
66449  PyEval_RestoreThread(_save);
66450  PyErr_SetString(PyExc_RuntimeError, e.what());
66451  SWIG_fail;
66452  }
66453  Py_END_ALLOW_THREADS
66454  }
66455  resultobj = SWIG_Py_Void();
66456  return resultobj;
66457 fail:
66458  return NULL;
66459 }
66460 
66461 
66462 SWIGINTERN PyObject *_wrap_GpuIndexIVF_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66463  PyObject *resultobj = 0;
66465  faiss::IndexIVF *arg2 = (faiss::IndexIVF *) 0 ;
66466  void *argp1 = 0 ;
66467  int res1 = 0 ;
66468  void *argp2 = 0 ;
66469  int res2 = 0 ;
66470  PyObject * obj0 = 0 ;
66471  PyObject * obj1 = 0 ;
66472 
66473  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVF_copyFrom",&obj0,&obj1)) SWIG_fail;
66474  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66475  if (!SWIG_IsOK(res1)) {
66476  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_copyFrom" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF *""'");
66477  }
66478  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66479  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
66480  if (!SWIG_IsOK(res2)) {
66481  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVF_copyFrom" "', argument " "2"" of type '" "faiss::IndexIVF const *""'");
66482  }
66483  arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
66484  {
66485  Py_BEGIN_ALLOW_THREADS
66486  try {
66487  (arg1)->copyFrom((faiss::IndexIVF const *)arg2);
66488  } catch(faiss::FaissException & e) {
66489  PyEval_RestoreThread(_save);
66490  PyErr_SetString(PyExc_RuntimeError, e.what());
66491  SWIG_fail;
66492  }
66493  Py_END_ALLOW_THREADS
66494  }
66495  resultobj = SWIG_Py_Void();
66496  return resultobj;
66497 fail:
66498  return NULL;
66499 }
66500 
66501 
66502 SWIGINTERN PyObject *_wrap_GpuIndexIVF_copyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66503  PyObject *resultobj = 0;
66505  faiss::IndexIVF *arg2 = (faiss::IndexIVF *) 0 ;
66506  void *argp1 = 0 ;
66507  int res1 = 0 ;
66508  void *argp2 = 0 ;
66509  int res2 = 0 ;
66510  PyObject * obj0 = 0 ;
66511  PyObject * obj1 = 0 ;
66512 
66513  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVF_copyTo",&obj0,&obj1)) SWIG_fail;
66514  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66515  if (!SWIG_IsOK(res1)) {
66516  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_copyTo" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF const *""'");
66517  }
66518  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66519  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
66520  if (!SWIG_IsOK(res2)) {
66521  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVF_copyTo" "', argument " "2"" of type '" "faiss::IndexIVF *""'");
66522  }
66523  arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
66524  {
66525  Py_BEGIN_ALLOW_THREADS
66526  try {
66527  ((faiss::gpu::GpuIndexIVF const *)arg1)->copyTo(arg2);
66528  } catch(faiss::FaissException & e) {
66529  PyEval_RestoreThread(_save);
66530  PyErr_SetString(PyExc_RuntimeError, e.what());
66531  SWIG_fail;
66532  }
66533  Py_END_ALLOW_THREADS
66534  }
66535  resultobj = SWIG_Py_Void();
66536  return resultobj;
66537 fail:
66538  return NULL;
66539 }
66540 
66541 
66542 SWIGINTERN PyObject *_wrap_GpuIndexIVF_getNumLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66543  PyObject *resultobj = 0;
66545  void *argp1 = 0 ;
66546  int res1 = 0 ;
66547  PyObject * obj0 = 0 ;
66548  int result;
66549 
66550  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVF_getNumLists",&obj0)) SWIG_fail;
66551  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66552  if (!SWIG_IsOK(res1)) {
66553  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_getNumLists" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF const *""'");
66554  }
66555  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66556  {
66557  Py_BEGIN_ALLOW_THREADS
66558  try {
66559  result = (int)((faiss::gpu::GpuIndexIVF const *)arg1)->getNumLists();
66560  } catch(faiss::FaissException & e) {
66561  PyEval_RestoreThread(_save);
66562  PyErr_SetString(PyExc_RuntimeError, e.what());
66563  SWIG_fail;
66564  }
66565  Py_END_ALLOW_THREADS
66566  }
66567  resultobj = SWIG_From_int(static_cast< int >(result));
66568  return resultobj;
66569 fail:
66570  return NULL;
66571 }
66572 
66573 
66574 SWIGINTERN PyObject *_wrap_GpuIndexIVF_getQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66575  PyObject *resultobj = 0;
66577  void *argp1 = 0 ;
66578  int res1 = 0 ;
66579  PyObject * obj0 = 0 ;
66580  faiss::gpu::GpuIndexFlat *result = 0 ;
66581 
66582  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVF_getQuantizer",&obj0)) SWIG_fail;
66583  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66584  if (!SWIG_IsOK(res1)) {
66585  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_getQuantizer" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF *""'");
66586  }
66587  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66588  {
66589  Py_BEGIN_ALLOW_THREADS
66590  try {
66591  result = (faiss::gpu::GpuIndexFlat *)(arg1)->getQuantizer();
66592  } catch(faiss::FaissException & e) {
66593  PyEval_RestoreThread(_save);
66594  PyErr_SetString(PyExc_RuntimeError, e.what());
66595  SWIG_fail;
66596  }
66597  Py_END_ALLOW_THREADS
66598  }
66599  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexFlat, 0 | 0 );
66600  return resultobj;
66601 fail:
66602  return NULL;
66603 }
66604 
66605 
66606 SWIGINTERN PyObject *_wrap_GpuIndexIVF_setNumProbes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66607  PyObject *resultobj = 0;
66609  int arg2 ;
66610  void *argp1 = 0 ;
66611  int res1 = 0 ;
66612  int val2 ;
66613  int ecode2 = 0 ;
66614  PyObject * obj0 = 0 ;
66615  PyObject * obj1 = 0 ;
66616 
66617  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVF_setNumProbes",&obj0,&obj1)) SWIG_fail;
66618  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66619  if (!SWIG_IsOK(res1)) {
66620  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_setNumProbes" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF *""'");
66621  }
66622  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66623  ecode2 = SWIG_AsVal_int(obj1, &val2);
66624  if (!SWIG_IsOK(ecode2)) {
66625  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVF_setNumProbes" "', argument " "2"" of type '" "int""'");
66626  }
66627  arg2 = static_cast< int >(val2);
66628  {
66629  Py_BEGIN_ALLOW_THREADS
66630  try {
66631  (arg1)->setNumProbes(arg2);
66632  } catch(faiss::FaissException & e) {
66633  PyEval_RestoreThread(_save);
66634  PyErr_SetString(PyExc_RuntimeError, e.what());
66635  SWIG_fail;
66636  }
66637  Py_END_ALLOW_THREADS
66638  }
66639  resultobj = SWIG_Py_Void();
66640  return resultobj;
66641 fail:
66642  return NULL;
66643 }
66644 
66645 
66646 SWIGINTERN PyObject *_wrap_GpuIndexIVF_getNumProbes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66647  PyObject *resultobj = 0;
66649  void *argp1 = 0 ;
66650  int res1 = 0 ;
66651  PyObject * obj0 = 0 ;
66652  int result;
66653 
66654  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVF_getNumProbes",&obj0)) SWIG_fail;
66655  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66656  if (!SWIG_IsOK(res1)) {
66657  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_getNumProbes" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF const *""'");
66658  }
66659  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66660  {
66661  Py_BEGIN_ALLOW_THREADS
66662  try {
66663  result = (int)((faiss::gpu::GpuIndexIVF const *)arg1)->getNumProbes();
66664  } catch(faiss::FaissException & e) {
66665  PyEval_RestoreThread(_save);
66666  PyErr_SetString(PyExc_RuntimeError, e.what());
66667  SWIG_fail;
66668  }
66669  Py_END_ALLOW_THREADS
66670  }
66671  resultobj = SWIG_From_int(static_cast< int >(result));
66672  return resultobj;
66673 fail:
66674  return NULL;
66675 }
66676 
66677 
66678 SWIGINTERN PyObject *_wrap_GpuIndexIVF_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66679  PyObject *resultobj = 0;
66681  faiss::Index::idx_t arg2 ;
66682  float *arg3 = (float *) 0 ;
66683  void *argp1 = 0 ;
66684  int res1 = 0 ;
66685  long val2 ;
66686  int ecode2 = 0 ;
66687  void *argp3 = 0 ;
66688  int res3 = 0 ;
66689  PyObject * obj0 = 0 ;
66690  PyObject * obj1 = 0 ;
66691  PyObject * obj2 = 0 ;
66692 
66693  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexIVF_add",&obj0,&obj1,&obj2)) SWIG_fail;
66694  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66695  if (!SWIG_IsOK(res1)) {
66696  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_add" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF *""'");
66697  }
66698  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66699  ecode2 = SWIG_AsVal_long(obj1, &val2);
66700  if (!SWIG_IsOK(ecode2)) {
66701  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVF_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
66702  }
66703  arg2 = static_cast< faiss::Index::idx_t >(val2);
66704  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
66705  if (!SWIG_IsOK(res3)) {
66706  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexIVF_add" "', argument " "3"" of type '" "float const *""'");
66707  }
66708  arg3 = reinterpret_cast< float * >(argp3);
66709  {
66710  Py_BEGIN_ALLOW_THREADS
66711  try {
66712  (arg1)->add(arg2,(float const *)arg3);
66713  } catch(faiss::FaissException & e) {
66714  PyEval_RestoreThread(_save);
66715  PyErr_SetString(PyExc_RuntimeError, e.what());
66716  SWIG_fail;
66717  }
66718  Py_END_ALLOW_THREADS
66719  }
66720  resultobj = SWIG_Py_Void();
66721  return resultobj;
66722 fail:
66723  return NULL;
66724 }
66725 
66726 
66727 SWIGINTERN PyObject *_wrap_GpuIndexIVF_cp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66728  PyObject *resultobj = 0;
66731  void *argp1 = 0 ;
66732  int res1 = 0 ;
66733  void *argp2 = 0 ;
66734  int res2 = 0 ;
66735  PyObject * obj0 = 0 ;
66736  PyObject * obj1 = 0 ;
66737 
66738  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVF_cp_set",&obj0,&obj1)) SWIG_fail;
66739  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66740  if (!SWIG_IsOK(res1)) {
66741  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_cp_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF *""'");
66742  }
66743  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66744  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
66745  if (!SWIG_IsOK(res2)) {
66746  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVF_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
66747  }
66748  arg2 = reinterpret_cast< faiss::ClusteringParameters * >(argp2);
66749  if (arg1) (arg1)->cp = *arg2;
66750  resultobj = SWIG_Py_Void();
66751  return resultobj;
66752 fail:
66753  return NULL;
66754 }
66755 
66756 
66757 SWIGINTERN PyObject *_wrap_GpuIndexIVF_cp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66758  PyObject *resultobj = 0;
66760  void *argp1 = 0 ;
66761  int res1 = 0 ;
66762  PyObject * obj0 = 0 ;
66763  faiss::ClusteringParameters *result = 0 ;
66764 
66765  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVF_cp_get",&obj0)) SWIG_fail;
66766  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVF, 0 | 0 );
66767  if (!SWIG_IsOK(res1)) {
66768  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVF_cp_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVF *""'");
66769  }
66770  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVF * >(argp1);
66771  result = (faiss::ClusteringParameters *)& ((arg1)->cp);
66772  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
66773  return resultobj;
66774 fail:
66775  return NULL;
66776 }
66777 
66778 
66779 SWIGINTERN PyObject *GpuIndexIVF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66780  PyObject *obj;
66781  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
66782  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexIVF, SWIG_NewClientData(obj));
66783  return SWIG_Py_Void();
66784 }
66785 
66786 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFPQConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66787  PyObject *resultobj = 0;
66788  faiss::gpu::GpuIndexIVFPQConfig *result = 0 ;
66789 
66790  if (!PyArg_ParseTuple(args,(char *)":new_GpuIndexIVFPQConfig")) SWIG_fail;
66791  {
66792  Py_BEGIN_ALLOW_THREADS
66793  try {
66795  } catch(faiss::FaissException & e) {
66796  PyEval_RestoreThread(_save);
66797  PyErr_SetString(PyExc_RuntimeError, e.what());
66798  SWIG_fail;
66799  }
66800  Py_END_ALLOW_THREADS
66801  }
66802  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, SWIG_POINTER_NEW | 0 );
66803  return resultobj;
66804 fail:
66805  return NULL;
66806 }
66807 
66808 
66809 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQConfig_useFloat16LookupTables_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66810  PyObject *resultobj = 0;
66812  bool arg2 ;
66813  void *argp1 = 0 ;
66814  int res1 = 0 ;
66815  bool val2 ;
66816  int ecode2 = 0 ;
66817  PyObject * obj0 = 0 ;
66818  PyObject * obj1 = 0 ;
66819 
66820  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQConfig_useFloat16LookupTables_set",&obj0,&obj1)) SWIG_fail;
66821  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0 | 0 );
66822  if (!SWIG_IsOK(res1)) {
66823  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQConfig_useFloat16LookupTables_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQConfig *""'");
66824  }
66825  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQConfig * >(argp1);
66826  ecode2 = SWIG_AsVal_bool(obj1, &val2);
66827  if (!SWIG_IsOK(ecode2)) {
66828  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQConfig_useFloat16LookupTables_set" "', argument " "2"" of type '" "bool""'");
66829  }
66830  arg2 = static_cast< bool >(val2);
66831  if (arg1) (arg1)->useFloat16LookupTables = arg2;
66832  resultobj = SWIG_Py_Void();
66833  return resultobj;
66834 fail:
66835  return NULL;
66836 }
66837 
66838 
66839 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQConfig_useFloat16LookupTables_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66840  PyObject *resultobj = 0;
66842  void *argp1 = 0 ;
66843  int res1 = 0 ;
66844  PyObject * obj0 = 0 ;
66845  bool result;
66846 
66847  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQConfig_useFloat16LookupTables_get",&obj0)) SWIG_fail;
66848  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0 | 0 );
66849  if (!SWIG_IsOK(res1)) {
66850  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQConfig_useFloat16LookupTables_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQConfig *""'");
66851  }
66852  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQConfig * >(argp1);
66853  result = (bool) ((arg1)->useFloat16LookupTables);
66854  resultobj = SWIG_From_bool(static_cast< bool >(result));
66855  return resultobj;
66856 fail:
66857  return NULL;
66858 }
66859 
66860 
66861 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQConfig_usePrecomputedTables_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66862  PyObject *resultobj = 0;
66864  bool arg2 ;
66865  void *argp1 = 0 ;
66866  int res1 = 0 ;
66867  bool val2 ;
66868  int ecode2 = 0 ;
66869  PyObject * obj0 = 0 ;
66870  PyObject * obj1 = 0 ;
66871 
66872  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQConfig_usePrecomputedTables_set",&obj0,&obj1)) SWIG_fail;
66873  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0 | 0 );
66874  if (!SWIG_IsOK(res1)) {
66875  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQConfig_usePrecomputedTables_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQConfig *""'");
66876  }
66877  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQConfig * >(argp1);
66878  ecode2 = SWIG_AsVal_bool(obj1, &val2);
66879  if (!SWIG_IsOK(ecode2)) {
66880  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQConfig_usePrecomputedTables_set" "', argument " "2"" of type '" "bool""'");
66881  }
66882  arg2 = static_cast< bool >(val2);
66883  if (arg1) (arg1)->usePrecomputedTables = arg2;
66884  resultobj = SWIG_Py_Void();
66885  return resultobj;
66886 fail:
66887  return NULL;
66888 }
66889 
66890 
66891 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQConfig_usePrecomputedTables_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66892  PyObject *resultobj = 0;
66894  void *argp1 = 0 ;
66895  int res1 = 0 ;
66896  PyObject * obj0 = 0 ;
66897  bool result;
66898 
66899  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQConfig_usePrecomputedTables_get",&obj0)) SWIG_fail;
66900  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0 | 0 );
66901  if (!SWIG_IsOK(res1)) {
66902  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQConfig_usePrecomputedTables_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQConfig *""'");
66903  }
66904  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQConfig * >(argp1);
66905  result = (bool) ((arg1)->usePrecomputedTables);
66906  resultobj = SWIG_From_bool(static_cast< bool >(result));
66907  return resultobj;
66908 fail:
66909  return NULL;
66910 }
66911 
66912 
66913 SWIGINTERN PyObject *_wrap_delete_GpuIndexIVFPQConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66914  PyObject *resultobj = 0;
66916  void *argp1 = 0 ;
66917  int res1 = 0 ;
66918  PyObject * obj0 = 0 ;
66919 
66920  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexIVFPQConfig",&obj0)) SWIG_fail;
66921  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, SWIG_POINTER_DISOWN | 0 );
66922  if (!SWIG_IsOK(res1)) {
66923  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexIVFPQConfig" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQConfig *""'");
66924  }
66925  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQConfig * >(argp1);
66926  delete arg1;
66927  resultobj = SWIG_Py_Void();
66928  return resultobj;
66929 fail:
66930  return NULL;
66931 }
66932 
66933 
66934 SWIGINTERN PyObject *GpuIndexIVFPQConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66935  PyObject *obj;
66936  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
66937  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, SWIG_NewClientData(obj));
66938  return SWIG_Py_Void();
66939 }
66940 
66941 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFPQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66942  PyObject *resultobj = 0;
66944  faiss::IndexIVFPQ *arg2 = (faiss::IndexIVFPQ *) 0 ;
66946  void *argp1 = 0 ;
66947  int res1 = 0 ;
66948  void *argp2 = 0 ;
66949  int res2 = 0 ;
66950  void *argp3 ;
66951  int res3 = 0 ;
66952  PyObject * obj0 = 0 ;
66953  PyObject * obj1 = 0 ;
66954  PyObject * obj2 = 0 ;
66955  faiss::gpu::GpuIndexIVFPQ *result = 0 ;
66956 
66957  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexIVFPQ",&obj0,&obj1,&obj2)) SWIG_fail;
66958  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
66959  if (!SWIG_IsOK(res1)) {
66960  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFPQ" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
66961  }
66962  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
66963  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
66964  if (!SWIG_IsOK(res2)) {
66965  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexIVFPQ" "', argument " "2"" of type '" "faiss::IndexIVFPQ const *""'");
66966  }
66967  arg2 = reinterpret_cast< faiss::IndexIVFPQ * >(argp2);
66968  {
66969  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0 | 0);
66970  if (!SWIG_IsOK(res3)) {
66971  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexIVFPQ" "', argument " "3"" of type '" "faiss::gpu::GpuIndexIVFPQConfig""'");
66972  }
66973  if (!argp3) {
66974  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexIVFPQ" "', argument " "3"" of type '" "faiss::gpu::GpuIndexIVFPQConfig""'");
66975  } else {
66976  faiss::gpu::GpuIndexIVFPQConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexIVFPQConfig * >(argp3);
66977  arg3 = *temp;
66978  if (SWIG_IsNewObj(res3)) delete temp;
66979  }
66980  }
66981  {
66982  Py_BEGIN_ALLOW_THREADS
66983  try {
66984  result = (faiss::gpu::GpuIndexIVFPQ *)new faiss::gpu::GpuIndexIVFPQ(arg1,(faiss::IndexIVFPQ const *)arg2,arg3);
66985  } catch(faiss::FaissException & e) {
66986  PyEval_RestoreThread(_save);
66987  PyErr_SetString(PyExc_RuntimeError, e.what());
66988  SWIG_fail;
66989  }
66990  Py_END_ALLOW_THREADS
66991  }
66992  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, SWIG_POINTER_NEW | 0 );
66993  return resultobj;
66994 fail:
66995  return NULL;
66996 }
66997 
66998 
66999 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFPQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67000  PyObject *resultobj = 0;
67002  faiss::IndexIVFPQ *arg2 = (faiss::IndexIVFPQ *) 0 ;
67003  void *argp1 = 0 ;
67004  int res1 = 0 ;
67005  void *argp2 = 0 ;
67006  int res2 = 0 ;
67007  PyObject * obj0 = 0 ;
67008  PyObject * obj1 = 0 ;
67009  faiss::gpu::GpuIndexIVFPQ *result = 0 ;
67010 
67011  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexIVFPQ",&obj0,&obj1)) SWIG_fail;
67012  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
67013  if (!SWIG_IsOK(res1)) {
67014  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFPQ" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
67015  }
67016  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
67017  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
67018  if (!SWIG_IsOK(res2)) {
67019  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexIVFPQ" "', argument " "2"" of type '" "faiss::IndexIVFPQ const *""'");
67020  }
67021  arg2 = reinterpret_cast< faiss::IndexIVFPQ * >(argp2);
67022  {
67023  Py_BEGIN_ALLOW_THREADS
67024  try {
67025  result = (faiss::gpu::GpuIndexIVFPQ *)new faiss::gpu::GpuIndexIVFPQ(arg1,(faiss::IndexIVFPQ const *)arg2);
67026  } catch(faiss::FaissException & e) {
67027  PyEval_RestoreThread(_save);
67028  PyErr_SetString(PyExc_RuntimeError, e.what());
67029  SWIG_fail;
67030  }
67031  Py_END_ALLOW_THREADS
67032  }
67033  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, SWIG_POINTER_NEW | 0 );
67034  return resultobj;
67035 fail:
67036  return NULL;
67037 }
67038 
67039 
67040 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFPQ__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67041  PyObject *resultobj = 0;
67043  int arg2 ;
67044  int arg3 ;
67045  int arg4 ;
67046  int arg5 ;
67047  faiss::MetricType arg6 ;
67049  void *argp1 = 0 ;
67050  int res1 = 0 ;
67051  int val2 ;
67052  int ecode2 = 0 ;
67053  int val3 ;
67054  int ecode3 = 0 ;
67055  int val4 ;
67056  int ecode4 = 0 ;
67057  int val5 ;
67058  int ecode5 = 0 ;
67059  int val6 ;
67060  int ecode6 = 0 ;
67061  void *argp7 ;
67062  int res7 = 0 ;
67063  PyObject * obj0 = 0 ;
67064  PyObject * obj1 = 0 ;
67065  PyObject * obj2 = 0 ;
67066  PyObject * obj3 = 0 ;
67067  PyObject * obj4 = 0 ;
67068  PyObject * obj5 = 0 ;
67069  PyObject * obj6 = 0 ;
67070  faiss::gpu::GpuIndexIVFPQ *result = 0 ;
67071 
67072  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:new_GpuIndexIVFPQ",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
67073  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
67074  if (!SWIG_IsOK(res1)) {
67075  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFPQ" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
67076  }
67077  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
67078  ecode2 = SWIG_AsVal_int(obj1, &val2);
67079  if (!SWIG_IsOK(ecode2)) {
67080  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexIVFPQ" "', argument " "2"" of type '" "int""'");
67081  }
67082  arg2 = static_cast< int >(val2);
67083  ecode3 = SWIG_AsVal_int(obj2, &val3);
67084  if (!SWIG_IsOK(ecode3)) {
67085  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GpuIndexIVFPQ" "', argument " "3"" of type '" "int""'");
67086  }
67087  arg3 = static_cast< int >(val3);
67088  ecode4 = SWIG_AsVal_int(obj3, &val4);
67089  if (!SWIG_IsOK(ecode4)) {
67090  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GpuIndexIVFPQ" "', argument " "4"" of type '" "int""'");
67091  }
67092  arg4 = static_cast< int >(val4);
67093  ecode5 = SWIG_AsVal_int(obj4, &val5);
67094  if (!SWIG_IsOK(ecode5)) {
67095  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GpuIndexIVFPQ" "', argument " "5"" of type '" "int""'");
67096  }
67097  arg5 = static_cast< int >(val5);
67098  ecode6 = SWIG_AsVal_int(obj5, &val6);
67099  if (!SWIG_IsOK(ecode6)) {
67100  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_GpuIndexIVFPQ" "', argument " "6"" of type '" "faiss::MetricType""'");
67101  }
67102  arg6 = static_cast< faiss::MetricType >(val6);
67103  {
67104  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0 | 0);
67105  if (!SWIG_IsOK(res7)) {
67106  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_GpuIndexIVFPQ" "', argument " "7"" of type '" "faiss::gpu::GpuIndexIVFPQConfig""'");
67107  }
67108  if (!argp7) {
67109  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexIVFPQ" "', argument " "7"" of type '" "faiss::gpu::GpuIndexIVFPQConfig""'");
67110  } else {
67111  faiss::gpu::GpuIndexIVFPQConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexIVFPQConfig * >(argp7);
67112  arg7 = *temp;
67113  if (SWIG_IsNewObj(res7)) delete temp;
67114  }
67115  }
67116  {
67117  Py_BEGIN_ALLOW_THREADS
67118  try {
67119  result = (faiss::gpu::GpuIndexIVFPQ *)new faiss::gpu::GpuIndexIVFPQ(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
67120  } catch(faiss::FaissException & e) {
67121  PyEval_RestoreThread(_save);
67122  PyErr_SetString(PyExc_RuntimeError, e.what());
67123  SWIG_fail;
67124  }
67125  Py_END_ALLOW_THREADS
67126  }
67127  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, SWIG_POINTER_NEW | 0 );
67128  return resultobj;
67129 fail:
67130  return NULL;
67131 }
67132 
67133 
67134 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFPQ__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67135  PyObject *resultobj = 0;
67137  int arg2 ;
67138  int arg3 ;
67139  int arg4 ;
67140  int arg5 ;
67141  faiss::MetricType arg6 ;
67142  void *argp1 = 0 ;
67143  int res1 = 0 ;
67144  int val2 ;
67145  int ecode2 = 0 ;
67146  int val3 ;
67147  int ecode3 = 0 ;
67148  int val4 ;
67149  int ecode4 = 0 ;
67150  int val5 ;
67151  int ecode5 = 0 ;
67152  int val6 ;
67153  int ecode6 = 0 ;
67154  PyObject * obj0 = 0 ;
67155  PyObject * obj1 = 0 ;
67156  PyObject * obj2 = 0 ;
67157  PyObject * obj3 = 0 ;
67158  PyObject * obj4 = 0 ;
67159  PyObject * obj5 = 0 ;
67160  faiss::gpu::GpuIndexIVFPQ *result = 0 ;
67161 
67162  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:new_GpuIndexIVFPQ",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
67163  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
67164  if (!SWIG_IsOK(res1)) {
67165  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFPQ" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
67166  }
67167  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
67168  ecode2 = SWIG_AsVal_int(obj1, &val2);
67169  if (!SWIG_IsOK(ecode2)) {
67170  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexIVFPQ" "', argument " "2"" of type '" "int""'");
67171  }
67172  arg2 = static_cast< int >(val2);
67173  ecode3 = SWIG_AsVal_int(obj2, &val3);
67174  if (!SWIG_IsOK(ecode3)) {
67175  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GpuIndexIVFPQ" "', argument " "3"" of type '" "int""'");
67176  }
67177  arg3 = static_cast< int >(val3);
67178  ecode4 = SWIG_AsVal_int(obj3, &val4);
67179  if (!SWIG_IsOK(ecode4)) {
67180  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GpuIndexIVFPQ" "', argument " "4"" of type '" "int""'");
67181  }
67182  arg4 = static_cast< int >(val4);
67183  ecode5 = SWIG_AsVal_int(obj4, &val5);
67184  if (!SWIG_IsOK(ecode5)) {
67185  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_GpuIndexIVFPQ" "', argument " "5"" of type '" "int""'");
67186  }
67187  arg5 = static_cast< int >(val5);
67188  ecode6 = SWIG_AsVal_int(obj5, &val6);
67189  if (!SWIG_IsOK(ecode6)) {
67190  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_GpuIndexIVFPQ" "', argument " "6"" of type '" "faiss::MetricType""'");
67191  }
67192  arg6 = static_cast< faiss::MetricType >(val6);
67193  {
67194  Py_BEGIN_ALLOW_THREADS
67195  try {
67196  result = (faiss::gpu::GpuIndexIVFPQ *)new faiss::gpu::GpuIndexIVFPQ(arg1,arg2,arg3,arg4,arg5,arg6);
67197  } catch(faiss::FaissException & e) {
67198  PyEval_RestoreThread(_save);
67199  PyErr_SetString(PyExc_RuntimeError, e.what());
67200  SWIG_fail;
67201  }
67202  Py_END_ALLOW_THREADS
67203  }
67204  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, SWIG_POINTER_NEW | 0 );
67205  return resultobj;
67206 fail:
67207  return NULL;
67208 }
67209 
67210 
67211 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFPQ(PyObject *self, PyObject *args) {
67212  Py_ssize_t argc;
67213  PyObject *argv[8] = {
67214  0
67215  };
67216  Py_ssize_t ii;
67217 
67218  if (!PyTuple_Check(args)) SWIG_fail;
67219  argc = args ? PyObject_Length(args) : 0;
67220  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
67221  argv[ii] = PyTuple_GET_ITEM(args,ii);
67222  }
67223  if (argc == 2) {
67224  int _v;
67225  void *vptr = 0;
67226  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
67227  _v = SWIG_CheckState(res);
67228  if (_v) {
67229  void *vptr = 0;
67230  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
67231  _v = SWIG_CheckState(res);
67232  if (_v) {
67233  return _wrap_new_GpuIndexIVFPQ__SWIG_1(self, args);
67234  }
67235  }
67236  }
67237  if (argc == 3) {
67238  int _v;
67239  void *vptr = 0;
67240  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
67241  _v = SWIG_CheckState(res);
67242  if (_v) {
67243  void *vptr = 0;
67244  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
67245  _v = SWIG_CheckState(res);
67246  if (_v) {
67247  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0);
67248  _v = SWIG_CheckState(res);
67249  if (_v) {
67250  return _wrap_new_GpuIndexIVFPQ__SWIG_0(self, args);
67251  }
67252  }
67253  }
67254  }
67255  if (argc == 6) {
67256  int _v;
67257  void *vptr = 0;
67258  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
67259  _v = SWIG_CheckState(res);
67260  if (_v) {
67261  {
67262  int res = SWIG_AsVal_int(argv[1], NULL);
67263  _v = SWIG_CheckState(res);
67264  }
67265  if (_v) {
67266  {
67267  int res = SWIG_AsVal_int(argv[2], NULL);
67268  _v = SWIG_CheckState(res);
67269  }
67270  if (_v) {
67271  {
67272  int res = SWIG_AsVal_int(argv[3], NULL);
67273  _v = SWIG_CheckState(res);
67274  }
67275  if (_v) {
67276  {
67277  int res = SWIG_AsVal_int(argv[4], NULL);
67278  _v = SWIG_CheckState(res);
67279  }
67280  if (_v) {
67281  {
67282  int res = SWIG_AsVal_int(argv[5], NULL);
67283  _v = SWIG_CheckState(res);
67284  }
67285  if (_v) {
67286  return _wrap_new_GpuIndexIVFPQ__SWIG_3(self, args);
67287  }
67288  }
67289  }
67290  }
67291  }
67292  }
67293  }
67294  if (argc == 7) {
67295  int _v;
67296  void *vptr = 0;
67297  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
67298  _v = SWIG_CheckState(res);
67299  if (_v) {
67300  {
67301  int res = SWIG_AsVal_int(argv[1], NULL);
67302  _v = SWIG_CheckState(res);
67303  }
67304  if (_v) {
67305  {
67306  int res = SWIG_AsVal_int(argv[2], NULL);
67307  _v = SWIG_CheckState(res);
67308  }
67309  if (_v) {
67310  {
67311  int res = SWIG_AsVal_int(argv[3], NULL);
67312  _v = SWIG_CheckState(res);
67313  }
67314  if (_v) {
67315  {
67316  int res = SWIG_AsVal_int(argv[4], NULL);
67317  _v = SWIG_CheckState(res);
67318  }
67319  if (_v) {
67320  {
67321  int res = SWIG_AsVal_int(argv[5], NULL);
67322  _v = SWIG_CheckState(res);
67323  }
67324  if (_v) {
67325  int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQConfig, 0);
67326  _v = SWIG_CheckState(res);
67327  if (_v) {
67328  return _wrap_new_GpuIndexIVFPQ__SWIG_2(self, args);
67329  }
67330  }
67331  }
67332  }
67333  }
67334  }
67335  }
67336  }
67337 
67338 fail:
67339  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_GpuIndexIVFPQ'.\n"
67340  " Possible C/C++ prototypes are:\n"
67341  " faiss::gpu::GpuIndexIVFPQ::GpuIndexIVFPQ(faiss::gpu::GpuResources *,faiss::IndexIVFPQ const *,faiss::gpu::GpuIndexIVFPQConfig)\n"
67342  " faiss::gpu::GpuIndexIVFPQ::GpuIndexIVFPQ(faiss::gpu::GpuResources *,faiss::IndexIVFPQ const *)\n"
67343  " faiss::gpu::GpuIndexIVFPQ::GpuIndexIVFPQ(faiss::gpu::GpuResources *,int,int,int,int,faiss::MetricType,faiss::gpu::GpuIndexIVFPQConfig)\n"
67344  " faiss::gpu::GpuIndexIVFPQ::GpuIndexIVFPQ(faiss::gpu::GpuResources *,int,int,int,int,faiss::MetricType)\n");
67345  return 0;
67346 }
67347 
67348 
67349 SWIGINTERN PyObject *_wrap_delete_GpuIndexIVFPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67350  PyObject *resultobj = 0;
67352  void *argp1 = 0 ;
67353  int res1 = 0 ;
67354  PyObject * obj0 = 0 ;
67355 
67356  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexIVFPQ",&obj0)) SWIG_fail;
67357  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, SWIG_POINTER_DISOWN | 0 );
67358  if (!SWIG_IsOK(res1)) {
67359  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexIVFPQ" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ *""'");
67360  }
67361  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67362  {
67363  Py_BEGIN_ALLOW_THREADS
67364  try {
67365  delete arg1;
67366  } catch(faiss::FaissException & e) {
67367  PyEval_RestoreThread(_save);
67368  PyErr_SetString(PyExc_RuntimeError, e.what());
67369  SWIG_fail;
67370  }
67371  Py_END_ALLOW_THREADS
67372  }
67373  resultobj = SWIG_Py_Void();
67374  return resultobj;
67375 fail:
67376  return NULL;
67377 }
67378 
67379 
67380 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67381  PyObject *resultobj = 0;
67383  faiss::IndexIVFPQ *arg2 = (faiss::IndexIVFPQ *) 0 ;
67384  void *argp1 = 0 ;
67385  int res1 = 0 ;
67386  void *argp2 = 0 ;
67387  int res2 = 0 ;
67388  PyObject * obj0 = 0 ;
67389  PyObject * obj1 = 0 ;
67390 
67391  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQ_copyFrom",&obj0,&obj1)) SWIG_fail;
67392  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67393  if (!SWIG_IsOK(res1)) {
67394  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_copyFrom" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ *""'");
67395  }
67396  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67397  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
67398  if (!SWIG_IsOK(res2)) {
67399  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVFPQ_copyFrom" "', argument " "2"" of type '" "faiss::IndexIVFPQ const *""'");
67400  }
67401  arg2 = reinterpret_cast< faiss::IndexIVFPQ * >(argp2);
67402  {
67403  Py_BEGIN_ALLOW_THREADS
67404  try {
67405  (arg1)->copyFrom((faiss::IndexIVFPQ const *)arg2);
67406  } catch(faiss::FaissException & e) {
67407  PyEval_RestoreThread(_save);
67408  PyErr_SetString(PyExc_RuntimeError, e.what());
67409  SWIG_fail;
67410  }
67411  Py_END_ALLOW_THREADS
67412  }
67413  resultobj = SWIG_Py_Void();
67414  return resultobj;
67415 fail:
67416  return NULL;
67417 }
67418 
67419 
67420 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_copyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67421  PyObject *resultobj = 0;
67423  faiss::IndexIVFPQ *arg2 = (faiss::IndexIVFPQ *) 0 ;
67424  void *argp1 = 0 ;
67425  int res1 = 0 ;
67426  void *argp2 = 0 ;
67427  int res2 = 0 ;
67428  PyObject * obj0 = 0 ;
67429  PyObject * obj1 = 0 ;
67430 
67431  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQ_copyTo",&obj0,&obj1)) SWIG_fail;
67432  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67433  if (!SWIG_IsOK(res1)) {
67434  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_copyTo" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67435  }
67436  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67437  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
67438  if (!SWIG_IsOK(res2)) {
67439  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVFPQ_copyTo" "', argument " "2"" of type '" "faiss::IndexIVFPQ *""'");
67440  }
67441  arg2 = reinterpret_cast< faiss::IndexIVFPQ * >(argp2);
67442  {
67443  Py_BEGIN_ALLOW_THREADS
67444  try {
67445  ((faiss::gpu::GpuIndexIVFPQ const *)arg1)->copyTo(arg2);
67446  } catch(faiss::FaissException & e) {
67447  PyEval_RestoreThread(_save);
67448  PyErr_SetString(PyExc_RuntimeError, e.what());
67449  SWIG_fail;
67450  }
67451  Py_END_ALLOW_THREADS
67452  }
67453  resultobj = SWIG_Py_Void();
67454  return resultobj;
67455 fail:
67456  return NULL;
67457 }
67458 
67459 
67460 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_reserveMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67461  PyObject *resultobj = 0;
67463  size_t arg2 ;
67464  void *argp1 = 0 ;
67465  int res1 = 0 ;
67466  size_t val2 ;
67467  int ecode2 = 0 ;
67468  PyObject * obj0 = 0 ;
67469  PyObject * obj1 = 0 ;
67470 
67471  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQ_reserveMemory",&obj0,&obj1)) SWIG_fail;
67472  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67473  if (!SWIG_IsOK(res1)) {
67474  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_reserveMemory" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ *""'");
67475  }
67476  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67477  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
67478  if (!SWIG_IsOK(ecode2)) {
67479  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQ_reserveMemory" "', argument " "2"" of type '" "size_t""'");
67480  }
67481  arg2 = static_cast< size_t >(val2);
67482  {
67483  Py_BEGIN_ALLOW_THREADS
67484  try {
67485  (arg1)->reserveMemory(arg2);
67486  } catch(faiss::FaissException & e) {
67487  PyEval_RestoreThread(_save);
67488  PyErr_SetString(PyExc_RuntimeError, e.what());
67489  SWIG_fail;
67490  }
67491  Py_END_ALLOW_THREADS
67492  }
67493  resultobj = SWIG_Py_Void();
67494  return resultobj;
67495 fail:
67496  return NULL;
67497 }
67498 
67499 
67500 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_setPrecomputedCodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67501  PyObject *resultobj = 0;
67503  bool arg2 ;
67504  void *argp1 = 0 ;
67505  int res1 = 0 ;
67506  bool val2 ;
67507  int ecode2 = 0 ;
67508  PyObject * obj0 = 0 ;
67509  PyObject * obj1 = 0 ;
67510 
67511  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQ_setPrecomputedCodes",&obj0,&obj1)) SWIG_fail;
67512  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67513  if (!SWIG_IsOK(res1)) {
67514  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_setPrecomputedCodes" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ *""'");
67515  }
67516  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67517  ecode2 = SWIG_AsVal_bool(obj1, &val2);
67518  if (!SWIG_IsOK(ecode2)) {
67519  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQ_setPrecomputedCodes" "', argument " "2"" of type '" "bool""'");
67520  }
67521  arg2 = static_cast< bool >(val2);
67522  {
67523  Py_BEGIN_ALLOW_THREADS
67524  try {
67525  (arg1)->setPrecomputedCodes(arg2);
67526  } catch(faiss::FaissException & e) {
67527  PyEval_RestoreThread(_save);
67528  PyErr_SetString(PyExc_RuntimeError, e.what());
67529  SWIG_fail;
67530  }
67531  Py_END_ALLOW_THREADS
67532  }
67533  resultobj = SWIG_Py_Void();
67534  return resultobj;
67535 fail:
67536  return NULL;
67537 }
67538 
67539 
67540 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_getPrecomputedCodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67541  PyObject *resultobj = 0;
67543  void *argp1 = 0 ;
67544  int res1 = 0 ;
67545  PyObject * obj0 = 0 ;
67546  bool result;
67547 
67548  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQ_getPrecomputedCodes",&obj0)) SWIG_fail;
67549  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67550  if (!SWIG_IsOK(res1)) {
67551  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_getPrecomputedCodes" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67552  }
67553  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67554  {
67555  Py_BEGIN_ALLOW_THREADS
67556  try {
67557  result = (bool)((faiss::gpu::GpuIndexIVFPQ const *)arg1)->getPrecomputedCodes();
67558  } catch(faiss::FaissException & e) {
67559  PyEval_RestoreThread(_save);
67560  PyErr_SetString(PyExc_RuntimeError, e.what());
67561  SWIG_fail;
67562  }
67563  Py_END_ALLOW_THREADS
67564  }
67565  resultobj = SWIG_From_bool(static_cast< bool >(result));
67566  return resultobj;
67567 fail:
67568  return NULL;
67569 }
67570 
67571 
67572 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_getNumSubQuantizers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67573  PyObject *resultobj = 0;
67575  void *argp1 = 0 ;
67576  int res1 = 0 ;
67577  PyObject * obj0 = 0 ;
67578  int result;
67579 
67580  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQ_getNumSubQuantizers",&obj0)) SWIG_fail;
67581  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67582  if (!SWIG_IsOK(res1)) {
67583  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_getNumSubQuantizers" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67584  }
67585  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67586  {
67587  Py_BEGIN_ALLOW_THREADS
67588  try {
67589  result = (int)((faiss::gpu::GpuIndexIVFPQ const *)arg1)->getNumSubQuantizers();
67590  } catch(faiss::FaissException & e) {
67591  PyEval_RestoreThread(_save);
67592  PyErr_SetString(PyExc_RuntimeError, e.what());
67593  SWIG_fail;
67594  }
67595  Py_END_ALLOW_THREADS
67596  }
67597  resultobj = SWIG_From_int(static_cast< int >(result));
67598  return resultobj;
67599 fail:
67600  return NULL;
67601 }
67602 
67603 
67604 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_getBitsPerCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67605  PyObject *resultobj = 0;
67607  void *argp1 = 0 ;
67608  int res1 = 0 ;
67609  PyObject * obj0 = 0 ;
67610  int result;
67611 
67612  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQ_getBitsPerCode",&obj0)) SWIG_fail;
67613  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67614  if (!SWIG_IsOK(res1)) {
67615  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_getBitsPerCode" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67616  }
67617  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67618  {
67619  Py_BEGIN_ALLOW_THREADS
67620  try {
67621  result = (int)((faiss::gpu::GpuIndexIVFPQ const *)arg1)->getBitsPerCode();
67622  } catch(faiss::FaissException & e) {
67623  PyEval_RestoreThread(_save);
67624  PyErr_SetString(PyExc_RuntimeError, e.what());
67625  SWIG_fail;
67626  }
67627  Py_END_ALLOW_THREADS
67628  }
67629  resultobj = SWIG_From_int(static_cast< int >(result));
67630  return resultobj;
67631 fail:
67632  return NULL;
67633 }
67634 
67635 
67636 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_getCentroidsPerSubQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67637  PyObject *resultobj = 0;
67639  void *argp1 = 0 ;
67640  int res1 = 0 ;
67641  PyObject * obj0 = 0 ;
67642  int result;
67643 
67644  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQ_getCentroidsPerSubQuantizer",&obj0)) SWIG_fail;
67645  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67646  if (!SWIG_IsOK(res1)) {
67647  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_getCentroidsPerSubQuantizer" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67648  }
67649  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67650  {
67651  Py_BEGIN_ALLOW_THREADS
67652  try {
67653  result = (int)((faiss::gpu::GpuIndexIVFPQ const *)arg1)->getCentroidsPerSubQuantizer();
67654  } catch(faiss::FaissException & e) {
67655  PyEval_RestoreThread(_save);
67656  PyErr_SetString(PyExc_RuntimeError, e.what());
67657  SWIG_fail;
67658  }
67659  Py_END_ALLOW_THREADS
67660  }
67661  resultobj = SWIG_From_int(static_cast< int >(result));
67662  return resultobj;
67663 fail:
67664  return NULL;
67665 }
67666 
67667 
67668 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_reclaimMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67669  PyObject *resultobj = 0;
67671  void *argp1 = 0 ;
67672  int res1 = 0 ;
67673  PyObject * obj0 = 0 ;
67674  size_t result;
67675 
67676  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQ_reclaimMemory",&obj0)) SWIG_fail;
67677  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67678  if (!SWIG_IsOK(res1)) {
67679  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_reclaimMemory" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ *""'");
67680  }
67681  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67682  {
67683  Py_BEGIN_ALLOW_THREADS
67684  try {
67685  result = (size_t)(arg1)->reclaimMemory();
67686  } catch(faiss::FaissException & e) {
67687  PyEval_RestoreThread(_save);
67688  PyErr_SetString(PyExc_RuntimeError, e.what());
67689  SWIG_fail;
67690  }
67691  Py_END_ALLOW_THREADS
67692  }
67693  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
67694  return resultobj;
67695 fail:
67696  return NULL;
67697 }
67698 
67699 
67700 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67701  PyObject *resultobj = 0;
67703  void *argp1 = 0 ;
67704  int res1 = 0 ;
67705  PyObject * obj0 = 0 ;
67706 
67707  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFPQ_reset",&obj0)) SWIG_fail;
67708  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67709  if (!SWIG_IsOK(res1)) {
67710  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_reset" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ *""'");
67711  }
67712  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67713  {
67714  Py_BEGIN_ALLOW_THREADS
67715  try {
67716  (arg1)->reset();
67717  } catch(faiss::FaissException & e) {
67718  PyEval_RestoreThread(_save);
67719  PyErr_SetString(PyExc_RuntimeError, e.what());
67720  SWIG_fail;
67721  }
67722  Py_END_ALLOW_THREADS
67723  }
67724  resultobj = SWIG_Py_Void();
67725  return resultobj;
67726 fail:
67727  return NULL;
67728 }
67729 
67730 
67731 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67732  PyObject *resultobj = 0;
67734  faiss::Index::idx_t arg2 ;
67735  float *arg3 = (float *) 0 ;
67736  void *argp1 = 0 ;
67737  int res1 = 0 ;
67738  long val2 ;
67739  int ecode2 = 0 ;
67740  void *argp3 = 0 ;
67741  int res3 = 0 ;
67742  PyObject * obj0 = 0 ;
67743  PyObject * obj1 = 0 ;
67744  PyObject * obj2 = 0 ;
67745 
67746  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexIVFPQ_train",&obj0,&obj1,&obj2)) SWIG_fail;
67747  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67748  if (!SWIG_IsOK(res1)) {
67749  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_train" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ *""'");
67750  }
67751  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67752  ecode2 = SWIG_AsVal_long(obj1, &val2);
67753  if (!SWIG_IsOK(ecode2)) {
67754  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQ_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
67755  }
67756  arg2 = static_cast< faiss::Index::idx_t >(val2);
67757  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
67758  if (!SWIG_IsOK(res3)) {
67759  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexIVFPQ_train" "', argument " "3"" of type '" "float const *""'");
67760  }
67761  arg3 = reinterpret_cast< float * >(argp3);
67762  {
67763  Py_BEGIN_ALLOW_THREADS
67764  try {
67765  (arg1)->train(arg2,(float const *)arg3);
67766  } catch(faiss::FaissException & e) {
67767  PyEval_RestoreThread(_save);
67768  PyErr_SetString(PyExc_RuntimeError, e.what());
67769  SWIG_fail;
67770  }
67771  Py_END_ALLOW_THREADS
67772  }
67773  resultobj = SWIG_Py_Void();
67774  return resultobj;
67775 fail:
67776  return NULL;
67777 }
67778 
67779 
67780 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_getListLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67781  PyObject *resultobj = 0;
67783  int arg2 ;
67784  void *argp1 = 0 ;
67785  int res1 = 0 ;
67786  int val2 ;
67787  int ecode2 = 0 ;
67788  PyObject * obj0 = 0 ;
67789  PyObject * obj1 = 0 ;
67790  int result;
67791 
67792  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQ_getListLength",&obj0,&obj1)) SWIG_fail;
67793  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67794  if (!SWIG_IsOK(res1)) {
67795  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_getListLength" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67796  }
67797  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67798  ecode2 = SWIG_AsVal_int(obj1, &val2);
67799  if (!SWIG_IsOK(ecode2)) {
67800  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQ_getListLength" "', argument " "2"" of type '" "int""'");
67801  }
67802  arg2 = static_cast< int >(val2);
67803  {
67804  Py_BEGIN_ALLOW_THREADS
67805  try {
67806  result = (int)((faiss::gpu::GpuIndexIVFPQ const *)arg1)->getListLength(arg2);
67807  } catch(faiss::FaissException & e) {
67808  PyEval_RestoreThread(_save);
67809  PyErr_SetString(PyExc_RuntimeError, e.what());
67810  SWIG_fail;
67811  }
67812  Py_END_ALLOW_THREADS
67813  }
67814  resultobj = SWIG_From_int(static_cast< int >(result));
67815  return resultobj;
67816 fail:
67817  return NULL;
67818 }
67819 
67820 
67821 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_getListCodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67822  PyObject *resultobj = 0;
67824  int arg2 ;
67825  void *argp1 = 0 ;
67826  int res1 = 0 ;
67827  int val2 ;
67828  int ecode2 = 0 ;
67829  PyObject * obj0 = 0 ;
67830  PyObject * obj1 = 0 ;
67831  std::vector< unsigned char > result;
67832 
67833  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQ_getListCodes",&obj0,&obj1)) SWIG_fail;
67834  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67835  if (!SWIG_IsOK(res1)) {
67836  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_getListCodes" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67837  }
67838  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67839  ecode2 = SWIG_AsVal_int(obj1, &val2);
67840  if (!SWIG_IsOK(ecode2)) {
67841  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQ_getListCodes" "', argument " "2"" of type '" "int""'");
67842  }
67843  arg2 = static_cast< int >(val2);
67844  {
67845  Py_BEGIN_ALLOW_THREADS
67846  try {
67847  result = ((faiss::gpu::GpuIndexIVFPQ const *)arg1)->getListCodes(arg2);
67848  } catch(faiss::FaissException & e) {
67849  PyEval_RestoreThread(_save);
67850  PyErr_SetString(PyExc_RuntimeError, e.what());
67851  SWIG_fail;
67852  }
67853  Py_END_ALLOW_THREADS
67854  }
67855  resultobj = SWIG_NewPointerObj((new std::vector< unsigned char >(static_cast< const std::vector< unsigned char >& >(result))), SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_OWN | 0 );
67856  return resultobj;
67857 fail:
67858  return NULL;
67859 }
67860 
67861 
67862 SWIGINTERN PyObject *_wrap_GpuIndexIVFPQ_getListIndices(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67863  PyObject *resultobj = 0;
67865  int arg2 ;
67866  void *argp1 = 0 ;
67867  int res1 = 0 ;
67868  int val2 ;
67869  int ecode2 = 0 ;
67870  PyObject * obj0 = 0 ;
67871  PyObject * obj1 = 0 ;
67872  std::vector< long > result;
67873 
67874  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFPQ_getListIndices",&obj0,&obj1)) SWIG_fail;
67875  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, 0 | 0 );
67876  if (!SWIG_IsOK(res1)) {
67877  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFPQ_getListIndices" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFPQ const *""'");
67878  }
67879  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFPQ * >(argp1);
67880  ecode2 = SWIG_AsVal_int(obj1, &val2);
67881  if (!SWIG_IsOK(ecode2)) {
67882  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFPQ_getListIndices" "', argument " "2"" of type '" "int""'");
67883  }
67884  arg2 = static_cast< int >(val2);
67885  {
67886  Py_BEGIN_ALLOW_THREADS
67887  try {
67888  result = ((faiss::gpu::GpuIndexIVFPQ const *)arg1)->getListIndices(arg2);
67889  } catch(faiss::FaissException & e) {
67890  PyEval_RestoreThread(_save);
67891  PyErr_SetString(PyExc_RuntimeError, e.what());
67892  SWIG_fail;
67893  }
67894  Py_END_ALLOW_THREADS
67895  }
67896  resultobj = SWIG_NewPointerObj((new std::vector< long >(static_cast< const std::vector< long >& >(result))), SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_OWN | 0 );
67897  return resultobj;
67898 fail:
67899  return NULL;
67900 }
67901 
67902 
67903 SWIGINTERN PyObject *GpuIndexIVFPQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67904  PyObject *obj;
67905  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
67906  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ, SWIG_NewClientData(obj));
67907  return SWIG_Py_Void();
67908 }
67909 
67910 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFFlatConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67911  PyObject *resultobj = 0;
67912  faiss::gpu::GpuIndexIVFFlatConfig *result = 0 ;
67913 
67914  if (!PyArg_ParseTuple(args,(char *)":new_GpuIndexIVFFlatConfig")) SWIG_fail;
67915  {
67916  Py_BEGIN_ALLOW_THREADS
67917  try {
67919  } catch(faiss::FaissException & e) {
67920  PyEval_RestoreThread(_save);
67921  PyErr_SetString(PyExc_RuntimeError, e.what());
67922  SWIG_fail;
67923  }
67924  Py_END_ALLOW_THREADS
67925  }
67926  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, SWIG_POINTER_NEW | 0 );
67927  return resultobj;
67928 fail:
67929  return NULL;
67930 }
67931 
67932 
67933 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlatConfig_useFloat16IVFStorage_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67934  PyObject *resultobj = 0;
67936  bool arg2 ;
67937  void *argp1 = 0 ;
67938  int res1 = 0 ;
67939  bool val2 ;
67940  int ecode2 = 0 ;
67941  PyObject * obj0 = 0 ;
67942  PyObject * obj1 = 0 ;
67943 
67944  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFFlatConfig_useFloat16IVFStorage_set",&obj0,&obj1)) SWIG_fail;
67945  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, 0 | 0 );
67946  if (!SWIG_IsOK(res1)) {
67947  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlatConfig_useFloat16IVFStorage_set" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlatConfig *""'");
67948  }
67949  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlatConfig * >(argp1);
67950  ecode2 = SWIG_AsVal_bool(obj1, &val2);
67951  if (!SWIG_IsOK(ecode2)) {
67952  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFFlatConfig_useFloat16IVFStorage_set" "', argument " "2"" of type '" "bool""'");
67953  }
67954  arg2 = static_cast< bool >(val2);
67955  if (arg1) (arg1)->useFloat16IVFStorage = arg2;
67956  resultobj = SWIG_Py_Void();
67957  return resultobj;
67958 fail:
67959  return NULL;
67960 }
67961 
67962 
67963 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlatConfig_useFloat16IVFStorage_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67964  PyObject *resultobj = 0;
67966  void *argp1 = 0 ;
67967  int res1 = 0 ;
67968  PyObject * obj0 = 0 ;
67969  bool result;
67970 
67971  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFFlatConfig_useFloat16IVFStorage_get",&obj0)) SWIG_fail;
67972  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, 0 | 0 );
67973  if (!SWIG_IsOK(res1)) {
67974  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlatConfig_useFloat16IVFStorage_get" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlatConfig *""'");
67975  }
67976  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlatConfig * >(argp1);
67977  result = (bool) ((arg1)->useFloat16IVFStorage);
67978  resultobj = SWIG_From_bool(static_cast< bool >(result));
67979  return resultobj;
67980 fail:
67981  return NULL;
67982 }
67983 
67984 
67985 SWIGINTERN PyObject *_wrap_delete_GpuIndexIVFFlatConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67986  PyObject *resultobj = 0;
67988  void *argp1 = 0 ;
67989  int res1 = 0 ;
67990  PyObject * obj0 = 0 ;
67991 
67992  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexIVFFlatConfig",&obj0)) SWIG_fail;
67993  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, SWIG_POINTER_DISOWN | 0 );
67994  if (!SWIG_IsOK(res1)) {
67995  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexIVFFlatConfig" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlatConfig *""'");
67996  }
67997  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlatConfig * >(argp1);
67998  delete arg1;
67999  resultobj = SWIG_Py_Void();
68000  return resultobj;
68001 fail:
68002  return NULL;
68003 }
68004 
68005 
68006 SWIGINTERN PyObject *GpuIndexIVFFlatConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68007  PyObject *obj;
68008  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
68009  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, SWIG_NewClientData(obj));
68010  return SWIG_Py_Void();
68011 }
68012 
68013 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68014  PyObject *resultobj = 0;
68018  void *argp1 = 0 ;
68019  int res1 = 0 ;
68020  void *argp2 = 0 ;
68021  int res2 = 0 ;
68022  void *argp3 ;
68023  int res3 = 0 ;
68024  PyObject * obj0 = 0 ;
68025  PyObject * obj1 = 0 ;
68026  PyObject * obj2 = 0 ;
68027  faiss::gpu::GpuIndexIVFFlat *result = 0 ;
68028 
68029  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexIVFFlat",&obj0,&obj1,&obj2)) SWIG_fail;
68030  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68031  if (!SWIG_IsOK(res1)) {
68032  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68033  }
68034  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68035  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
68036  if (!SWIG_IsOK(res2)) {
68037  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexIVFFlat" "', argument " "2"" of type '" "faiss::IndexIVFFlat const *""'");
68038  }
68039  arg2 = reinterpret_cast< faiss::IndexIVFFlat * >(argp2);
68040  {
68041  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, 0 | 0);
68042  if (!SWIG_IsOK(res3)) {
68043  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexIVFFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexIVFFlatConfig""'");
68044  }
68045  if (!argp3) {
68046  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexIVFFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexIVFFlatConfig""'");
68047  } else {
68048  faiss::gpu::GpuIndexIVFFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexIVFFlatConfig * >(argp3);
68049  arg3 = *temp;
68050  if (SWIG_IsNewObj(res3)) delete temp;
68051  }
68052  }
68053  {
68054  Py_BEGIN_ALLOW_THREADS
68055  try {
68056  result = (faiss::gpu::GpuIndexIVFFlat *)new faiss::gpu::GpuIndexIVFFlat(arg1,(faiss::IndexIVFFlat const *)arg2,arg3);
68057  } catch(faiss::FaissException & e) {
68058  PyEval_RestoreThread(_save);
68059  PyErr_SetString(PyExc_RuntimeError, e.what());
68060  SWIG_fail;
68061  }
68062  Py_END_ALLOW_THREADS
68063  }
68064  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, SWIG_POINTER_NEW | 0 );
68065  return resultobj;
68066 fail:
68067  return NULL;
68068 }
68069 
68070 
68071 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68072  PyObject *resultobj = 0;
68075  void *argp1 = 0 ;
68076  int res1 = 0 ;
68077  void *argp2 = 0 ;
68078  int res2 = 0 ;
68079  PyObject * obj0 = 0 ;
68080  PyObject * obj1 = 0 ;
68081  faiss::gpu::GpuIndexIVFFlat *result = 0 ;
68082 
68083  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexIVFFlat",&obj0,&obj1)) SWIG_fail;
68084  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68085  if (!SWIG_IsOK(res1)) {
68086  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68087  }
68088  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68089  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
68090  if (!SWIG_IsOK(res2)) {
68091  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexIVFFlat" "', argument " "2"" of type '" "faiss::IndexIVFFlat const *""'");
68092  }
68093  arg2 = reinterpret_cast< faiss::IndexIVFFlat * >(argp2);
68094  {
68095  Py_BEGIN_ALLOW_THREADS
68096  try {
68098  } catch(faiss::FaissException & e) {
68099  PyEval_RestoreThread(_save);
68100  PyErr_SetString(PyExc_RuntimeError, e.what());
68101  SWIG_fail;
68102  }
68103  Py_END_ALLOW_THREADS
68104  }
68105  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, SWIG_POINTER_NEW | 0 );
68106  return resultobj;
68107 fail:
68108  return NULL;
68109 }
68110 
68111 
68112 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFFlat__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68113  PyObject *resultobj = 0;
68115  int arg2 ;
68116  int arg3 ;
68117  faiss::MetricType arg4 ;
68119  void *argp1 = 0 ;
68120  int res1 = 0 ;
68121  int val2 ;
68122  int ecode2 = 0 ;
68123  int val3 ;
68124  int ecode3 = 0 ;
68125  int val4 ;
68126  int ecode4 = 0 ;
68127  void *argp5 ;
68128  int res5 = 0 ;
68129  PyObject * obj0 = 0 ;
68130  PyObject * obj1 = 0 ;
68131  PyObject * obj2 = 0 ;
68132  PyObject * obj3 = 0 ;
68133  PyObject * obj4 = 0 ;
68134  faiss::gpu::GpuIndexIVFFlat *result = 0 ;
68135 
68136  if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_GpuIndexIVFFlat",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
68137  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68138  if (!SWIG_IsOK(res1)) {
68139  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68140  }
68141  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68142  ecode2 = SWIG_AsVal_int(obj1, &val2);
68143  if (!SWIG_IsOK(ecode2)) {
68144  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexIVFFlat" "', argument " "2"" of type '" "int""'");
68145  }
68146  arg2 = static_cast< int >(val2);
68147  ecode3 = SWIG_AsVal_int(obj2, &val3);
68148  if (!SWIG_IsOK(ecode3)) {
68149  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GpuIndexIVFFlat" "', argument " "3"" of type '" "int""'");
68150  }
68151  arg3 = static_cast< int >(val3);
68152  ecode4 = SWIG_AsVal_int(obj3, &val4);
68153  if (!SWIG_IsOK(ecode4)) {
68154  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GpuIndexIVFFlat" "', argument " "4"" of type '" "faiss::MetricType""'");
68155  }
68156  arg4 = static_cast< faiss::MetricType >(val4);
68157  {
68158  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, 0 | 0);
68159  if (!SWIG_IsOK(res5)) {
68160  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_GpuIndexIVFFlat" "', argument " "5"" of type '" "faiss::gpu::GpuIndexIVFFlatConfig""'");
68161  }
68162  if (!argp5) {
68163  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexIVFFlat" "', argument " "5"" of type '" "faiss::gpu::GpuIndexIVFFlatConfig""'");
68164  } else {
68165  faiss::gpu::GpuIndexIVFFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexIVFFlatConfig * >(argp5);
68166  arg5 = *temp;
68167  if (SWIG_IsNewObj(res5)) delete temp;
68168  }
68169  }
68170  {
68171  Py_BEGIN_ALLOW_THREADS
68172  try {
68173  result = (faiss::gpu::GpuIndexIVFFlat *)new faiss::gpu::GpuIndexIVFFlat(arg1,arg2,arg3,arg4,arg5);
68174  } catch(faiss::FaissException & e) {
68175  PyEval_RestoreThread(_save);
68176  PyErr_SetString(PyExc_RuntimeError, e.what());
68177  SWIG_fail;
68178  }
68179  Py_END_ALLOW_THREADS
68180  }
68181  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, SWIG_POINTER_NEW | 0 );
68182  return resultobj;
68183 fail:
68184  return NULL;
68185 }
68186 
68187 
68188 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFFlat__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68189  PyObject *resultobj = 0;
68191  int arg2 ;
68192  int arg3 ;
68193  faiss::MetricType arg4 ;
68194  void *argp1 = 0 ;
68195  int res1 = 0 ;
68196  int val2 ;
68197  int ecode2 = 0 ;
68198  int val3 ;
68199  int ecode3 = 0 ;
68200  int val4 ;
68201  int ecode4 = 0 ;
68202  PyObject * obj0 = 0 ;
68203  PyObject * obj1 = 0 ;
68204  PyObject * obj2 = 0 ;
68205  PyObject * obj3 = 0 ;
68206  faiss::gpu::GpuIndexIVFFlat *result = 0 ;
68207 
68208  if (!PyArg_ParseTuple(args,(char *)"OOOO:new_GpuIndexIVFFlat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
68209  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68210  if (!SWIG_IsOK(res1)) {
68211  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexIVFFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68212  }
68213  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68214  ecode2 = SWIG_AsVal_int(obj1, &val2);
68215  if (!SWIG_IsOK(ecode2)) {
68216  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexIVFFlat" "', argument " "2"" of type '" "int""'");
68217  }
68218  arg2 = static_cast< int >(val2);
68219  ecode3 = SWIG_AsVal_int(obj2, &val3);
68220  if (!SWIG_IsOK(ecode3)) {
68221  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_GpuIndexIVFFlat" "', argument " "3"" of type '" "int""'");
68222  }
68223  arg3 = static_cast< int >(val3);
68224  ecode4 = SWIG_AsVal_int(obj3, &val4);
68225  if (!SWIG_IsOK(ecode4)) {
68226  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_GpuIndexIVFFlat" "', argument " "4"" of type '" "faiss::MetricType""'");
68227  }
68228  arg4 = static_cast< faiss::MetricType >(val4);
68229  {
68230  Py_BEGIN_ALLOW_THREADS
68231  try {
68232  result = (faiss::gpu::GpuIndexIVFFlat *)new faiss::gpu::GpuIndexIVFFlat(arg1,arg2,arg3,arg4);
68233  } catch(faiss::FaissException & e) {
68234  PyEval_RestoreThread(_save);
68235  PyErr_SetString(PyExc_RuntimeError, e.what());
68236  SWIG_fail;
68237  }
68238  Py_END_ALLOW_THREADS
68239  }
68240  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, SWIG_POINTER_NEW | 0 );
68241  return resultobj;
68242 fail:
68243  return NULL;
68244 }
68245 
68246 
68247 SWIGINTERN PyObject *_wrap_new_GpuIndexIVFFlat(PyObject *self, PyObject *args) {
68248  Py_ssize_t argc;
68249  PyObject *argv[6] = {
68250  0
68251  };
68252  Py_ssize_t ii;
68253 
68254  if (!PyTuple_Check(args)) SWIG_fail;
68255  argc = args ? PyObject_Length(args) : 0;
68256  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
68257  argv[ii] = PyTuple_GET_ITEM(args,ii);
68258  }
68259  if (argc == 2) {
68260  int _v;
68261  void *vptr = 0;
68262  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68263  _v = SWIG_CheckState(res);
68264  if (_v) {
68265  void *vptr = 0;
68266  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexIVFFlat, 0);
68267  _v = SWIG_CheckState(res);
68268  if (_v) {
68269  return _wrap_new_GpuIndexIVFFlat__SWIG_1(self, args);
68270  }
68271  }
68272  }
68273  if (argc == 3) {
68274  int _v;
68275  void *vptr = 0;
68276  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68277  _v = SWIG_CheckState(res);
68278  if (_v) {
68279  void *vptr = 0;
68280  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexIVFFlat, 0);
68281  _v = SWIG_CheckState(res);
68282  if (_v) {
68283  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, 0);
68284  _v = SWIG_CheckState(res);
68285  if (_v) {
68286  return _wrap_new_GpuIndexIVFFlat__SWIG_0(self, args);
68287  }
68288  }
68289  }
68290  }
68291  if (argc == 4) {
68292  int _v;
68293  void *vptr = 0;
68294  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68295  _v = SWIG_CheckState(res);
68296  if (_v) {
68297  {
68298  int res = SWIG_AsVal_int(argv[1], NULL);
68299  _v = SWIG_CheckState(res);
68300  }
68301  if (_v) {
68302  {
68303  int res = SWIG_AsVal_int(argv[2], NULL);
68304  _v = SWIG_CheckState(res);
68305  }
68306  if (_v) {
68307  {
68308  int res = SWIG_AsVal_int(argv[3], NULL);
68309  _v = SWIG_CheckState(res);
68310  }
68311  if (_v) {
68312  return _wrap_new_GpuIndexIVFFlat__SWIG_3(self, args);
68313  }
68314  }
68315  }
68316  }
68317  }
68318  if (argc == 5) {
68319  int _v;
68320  void *vptr = 0;
68321  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68322  _v = SWIG_CheckState(res);
68323  if (_v) {
68324  {
68325  int res = SWIG_AsVal_int(argv[1], NULL);
68326  _v = SWIG_CheckState(res);
68327  }
68328  if (_v) {
68329  {
68330  int res = SWIG_AsVal_int(argv[2], NULL);
68331  _v = SWIG_CheckState(res);
68332  }
68333  if (_v) {
68334  {
68335  int res = SWIG_AsVal_int(argv[3], NULL);
68336  _v = SWIG_CheckState(res);
68337  }
68338  if (_v) {
68339  int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlatConfig, 0);
68340  _v = SWIG_CheckState(res);
68341  if (_v) {
68342  return _wrap_new_GpuIndexIVFFlat__SWIG_2(self, args);
68343  }
68344  }
68345  }
68346  }
68347  }
68348  }
68349 
68350 fail:
68351  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_GpuIndexIVFFlat'.\n"
68352  " Possible C/C++ prototypes are:\n"
68353  " faiss::gpu::GpuIndexIVFFlat::GpuIndexIVFFlat(faiss::gpu::GpuResources *,faiss::IndexIVFFlat const *,faiss::gpu::GpuIndexIVFFlatConfig)\n"
68354  " faiss::gpu::GpuIndexIVFFlat::GpuIndexIVFFlat(faiss::gpu::GpuResources *,faiss::IndexIVFFlat const *)\n"
68355  " faiss::gpu::GpuIndexIVFFlat::GpuIndexIVFFlat(faiss::gpu::GpuResources *,int,int,faiss::MetricType,faiss::gpu::GpuIndexIVFFlatConfig)\n"
68356  " faiss::gpu::GpuIndexIVFFlat::GpuIndexIVFFlat(faiss::gpu::GpuResources *,int,int,faiss::MetricType)\n");
68357  return 0;
68358 }
68359 
68360 
68361 SWIGINTERN PyObject *_wrap_delete_GpuIndexIVFFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68362  PyObject *resultobj = 0;
68364  void *argp1 = 0 ;
68365  int res1 = 0 ;
68366  PyObject * obj0 = 0 ;
68367 
68368  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexIVFFlat",&obj0)) SWIG_fail;
68369  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, SWIG_POINTER_DISOWN | 0 );
68370  if (!SWIG_IsOK(res1)) {
68371  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexIVFFlat" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlat *""'");
68372  }
68373  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlat * >(argp1);
68374  {
68375  Py_BEGIN_ALLOW_THREADS
68376  try {
68377  delete arg1;
68378  } catch(faiss::FaissException & e) {
68379  PyEval_RestoreThread(_save);
68380  PyErr_SetString(PyExc_RuntimeError, e.what());
68381  SWIG_fail;
68382  }
68383  Py_END_ALLOW_THREADS
68384  }
68385  resultobj = SWIG_Py_Void();
68386  return resultobj;
68387 fail:
68388  return NULL;
68389 }
68390 
68391 
68392 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlat_reserveMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68393  PyObject *resultobj = 0;
68395  size_t arg2 ;
68396  void *argp1 = 0 ;
68397  int res1 = 0 ;
68398  size_t val2 ;
68399  int ecode2 = 0 ;
68400  PyObject * obj0 = 0 ;
68401  PyObject * obj1 = 0 ;
68402 
68403  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFFlat_reserveMemory",&obj0,&obj1)) SWIG_fail;
68404  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, 0 | 0 );
68405  if (!SWIG_IsOK(res1)) {
68406  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlat_reserveMemory" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlat *""'");
68407  }
68408  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlat * >(argp1);
68409  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
68410  if (!SWIG_IsOK(ecode2)) {
68411  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFFlat_reserveMemory" "', argument " "2"" of type '" "size_t""'");
68412  }
68413  arg2 = static_cast< size_t >(val2);
68414  {
68415  Py_BEGIN_ALLOW_THREADS
68416  try {
68417  (arg1)->reserveMemory(arg2);
68418  } catch(faiss::FaissException & e) {
68419  PyEval_RestoreThread(_save);
68420  PyErr_SetString(PyExc_RuntimeError, e.what());
68421  SWIG_fail;
68422  }
68423  Py_END_ALLOW_THREADS
68424  }
68425  resultobj = SWIG_Py_Void();
68426  return resultobj;
68427 fail:
68428  return NULL;
68429 }
68430 
68431 
68432 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlat_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68433  PyObject *resultobj = 0;
68436  void *argp1 = 0 ;
68437  int res1 = 0 ;
68438  void *argp2 = 0 ;
68439  int res2 = 0 ;
68440  PyObject * obj0 = 0 ;
68441  PyObject * obj1 = 0 ;
68442 
68443  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFFlat_copyFrom",&obj0,&obj1)) SWIG_fail;
68444  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, 0 | 0 );
68445  if (!SWIG_IsOK(res1)) {
68446  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlat_copyFrom" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlat *""'");
68447  }
68448  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlat * >(argp1);
68449  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
68450  if (!SWIG_IsOK(res2)) {
68451  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVFFlat_copyFrom" "', argument " "2"" of type '" "faiss::IndexIVFFlat const *""'");
68452  }
68453  arg2 = reinterpret_cast< faiss::IndexIVFFlat * >(argp2);
68454  {
68455  Py_BEGIN_ALLOW_THREADS
68456  try {
68457  (arg1)->copyFrom((faiss::IndexIVFFlat const *)arg2);
68458  } catch(faiss::FaissException & e) {
68459  PyEval_RestoreThread(_save);
68460  PyErr_SetString(PyExc_RuntimeError, e.what());
68461  SWIG_fail;
68462  }
68463  Py_END_ALLOW_THREADS
68464  }
68465  resultobj = SWIG_Py_Void();
68466  return resultobj;
68467 fail:
68468  return NULL;
68469 }
68470 
68471 
68472 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlat_copyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68473  PyObject *resultobj = 0;
68476  void *argp1 = 0 ;
68477  int res1 = 0 ;
68478  void *argp2 = 0 ;
68479  int res2 = 0 ;
68480  PyObject * obj0 = 0 ;
68481  PyObject * obj1 = 0 ;
68482 
68483  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexIVFFlat_copyTo",&obj0,&obj1)) SWIG_fail;
68484  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, 0 | 0 );
68485  if (!SWIG_IsOK(res1)) {
68486  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlat_copyTo" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlat const *""'");
68487  }
68488  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlat * >(argp1);
68489  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
68490  if (!SWIG_IsOK(res2)) {
68491  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexIVFFlat_copyTo" "', argument " "2"" of type '" "faiss::IndexIVFFlat *""'");
68492  }
68493  arg2 = reinterpret_cast< faiss::IndexIVFFlat * >(argp2);
68494  {
68495  Py_BEGIN_ALLOW_THREADS
68496  try {
68497  ((faiss::gpu::GpuIndexIVFFlat const *)arg1)->copyTo(arg2);
68498  } catch(faiss::FaissException & e) {
68499  PyEval_RestoreThread(_save);
68500  PyErr_SetString(PyExc_RuntimeError, e.what());
68501  SWIG_fail;
68502  }
68503  Py_END_ALLOW_THREADS
68504  }
68505  resultobj = SWIG_Py_Void();
68506  return resultobj;
68507 fail:
68508  return NULL;
68509 }
68510 
68511 
68512 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlat_reclaimMemory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68513  PyObject *resultobj = 0;
68515  void *argp1 = 0 ;
68516  int res1 = 0 ;
68517  PyObject * obj0 = 0 ;
68518  size_t result;
68519 
68520  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFFlat_reclaimMemory",&obj0)) SWIG_fail;
68521  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, 0 | 0 );
68522  if (!SWIG_IsOK(res1)) {
68523  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlat_reclaimMemory" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlat *""'");
68524  }
68525  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlat * >(argp1);
68526  {
68527  Py_BEGIN_ALLOW_THREADS
68528  try {
68529  result = (size_t)(arg1)->reclaimMemory();
68530  } catch(faiss::FaissException & e) {
68531  PyEval_RestoreThread(_save);
68532  PyErr_SetString(PyExc_RuntimeError, e.what());
68533  SWIG_fail;
68534  }
68535  Py_END_ALLOW_THREADS
68536  }
68537  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
68538  return resultobj;
68539 fail:
68540  return NULL;
68541 }
68542 
68543 
68544 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68545  PyObject *resultobj = 0;
68547  void *argp1 = 0 ;
68548  int res1 = 0 ;
68549  PyObject * obj0 = 0 ;
68550 
68551  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexIVFFlat_reset",&obj0)) SWIG_fail;
68552  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, 0 | 0 );
68553  if (!SWIG_IsOK(res1)) {
68554  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlat_reset" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlat *""'");
68555  }
68556  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlat * >(argp1);
68557  {
68558  Py_BEGIN_ALLOW_THREADS
68559  try {
68560  (arg1)->reset();
68561  } catch(faiss::FaissException & e) {
68562  PyEval_RestoreThread(_save);
68563  PyErr_SetString(PyExc_RuntimeError, e.what());
68564  SWIG_fail;
68565  }
68566  Py_END_ALLOW_THREADS
68567  }
68568  resultobj = SWIG_Py_Void();
68569  return resultobj;
68570 fail:
68571  return NULL;
68572 }
68573 
68574 
68575 SWIGINTERN PyObject *_wrap_GpuIndexIVFFlat_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68576  PyObject *resultobj = 0;
68578  faiss::Index::idx_t arg2 ;
68579  float *arg3 = (float *) 0 ;
68580  void *argp1 = 0 ;
68581  int res1 = 0 ;
68582  long val2 ;
68583  int ecode2 = 0 ;
68584  void *argp3 = 0 ;
68585  int res3 = 0 ;
68586  PyObject * obj0 = 0 ;
68587  PyObject * obj1 = 0 ;
68588  PyObject * obj2 = 0 ;
68589 
68590  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexIVFFlat_train",&obj0,&obj1,&obj2)) SWIG_fail;
68591  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, 0 | 0 );
68592  if (!SWIG_IsOK(res1)) {
68593  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexIVFFlat_train" "', argument " "1"" of type '" "faiss::gpu::GpuIndexIVFFlat *""'");
68594  }
68595  arg1 = reinterpret_cast< faiss::gpu::GpuIndexIVFFlat * >(argp1);
68596  ecode2 = SWIG_AsVal_long(obj1, &val2);
68597  if (!SWIG_IsOK(ecode2)) {
68598  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexIVFFlat_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
68599  }
68600  arg2 = static_cast< faiss::Index::idx_t >(val2);
68601  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
68602  if (!SWIG_IsOK(res3)) {
68603  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexIVFFlat_train" "', argument " "3"" of type '" "float const *""'");
68604  }
68605  arg3 = reinterpret_cast< float * >(argp3);
68606  {
68607  Py_BEGIN_ALLOW_THREADS
68608  try {
68609  (arg1)->train(arg2,(float const *)arg3);
68610  } catch(faiss::FaissException & e) {
68611  PyEval_RestoreThread(_save);
68612  PyErr_SetString(PyExc_RuntimeError, e.what());
68613  SWIG_fail;
68614  }
68615  Py_END_ALLOW_THREADS
68616  }
68617  resultobj = SWIG_Py_Void();
68618  return resultobj;
68619 fail:
68620  return NULL;
68621 }
68622 
68623 
68624 SWIGINTERN PyObject *GpuIndexIVFFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68625  PyObject *obj;
68626  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
68627  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat, SWIG_NewClientData(obj));
68628  return SWIG_Py_Void();
68629 }
68630 
68631 SWIGINTERN PyObject *_wrap_new_GpuIndexBinaryFlatConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68632  PyObject *resultobj = 0;
68634 
68635  if (!PyArg_ParseTuple(args,(char *)":new_GpuIndexBinaryFlatConfig")) SWIG_fail;
68637  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig, SWIG_POINTER_NEW | 0 );
68638  return resultobj;
68639 fail:
68640  return NULL;
68641 }
68642 
68643 
68644 SWIGINTERN PyObject *_wrap_delete_GpuIndexBinaryFlatConfig(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68645  PyObject *resultobj = 0;
68647  void *argp1 = 0 ;
68648  int res1 = 0 ;
68649  PyObject * obj0 = 0 ;
68650 
68651  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexBinaryFlatConfig",&obj0)) SWIG_fail;
68652  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig, SWIG_POINTER_DISOWN | 0 );
68653  if (!SWIG_IsOK(res1)) {
68654  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexBinaryFlatConfig" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlatConfig *""'");
68655  }
68656  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlatConfig * >(argp1);
68657  delete arg1;
68658  resultobj = SWIG_Py_Void();
68659  return resultobj;
68660 fail:
68661  return NULL;
68662 }
68663 
68664 
68665 SWIGINTERN PyObject *GpuIndexBinaryFlatConfig_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68666  PyObject *obj;
68667  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
68668  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig, SWIG_NewClientData(obj));
68669  return SWIG_Py_Void();
68670 }
68671 
68672 SWIGINTERN PyObject *_wrap_new_GpuIndexBinaryFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68673  PyObject *resultobj = 0;
68677  void *argp1 = 0 ;
68678  int res1 = 0 ;
68679  void *argp2 = 0 ;
68680  int res2 = 0 ;
68681  void *argp3 ;
68682  int res3 = 0 ;
68683  PyObject * obj0 = 0 ;
68684  PyObject * obj1 = 0 ;
68685  PyObject * obj2 = 0 ;
68686  faiss::gpu::GpuIndexBinaryFlat *result = 0 ;
68687 
68688  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexBinaryFlat",&obj0,&obj1,&obj2)) SWIG_fail;
68689  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68690  if (!SWIG_IsOK(res1)) {
68691  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexBinaryFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68692  }
68693  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68694  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
68695  if (!SWIG_IsOK(res2)) {
68696  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexBinaryFlat" "', argument " "2"" of type '" "faiss::IndexBinaryFlat const *""'");
68697  }
68698  arg2 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp2);
68699  {
68700  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig, 0 | 0);
68701  if (!SWIG_IsOK(res3)) {
68702  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexBinaryFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexBinaryFlatConfig""'");
68703  }
68704  if (!argp3) {
68705  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexBinaryFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexBinaryFlatConfig""'");
68706  } else {
68707  faiss::gpu::GpuIndexBinaryFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlatConfig * >(argp3);
68708  arg3 = *temp;
68709  if (SWIG_IsNewObj(res3)) delete temp;
68710  }
68711  }
68712  {
68713  Py_BEGIN_ALLOW_THREADS
68714  try {
68716  } catch(faiss::FaissException & e) {
68717  PyEval_RestoreThread(_save);
68718  PyErr_SetString(PyExc_RuntimeError, e.what());
68719  SWIG_fail;
68720  }
68721  Py_END_ALLOW_THREADS
68722  }
68723  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, SWIG_POINTER_NEW | 0 );
68724  return resultobj;
68725 fail:
68726  return NULL;
68727 }
68728 
68729 
68730 SWIGINTERN PyObject *_wrap_new_GpuIndexBinaryFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68731  PyObject *resultobj = 0;
68734  void *argp1 = 0 ;
68735  int res1 = 0 ;
68736  void *argp2 = 0 ;
68737  int res2 = 0 ;
68738  PyObject * obj0 = 0 ;
68739  PyObject * obj1 = 0 ;
68740  faiss::gpu::GpuIndexBinaryFlat *result = 0 ;
68741 
68742  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexBinaryFlat",&obj0,&obj1)) SWIG_fail;
68743  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68744  if (!SWIG_IsOK(res1)) {
68745  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexBinaryFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68746  }
68747  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68748  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
68749  if (!SWIG_IsOK(res2)) {
68750  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GpuIndexBinaryFlat" "', argument " "2"" of type '" "faiss::IndexBinaryFlat const *""'");
68751  }
68752  arg2 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp2);
68753  {
68754  Py_BEGIN_ALLOW_THREADS
68755  try {
68757  } catch(faiss::FaissException & e) {
68758  PyEval_RestoreThread(_save);
68759  PyErr_SetString(PyExc_RuntimeError, e.what());
68760  SWIG_fail;
68761  }
68762  Py_END_ALLOW_THREADS
68763  }
68764  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, SWIG_POINTER_NEW | 0 );
68765  return resultobj;
68766 fail:
68767  return NULL;
68768 }
68769 
68770 
68771 SWIGINTERN PyObject *_wrap_new_GpuIndexBinaryFlat__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68772  PyObject *resultobj = 0;
68774  int arg2 ;
68776  void *argp1 = 0 ;
68777  int res1 = 0 ;
68778  int val2 ;
68779  int ecode2 = 0 ;
68780  void *argp3 ;
68781  int res3 = 0 ;
68782  PyObject * obj0 = 0 ;
68783  PyObject * obj1 = 0 ;
68784  PyObject * obj2 = 0 ;
68785  faiss::gpu::GpuIndexBinaryFlat *result = 0 ;
68786 
68787  if (!PyArg_ParseTuple(args,(char *)"OOO:new_GpuIndexBinaryFlat",&obj0,&obj1,&obj2)) SWIG_fail;
68788  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68789  if (!SWIG_IsOK(res1)) {
68790  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexBinaryFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68791  }
68792  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68793  ecode2 = SWIG_AsVal_int(obj1, &val2);
68794  if (!SWIG_IsOK(ecode2)) {
68795  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexBinaryFlat" "', argument " "2"" of type '" "int""'");
68796  }
68797  arg2 = static_cast< int >(val2);
68798  {
68799  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig, 0 | 0);
68800  if (!SWIG_IsOK(res3)) {
68801  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_GpuIndexBinaryFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexBinaryFlatConfig""'");
68802  }
68803  if (!argp3) {
68804  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GpuIndexBinaryFlat" "', argument " "3"" of type '" "faiss::gpu::GpuIndexBinaryFlatConfig""'");
68805  } else {
68806  faiss::gpu::GpuIndexBinaryFlatConfig * temp = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlatConfig * >(argp3);
68807  arg3 = *temp;
68808  if (SWIG_IsNewObj(res3)) delete temp;
68809  }
68810  }
68811  {
68812  Py_BEGIN_ALLOW_THREADS
68813  try {
68814  result = (faiss::gpu::GpuIndexBinaryFlat *)new faiss::gpu::GpuIndexBinaryFlat(arg1,arg2,arg3);
68815  } catch(faiss::FaissException & e) {
68816  PyEval_RestoreThread(_save);
68817  PyErr_SetString(PyExc_RuntimeError, e.what());
68818  SWIG_fail;
68819  }
68820  Py_END_ALLOW_THREADS
68821  }
68822  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, SWIG_POINTER_NEW | 0 );
68823  return resultobj;
68824 fail:
68825  return NULL;
68826 }
68827 
68828 
68829 SWIGINTERN PyObject *_wrap_new_GpuIndexBinaryFlat__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68830  PyObject *resultobj = 0;
68832  int arg2 ;
68833  void *argp1 = 0 ;
68834  int res1 = 0 ;
68835  int val2 ;
68836  int ecode2 = 0 ;
68837  PyObject * obj0 = 0 ;
68838  PyObject * obj1 = 0 ;
68839  faiss::gpu::GpuIndexBinaryFlat *result = 0 ;
68840 
68841  if (!PyArg_ParseTuple(args,(char *)"OO:new_GpuIndexBinaryFlat",&obj0,&obj1)) SWIG_fail;
68842  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
68843  if (!SWIG_IsOK(res1)) {
68844  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GpuIndexBinaryFlat" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
68845  }
68846  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
68847  ecode2 = SWIG_AsVal_int(obj1, &val2);
68848  if (!SWIG_IsOK(ecode2)) {
68849  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GpuIndexBinaryFlat" "', argument " "2"" of type '" "int""'");
68850  }
68851  arg2 = static_cast< int >(val2);
68852  {
68853  Py_BEGIN_ALLOW_THREADS
68854  try {
68856  } catch(faiss::FaissException & e) {
68857  PyEval_RestoreThread(_save);
68858  PyErr_SetString(PyExc_RuntimeError, e.what());
68859  SWIG_fail;
68860  }
68861  Py_END_ALLOW_THREADS
68862  }
68863  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, SWIG_POINTER_NEW | 0 );
68864  return resultobj;
68865 fail:
68866  return NULL;
68867 }
68868 
68869 
68870 SWIGINTERN PyObject *_wrap_new_GpuIndexBinaryFlat(PyObject *self, PyObject *args) {
68871  Py_ssize_t argc;
68872  PyObject *argv[4] = {
68873  0
68874  };
68875  Py_ssize_t ii;
68876 
68877  if (!PyTuple_Check(args)) SWIG_fail;
68878  argc = args ? PyObject_Length(args) : 0;
68879  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
68880  argv[ii] = PyTuple_GET_ITEM(args,ii);
68881  }
68882  if (argc == 2) {
68883  int _v;
68884  void *vptr = 0;
68885  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68886  _v = SWIG_CheckState(res);
68887  if (_v) {
68888  void *vptr = 0;
68889  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexBinaryFlat, 0);
68890  _v = SWIG_CheckState(res);
68891  if (_v) {
68892  return _wrap_new_GpuIndexBinaryFlat__SWIG_1(self, args);
68893  }
68894  }
68895  }
68896  if (argc == 2) {
68897  int _v;
68898  void *vptr = 0;
68899  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68900  _v = SWIG_CheckState(res);
68901  if (_v) {
68902  {
68903  int res = SWIG_AsVal_int(argv[1], NULL);
68904  _v = SWIG_CheckState(res);
68905  }
68906  if (_v) {
68907  return _wrap_new_GpuIndexBinaryFlat__SWIG_3(self, args);
68908  }
68909  }
68910  }
68911  if (argc == 3) {
68912  int _v;
68913  void *vptr = 0;
68914  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68915  _v = SWIG_CheckState(res);
68916  if (_v) {
68917  void *vptr = 0;
68918  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IndexBinaryFlat, 0);
68919  _v = SWIG_CheckState(res);
68920  if (_v) {
68921  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig, 0);
68922  _v = SWIG_CheckState(res);
68923  if (_v) {
68924  return _wrap_new_GpuIndexBinaryFlat__SWIG_0(self, args);
68925  }
68926  }
68927  }
68928  }
68929  if (argc == 3) {
68930  int _v;
68931  void *vptr = 0;
68932  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
68933  _v = SWIG_CheckState(res);
68934  if (_v) {
68935  {
68936  int res = SWIG_AsVal_int(argv[1], NULL);
68937  _v = SWIG_CheckState(res);
68938  }
68939  if (_v) {
68940  int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlatConfig, 0);
68941  _v = SWIG_CheckState(res);
68942  if (_v) {
68943  return _wrap_new_GpuIndexBinaryFlat__SWIG_2(self, args);
68944  }
68945  }
68946  }
68947  }
68948 
68949 fail:
68950  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_GpuIndexBinaryFlat'.\n"
68951  " Possible C/C++ prototypes are:\n"
68952  " faiss::gpu::GpuIndexBinaryFlat::GpuIndexBinaryFlat(faiss::gpu::GpuResources *,faiss::IndexBinaryFlat const *,faiss::gpu::GpuIndexBinaryFlatConfig)\n"
68953  " faiss::gpu::GpuIndexBinaryFlat::GpuIndexBinaryFlat(faiss::gpu::GpuResources *,faiss::IndexBinaryFlat const *)\n"
68954  " faiss::gpu::GpuIndexBinaryFlat::GpuIndexBinaryFlat(faiss::gpu::GpuResources *,int,faiss::gpu::GpuIndexBinaryFlatConfig)\n"
68955  " faiss::gpu::GpuIndexBinaryFlat::GpuIndexBinaryFlat(faiss::gpu::GpuResources *,int)\n");
68956  return 0;
68957 }
68958 
68959 
68960 SWIGINTERN PyObject *_wrap_delete_GpuIndexBinaryFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68961  PyObject *resultobj = 0;
68963  void *argp1 = 0 ;
68964  int res1 = 0 ;
68965  PyObject * obj0 = 0 ;
68966 
68967  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuIndexBinaryFlat",&obj0)) SWIG_fail;
68968  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, SWIG_POINTER_DISOWN | 0 );
68969  if (!SWIG_IsOK(res1)) {
68970  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuIndexBinaryFlat" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlat *""'");
68971  }
68972  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlat * >(argp1);
68973  {
68974  Py_BEGIN_ALLOW_THREADS
68975  try {
68976  delete arg1;
68977  } catch(faiss::FaissException & e) {
68978  PyEval_RestoreThread(_save);
68979  PyErr_SetString(PyExc_RuntimeError, e.what());
68980  SWIG_fail;
68981  }
68982  Py_END_ALLOW_THREADS
68983  }
68984  resultobj = SWIG_Py_Void();
68985  return resultobj;
68986 fail:
68987  return NULL;
68988 }
68989 
68990 
68991 SWIGINTERN PyObject *_wrap_GpuIndexBinaryFlat_copyFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68992  PyObject *resultobj = 0;
68995  void *argp1 = 0 ;
68996  int res1 = 0 ;
68997  void *argp2 = 0 ;
68998  int res2 = 0 ;
68999  PyObject * obj0 = 0 ;
69000  PyObject * obj1 = 0 ;
69001 
69002  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexBinaryFlat_copyFrom",&obj0,&obj1)) SWIG_fail;
69003  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, 0 | 0 );
69004  if (!SWIG_IsOK(res1)) {
69005  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexBinaryFlat_copyFrom" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlat *""'");
69006  }
69007  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlat * >(argp1);
69008  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
69009  if (!SWIG_IsOK(res2)) {
69010  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexBinaryFlat_copyFrom" "', argument " "2"" of type '" "faiss::IndexBinaryFlat const *""'");
69011  }
69012  arg2 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp2);
69013  {
69014  Py_BEGIN_ALLOW_THREADS
69015  try {
69016  (arg1)->copyFrom((faiss::IndexBinaryFlat const *)arg2);
69017  } catch(faiss::FaissException & e) {
69018  PyEval_RestoreThread(_save);
69019  PyErr_SetString(PyExc_RuntimeError, e.what());
69020  SWIG_fail;
69021  }
69022  Py_END_ALLOW_THREADS
69023  }
69024  resultobj = SWIG_Py_Void();
69025  return resultobj;
69026 fail:
69027  return NULL;
69028 }
69029 
69030 
69031 SWIGINTERN PyObject *_wrap_GpuIndexBinaryFlat_copyTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69032  PyObject *resultobj = 0;
69035  void *argp1 = 0 ;
69036  int res1 = 0 ;
69037  void *argp2 = 0 ;
69038  int res2 = 0 ;
69039  PyObject * obj0 = 0 ;
69040  PyObject * obj1 = 0 ;
69041 
69042  if (!PyArg_ParseTuple(args,(char *)"OO:GpuIndexBinaryFlat_copyTo",&obj0,&obj1)) SWIG_fail;
69043  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, 0 | 0 );
69044  if (!SWIG_IsOK(res1)) {
69045  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexBinaryFlat_copyTo" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlat const *""'");
69046  }
69047  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlat * >(argp1);
69048  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
69049  if (!SWIG_IsOK(res2)) {
69050  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuIndexBinaryFlat_copyTo" "', argument " "2"" of type '" "faiss::IndexBinaryFlat *""'");
69051  }
69052  arg2 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp2);
69053  {
69054  Py_BEGIN_ALLOW_THREADS
69055  try {
69056  ((faiss::gpu::GpuIndexBinaryFlat const *)arg1)->copyTo(arg2);
69057  } catch(faiss::FaissException & e) {
69058  PyEval_RestoreThread(_save);
69059  PyErr_SetString(PyExc_RuntimeError, e.what());
69060  SWIG_fail;
69061  }
69062  Py_END_ALLOW_THREADS
69063  }
69064  resultobj = SWIG_Py_Void();
69065  return resultobj;
69066 fail:
69067  return NULL;
69068 }
69069 
69070 
69071 SWIGINTERN PyObject *_wrap_GpuIndexBinaryFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69072  PyObject *resultobj = 0;
69075  uint8_t *arg3 = (uint8_t *) 0 ;
69076  void *argp1 = 0 ;
69077  int res1 = 0 ;
69078  long val2 ;
69079  int ecode2 = 0 ;
69080  void *argp3 = 0 ;
69081  int res3 = 0 ;
69082  PyObject * obj0 = 0 ;
69083  PyObject * obj1 = 0 ;
69084  PyObject * obj2 = 0 ;
69085 
69086  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexBinaryFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
69087  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, 0 | 0 );
69088  if (!SWIG_IsOK(res1)) {
69089  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexBinaryFlat_add" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlat *""'");
69090  }
69091  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlat * >(argp1);
69092  ecode2 = SWIG_AsVal_long(obj1, &val2);
69093  if (!SWIG_IsOK(ecode2)) {
69094  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexBinaryFlat_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
69095  }
69096  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
69097  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
69098  if (!SWIG_IsOK(res3)) {
69099  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexBinaryFlat_add" "', argument " "3"" of type '" "uint8_t const *""'");
69100  }
69101  arg3 = reinterpret_cast< uint8_t * >(argp3);
69102  {
69103  Py_BEGIN_ALLOW_THREADS
69104  try {
69105  (arg1)->add(arg2,(uint8_t const *)arg3);
69106  } catch(faiss::FaissException & e) {
69107  PyEval_RestoreThread(_save);
69108  PyErr_SetString(PyExc_RuntimeError, e.what());
69109  SWIG_fail;
69110  }
69111  Py_END_ALLOW_THREADS
69112  }
69113  resultobj = SWIG_Py_Void();
69114  return resultobj;
69115 fail:
69116  return NULL;
69117 }
69118 
69119 
69120 SWIGINTERN PyObject *_wrap_GpuIndexBinaryFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69121  PyObject *resultobj = 0;
69123  void *argp1 = 0 ;
69124  int res1 = 0 ;
69125  PyObject * obj0 = 0 ;
69126 
69127  if (!PyArg_ParseTuple(args,(char *)"O:GpuIndexBinaryFlat_reset",&obj0)) SWIG_fail;
69128  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, 0 | 0 );
69129  if (!SWIG_IsOK(res1)) {
69130  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexBinaryFlat_reset" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlat *""'");
69131  }
69132  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlat * >(argp1);
69133  {
69134  Py_BEGIN_ALLOW_THREADS
69135  try {
69136  (arg1)->reset();
69137  } catch(faiss::FaissException & e) {
69138  PyEval_RestoreThread(_save);
69139  PyErr_SetString(PyExc_RuntimeError, e.what());
69140  SWIG_fail;
69141  }
69142  Py_END_ALLOW_THREADS
69143  }
69144  resultobj = SWIG_Py_Void();
69145  return resultobj;
69146 fail:
69147  return NULL;
69148 }
69149 
69150 
69151 SWIGINTERN PyObject *_wrap_GpuIndexBinaryFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69152  PyObject *resultobj = 0;
69155  uint8_t *arg3 = (uint8_t *) 0 ;
69157  int32_t *arg5 = (int32_t *) 0 ;
69159  void *argp1 = 0 ;
69160  int res1 = 0 ;
69161  long val2 ;
69162  int ecode2 = 0 ;
69163  void *argp3 = 0 ;
69164  int res3 = 0 ;
69165  long val4 ;
69166  int ecode4 = 0 ;
69167  void *argp5 = 0 ;
69168  int res5 = 0 ;
69169  void *argp6 = 0 ;
69170  int res6 = 0 ;
69171  PyObject * obj0 = 0 ;
69172  PyObject * obj1 = 0 ;
69173  PyObject * obj2 = 0 ;
69174  PyObject * obj3 = 0 ;
69175  PyObject * obj4 = 0 ;
69176  PyObject * obj5 = 0 ;
69177 
69178  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:GpuIndexBinaryFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
69179  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, 0 | 0 );
69180  if (!SWIG_IsOK(res1)) {
69181  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexBinaryFlat_search" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlat const *""'");
69182  }
69183  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlat * >(argp1);
69184  ecode2 = SWIG_AsVal_long(obj1, &val2);
69185  if (!SWIG_IsOK(ecode2)) {
69186  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexBinaryFlat_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
69187  }
69188  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
69189  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
69190  if (!SWIG_IsOK(res3)) {
69191  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexBinaryFlat_search" "', argument " "3"" of type '" "uint8_t const *""'");
69192  }
69193  arg3 = reinterpret_cast< uint8_t * >(argp3);
69194  ecode4 = SWIG_AsVal_long(obj3, &val4);
69195  if (!SWIG_IsOK(ecode4)) {
69196  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GpuIndexBinaryFlat_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
69197  }
69198  arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
69199  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
69200  if (!SWIG_IsOK(res5)) {
69201  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GpuIndexBinaryFlat_search" "', argument " "5"" of type '" "int32_t *""'");
69202  }
69203  arg5 = reinterpret_cast< int32_t * >(argp5);
69204  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
69205  if (!SWIG_IsOK(res6)) {
69206  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "GpuIndexBinaryFlat_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
69207  }
69208  arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
69209  {
69210  Py_BEGIN_ALLOW_THREADS
69211  try {
69212  ((faiss::gpu::GpuIndexBinaryFlat const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
69213  } catch(faiss::FaissException & e) {
69214  PyEval_RestoreThread(_save);
69215  PyErr_SetString(PyExc_RuntimeError, e.what());
69216  SWIG_fail;
69217  }
69218  Py_END_ALLOW_THREADS
69219  }
69220  resultobj = SWIG_Py_Void();
69221  return resultobj;
69222 fail:
69223  return NULL;
69224 }
69225 
69226 
69227 SWIGINTERN PyObject *_wrap_GpuIndexBinaryFlat_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69228  PyObject *resultobj = 0;
69231  uint8_t *arg3 = (uint8_t *) 0 ;
69232  void *argp1 = 0 ;
69233  int res1 = 0 ;
69234  long val2 ;
69235  int ecode2 = 0 ;
69236  void *argp3 = 0 ;
69237  int res3 = 0 ;
69238  PyObject * obj0 = 0 ;
69239  PyObject * obj1 = 0 ;
69240  PyObject * obj2 = 0 ;
69241 
69242  if (!PyArg_ParseTuple(args,(char *)"OOO:GpuIndexBinaryFlat_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
69243  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, 0 | 0 );
69244  if (!SWIG_IsOK(res1)) {
69245  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuIndexBinaryFlat_reconstruct" "', argument " "1"" of type '" "faiss::gpu::GpuIndexBinaryFlat const *""'");
69246  }
69247  arg1 = reinterpret_cast< faiss::gpu::GpuIndexBinaryFlat * >(argp1);
69248  ecode2 = SWIG_AsVal_long(obj1, &val2);
69249  if (!SWIG_IsOK(ecode2)) {
69250  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GpuIndexBinaryFlat_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
69251  }
69252  arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
69253  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
69254  if (!SWIG_IsOK(res3)) {
69255  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuIndexBinaryFlat_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
69256  }
69257  arg3 = reinterpret_cast< uint8_t * >(argp3);
69258  {
69259  Py_BEGIN_ALLOW_THREADS
69260  try {
69261  ((faiss::gpu::GpuIndexBinaryFlat const *)arg1)->reconstruct(arg2,arg3);
69262  } catch(faiss::FaissException & e) {
69263  PyEval_RestoreThread(_save);
69264  PyErr_SetString(PyExc_RuntimeError, e.what());
69265  SWIG_fail;
69266  }
69267  Py_END_ALLOW_THREADS
69268  }
69269  resultobj = SWIG_Py_Void();
69270  return resultobj;
69271 fail:
69272  return NULL;
69273 }
69274 
69275 
69276 SWIGINTERN PyObject *GpuIndexBinaryFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69277  PyObject *obj;
69278  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
69279  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat, SWIG_NewClientData(obj));
69280  return SWIG_Py_Void();
69281 }
69282 
69283 SWIGINTERN PyObject *_wrap_new_IndexProxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69284  PyObject *resultobj = 0;
69285  faiss::gpu::IndexProxy *result = 0 ;
69286 
69287  if (!PyArg_ParseTuple(args,(char *)":new_IndexProxy")) SWIG_fail;
69288  {
69289  Py_BEGIN_ALLOW_THREADS
69290  try {
69292  } catch(faiss::FaissException & e) {
69293  PyEval_RestoreThread(_save);
69294  PyErr_SetString(PyExc_RuntimeError, e.what());
69295  SWIG_fail;
69296  }
69297  Py_END_ALLOW_THREADS
69298  }
69299  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__IndexProxy, SWIG_POINTER_NEW | 0 );
69300  return resultobj;
69301 fail:
69302  return NULL;
69303 }
69304 
69305 
69306 SWIGINTERN PyObject *_wrap_delete_IndexProxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69307  PyObject *resultobj = 0;
69309  void *argp1 = 0 ;
69310  int res1 = 0 ;
69311  PyObject * obj0 = 0 ;
69312 
69313  if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexProxy",&obj0)) SWIG_fail;
69314  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, SWIG_POINTER_DISOWN | 0 );
69315  if (!SWIG_IsOK(res1)) {
69316  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexProxy" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69317  }
69318  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69319  {
69320  Py_BEGIN_ALLOW_THREADS
69321  try {
69322  delete arg1;
69323  } catch(faiss::FaissException & e) {
69324  PyEval_RestoreThread(_save);
69325  PyErr_SetString(PyExc_RuntimeError, e.what());
69326  SWIG_fail;
69327  }
69328  Py_END_ALLOW_THREADS
69329  }
69330  resultobj = SWIG_Py_Void();
69331  return resultobj;
69332 fail:
69333  return NULL;
69334 }
69335 
69336 
69337 SWIGINTERN PyObject *_wrap_IndexProxy_addIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69338  PyObject *resultobj = 0;
69340  faiss::Index *arg2 = (faiss::Index *) 0 ;
69341  void *argp1 = 0 ;
69342  int res1 = 0 ;
69343  void *argp2 = 0 ;
69344  int res2 = 0 ;
69345  PyObject * obj0 = 0 ;
69346  PyObject * obj1 = 0 ;
69347 
69348  if (!PyArg_ParseTuple(args,(char *)"OO:IndexProxy_addIndex",&obj0,&obj1)) SWIG_fail;
69349  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69350  if (!SWIG_IsOK(res1)) {
69351  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_addIndex" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69352  }
69353  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69354  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
69355  if (!SWIG_IsOK(res2)) {
69356  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexProxy_addIndex" "', argument " "2"" of type '" "faiss::Index *""'");
69357  }
69358  arg2 = reinterpret_cast< faiss::Index * >(argp2);
69359  {
69360  Py_BEGIN_ALLOW_THREADS
69361  try {
69362  (arg1)->addIndex(arg2);
69363  } catch(faiss::FaissException & e) {
69364  PyEval_RestoreThread(_save);
69365  PyErr_SetString(PyExc_RuntimeError, e.what());
69366  SWIG_fail;
69367  }
69368  Py_END_ALLOW_THREADS
69369  }
69370  resultobj = SWIG_Py_Void();
69371  return resultobj;
69372 fail:
69373  return NULL;
69374 }
69375 
69376 
69377 SWIGINTERN PyObject *_wrap_IndexProxy_removeIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69378  PyObject *resultobj = 0;
69380  faiss::Index *arg2 = (faiss::Index *) 0 ;
69381  void *argp1 = 0 ;
69382  int res1 = 0 ;
69383  void *argp2 = 0 ;
69384  int res2 = 0 ;
69385  PyObject * obj0 = 0 ;
69386  PyObject * obj1 = 0 ;
69387 
69388  if (!PyArg_ParseTuple(args,(char *)"OO:IndexProxy_removeIndex",&obj0,&obj1)) SWIG_fail;
69389  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69390  if (!SWIG_IsOK(res1)) {
69391  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_removeIndex" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69392  }
69393  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69394  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
69395  if (!SWIG_IsOK(res2)) {
69396  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexProxy_removeIndex" "', argument " "2"" of type '" "faiss::Index *""'");
69397  }
69398  arg2 = reinterpret_cast< faiss::Index * >(argp2);
69399  {
69400  Py_BEGIN_ALLOW_THREADS
69401  try {
69402  (arg1)->removeIndex(arg2);
69403  } catch(faiss::FaissException & e) {
69404  PyEval_RestoreThread(_save);
69405  PyErr_SetString(PyExc_RuntimeError, e.what());
69406  SWIG_fail;
69407  }
69408  Py_END_ALLOW_THREADS
69409  }
69410  resultobj = SWIG_Py_Void();
69411  return resultobj;
69412 fail:
69413  return NULL;
69414 }
69415 
69416 
69417 SWIGINTERN PyObject *_wrap_IndexProxy_runOnIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69418  PyObject *resultobj = 0;
69420  SwigValueWrapper< std::function< void (faiss::Index *) > > arg2 ;
69421  void *argp1 = 0 ;
69422  int res1 = 0 ;
69423  void *argp2 ;
69424  int res2 = 0 ;
69425  PyObject * obj0 = 0 ;
69426  PyObject * obj1 = 0 ;
69427 
69428  if (!PyArg_ParseTuple(args,(char *)"OO:IndexProxy_runOnIndex",&obj0,&obj1)) SWIG_fail;
69429  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69430  if (!SWIG_IsOK(res1)) {
69431  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_runOnIndex" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69432  }
69433  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69434  {
69435  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__functionT_void_ffaiss__Index_pF_t, 0 | 0);
69436  if (!SWIG_IsOK(res2)) {
69437  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexProxy_runOnIndex" "', argument " "2"" of type '" "std::function< void (faiss::Index *) >""'");
69438  }
69439  if (!argp2) {
69440  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexProxy_runOnIndex" "', argument " "2"" of type '" "std::function< void (faiss::Index *) >""'");
69441  } else {
69442  std::function< void (faiss::Index *) > * temp = reinterpret_cast< std::function< void (faiss::Index *) > * >(argp2);
69443  arg2 = *temp;
69444  if (SWIG_IsNewObj(res2)) delete temp;
69445  }
69446  }
69447  {
69448  Py_BEGIN_ALLOW_THREADS
69449  try {
69450  (arg1)->runOnIndex(arg2);
69451  } catch(faiss::FaissException & e) {
69452  PyEval_RestoreThread(_save);
69453  PyErr_SetString(PyExc_RuntimeError, e.what());
69454  SWIG_fail;
69455  }
69456  Py_END_ALLOW_THREADS
69457  }
69458  resultobj = SWIG_Py_Void();
69459  return resultobj;
69460 fail:
69461  return NULL;
69462 }
69463 
69464 
69465 SWIGINTERN PyObject *_wrap_IndexProxy_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69466  PyObject *resultobj = 0;
69468  void *argp1 = 0 ;
69469  int res1 = 0 ;
69470  PyObject * obj0 = 0 ;
69471 
69472  if (!PyArg_ParseTuple(args,(char *)"O:IndexProxy_reset",&obj0)) SWIG_fail;
69473  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69474  if (!SWIG_IsOK(res1)) {
69475  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_reset" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69476  }
69477  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69478  {
69479  Py_BEGIN_ALLOW_THREADS
69480  try {
69481  (arg1)->reset();
69482  } catch(faiss::FaissException & e) {
69483  PyEval_RestoreThread(_save);
69484  PyErr_SetString(PyExc_RuntimeError, e.what());
69485  SWIG_fail;
69486  }
69487  Py_END_ALLOW_THREADS
69488  }
69489  resultobj = SWIG_Py_Void();
69490  return resultobj;
69491 fail:
69492  return NULL;
69493 }
69494 
69495 
69496 SWIGINTERN PyObject *_wrap_IndexProxy_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69497  PyObject *resultobj = 0;
69499  faiss::Index::idx_t arg2 ;
69500  float *arg3 = (float *) 0 ;
69501  void *argp1 = 0 ;
69502  int res1 = 0 ;
69503  long val2 ;
69504  int ecode2 = 0 ;
69505  void *argp3 = 0 ;
69506  int res3 = 0 ;
69507  PyObject * obj0 = 0 ;
69508  PyObject * obj1 = 0 ;
69509  PyObject * obj2 = 0 ;
69510 
69511  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexProxy_train",&obj0,&obj1,&obj2)) SWIG_fail;
69512  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69513  if (!SWIG_IsOK(res1)) {
69514  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_train" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69515  }
69516  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69517  ecode2 = SWIG_AsVal_long(obj1, &val2);
69518  if (!SWIG_IsOK(ecode2)) {
69519  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexProxy_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
69520  }
69521  arg2 = static_cast< faiss::Index::idx_t >(val2);
69522  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69523  if (!SWIG_IsOK(res3)) {
69524  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexProxy_train" "', argument " "3"" of type '" "float const *""'");
69525  }
69526  arg3 = reinterpret_cast< float * >(argp3);
69527  {
69528  Py_BEGIN_ALLOW_THREADS
69529  try {
69530  (arg1)->train(arg2,(float const *)arg3);
69531  } catch(faiss::FaissException & e) {
69532  PyEval_RestoreThread(_save);
69533  PyErr_SetString(PyExc_RuntimeError, e.what());
69534  SWIG_fail;
69535  }
69536  Py_END_ALLOW_THREADS
69537  }
69538  resultobj = SWIG_Py_Void();
69539  return resultobj;
69540 fail:
69541  return NULL;
69542 }
69543 
69544 
69545 SWIGINTERN PyObject *_wrap_IndexProxy_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69546  PyObject *resultobj = 0;
69548  faiss::Index::idx_t arg2 ;
69549  float *arg3 = (float *) 0 ;
69550  void *argp1 = 0 ;
69551  int res1 = 0 ;
69552  long val2 ;
69553  int ecode2 = 0 ;
69554  void *argp3 = 0 ;
69555  int res3 = 0 ;
69556  PyObject * obj0 = 0 ;
69557  PyObject * obj1 = 0 ;
69558  PyObject * obj2 = 0 ;
69559 
69560  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexProxy_add",&obj0,&obj1,&obj2)) SWIG_fail;
69561  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69562  if (!SWIG_IsOK(res1)) {
69563  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_add" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69564  }
69565  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69566  ecode2 = SWIG_AsVal_long(obj1, &val2);
69567  if (!SWIG_IsOK(ecode2)) {
69568  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexProxy_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
69569  }
69570  arg2 = static_cast< faiss::Index::idx_t >(val2);
69571  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69572  if (!SWIG_IsOK(res3)) {
69573  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexProxy_add" "', argument " "3"" of type '" "float const *""'");
69574  }
69575  arg3 = reinterpret_cast< float * >(argp3);
69576  {
69577  Py_BEGIN_ALLOW_THREADS
69578  try {
69579  (arg1)->add(arg2,(float const *)arg3);
69580  } catch(faiss::FaissException & e) {
69581  PyEval_RestoreThread(_save);
69582  PyErr_SetString(PyExc_RuntimeError, e.what());
69583  SWIG_fail;
69584  }
69585  Py_END_ALLOW_THREADS
69586  }
69587  resultobj = SWIG_Py_Void();
69588  return resultobj;
69589 fail:
69590  return NULL;
69591 }
69592 
69593 
69594 SWIGINTERN PyObject *_wrap_IndexProxy_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69595  PyObject *resultobj = 0;
69597  faiss::Index::idx_t arg2 ;
69598  float *arg3 = (float *) 0 ;
69599  faiss::Index::idx_t arg4 ;
69600  float *arg5 = (float *) 0 ;
69602  void *argp1 = 0 ;
69603  int res1 = 0 ;
69604  long val2 ;
69605  int ecode2 = 0 ;
69606  void *argp3 = 0 ;
69607  int res3 = 0 ;
69608  long val4 ;
69609  int ecode4 = 0 ;
69610  void *argp5 = 0 ;
69611  int res5 = 0 ;
69612  void *argp6 = 0 ;
69613  int res6 = 0 ;
69614  PyObject * obj0 = 0 ;
69615  PyObject * obj1 = 0 ;
69616  PyObject * obj2 = 0 ;
69617  PyObject * obj3 = 0 ;
69618  PyObject * obj4 = 0 ;
69619  PyObject * obj5 = 0 ;
69620 
69621  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexProxy_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
69622  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69623  if (!SWIG_IsOK(res1)) {
69624  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_search" "', argument " "1"" of type '" "faiss::gpu::IndexProxy const *""'");
69625  }
69626  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69627  ecode2 = SWIG_AsVal_long(obj1, &val2);
69628  if (!SWIG_IsOK(ecode2)) {
69629  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexProxy_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
69630  }
69631  arg2 = static_cast< faiss::Index::idx_t >(val2);
69632  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69633  if (!SWIG_IsOK(res3)) {
69634  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexProxy_search" "', argument " "3"" of type '" "float const *""'");
69635  }
69636  arg3 = reinterpret_cast< float * >(argp3);
69637  ecode4 = SWIG_AsVal_long(obj3, &val4);
69638  if (!SWIG_IsOK(ecode4)) {
69639  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexProxy_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
69640  }
69641  arg4 = static_cast< faiss::Index::idx_t >(val4);
69642  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
69643  if (!SWIG_IsOK(res5)) {
69644  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexProxy_search" "', argument " "5"" of type '" "float *""'");
69645  }
69646  arg5 = reinterpret_cast< float * >(argp5);
69647  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
69648  if (!SWIG_IsOK(res6)) {
69649  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexProxy_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
69650  }
69651  arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
69652  {
69653  Py_BEGIN_ALLOW_THREADS
69654  try {
69655  ((faiss::gpu::IndexProxy const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
69656  } catch(faiss::FaissException & e) {
69657  PyEval_RestoreThread(_save);
69658  PyErr_SetString(PyExc_RuntimeError, e.what());
69659  SWIG_fail;
69660  }
69661  Py_END_ALLOW_THREADS
69662  }
69663  resultobj = SWIG_Py_Void();
69664  return resultobj;
69665 fail:
69666  return NULL;
69667 }
69668 
69669 
69670 SWIGINTERN PyObject *_wrap_IndexProxy_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69671  PyObject *resultobj = 0;
69673  faiss::Index::idx_t arg2 ;
69674  float *arg3 = (float *) 0 ;
69675  void *argp1 = 0 ;
69676  int res1 = 0 ;
69677  long val2 ;
69678  int ecode2 = 0 ;
69679  void *argp3 = 0 ;
69680  int res3 = 0 ;
69681  PyObject * obj0 = 0 ;
69682  PyObject * obj1 = 0 ;
69683  PyObject * obj2 = 0 ;
69684 
69685  if (!PyArg_ParseTuple(args,(char *)"OOO:IndexProxy_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
69686  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69687  if (!SWIG_IsOK(res1)) {
69688  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_reconstruct" "', argument " "1"" of type '" "faiss::gpu::IndexProxy const *""'");
69689  }
69690  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69691  ecode2 = SWIG_AsVal_long(obj1, &val2);
69692  if (!SWIG_IsOK(ecode2)) {
69693  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexProxy_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
69694  }
69695  arg2 = static_cast< faiss::Index::idx_t >(val2);
69696  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69697  if (!SWIG_IsOK(res3)) {
69698  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexProxy_reconstruct" "', argument " "3"" of type '" "float *""'");
69699  }
69700  arg3 = reinterpret_cast< float * >(argp3);
69701  {
69702  Py_BEGIN_ALLOW_THREADS
69703  try {
69704  ((faiss::gpu::IndexProxy const *)arg1)->reconstruct(arg2,arg3);
69705  } catch(faiss::FaissException & e) {
69706  PyEval_RestoreThread(_save);
69707  PyErr_SetString(PyExc_RuntimeError, e.what());
69708  SWIG_fail;
69709  }
69710  Py_END_ALLOW_THREADS
69711  }
69712  resultobj = SWIG_Py_Void();
69713  return resultobj;
69714 fail:
69715  return NULL;
69716 }
69717 
69718 
69719 SWIGINTERN PyObject *_wrap_IndexProxy_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69720  PyObject *resultobj = 0;
69722  bool arg2 ;
69723  void *argp1 = 0 ;
69724  int res1 = 0 ;
69725  bool val2 ;
69726  int ecode2 = 0 ;
69727  PyObject * obj0 = 0 ;
69728  PyObject * obj1 = 0 ;
69729 
69730  if (!PyArg_ParseTuple(args,(char *)"OO:IndexProxy_own_fields_set",&obj0,&obj1)) SWIG_fail;
69731  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69732  if (!SWIG_IsOK(res1)) {
69733  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_own_fields_set" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69734  }
69735  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69736  ecode2 = SWIG_AsVal_bool(obj1, &val2);
69737  if (!SWIG_IsOK(ecode2)) {
69738  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexProxy_own_fields_set" "', argument " "2"" of type '" "bool""'");
69739  }
69740  arg2 = static_cast< bool >(val2);
69741  if (arg1) (arg1)->own_fields = arg2;
69742  resultobj = SWIG_Py_Void();
69743  return resultobj;
69744 fail:
69745  return NULL;
69746 }
69747 
69748 
69749 SWIGINTERN PyObject *_wrap_IndexProxy_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69750  PyObject *resultobj = 0;
69752  void *argp1 = 0 ;
69753  int res1 = 0 ;
69754  PyObject * obj0 = 0 ;
69755  bool result;
69756 
69757  if (!PyArg_ParseTuple(args,(char *)"O:IndexProxy_own_fields_get",&obj0)) SWIG_fail;
69758  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69759  if (!SWIG_IsOK(res1)) {
69760  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_own_fields_get" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69761  }
69762  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69763  result = (bool) ((arg1)->own_fields);
69764  resultobj = SWIG_From_bool(static_cast< bool >(result));
69765  return resultobj;
69766 fail:
69767  return NULL;
69768 }
69769 
69770 
69771 SWIGINTERN PyObject *_wrap_IndexProxy_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69772  PyObject *resultobj = 0;
69774  void *argp1 = 0 ;
69775  int res1 = 0 ;
69776  PyObject * obj0 = 0 ;
69777  int result;
69778 
69779  if (!PyArg_ParseTuple(args,(char *)"O:IndexProxy_count",&obj0)) SWIG_fail;
69780  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69781  if (!SWIG_IsOK(res1)) {
69782  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_count" "', argument " "1"" of type '" "faiss::gpu::IndexProxy const *""'");
69783  }
69784  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69785  {
69786  Py_BEGIN_ALLOW_THREADS
69787  try {
69788  result = (int)((faiss::gpu::IndexProxy const *)arg1)->count();
69789  } catch(faiss::FaissException & e) {
69790  PyEval_RestoreThread(_save);
69791  PyErr_SetString(PyExc_RuntimeError, e.what());
69792  SWIG_fail;
69793  }
69794  Py_END_ALLOW_THREADS
69795  }
69796  resultobj = SWIG_From_int(static_cast< int >(result));
69797  return resultobj;
69798 fail:
69799  return NULL;
69800 }
69801 
69802 
69803 SWIGINTERN PyObject *_wrap_IndexProxy_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69804  PyObject *resultobj = 0;
69806  int arg2 ;
69807  void *argp1 = 0 ;
69808  int res1 = 0 ;
69809  int val2 ;
69810  int ecode2 = 0 ;
69811  PyObject * obj0 = 0 ;
69812  PyObject * obj1 = 0 ;
69813  faiss::Index *result = 0 ;
69814 
69815  if (!PyArg_ParseTuple(args,(char *)"OO:IndexProxy_at",&obj0,&obj1)) SWIG_fail;
69816  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__IndexProxy, 0 | 0 );
69817  if (!SWIG_IsOK(res1)) {
69818  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexProxy_at" "', argument " "1"" of type '" "faiss::gpu::IndexProxy *""'");
69819  }
69820  arg1 = reinterpret_cast< faiss::gpu::IndexProxy * >(argp1);
69821  ecode2 = SWIG_AsVal_int(obj1, &val2);
69822  if (!SWIG_IsOK(ecode2)) {
69823  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexProxy_at" "', argument " "2"" of type '" "int""'");
69824  }
69825  arg2 = static_cast< int >(val2);
69826  {
69827  Py_BEGIN_ALLOW_THREADS
69828  try {
69829  result = (faiss::Index *)(arg1)->at(arg2);
69830  } catch(faiss::FaissException & e) {
69831  PyEval_RestoreThread(_save);
69832  PyErr_SetString(PyExc_RuntimeError, e.what());
69833  SWIG_fail;
69834  }
69835  Py_END_ALLOW_THREADS
69836  }
69837  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
69838  return resultobj;
69839 fail:
69840  return NULL;
69841 }
69842 
69843 
69844 SWIGINTERN PyObject *IndexProxy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69845  PyObject *obj;
69846  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
69847  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__IndexProxy, SWIG_NewClientData(obj));
69848  return SWIG_Py_Void();
69849 }
69850 
69851 SWIGINTERN PyObject *_wrap_kmeans_clustering_gpu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69852  PyObject *resultobj = 0;
69853  int arg1 ;
69854  size_t arg2 ;
69855  size_t arg3 ;
69856  size_t arg4 ;
69857  float *arg5 = (float *) 0 ;
69858  float *arg6 = (float *) 0 ;
69859  bool arg7 ;
69860  bool arg8 ;
69861  int val1 ;
69862  int ecode1 = 0 ;
69863  size_t val2 ;
69864  int ecode2 = 0 ;
69865  size_t val3 ;
69866  int ecode3 = 0 ;
69867  size_t val4 ;
69868  int ecode4 = 0 ;
69869  void *argp5 = 0 ;
69870  int res5 = 0 ;
69871  void *argp6 = 0 ;
69872  int res6 = 0 ;
69873  bool val7 ;
69874  int ecode7 = 0 ;
69875  bool val8 ;
69876  int ecode8 = 0 ;
69877  PyObject * obj0 = 0 ;
69878  PyObject * obj1 = 0 ;
69879  PyObject * obj2 = 0 ;
69880  PyObject * obj3 = 0 ;
69881  PyObject * obj4 = 0 ;
69882  PyObject * obj5 = 0 ;
69883  PyObject * obj6 = 0 ;
69884  PyObject * obj7 = 0 ;
69885  float result;
69886 
69887  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:kmeans_clustering_gpu",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
69888  ecode1 = SWIG_AsVal_int(obj0, &val1);
69889  if (!SWIG_IsOK(ecode1)) {
69890  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "kmeans_clustering_gpu" "', argument " "1"" of type '" "int""'");
69891  }
69892  arg1 = static_cast< int >(val1);
69893  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69894  if (!SWIG_IsOK(ecode2)) {
69895  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kmeans_clustering_gpu" "', argument " "2"" of type '" "size_t""'");
69896  }
69897  arg2 = static_cast< size_t >(val2);
69898  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
69899  if (!SWIG_IsOK(ecode3)) {
69900  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "kmeans_clustering_gpu" "', argument " "3"" of type '" "size_t""'");
69901  }
69902  arg3 = static_cast< size_t >(val3);
69903  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
69904  if (!SWIG_IsOK(ecode4)) {
69905  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "kmeans_clustering_gpu" "', argument " "4"" of type '" "size_t""'");
69906  }
69907  arg4 = static_cast< size_t >(val4);
69908  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
69909  if (!SWIG_IsOK(res5)) {
69910  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "kmeans_clustering_gpu" "', argument " "5"" of type '" "float const *""'");
69911  }
69912  arg5 = reinterpret_cast< float * >(argp5);
69913  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
69914  if (!SWIG_IsOK(res6)) {
69915  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "kmeans_clustering_gpu" "', argument " "6"" of type '" "float *""'");
69916  }
69917  arg6 = reinterpret_cast< float * >(argp6);
69918  ecode7 = SWIG_AsVal_bool(obj6, &val7);
69919  if (!SWIG_IsOK(ecode7)) {
69920  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "kmeans_clustering_gpu" "', argument " "7"" of type '" "bool""'");
69921  }
69922  arg7 = static_cast< bool >(val7);
69923  ecode8 = SWIG_AsVal_bool(obj7, &val8);
69924  if (!SWIG_IsOK(ecode8)) {
69925  SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "kmeans_clustering_gpu" "', argument " "8"" of type '" "bool""'");
69926  }
69927  arg8 = static_cast< bool >(val8);
69928  {
69929  Py_BEGIN_ALLOW_THREADS
69930  try {
69931  result = (float)faiss::gpu::kmeans_clustering_gpu(arg1,arg2,arg3,arg4,(float const *)arg5,arg6,arg7,arg8);
69932  } catch(faiss::FaissException & e) {
69933  PyEval_RestoreThread(_save);
69934  PyErr_SetString(PyExc_RuntimeError, e.what());
69935  SWIG_fail;
69936  }
69937  Py_END_ALLOW_THREADS
69938  }
69939  resultobj = SWIG_From_float(static_cast< float >(result));
69940  return resultobj;
69941 fail:
69942  return NULL;
69943 }
69944 
69945 
69946 SWIGINTERN PyObject *_wrap_bruteForceKnn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69947  PyObject *resultobj = 0;
69949  faiss::MetricType arg2 ;
69950  float *arg3 = (float *) 0 ;
69951  int arg4 ;
69952  float *arg5 = (float *) 0 ;
69953  int arg6 ;
69954  int arg7 ;
69955  int arg8 ;
69956  float *arg9 = (float *) 0 ;
69957  faiss::Index::idx_t *arg10 = (faiss::Index::idx_t *) 0 ;
69958  void *argp1 = 0 ;
69959  int res1 = 0 ;
69960  int val2 ;
69961  int ecode2 = 0 ;
69962  void *argp3 = 0 ;
69963  int res3 = 0 ;
69964  int val4 ;
69965  int ecode4 = 0 ;
69966  void *argp5 = 0 ;
69967  int res5 = 0 ;
69968  int val6 ;
69969  int ecode6 = 0 ;
69970  int val7 ;
69971  int ecode7 = 0 ;
69972  int val8 ;
69973  int ecode8 = 0 ;
69974  void *argp9 = 0 ;
69975  int res9 = 0 ;
69976  void *argp10 = 0 ;
69977  int res10 = 0 ;
69978  PyObject * obj0 = 0 ;
69979  PyObject * obj1 = 0 ;
69980  PyObject * obj2 = 0 ;
69981  PyObject * obj3 = 0 ;
69982  PyObject * obj4 = 0 ;
69983  PyObject * obj5 = 0 ;
69984  PyObject * obj6 = 0 ;
69985  PyObject * obj7 = 0 ;
69986  PyObject * obj8 = 0 ;
69987  PyObject * obj9 = 0 ;
69988 
69989  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:bruteForceKnn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
69990  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
69991  if (!SWIG_IsOK(res1)) {
69992  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bruteForceKnn" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
69993  }
69994  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
69995  ecode2 = SWIG_AsVal_int(obj1, &val2);
69996  if (!SWIG_IsOK(ecode2)) {
69997  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bruteForceKnn" "', argument " "2"" of type '" "faiss::MetricType""'");
69998  }
69999  arg2 = static_cast< faiss::MetricType >(val2);
70000  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
70001  if (!SWIG_IsOK(res3)) {
70002  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "bruteForceKnn" "', argument " "3"" of type '" "float const *""'");
70003  }
70004  arg3 = reinterpret_cast< float * >(argp3);
70005  ecode4 = SWIG_AsVal_int(obj3, &val4);
70006  if (!SWIG_IsOK(ecode4)) {
70007  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "bruteForceKnn" "', argument " "4"" of type '" "int""'");
70008  }
70009  arg4 = static_cast< int >(val4);
70010  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
70011  if (!SWIG_IsOK(res5)) {
70012  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "bruteForceKnn" "', argument " "5"" of type '" "float const *""'");
70013  }
70014  arg5 = reinterpret_cast< float * >(argp5);
70015  ecode6 = SWIG_AsVal_int(obj5, &val6);
70016  if (!SWIG_IsOK(ecode6)) {
70017  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "bruteForceKnn" "', argument " "6"" of type '" "int""'");
70018  }
70019  arg6 = static_cast< int >(val6);
70020  ecode7 = SWIG_AsVal_int(obj6, &val7);
70021  if (!SWIG_IsOK(ecode7)) {
70022  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "bruteForceKnn" "', argument " "7"" of type '" "int""'");
70023  }
70024  arg7 = static_cast< int >(val7);
70025  ecode8 = SWIG_AsVal_int(obj7, &val8);
70026  if (!SWIG_IsOK(ecode8)) {
70027  SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "bruteForceKnn" "', argument " "8"" of type '" "int""'");
70028  }
70029  arg8 = static_cast< int >(val8);
70030  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_float, 0 | 0 );
70031  if (!SWIG_IsOK(res9)) {
70032  SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "bruteForceKnn" "', argument " "9"" of type '" "float *""'");
70033  }
70034  arg9 = reinterpret_cast< float * >(argp9);
70035  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_long, 0 | 0 );
70036  if (!SWIG_IsOK(res10)) {
70037  SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "bruteForceKnn" "', argument " "10"" of type '" "faiss::Index::idx_t *""'");
70038  }
70039  arg10 = reinterpret_cast< faiss::Index::idx_t * >(argp10);
70040  {
70041  Py_BEGIN_ALLOW_THREADS
70042  try {
70043  faiss::gpu::bruteForceKnn(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6,arg7,arg8,arg9,arg10);
70044  } catch(faiss::FaissException & e) {
70045  PyEval_RestoreThread(_save);
70046  PyErr_SetString(PyExc_RuntimeError, e.what());
70047  SWIG_fail;
70048  }
70049  Py_END_ALLOW_THREADS
70050  }
70051  resultobj = SWIG_Py_Void();
70052  return resultobj;
70053 fail:
70054  return NULL;
70055 }
70056 
70057 
70058 SWIGINTERN PyObject *_wrap_downcast_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70059  PyObject *resultobj = 0;
70060  faiss::Index *arg1 = (faiss::Index *) 0 ;
70061  void *argp1 = 0 ;
70062  int res1 = 0 ;
70063  PyObject * obj0 = 0 ;
70064  faiss::Index *result = 0 ;
70065 
70066  if (!PyArg_ParseTuple(args,(char *)"O:downcast_index",&obj0)) SWIG_fail;
70067  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
70068  if (!SWIG_IsOK(res1)) {
70069  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downcast_index" "', argument " "1"" of type '" "faiss::Index *""'");
70070  }
70071  arg1 = reinterpret_cast< faiss::Index * >(argp1);
70072  {
70073  Py_BEGIN_ALLOW_THREADS
70074  try {
70075  result = (faiss::Index *)downcast_index(arg1);
70076  } catch(faiss::FaissException & e) {
70077  PyEval_RestoreThread(_save);
70078  PyErr_SetString(PyExc_RuntimeError, e.what());
70079  SWIG_fail;
70080  }
70081  Py_END_ALLOW_THREADS
70082  }
70083  {
70084  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70085  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
70086  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,0);
70087  } else
70088  /*@SWIG@*/
70089  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70090  if (dynamic_cast<faiss::IndexShards *> (result)) {
70091  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,0);
70092  } else
70093  /*@SWIG@*/
70094  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70095  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
70096  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,0);
70097  } else
70098  /*@SWIG@*/
70099  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70100  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
70101  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,0);
70102  } else
70103  /*@SWIG@*/
70104  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70105  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
70106  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,0);
70107  } else
70108  /*@SWIG@*/
70109  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70110  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
70111  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,0);
70112  } else
70113  /*@SWIG@*/
70114  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70115  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
70116  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,0);
70117  } else
70118  /*@SWIG@*/
70119  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70120  if (dynamic_cast<faiss::IndexIVF *> (result)) {
70121  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,0);
70122  } else
70123  /*@SWIG@*/
70124  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70125  if (dynamic_cast<faiss::IndexFlat *> (result)) {
70126  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,0);
70127  } else
70128  /*@SWIG@*/
70129  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70130  if (dynamic_cast<faiss::IndexPQ *> (result)) {
70131  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,0);
70132  } else
70133  /*@SWIG@*/
70134  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70135  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
70136  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,0);
70137  } else
70138  /*@SWIG@*/
70139  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70140  if (dynamic_cast<faiss::IndexLSH *> (result)) {
70141  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,0);
70142  } else
70143  /*@SWIG@*/
70144  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70145  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
70146  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,0);
70147  } else
70148  /*@SWIG@*/
70149  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70150  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
70151  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,0);
70152  } else
70153  /*@SWIG@*/
70154  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70155  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
70156  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,0);
70157  } else
70158  /*@SWIG@*/
70159  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70160  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
70161  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,0);
70162  } else
70163  /*@SWIG@*/
70164  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70165  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
70166  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,0);
70167  } else
70168  /*@SWIG@*/
70169  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70170  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
70171  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,0);
70172  } else
70173  /*@SWIG@*/
70174  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70175  if (dynamic_cast<faiss::Index2Layer *> (result)) {
70176  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,0);
70177  } else
70178  /*@SWIG@*/
70179 
70180  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70181  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
70182  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,0);
70183  } else
70184  /*@SWIG@*/
70185  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70186  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
70187  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,0);
70188  } else
70189  /*@SWIG@*/
70190  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70191  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
70192  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,0);
70193  } else
70194  /*@SWIG@*/
70195  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70196  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
70197  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,0);
70198  } else
70199  /*@SWIG@*/
70200 
70201  // default for non-recognized classes
70202  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70203  if (dynamic_cast<faiss::Index *> (result)) {
70204  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,0);
70205  } else
70206  /*@SWIG@*/
70207  if (result == NULL)
70208  {
70209  resultobj = SWIG_Py_Void();
70210 
70211  // Lua does not need a push for nil
70212  } else {
70213  assert(false);
70214  }
70215 
70216 
70217 
70218  }
70219  return resultobj;
70220 fail:
70221  return NULL;
70222 }
70223 
70224 
70225 SWIGINTERN PyObject *_wrap_downcast_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70226  PyObject *resultobj = 0;
70228  void *argp1 = 0 ;
70229  int res1 = 0 ;
70230  PyObject * obj0 = 0 ;
70231  faiss::VectorTransform *result = 0 ;
70232 
70233  if (!PyArg_ParseTuple(args,(char *)"O:downcast_VectorTransform",&obj0)) SWIG_fail;
70234  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
70235  if (!SWIG_IsOK(res1)) {
70236  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downcast_VectorTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
70237  }
70238  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
70239  {
70240  Py_BEGIN_ALLOW_THREADS
70241  try {
70242  result = (faiss::VectorTransform *)downcast_VectorTransform(arg1);
70243  } catch(faiss::FaissException & e) {
70244  PyEval_RestoreThread(_save);
70245  PyErr_SetString(PyExc_RuntimeError, e.what());
70246  SWIG_fail;
70247  }
70248  Py_END_ALLOW_THREADS
70249  }
70250  {
70251  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70252  if (dynamic_cast<faiss::RemapDimensionsTransform *> (result)) {
70253  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RemapDimensionsTransform,0);
70254  } else
70255  /*@SWIG@*/
70256  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70257  if (dynamic_cast<faiss::OPQMatrix *> (result)) {
70258  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__OPQMatrix,0);
70259  } else
70260  /*@SWIG@*/
70261  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70262  if (dynamic_cast<faiss::PCAMatrix *> (result)) {
70263  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__PCAMatrix,0);
70264  } else
70265  /*@SWIG@*/
70266  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70267  if (dynamic_cast<faiss::RandomRotationMatrix *> (result)) {
70268  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RandomRotationMatrix,0);
70269  } else
70270  /*@SWIG@*/
70271  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70272  if (dynamic_cast<faiss::LinearTransform *> (result)) {
70273  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__LinearTransform,0);
70274  } else
70275  /*@SWIG@*/
70276  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70277  if (dynamic_cast<faiss::NormalizationTransform *> (result)) {
70278  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__NormalizationTransform,0);
70279  } else
70280  /*@SWIG@*/
70281  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70282  if (dynamic_cast<faiss::VectorTransform *> (result)) {
70283  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__VectorTransform,0);
70284  } else
70285  /*@SWIG@*/
70286  {
70287  assert(false);
70288  }
70289 
70290 
70291 
70292  }
70293  return resultobj;
70294 fail:
70295  return NULL;
70296 }
70297 
70298 
70299 SWIGINTERN PyObject *_wrap_downcast_IndexBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70300  PyObject *resultobj = 0;
70301  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
70302  void *argp1 = 0 ;
70303  int res1 = 0 ;
70304  PyObject * obj0 = 0 ;
70305  faiss::IndexBinary *result = 0 ;
70306 
70307  if (!PyArg_ParseTuple(args,(char *)"O:downcast_IndexBinary",&obj0)) SWIG_fail;
70308  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
70309  if (!SWIG_IsOK(res1)) {
70310  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downcast_IndexBinary" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
70311  }
70312  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
70313  {
70314  Py_BEGIN_ALLOW_THREADS
70315  try {
70316  result = (faiss::IndexBinary *)downcast_IndexBinary(arg1);
70317  } catch(faiss::FaissException & e) {
70318  PyEval_RestoreThread(_save);
70319  PyErr_SetString(PyExc_RuntimeError, e.what());
70320  SWIG_fail;
70321  }
70322  Py_END_ALLOW_THREADS
70323  }
70324  {
70325  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70326  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
70327  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,0);
70328  } else
70329  /*@SWIG@*/
70330  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70331  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
70332  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,0);
70333  } else
70334  /*@SWIG@*/
70335  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70336  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
70337  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,0);
70338  } else
70339  /*@SWIG@*/
70340  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70341  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
70342  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,0);
70343  } else
70344  /*@SWIG@*/
70345 
70346  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70347  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
70348  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,0);
70349  } else
70350  /*@SWIG@*/
70351 
70352  // default for non-recognized classes
70353  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70354  if (dynamic_cast<faiss::IndexBinary *> (result)) {
70355  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,0);
70356  } else
70357  /*@SWIG@*/
70358  if (result == NULL)
70359  {
70360  resultobj = SWIG_Py_Void();
70361 
70362  // Lua does not need a push for nil
70363  } else {
70364  assert(false);
70365  }
70366 
70367 
70368 
70369  }
70370  return resultobj;
70371 fail:
70372  return NULL;
70373 }
70374 
70375 
70376 SWIGINTERN PyObject *_wrap_write_index__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70377  PyObject *resultobj = 0;
70378  faiss::Index *arg1 = (faiss::Index *) 0 ;
70379  char *arg2 = (char *) 0 ;
70380  void *argp1 = 0 ;
70381  int res1 = 0 ;
70382  int res2 ;
70383  char *buf2 = 0 ;
70384  int alloc2 = 0 ;
70385  PyObject * obj0 = 0 ;
70386  PyObject * obj1 = 0 ;
70387 
70388  if (!PyArg_ParseTuple(args,(char *)"OO:write_index",&obj0,&obj1)) SWIG_fail;
70389  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
70390  if (!SWIG_IsOK(res1)) {
70391  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index" "', argument " "1"" of type '" "faiss::Index const *""'");
70392  }
70393  arg1 = reinterpret_cast< faiss::Index * >(argp1);
70394  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
70395  if (!SWIG_IsOK(res2)) {
70396  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index" "', argument " "2"" of type '" "char const *""'");
70397  }
70398  arg2 = reinterpret_cast< char * >(buf2);
70399  {
70400  Py_BEGIN_ALLOW_THREADS
70401  try {
70402  faiss::write_index((faiss::Index const *)arg1,(char const *)arg2);
70403  } catch(faiss::FaissException & e) {
70404  PyEval_RestoreThread(_save);
70405  PyErr_SetString(PyExc_RuntimeError, e.what());
70406  SWIG_fail;
70407  }
70408  Py_END_ALLOW_THREADS
70409  }
70410  resultobj = SWIG_Py_Void();
70411  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
70412  return resultobj;
70413 fail:
70414  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
70415  return NULL;
70416 }
70417 
70418 
70419 SWIGINTERN PyObject *_wrap_write_index__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70420  PyObject *resultobj = 0;
70421  faiss::Index *arg1 = (faiss::Index *) 0 ;
70422  FILE *arg2 = (FILE *) 0 ;
70423  void *argp1 = 0 ;
70424  int res1 = 0 ;
70425  void *argp2 = 0 ;
70426  int res2 = 0 ;
70427  PyObject * obj0 = 0 ;
70428  PyObject * obj1 = 0 ;
70429 
70430  if (!PyArg_ParseTuple(args,(char *)"OO:write_index",&obj0,&obj1)) SWIG_fail;
70431  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
70432  if (!SWIG_IsOK(res1)) {
70433  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index" "', argument " "1"" of type '" "faiss::Index const *""'");
70434  }
70435  arg1 = reinterpret_cast< faiss::Index * >(argp1);
70436  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FILE, 0 | 0 );
70437  if (!SWIG_IsOK(res2)) {
70438  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index" "', argument " "2"" of type '" "FILE *""'");
70439  }
70440  arg2 = reinterpret_cast< FILE * >(argp2);
70441  {
70442  Py_BEGIN_ALLOW_THREADS
70443  try {
70444  faiss::write_index((faiss::Index const *)arg1,arg2);
70445  } catch(faiss::FaissException & e) {
70446  PyEval_RestoreThread(_save);
70447  PyErr_SetString(PyExc_RuntimeError, e.what());
70448  SWIG_fail;
70449  }
70450  Py_END_ALLOW_THREADS
70451  }
70452  resultobj = SWIG_Py_Void();
70453  return resultobj;
70454 fail:
70455  return NULL;
70456 }
70457 
70458 
70459 SWIGINTERN PyObject *_wrap_write_index__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70460  PyObject *resultobj = 0;
70461  faiss::Index *arg1 = (faiss::Index *) 0 ;
70462  faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
70463  void *argp1 = 0 ;
70464  int res1 = 0 ;
70465  void *argp2 = 0 ;
70466  int res2 = 0 ;
70467  PyObject * obj0 = 0 ;
70468  PyObject * obj1 = 0 ;
70469 
70470  if (!PyArg_ParseTuple(args,(char *)"OO:write_index",&obj0,&obj1)) SWIG_fail;
70471  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
70472  if (!SWIG_IsOK(res1)) {
70473  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index" "', argument " "1"" of type '" "faiss::Index const *""'");
70474  }
70475  arg1 = reinterpret_cast< faiss::Index * >(argp1);
70476  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
70477  if (!SWIG_IsOK(res2)) {
70478  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index" "', argument " "2"" of type '" "faiss::IOWriter *""'");
70479  }
70480  arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
70481  {
70482  Py_BEGIN_ALLOW_THREADS
70483  try {
70484  faiss::write_index((faiss::Index const *)arg1,arg2);
70485  } catch(faiss::FaissException & e) {
70486  PyEval_RestoreThread(_save);
70487  PyErr_SetString(PyExc_RuntimeError, e.what());
70488  SWIG_fail;
70489  }
70490  Py_END_ALLOW_THREADS
70491  }
70492  resultobj = SWIG_Py_Void();
70493  return resultobj;
70494 fail:
70495  return NULL;
70496 }
70497 
70498 
70499 SWIGINTERN PyObject *_wrap_write_index(PyObject *self, PyObject *args) {
70500  Py_ssize_t argc;
70501  PyObject *argv[3] = {
70502  0
70503  };
70504  Py_ssize_t ii;
70505 
70506  if (!PyTuple_Check(args)) SWIG_fail;
70507  argc = args ? PyObject_Length(args) : 0;
70508  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
70509  argv[ii] = PyTuple_GET_ITEM(args,ii);
70510  }
70511  if (argc == 2) {
70512  int _v;
70513  void *vptr = 0;
70514  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
70515  _v = SWIG_CheckState(res);
70516  if (_v) {
70517  void *vptr = 0;
70518  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FILE, 0);
70519  _v = SWIG_CheckState(res);
70520  if (_v) {
70521  return _wrap_write_index__SWIG_1(self, args);
70522  }
70523  }
70524  }
70525  if (argc == 2) {
70526  int _v;
70527  void *vptr = 0;
70528  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
70529  _v = SWIG_CheckState(res);
70530  if (_v) {
70531  void *vptr = 0;
70532  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IOWriter, 0);
70533  _v = SWIG_CheckState(res);
70534  if (_v) {
70535  return _wrap_write_index__SWIG_2(self, args);
70536  }
70537  }
70538  }
70539  if (argc == 2) {
70540  int _v;
70541  void *vptr = 0;
70542  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
70543  _v = SWIG_CheckState(res);
70544  if (_v) {
70545  int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
70546  _v = SWIG_CheckState(res);
70547  if (_v) {
70548  return _wrap_write_index__SWIG_0(self, args);
70549  }
70550  }
70551  }
70552 
70553 fail:
70554  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'write_index'.\n"
70555  " Possible C/C++ prototypes are:\n"
70556  " faiss::write_index(faiss::Index const *,char const *)\n"
70557  " faiss::write_index(faiss::Index const *,FILE *)\n"
70558  " faiss::write_index(faiss::Index const *,faiss::IOWriter *)\n");
70559  return 0;
70560 }
70561 
70562 
70563 SWIGINTERN PyObject *_wrap_write_index_binary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70564  PyObject *resultobj = 0;
70565  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
70566  char *arg2 = (char *) 0 ;
70567  void *argp1 = 0 ;
70568  int res1 = 0 ;
70569  int res2 ;
70570  char *buf2 = 0 ;
70571  int alloc2 = 0 ;
70572  PyObject * obj0 = 0 ;
70573  PyObject * obj1 = 0 ;
70574 
70575  if (!PyArg_ParseTuple(args,(char *)"OO:write_index_binary",&obj0,&obj1)) SWIG_fail;
70576  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
70577  if (!SWIG_IsOK(res1)) {
70578  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index_binary" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
70579  }
70580  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
70581  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
70582  if (!SWIG_IsOK(res2)) {
70583  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index_binary" "', argument " "2"" of type '" "char const *""'");
70584  }
70585  arg2 = reinterpret_cast< char * >(buf2);
70586  {
70587  Py_BEGIN_ALLOW_THREADS
70588  try {
70589  faiss::write_index_binary((faiss::IndexBinary const *)arg1,(char const *)arg2);
70590  } catch(faiss::FaissException & e) {
70591  PyEval_RestoreThread(_save);
70592  PyErr_SetString(PyExc_RuntimeError, e.what());
70593  SWIG_fail;
70594  }
70595  Py_END_ALLOW_THREADS
70596  }
70597  resultobj = SWIG_Py_Void();
70598  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
70599  return resultobj;
70600 fail:
70601  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
70602  return NULL;
70603 }
70604 
70605 
70606 SWIGINTERN PyObject *_wrap_write_index_binary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70607  PyObject *resultobj = 0;
70608  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
70609  FILE *arg2 = (FILE *) 0 ;
70610  void *argp1 = 0 ;
70611  int res1 = 0 ;
70612  void *argp2 = 0 ;
70613  int res2 = 0 ;
70614  PyObject * obj0 = 0 ;
70615  PyObject * obj1 = 0 ;
70616 
70617  if (!PyArg_ParseTuple(args,(char *)"OO:write_index_binary",&obj0,&obj1)) SWIG_fail;
70618  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
70619  if (!SWIG_IsOK(res1)) {
70620  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index_binary" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
70621  }
70622  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
70623  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FILE, 0 | 0 );
70624  if (!SWIG_IsOK(res2)) {
70625  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index_binary" "', argument " "2"" of type '" "FILE *""'");
70626  }
70627  arg2 = reinterpret_cast< FILE * >(argp2);
70628  {
70629  Py_BEGIN_ALLOW_THREADS
70630  try {
70631  faiss::write_index_binary((faiss::IndexBinary const *)arg1,arg2);
70632  } catch(faiss::FaissException & e) {
70633  PyEval_RestoreThread(_save);
70634  PyErr_SetString(PyExc_RuntimeError, e.what());
70635  SWIG_fail;
70636  }
70637  Py_END_ALLOW_THREADS
70638  }
70639  resultobj = SWIG_Py_Void();
70640  return resultobj;
70641 fail:
70642  return NULL;
70643 }
70644 
70645 
70646 SWIGINTERN PyObject *_wrap_write_index_binary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70647  PyObject *resultobj = 0;
70648  faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
70649  faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
70650  void *argp1 = 0 ;
70651  int res1 = 0 ;
70652  void *argp2 = 0 ;
70653  int res2 = 0 ;
70654  PyObject * obj0 = 0 ;
70655  PyObject * obj1 = 0 ;
70656 
70657  if (!PyArg_ParseTuple(args,(char *)"OO:write_index_binary",&obj0,&obj1)) SWIG_fail;
70658  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
70659  if (!SWIG_IsOK(res1)) {
70660  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index_binary" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
70661  }
70662  arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
70663  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
70664  if (!SWIG_IsOK(res2)) {
70665  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index_binary" "', argument " "2"" of type '" "faiss::IOWriter *""'");
70666  }
70667  arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
70668  {
70669  Py_BEGIN_ALLOW_THREADS
70670  try {
70671  faiss::write_index_binary((faiss::IndexBinary const *)arg1,arg2);
70672  } catch(faiss::FaissException & e) {
70673  PyEval_RestoreThread(_save);
70674  PyErr_SetString(PyExc_RuntimeError, e.what());
70675  SWIG_fail;
70676  }
70677  Py_END_ALLOW_THREADS
70678  }
70679  resultobj = SWIG_Py_Void();
70680  return resultobj;
70681 fail:
70682  return NULL;
70683 }
70684 
70685 
70686 SWIGINTERN PyObject *_wrap_write_index_binary(PyObject *self, PyObject *args) {
70687  Py_ssize_t argc;
70688  PyObject *argv[3] = {
70689  0
70690  };
70691  Py_ssize_t ii;
70692 
70693  if (!PyTuple_Check(args)) SWIG_fail;
70694  argc = args ? PyObject_Length(args) : 0;
70695  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
70696  argv[ii] = PyTuple_GET_ITEM(args,ii);
70697  }
70698  if (argc == 2) {
70699  int _v;
70700  void *vptr = 0;
70701  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
70702  _v = SWIG_CheckState(res);
70703  if (_v) {
70704  void *vptr = 0;
70705  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FILE, 0);
70706  _v = SWIG_CheckState(res);
70707  if (_v) {
70708  return _wrap_write_index_binary__SWIG_1(self, args);
70709  }
70710  }
70711  }
70712  if (argc == 2) {
70713  int _v;
70714  void *vptr = 0;
70715  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
70716  _v = SWIG_CheckState(res);
70717  if (_v) {
70718  void *vptr = 0;
70719  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IOWriter, 0);
70720  _v = SWIG_CheckState(res);
70721  if (_v) {
70722  return _wrap_write_index_binary__SWIG_2(self, args);
70723  }
70724  }
70725  }
70726  if (argc == 2) {
70727  int _v;
70728  void *vptr = 0;
70729  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
70730  _v = SWIG_CheckState(res);
70731  if (_v) {
70732  int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
70733  _v = SWIG_CheckState(res);
70734  if (_v) {
70735  return _wrap_write_index_binary__SWIG_0(self, args);
70736  }
70737  }
70738  }
70739 
70740 fail:
70741  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'write_index_binary'.\n"
70742  " Possible C/C++ prototypes are:\n"
70743  " faiss::write_index_binary(faiss::IndexBinary const *,char const *)\n"
70744  " faiss::write_index_binary(faiss::IndexBinary const *,FILE *)\n"
70745  " faiss::write_index_binary(faiss::IndexBinary const *,faiss::IOWriter *)\n");
70746  return 0;
70747 }
70748 
70749 
70750 SWIGINTERN int Swig_var_IO_FLAG_MMAP_set(PyObject *) {
70751  SWIG_Error(SWIG_AttributeError,"Variable IO_FLAG_MMAP is read-only.");
70752  return 1;
70753 }
70754 
70755 
70756 SWIGINTERN PyObject *Swig_var_IO_FLAG_MMAP_get(void) {
70757  PyObject *pyobj = 0;
70758 
70759  pyobj = SWIG_From_int(static_cast< int >(faiss::IO_FLAG_MMAP));
70760  return pyobj;
70761 }
70762 
70763 
70764 SWIGINTERN int Swig_var_IO_FLAG_READ_ONLY_set(PyObject *) {
70765  SWIG_Error(SWIG_AttributeError,"Variable IO_FLAG_READ_ONLY is read-only.");
70766  return 1;
70767 }
70768 
70769 
70770 SWIGINTERN PyObject *Swig_var_IO_FLAG_READ_ONLY_get(void) {
70771  PyObject *pyobj = 0;
70772 
70773  pyobj = SWIG_From_int(static_cast< int >(faiss::IO_FLAG_READ_ONLY));
70774  return pyobj;
70775 }
70776 
70777 
70778 SWIGINTERN PyObject *_wrap_read_index__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70779  PyObject *resultobj = 0;
70780  char *arg1 = (char *) 0 ;
70781  int arg2 ;
70782  int res1 ;
70783  char *buf1 = 0 ;
70784  int alloc1 = 0 ;
70785  int val2 ;
70786  int ecode2 = 0 ;
70787  PyObject * obj0 = 0 ;
70788  PyObject * obj1 = 0 ;
70789  faiss::Index *result = 0 ;
70790 
70791  if (!PyArg_ParseTuple(args,(char *)"OO:read_index",&obj0,&obj1)) SWIG_fail;
70792  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
70793  if (!SWIG_IsOK(res1)) {
70794  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "char const *""'");
70795  }
70796  arg1 = reinterpret_cast< char * >(buf1);
70797  ecode2 = SWIG_AsVal_int(obj1, &val2);
70798  if (!SWIG_IsOK(ecode2)) {
70799  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index" "', argument " "2"" of type '" "int""'");
70800  }
70801  arg2 = static_cast< int >(val2);
70802  {
70803  Py_BEGIN_ALLOW_THREADS
70804  try {
70805  result = (faiss::Index *)faiss::read_index((char const *)arg1,arg2);
70806  } catch(faiss::FaissException & e) {
70807  PyEval_RestoreThread(_save);
70808  PyErr_SetString(PyExc_RuntimeError, e.what());
70809  SWIG_fail;
70810  }
70811  Py_END_ALLOW_THREADS
70812  }
70813  {
70814  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70815  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
70816  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
70817  } else
70818  /*@SWIG@*/
70819  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70820  if (dynamic_cast<faiss::IndexShards *> (result)) {
70821  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
70822  } else
70823  /*@SWIG@*/
70824  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70825  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
70826  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
70827  } else
70828  /*@SWIG@*/
70829  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70830  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
70831  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
70832  } else
70833  /*@SWIG@*/
70834  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70835  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
70836  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
70837  } else
70838  /*@SWIG@*/
70839  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70840  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
70841  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
70842  } else
70843  /*@SWIG@*/
70844  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70845  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
70846  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
70847  } else
70848  /*@SWIG@*/
70849  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70850  if (dynamic_cast<faiss::IndexIVF *> (result)) {
70851  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
70852  } else
70853  /*@SWIG@*/
70854  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70855  if (dynamic_cast<faiss::IndexFlat *> (result)) {
70856  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
70857  } else
70858  /*@SWIG@*/
70859  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70860  if (dynamic_cast<faiss::IndexPQ *> (result)) {
70861  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
70862  } else
70863  /*@SWIG@*/
70864  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70865  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
70866  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
70867  } else
70868  /*@SWIG@*/
70869  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70870  if (dynamic_cast<faiss::IndexLSH *> (result)) {
70871  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
70872  } else
70873  /*@SWIG@*/
70874  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70875  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
70876  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
70877  } else
70878  /*@SWIG@*/
70879  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70880  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
70881  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
70882  } else
70883  /*@SWIG@*/
70884  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70885  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
70886  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
70887  } else
70888  /*@SWIG@*/
70889  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70890  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
70891  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
70892  } else
70893  /*@SWIG@*/
70894  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70895  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
70896  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
70897  } else
70898  /*@SWIG@*/
70899  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70900  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
70901  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
70902  } else
70903  /*@SWIG@*/
70904  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70905  if (dynamic_cast<faiss::Index2Layer *> (result)) {
70906  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
70907  } else
70908  /*@SWIG@*/
70909 
70910  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70911  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
70912  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
70913  } else
70914  /*@SWIG@*/
70915  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70916  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
70917  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
70918  } else
70919  /*@SWIG@*/
70920  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70921  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
70922  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
70923  } else
70924  /*@SWIG@*/
70925  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
70926  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
70927  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
70928  } else
70929  /*@SWIG@*/
70930 
70931  // default for non-recognized classes
70932  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70933  if (dynamic_cast<faiss::Index *> (result)) {
70934  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
70935  } else
70936  /*@SWIG@*/
70937  if (result == NULL)
70938  {
70939  resultobj = SWIG_Py_Void();
70940 
70941  // Lua does not need a push for nil
70942  } else {
70943  assert(false);
70944  }
70945 
70946 
70947 
70948  }
70949  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
70950  return resultobj;
70951 fail:
70952  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
70953  return NULL;
70954 }
70955 
70956 
70957 SWIGINTERN PyObject *_wrap_read_index__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70958  PyObject *resultobj = 0;
70959  char *arg1 = (char *) 0 ;
70960  int res1 ;
70961  char *buf1 = 0 ;
70962  int alloc1 = 0 ;
70963  PyObject * obj0 = 0 ;
70964  faiss::Index *result = 0 ;
70965 
70966  if (!PyArg_ParseTuple(args,(char *)"O:read_index",&obj0)) SWIG_fail;
70967  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
70968  if (!SWIG_IsOK(res1)) {
70969  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "char const *""'");
70970  }
70971  arg1 = reinterpret_cast< char * >(buf1);
70972  {
70973  Py_BEGIN_ALLOW_THREADS
70974  try {
70975  result = (faiss::Index *)faiss::read_index((char const *)arg1);
70976  } catch(faiss::FaissException & e) {
70977  PyEval_RestoreThread(_save);
70978  PyErr_SetString(PyExc_RuntimeError, e.what());
70979  SWIG_fail;
70980  }
70981  Py_END_ALLOW_THREADS
70982  }
70983  {
70984  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70985  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
70986  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
70987  } else
70988  /*@SWIG@*/
70989  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70990  if (dynamic_cast<faiss::IndexShards *> (result)) {
70991  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
70992  } else
70993  /*@SWIG@*/
70994  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
70995  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
70996  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
70997  } else
70998  /*@SWIG@*/
70999  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71000  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
71001  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
71002  } else
71003  /*@SWIG@*/
71004  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71005  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
71006  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
71007  } else
71008  /*@SWIG@*/
71009  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71010  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
71011  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
71012  } else
71013  /*@SWIG@*/
71014  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71015  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
71016  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
71017  } else
71018  /*@SWIG@*/
71019  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71020  if (dynamic_cast<faiss::IndexIVF *> (result)) {
71021  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
71022  } else
71023  /*@SWIG@*/
71024  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71025  if (dynamic_cast<faiss::IndexFlat *> (result)) {
71026  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
71027  } else
71028  /*@SWIG@*/
71029  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71030  if (dynamic_cast<faiss::IndexPQ *> (result)) {
71031  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
71032  } else
71033  /*@SWIG@*/
71034  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71035  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
71036  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
71037  } else
71038  /*@SWIG@*/
71039  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71040  if (dynamic_cast<faiss::IndexLSH *> (result)) {
71041  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
71042  } else
71043  /*@SWIG@*/
71044  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71045  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
71046  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
71047  } else
71048  /*@SWIG@*/
71049  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71050  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
71051  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
71052  } else
71053  /*@SWIG@*/
71054  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71055  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
71056  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
71057  } else
71058  /*@SWIG@*/
71059  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71060  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
71061  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
71062  } else
71063  /*@SWIG@*/
71064  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71065  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
71066  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
71067  } else
71068  /*@SWIG@*/
71069  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71070  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
71071  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
71072  } else
71073  /*@SWIG@*/
71074  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71075  if (dynamic_cast<faiss::Index2Layer *> (result)) {
71076  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
71077  } else
71078  /*@SWIG@*/
71079 
71080  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71081  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
71082  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
71083  } else
71084  /*@SWIG@*/
71085  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71086  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
71087  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
71088  } else
71089  /*@SWIG@*/
71090  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71091  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
71092  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
71093  } else
71094  /*@SWIG@*/
71095  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71096  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
71097  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
71098  } else
71099  /*@SWIG@*/
71100 
71101  // default for non-recognized classes
71102  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71103  if (dynamic_cast<faiss::Index *> (result)) {
71104  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
71105  } else
71106  /*@SWIG@*/
71107  if (result == NULL)
71108  {
71109  resultobj = SWIG_Py_Void();
71110 
71111  // Lua does not need a push for nil
71112  } else {
71113  assert(false);
71114  }
71115 
71116 
71117 
71118  }
71119  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
71120  return resultobj;
71121 fail:
71122  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
71123  return NULL;
71124 }
71125 
71126 
71127 SWIGINTERN PyObject *_wrap_read_index__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71128  PyObject *resultobj = 0;
71129  FILE *arg1 = (FILE *) 0 ;
71130  int arg2 ;
71131  void *argp1 = 0 ;
71132  int res1 = 0 ;
71133  int val2 ;
71134  int ecode2 = 0 ;
71135  PyObject * obj0 = 0 ;
71136  PyObject * obj1 = 0 ;
71137  faiss::Index *result = 0 ;
71138 
71139  if (!PyArg_ParseTuple(args,(char *)"OO:read_index",&obj0,&obj1)) SWIG_fail;
71140  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
71141  if (!SWIG_IsOK(res1)) {
71142  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "FILE *""'");
71143  }
71144  arg1 = reinterpret_cast< FILE * >(argp1);
71145  ecode2 = SWIG_AsVal_int(obj1, &val2);
71146  if (!SWIG_IsOK(ecode2)) {
71147  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index" "', argument " "2"" of type '" "int""'");
71148  }
71149  arg2 = static_cast< int >(val2);
71150  {
71151  Py_BEGIN_ALLOW_THREADS
71152  try {
71153  result = (faiss::Index *)faiss::read_index(arg1,arg2);
71154  } catch(faiss::FaissException & e) {
71155  PyEval_RestoreThread(_save);
71156  PyErr_SetString(PyExc_RuntimeError, e.what());
71157  SWIG_fail;
71158  }
71159  Py_END_ALLOW_THREADS
71160  }
71161  {
71162  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71163  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
71164  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
71165  } else
71166  /*@SWIG@*/
71167  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71168  if (dynamic_cast<faiss::IndexShards *> (result)) {
71169  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
71170  } else
71171  /*@SWIG@*/
71172  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71173  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
71174  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
71175  } else
71176  /*@SWIG@*/
71177  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71178  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
71179  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
71180  } else
71181  /*@SWIG@*/
71182  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71183  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
71184  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
71185  } else
71186  /*@SWIG@*/
71187  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71188  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
71189  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
71190  } else
71191  /*@SWIG@*/
71192  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71193  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
71194  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
71195  } else
71196  /*@SWIG@*/
71197  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71198  if (dynamic_cast<faiss::IndexIVF *> (result)) {
71199  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
71200  } else
71201  /*@SWIG@*/
71202  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71203  if (dynamic_cast<faiss::IndexFlat *> (result)) {
71204  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
71205  } else
71206  /*@SWIG@*/
71207  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71208  if (dynamic_cast<faiss::IndexPQ *> (result)) {
71209  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
71210  } else
71211  /*@SWIG@*/
71212  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71213  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
71214  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
71215  } else
71216  /*@SWIG@*/
71217  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71218  if (dynamic_cast<faiss::IndexLSH *> (result)) {
71219  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
71220  } else
71221  /*@SWIG@*/
71222  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71223  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
71224  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
71225  } else
71226  /*@SWIG@*/
71227  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71228  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
71229  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
71230  } else
71231  /*@SWIG@*/
71232  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71233  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
71234  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
71235  } else
71236  /*@SWIG@*/
71237  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71238  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
71239  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
71240  } else
71241  /*@SWIG@*/
71242  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71243  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
71244  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
71245  } else
71246  /*@SWIG@*/
71247  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71248  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
71249  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
71250  } else
71251  /*@SWIG@*/
71252  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71253  if (dynamic_cast<faiss::Index2Layer *> (result)) {
71254  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
71255  } else
71256  /*@SWIG@*/
71257 
71258  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71259  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
71260  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
71261  } else
71262  /*@SWIG@*/
71263  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71264  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
71265  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
71266  } else
71267  /*@SWIG@*/
71268  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71269  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
71270  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
71271  } else
71272  /*@SWIG@*/
71273  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71274  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
71275  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
71276  } else
71277  /*@SWIG@*/
71278 
71279  // default for non-recognized classes
71280  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71281  if (dynamic_cast<faiss::Index *> (result)) {
71282  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
71283  } else
71284  /*@SWIG@*/
71285  if (result == NULL)
71286  {
71287  resultobj = SWIG_Py_Void();
71288 
71289  // Lua does not need a push for nil
71290  } else {
71291  assert(false);
71292  }
71293 
71294 
71295 
71296  }
71297  return resultobj;
71298 fail:
71299  return NULL;
71300 }
71301 
71302 
71303 SWIGINTERN PyObject *_wrap_read_index__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71304  PyObject *resultobj = 0;
71305  FILE *arg1 = (FILE *) 0 ;
71306  void *argp1 = 0 ;
71307  int res1 = 0 ;
71308  PyObject * obj0 = 0 ;
71309  faiss::Index *result = 0 ;
71310 
71311  if (!PyArg_ParseTuple(args,(char *)"O:read_index",&obj0)) SWIG_fail;
71312  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
71313  if (!SWIG_IsOK(res1)) {
71314  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "FILE *""'");
71315  }
71316  arg1 = reinterpret_cast< FILE * >(argp1);
71317  {
71318  Py_BEGIN_ALLOW_THREADS
71319  try {
71320  result = (faiss::Index *)faiss::read_index(arg1);
71321  } catch(faiss::FaissException & e) {
71322  PyEval_RestoreThread(_save);
71323  PyErr_SetString(PyExc_RuntimeError, e.what());
71324  SWIG_fail;
71325  }
71326  Py_END_ALLOW_THREADS
71327  }
71328  {
71329  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71330  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
71331  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
71332  } else
71333  /*@SWIG@*/
71334  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71335  if (dynamic_cast<faiss::IndexShards *> (result)) {
71336  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
71337  } else
71338  /*@SWIG@*/
71339  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71340  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
71341  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
71342  } else
71343  /*@SWIG@*/
71344  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71345  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
71346  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
71347  } else
71348  /*@SWIG@*/
71349  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71350  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
71351  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
71352  } else
71353  /*@SWIG@*/
71354  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71355  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
71356  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
71357  } else
71358  /*@SWIG@*/
71359  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71360  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
71361  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
71362  } else
71363  /*@SWIG@*/
71364  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71365  if (dynamic_cast<faiss::IndexIVF *> (result)) {
71366  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
71367  } else
71368  /*@SWIG@*/
71369  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71370  if (dynamic_cast<faiss::IndexFlat *> (result)) {
71371  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
71372  } else
71373  /*@SWIG@*/
71374  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71375  if (dynamic_cast<faiss::IndexPQ *> (result)) {
71376  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
71377  } else
71378  /*@SWIG@*/
71379  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71380  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
71381  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
71382  } else
71383  /*@SWIG@*/
71384  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71385  if (dynamic_cast<faiss::IndexLSH *> (result)) {
71386  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
71387  } else
71388  /*@SWIG@*/
71389  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71390  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
71391  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
71392  } else
71393  /*@SWIG@*/
71394  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71395  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
71396  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
71397  } else
71398  /*@SWIG@*/
71399  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71400  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
71401  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
71402  } else
71403  /*@SWIG@*/
71404  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71405  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
71406  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
71407  } else
71408  /*@SWIG@*/
71409  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71410  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
71411  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
71412  } else
71413  /*@SWIG@*/
71414  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71415  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
71416  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
71417  } else
71418  /*@SWIG@*/
71419  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71420  if (dynamic_cast<faiss::Index2Layer *> (result)) {
71421  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
71422  } else
71423  /*@SWIG@*/
71424 
71425  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71426  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
71427  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
71428  } else
71429  /*@SWIG@*/
71430  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71431  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
71432  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
71433  } else
71434  /*@SWIG@*/
71435  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71436  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
71437  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
71438  } else
71439  /*@SWIG@*/
71440  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71441  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
71442  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
71443  } else
71444  /*@SWIG@*/
71445 
71446  // default for non-recognized classes
71447  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71448  if (dynamic_cast<faiss::Index *> (result)) {
71449  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
71450  } else
71451  /*@SWIG@*/
71452  if (result == NULL)
71453  {
71454  resultobj = SWIG_Py_Void();
71455 
71456  // Lua does not need a push for nil
71457  } else {
71458  assert(false);
71459  }
71460 
71461 
71462 
71463  }
71464  return resultobj;
71465 fail:
71466  return NULL;
71467 }
71468 
71469 
71470 SWIGINTERN PyObject *_wrap_read_index__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71471  PyObject *resultobj = 0;
71472  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
71473  int arg2 ;
71474  void *argp1 = 0 ;
71475  int res1 = 0 ;
71476  int val2 ;
71477  int ecode2 = 0 ;
71478  PyObject * obj0 = 0 ;
71479  PyObject * obj1 = 0 ;
71480  faiss::Index *result = 0 ;
71481 
71482  if (!PyArg_ParseTuple(args,(char *)"OO:read_index",&obj0,&obj1)) SWIG_fail;
71483  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
71484  if (!SWIG_IsOK(res1)) {
71485  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "faiss::IOReader *""'");
71486  }
71487  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
71488  ecode2 = SWIG_AsVal_int(obj1, &val2);
71489  if (!SWIG_IsOK(ecode2)) {
71490  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index" "', argument " "2"" of type '" "int""'");
71491  }
71492  arg2 = static_cast< int >(val2);
71493  {
71494  Py_BEGIN_ALLOW_THREADS
71495  try {
71496  result = (faiss::Index *)faiss::read_index(arg1,arg2);
71497  } catch(faiss::FaissException & e) {
71498  PyEval_RestoreThread(_save);
71499  PyErr_SetString(PyExc_RuntimeError, e.what());
71500  SWIG_fail;
71501  }
71502  Py_END_ALLOW_THREADS
71503  }
71504  {
71505  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71506  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
71507  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
71508  } else
71509  /*@SWIG@*/
71510  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71511  if (dynamic_cast<faiss::IndexShards *> (result)) {
71512  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
71513  } else
71514  /*@SWIG@*/
71515  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71516  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
71517  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
71518  } else
71519  /*@SWIG@*/
71520  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71521  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
71522  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
71523  } else
71524  /*@SWIG@*/
71525  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71526  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
71527  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
71528  } else
71529  /*@SWIG@*/
71530  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71531  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
71532  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
71533  } else
71534  /*@SWIG@*/
71535  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71536  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
71537  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
71538  } else
71539  /*@SWIG@*/
71540  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71541  if (dynamic_cast<faiss::IndexIVF *> (result)) {
71542  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
71543  } else
71544  /*@SWIG@*/
71545  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71546  if (dynamic_cast<faiss::IndexFlat *> (result)) {
71547  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
71548  } else
71549  /*@SWIG@*/
71550  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71551  if (dynamic_cast<faiss::IndexPQ *> (result)) {
71552  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
71553  } else
71554  /*@SWIG@*/
71555  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71556  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
71557  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
71558  } else
71559  /*@SWIG@*/
71560  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71561  if (dynamic_cast<faiss::IndexLSH *> (result)) {
71562  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
71563  } else
71564  /*@SWIG@*/
71565  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71566  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
71567  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
71568  } else
71569  /*@SWIG@*/
71570  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71571  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
71572  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
71573  } else
71574  /*@SWIG@*/
71575  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71576  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
71577  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
71578  } else
71579  /*@SWIG@*/
71580  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71581  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
71582  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
71583  } else
71584  /*@SWIG@*/
71585  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71586  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
71587  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
71588  } else
71589  /*@SWIG@*/
71590  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71591  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
71592  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
71593  } else
71594  /*@SWIG@*/
71595  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71596  if (dynamic_cast<faiss::Index2Layer *> (result)) {
71597  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
71598  } else
71599  /*@SWIG@*/
71600 
71601  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71602  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
71603  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
71604  } else
71605  /*@SWIG@*/
71606  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71607  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
71608  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
71609  } else
71610  /*@SWIG@*/
71611  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71612  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
71613  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
71614  } else
71615  /*@SWIG@*/
71616  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71617  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
71618  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
71619  } else
71620  /*@SWIG@*/
71621 
71622  // default for non-recognized classes
71623  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71624  if (dynamic_cast<faiss::Index *> (result)) {
71625  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
71626  } else
71627  /*@SWIG@*/
71628  if (result == NULL)
71629  {
71630  resultobj = SWIG_Py_Void();
71631 
71632  // Lua does not need a push for nil
71633  } else {
71634  assert(false);
71635  }
71636 
71637 
71638 
71639  }
71640  return resultobj;
71641 fail:
71642  return NULL;
71643 }
71644 
71645 
71646 SWIGINTERN PyObject *_wrap_read_index__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71647  PyObject *resultobj = 0;
71648  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
71649  void *argp1 = 0 ;
71650  int res1 = 0 ;
71651  PyObject * obj0 = 0 ;
71652  faiss::Index *result = 0 ;
71653 
71654  if (!PyArg_ParseTuple(args,(char *)"O:read_index",&obj0)) SWIG_fail;
71655  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
71656  if (!SWIG_IsOK(res1)) {
71657  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "faiss::IOReader *""'");
71658  }
71659  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
71660  {
71661  Py_BEGIN_ALLOW_THREADS
71662  try {
71663  result = (faiss::Index *)faiss::read_index(arg1);
71664  } catch(faiss::FaissException & e) {
71665  PyEval_RestoreThread(_save);
71666  PyErr_SetString(PyExc_RuntimeError, e.what());
71667  SWIG_fail;
71668  }
71669  Py_END_ALLOW_THREADS
71670  }
71671  {
71672  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71673  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
71674  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
71675  } else
71676  /*@SWIG@*/
71677  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71678  if (dynamic_cast<faiss::IndexShards *> (result)) {
71679  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
71680  } else
71681  /*@SWIG@*/
71682  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71683  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
71684  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
71685  } else
71686  /*@SWIG@*/
71687  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71688  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
71689  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
71690  } else
71691  /*@SWIG@*/
71692  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71693  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
71694  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
71695  } else
71696  /*@SWIG@*/
71697  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71698  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
71699  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
71700  } else
71701  /*@SWIG@*/
71702  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71703  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
71704  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
71705  } else
71706  /*@SWIG@*/
71707  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71708  if (dynamic_cast<faiss::IndexIVF *> (result)) {
71709  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
71710  } else
71711  /*@SWIG@*/
71712  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71713  if (dynamic_cast<faiss::IndexFlat *> (result)) {
71714  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
71715  } else
71716  /*@SWIG@*/
71717  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71718  if (dynamic_cast<faiss::IndexPQ *> (result)) {
71719  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
71720  } else
71721  /*@SWIG@*/
71722  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71723  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
71724  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
71725  } else
71726  /*@SWIG@*/
71727  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71728  if (dynamic_cast<faiss::IndexLSH *> (result)) {
71729  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
71730  } else
71731  /*@SWIG@*/
71732  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71733  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
71734  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
71735  } else
71736  /*@SWIG@*/
71737  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71738  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
71739  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
71740  } else
71741  /*@SWIG@*/
71742  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71743  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
71744  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
71745  } else
71746  /*@SWIG@*/
71747  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71748  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
71749  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
71750  } else
71751  /*@SWIG@*/
71752  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71753  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
71754  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
71755  } else
71756  /*@SWIG@*/
71757  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71758  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
71759  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
71760  } else
71761  /*@SWIG@*/
71762  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71763  if (dynamic_cast<faiss::Index2Layer *> (result)) {
71764  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
71765  } else
71766  /*@SWIG@*/
71767 
71768  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71769  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
71770  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
71771  } else
71772  /*@SWIG@*/
71773  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71774  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
71775  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
71776  } else
71777  /*@SWIG@*/
71778  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71779  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
71780  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
71781  } else
71782  /*@SWIG@*/
71783  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71784  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
71785  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
71786  } else
71787  /*@SWIG@*/
71788 
71789  // default for non-recognized classes
71790  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71791  if (dynamic_cast<faiss::Index *> (result)) {
71792  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
71793  } else
71794  /*@SWIG@*/
71795  if (result == NULL)
71796  {
71797  resultobj = SWIG_Py_Void();
71798 
71799  // Lua does not need a push for nil
71800  } else {
71801  assert(false);
71802  }
71803 
71804 
71805 
71806  }
71807  return resultobj;
71808 fail:
71809  return NULL;
71810 }
71811 
71812 
71813 SWIGINTERN PyObject *_wrap_read_index(PyObject *self, PyObject *args) {
71814  Py_ssize_t argc;
71815  PyObject *argv[3] = {
71816  0
71817  };
71818  Py_ssize_t ii;
71819 
71820  if (!PyTuple_Check(args)) SWIG_fail;
71821  argc = args ? PyObject_Length(args) : 0;
71822  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
71823  argv[ii] = PyTuple_GET_ITEM(args,ii);
71824  }
71825  if (argc == 1) {
71826  int _v;
71827  void *vptr = 0;
71828  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
71829  _v = SWIG_CheckState(res);
71830  if (_v) {
71831  return _wrap_read_index__SWIG_3(self, args);
71832  }
71833  }
71834  if (argc == 1) {
71835  int _v;
71836  void *vptr = 0;
71837  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
71838  _v = SWIG_CheckState(res);
71839  if (_v) {
71840  return _wrap_read_index__SWIG_5(self, args);
71841  }
71842  }
71843  if (argc == 1) {
71844  int _v;
71845  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
71846  _v = SWIG_CheckState(res);
71847  if (_v) {
71848  return _wrap_read_index__SWIG_1(self, args);
71849  }
71850  }
71851  if (argc == 2) {
71852  int _v;
71853  void *vptr = 0;
71854  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
71855  _v = SWIG_CheckState(res);
71856  if (_v) {
71857  {
71858  int res = SWIG_AsVal_int(argv[1], NULL);
71859  _v = SWIG_CheckState(res);
71860  }
71861  if (_v) {
71862  return _wrap_read_index__SWIG_4(self, args);
71863  }
71864  }
71865  }
71866  if (argc == 2) {
71867  int _v;
71868  void *vptr = 0;
71869  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
71870  _v = SWIG_CheckState(res);
71871  if (_v) {
71872  {
71873  int res = SWIG_AsVal_int(argv[1], NULL);
71874  _v = SWIG_CheckState(res);
71875  }
71876  if (_v) {
71877  return _wrap_read_index__SWIG_2(self, args);
71878  }
71879  }
71880  }
71881  if (argc == 2) {
71882  int _v;
71883  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
71884  _v = SWIG_CheckState(res);
71885  if (_v) {
71886  {
71887  int res = SWIG_AsVal_int(argv[1], NULL);
71888  _v = SWIG_CheckState(res);
71889  }
71890  if (_v) {
71891  return _wrap_read_index__SWIG_0(self, args);
71892  }
71893  }
71894  }
71895 
71896 fail:
71897  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_index'.\n"
71898  " Possible C/C++ prototypes are:\n"
71899  " faiss::read_index(char const *,int)\n"
71900  " faiss::read_index(char const *)\n"
71901  " faiss::read_index(FILE *,int)\n"
71902  " faiss::read_index(FILE *)\n"
71903  " faiss::read_index(faiss::IOReader *,int)\n"
71904  " faiss::read_index(faiss::IOReader *)\n");
71905  return 0;
71906 }
71907 
71908 
71909 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71910  PyObject *resultobj = 0;
71911  char *arg1 = (char *) 0 ;
71912  int arg2 ;
71913  int res1 ;
71914  char *buf1 = 0 ;
71915  int alloc1 = 0 ;
71916  int val2 ;
71917  int ecode2 = 0 ;
71918  PyObject * obj0 = 0 ;
71919  PyObject * obj1 = 0 ;
71920  faiss::IndexBinary *result = 0 ;
71921 
71922  if (!PyArg_ParseTuple(args,(char *)"OO:read_index_binary",&obj0,&obj1)) SWIG_fail;
71923  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
71924  if (!SWIG_IsOK(res1)) {
71925  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "char const *""'");
71926  }
71927  arg1 = reinterpret_cast< char * >(buf1);
71928  ecode2 = SWIG_AsVal_int(obj1, &val2);
71929  if (!SWIG_IsOK(ecode2)) {
71930  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index_binary" "', argument " "2"" of type '" "int""'");
71931  }
71932  arg2 = static_cast< int >(val2);
71933  {
71934  Py_BEGIN_ALLOW_THREADS
71935  try {
71936  result = (faiss::IndexBinary *)faiss::read_index_binary((char const *)arg1,arg2);
71937  } catch(faiss::FaissException & e) {
71938  PyEval_RestoreThread(_save);
71939  PyErr_SetString(PyExc_RuntimeError, e.what());
71940  SWIG_fail;
71941  }
71942  Py_END_ALLOW_THREADS
71943  }
71944  {
71945  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71946  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
71947  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
71948  } else
71949  /*@SWIG@*/
71950  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71951  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
71952  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
71953  } else
71954  /*@SWIG@*/
71955  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71956  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
71957  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
71958  } else
71959  /*@SWIG@*/
71960  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71961  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
71962  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
71963  } else
71964  /*@SWIG@*/
71965 
71966  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
71967  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
71968  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,SWIG_POINTER_OWN);
71969  } else
71970  /*@SWIG@*/
71971 
71972  // default for non-recognized classes
71973  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
71974  if (dynamic_cast<faiss::IndexBinary *> (result)) {
71975  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
71976  } else
71977  /*@SWIG@*/
71978  if (result == NULL)
71979  {
71980  resultobj = SWIG_Py_Void();
71981 
71982  // Lua does not need a push for nil
71983  } else {
71984  assert(false);
71985  }
71986 
71987 
71988 
71989  }
71990  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
71991  return resultobj;
71992 fail:
71993  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
71994  return NULL;
71995 }
71996 
71997 
71998 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71999  PyObject *resultobj = 0;
72000  char *arg1 = (char *) 0 ;
72001  int res1 ;
72002  char *buf1 = 0 ;
72003  int alloc1 = 0 ;
72004  PyObject * obj0 = 0 ;
72005  faiss::IndexBinary *result = 0 ;
72006 
72007  if (!PyArg_ParseTuple(args,(char *)"O:read_index_binary",&obj0)) SWIG_fail;
72008  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
72009  if (!SWIG_IsOK(res1)) {
72010  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "char const *""'");
72011  }
72012  arg1 = reinterpret_cast< char * >(buf1);
72013  {
72014  Py_BEGIN_ALLOW_THREADS
72015  try {
72016  result = (faiss::IndexBinary *)faiss::read_index_binary((char const *)arg1);
72017  } catch(faiss::FaissException & e) {
72018  PyEval_RestoreThread(_save);
72019  PyErr_SetString(PyExc_RuntimeError, e.what());
72020  SWIG_fail;
72021  }
72022  Py_END_ALLOW_THREADS
72023  }
72024  {
72025  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72026  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
72027  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
72028  } else
72029  /*@SWIG@*/
72030  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72031  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
72032  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
72033  } else
72034  /*@SWIG@*/
72035  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72036  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
72037  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
72038  } else
72039  /*@SWIG@*/
72040  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72041  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
72042  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
72043  } else
72044  /*@SWIG@*/
72045 
72046  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
72047  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
72048  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,SWIG_POINTER_OWN);
72049  } else
72050  /*@SWIG@*/
72051 
72052  // default for non-recognized classes
72053  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72054  if (dynamic_cast<faiss::IndexBinary *> (result)) {
72055  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
72056  } else
72057  /*@SWIG@*/
72058  if (result == NULL)
72059  {
72060  resultobj = SWIG_Py_Void();
72061 
72062  // Lua does not need a push for nil
72063  } else {
72064  assert(false);
72065  }
72066 
72067 
72068 
72069  }
72070  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
72071  return resultobj;
72072 fail:
72073  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
72074  return NULL;
72075 }
72076 
72077 
72078 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72079  PyObject *resultobj = 0;
72080  FILE *arg1 = (FILE *) 0 ;
72081  int arg2 ;
72082  void *argp1 = 0 ;
72083  int res1 = 0 ;
72084  int val2 ;
72085  int ecode2 = 0 ;
72086  PyObject * obj0 = 0 ;
72087  PyObject * obj1 = 0 ;
72088  faiss::IndexBinary *result = 0 ;
72089 
72090  if (!PyArg_ParseTuple(args,(char *)"OO:read_index_binary",&obj0,&obj1)) SWIG_fail;
72091  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
72092  if (!SWIG_IsOK(res1)) {
72093  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "FILE *""'");
72094  }
72095  arg1 = reinterpret_cast< FILE * >(argp1);
72096  ecode2 = SWIG_AsVal_int(obj1, &val2);
72097  if (!SWIG_IsOK(ecode2)) {
72098  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index_binary" "', argument " "2"" of type '" "int""'");
72099  }
72100  arg2 = static_cast< int >(val2);
72101  {
72102  Py_BEGIN_ALLOW_THREADS
72103  try {
72104  result = (faiss::IndexBinary *)faiss::read_index_binary(arg1,arg2);
72105  } catch(faiss::FaissException & e) {
72106  PyEval_RestoreThread(_save);
72107  PyErr_SetString(PyExc_RuntimeError, e.what());
72108  SWIG_fail;
72109  }
72110  Py_END_ALLOW_THREADS
72111  }
72112  {
72113  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72114  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
72115  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
72116  } else
72117  /*@SWIG@*/
72118  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72119  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
72120  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
72121  } else
72122  /*@SWIG@*/
72123  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72124  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
72125  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
72126  } else
72127  /*@SWIG@*/
72128  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72129  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
72130  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
72131  } else
72132  /*@SWIG@*/
72133 
72134  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
72135  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
72136  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,SWIG_POINTER_OWN);
72137  } else
72138  /*@SWIG@*/
72139 
72140  // default for non-recognized classes
72141  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72142  if (dynamic_cast<faiss::IndexBinary *> (result)) {
72143  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
72144  } else
72145  /*@SWIG@*/
72146  if (result == NULL)
72147  {
72148  resultobj = SWIG_Py_Void();
72149 
72150  // Lua does not need a push for nil
72151  } else {
72152  assert(false);
72153  }
72154 
72155 
72156 
72157  }
72158  return resultobj;
72159 fail:
72160  return NULL;
72161 }
72162 
72163 
72164 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72165  PyObject *resultobj = 0;
72166  FILE *arg1 = (FILE *) 0 ;
72167  void *argp1 = 0 ;
72168  int res1 = 0 ;
72169  PyObject * obj0 = 0 ;
72170  faiss::IndexBinary *result = 0 ;
72171 
72172  if (!PyArg_ParseTuple(args,(char *)"O:read_index_binary",&obj0)) SWIG_fail;
72173  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
72174  if (!SWIG_IsOK(res1)) {
72175  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "FILE *""'");
72176  }
72177  arg1 = reinterpret_cast< FILE * >(argp1);
72178  {
72179  Py_BEGIN_ALLOW_THREADS
72180  try {
72181  result = (faiss::IndexBinary *)faiss::read_index_binary(arg1);
72182  } catch(faiss::FaissException & e) {
72183  PyEval_RestoreThread(_save);
72184  PyErr_SetString(PyExc_RuntimeError, e.what());
72185  SWIG_fail;
72186  }
72187  Py_END_ALLOW_THREADS
72188  }
72189  {
72190  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72191  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
72192  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
72193  } else
72194  /*@SWIG@*/
72195  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72196  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
72197  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
72198  } else
72199  /*@SWIG@*/
72200  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72201  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
72202  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
72203  } else
72204  /*@SWIG@*/
72205  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72206  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
72207  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
72208  } else
72209  /*@SWIG@*/
72210 
72211  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
72212  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
72213  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,SWIG_POINTER_OWN);
72214  } else
72215  /*@SWIG@*/
72216 
72217  // default for non-recognized classes
72218  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72219  if (dynamic_cast<faiss::IndexBinary *> (result)) {
72220  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
72221  } else
72222  /*@SWIG@*/
72223  if (result == NULL)
72224  {
72225  resultobj = SWIG_Py_Void();
72226 
72227  // Lua does not need a push for nil
72228  } else {
72229  assert(false);
72230  }
72231 
72232 
72233 
72234  }
72235  return resultobj;
72236 fail:
72237  return NULL;
72238 }
72239 
72240 
72241 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72242  PyObject *resultobj = 0;
72243  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
72244  int arg2 ;
72245  void *argp1 = 0 ;
72246  int res1 = 0 ;
72247  int val2 ;
72248  int ecode2 = 0 ;
72249  PyObject * obj0 = 0 ;
72250  PyObject * obj1 = 0 ;
72251  faiss::IndexBinary *result = 0 ;
72252 
72253  if (!PyArg_ParseTuple(args,(char *)"OO:read_index_binary",&obj0,&obj1)) SWIG_fail;
72254  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
72255  if (!SWIG_IsOK(res1)) {
72256  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "faiss::IOReader *""'");
72257  }
72258  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
72259  ecode2 = SWIG_AsVal_int(obj1, &val2);
72260  if (!SWIG_IsOK(ecode2)) {
72261  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index_binary" "', argument " "2"" of type '" "int""'");
72262  }
72263  arg2 = static_cast< int >(val2);
72264  {
72265  Py_BEGIN_ALLOW_THREADS
72266  try {
72267  result = (faiss::IndexBinary *)faiss::read_index_binary(arg1,arg2);
72268  } catch(faiss::FaissException & e) {
72269  PyEval_RestoreThread(_save);
72270  PyErr_SetString(PyExc_RuntimeError, e.what());
72271  SWIG_fail;
72272  }
72273  Py_END_ALLOW_THREADS
72274  }
72275  {
72276  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72277  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
72278  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
72279  } else
72280  /*@SWIG@*/
72281  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72282  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
72283  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
72284  } else
72285  /*@SWIG@*/
72286  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72287  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
72288  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
72289  } else
72290  /*@SWIG@*/
72291  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72292  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
72293  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
72294  } else
72295  /*@SWIG@*/
72296 
72297  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
72298  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
72299  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,SWIG_POINTER_OWN);
72300  } else
72301  /*@SWIG@*/
72302 
72303  // default for non-recognized classes
72304  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72305  if (dynamic_cast<faiss::IndexBinary *> (result)) {
72306  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
72307  } else
72308  /*@SWIG@*/
72309  if (result == NULL)
72310  {
72311  resultobj = SWIG_Py_Void();
72312 
72313  // Lua does not need a push for nil
72314  } else {
72315  assert(false);
72316  }
72317 
72318 
72319 
72320  }
72321  return resultobj;
72322 fail:
72323  return NULL;
72324 }
72325 
72326 
72327 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72328  PyObject *resultobj = 0;
72329  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
72330  void *argp1 = 0 ;
72331  int res1 = 0 ;
72332  PyObject * obj0 = 0 ;
72333  faiss::IndexBinary *result = 0 ;
72334 
72335  if (!PyArg_ParseTuple(args,(char *)"O:read_index_binary",&obj0)) SWIG_fail;
72336  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
72337  if (!SWIG_IsOK(res1)) {
72338  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "faiss::IOReader *""'");
72339  }
72340  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
72341  {
72342  Py_BEGIN_ALLOW_THREADS
72343  try {
72344  result = (faiss::IndexBinary *)faiss::read_index_binary(arg1);
72345  } catch(faiss::FaissException & e) {
72346  PyEval_RestoreThread(_save);
72347  PyErr_SetString(PyExc_RuntimeError, e.what());
72348  SWIG_fail;
72349  }
72350  Py_END_ALLOW_THREADS
72351  }
72352  {
72353  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72354  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
72355  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
72356  } else
72357  /*@SWIG@*/
72358  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72359  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
72360  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
72361  } else
72362  /*@SWIG@*/
72363  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72364  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
72365  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
72366  } else
72367  /*@SWIG@*/
72368  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72369  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
72370  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
72371  } else
72372  /*@SWIG@*/
72373 
72374  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
72375  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
72376  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,SWIG_POINTER_OWN);
72377  } else
72378  /*@SWIG@*/
72379 
72380  // default for non-recognized classes
72381  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72382  if (dynamic_cast<faiss::IndexBinary *> (result)) {
72383  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
72384  } else
72385  /*@SWIG@*/
72386  if (result == NULL)
72387  {
72388  resultobj = SWIG_Py_Void();
72389 
72390  // Lua does not need a push for nil
72391  } else {
72392  assert(false);
72393  }
72394 
72395 
72396 
72397  }
72398  return resultobj;
72399 fail:
72400  return NULL;
72401 }
72402 
72403 
72404 SWIGINTERN PyObject *_wrap_read_index_binary(PyObject *self, PyObject *args) {
72405  Py_ssize_t argc;
72406  PyObject *argv[3] = {
72407  0
72408  };
72409  Py_ssize_t ii;
72410 
72411  if (!PyTuple_Check(args)) SWIG_fail;
72412  argc = args ? PyObject_Length(args) : 0;
72413  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
72414  argv[ii] = PyTuple_GET_ITEM(args,ii);
72415  }
72416  if (argc == 1) {
72417  int _v;
72418  void *vptr = 0;
72419  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
72420  _v = SWIG_CheckState(res);
72421  if (_v) {
72422  return _wrap_read_index_binary__SWIG_3(self, args);
72423  }
72424  }
72425  if (argc == 1) {
72426  int _v;
72427  void *vptr = 0;
72428  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
72429  _v = SWIG_CheckState(res);
72430  if (_v) {
72431  return _wrap_read_index_binary__SWIG_5(self, args);
72432  }
72433  }
72434  if (argc == 1) {
72435  int _v;
72436  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
72437  _v = SWIG_CheckState(res);
72438  if (_v) {
72439  return _wrap_read_index_binary__SWIG_1(self, args);
72440  }
72441  }
72442  if (argc == 2) {
72443  int _v;
72444  void *vptr = 0;
72445  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
72446  _v = SWIG_CheckState(res);
72447  if (_v) {
72448  {
72449  int res = SWIG_AsVal_int(argv[1], NULL);
72450  _v = SWIG_CheckState(res);
72451  }
72452  if (_v) {
72453  return _wrap_read_index_binary__SWIG_4(self, args);
72454  }
72455  }
72456  }
72457  if (argc == 2) {
72458  int _v;
72459  void *vptr = 0;
72460  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
72461  _v = SWIG_CheckState(res);
72462  if (_v) {
72463  {
72464  int res = SWIG_AsVal_int(argv[1], NULL);
72465  _v = SWIG_CheckState(res);
72466  }
72467  if (_v) {
72468  return _wrap_read_index_binary__SWIG_2(self, args);
72469  }
72470  }
72471  }
72472  if (argc == 2) {
72473  int _v;
72474  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
72475  _v = SWIG_CheckState(res);
72476  if (_v) {
72477  {
72478  int res = SWIG_AsVal_int(argv[1], NULL);
72479  _v = SWIG_CheckState(res);
72480  }
72481  if (_v) {
72482  return _wrap_read_index_binary__SWIG_0(self, args);
72483  }
72484  }
72485  }
72486 
72487 fail:
72488  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_index_binary'.\n"
72489  " Possible C/C++ prototypes are:\n"
72490  " faiss::read_index_binary(char const *,int)\n"
72491  " faiss::read_index_binary(char const *)\n"
72492  " faiss::read_index_binary(FILE *,int)\n"
72493  " faiss::read_index_binary(FILE *)\n"
72494  " faiss::read_index_binary(faiss::IOReader *,int)\n"
72495  " faiss::read_index_binary(faiss::IOReader *)\n");
72496  return 0;
72497 }
72498 
72499 
72500 SWIGINTERN PyObject *_wrap_write_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72501  PyObject *resultobj = 0;
72503  char *arg2 = (char *) 0 ;
72504  void *argp1 = 0 ;
72505  int res1 = 0 ;
72506  int res2 ;
72507  char *buf2 = 0 ;
72508  int alloc2 = 0 ;
72509  PyObject * obj0 = 0 ;
72510  PyObject * obj1 = 0 ;
72511 
72512  if (!PyArg_ParseTuple(args,(char *)"OO:write_VectorTransform",&obj0,&obj1)) SWIG_fail;
72513  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
72514  if (!SWIG_IsOK(res1)) {
72515  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_VectorTransform" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
72516  }
72517  arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
72518  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
72519  if (!SWIG_IsOK(res2)) {
72520  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_VectorTransform" "', argument " "2"" of type '" "char const *""'");
72521  }
72522  arg2 = reinterpret_cast< char * >(buf2);
72523  {
72524  Py_BEGIN_ALLOW_THREADS
72525  try {
72526  faiss::write_VectorTransform((faiss::VectorTransform const *)arg1,(char const *)arg2);
72527  } catch(faiss::FaissException & e) {
72528  PyEval_RestoreThread(_save);
72529  PyErr_SetString(PyExc_RuntimeError, e.what());
72530  SWIG_fail;
72531  }
72532  Py_END_ALLOW_THREADS
72533  }
72534  resultobj = SWIG_Py_Void();
72535  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
72536  return resultobj;
72537 fail:
72538  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
72539  return NULL;
72540 }
72541 
72542 
72543 SWIGINTERN PyObject *_wrap_read_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72544  PyObject *resultobj = 0;
72545  char *arg1 = (char *) 0 ;
72546  int res1 ;
72547  char *buf1 = 0 ;
72548  int alloc1 = 0 ;
72549  PyObject * obj0 = 0 ;
72550  faiss::VectorTransform *result = 0 ;
72551 
72552  if (!PyArg_ParseTuple(args,(char *)"O:read_VectorTransform",&obj0)) SWIG_fail;
72553  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
72554  if (!SWIG_IsOK(res1)) {
72555  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_VectorTransform" "', argument " "1"" of type '" "char const *""'");
72556  }
72557  arg1 = reinterpret_cast< char * >(buf1);
72558  {
72559  Py_BEGIN_ALLOW_THREADS
72560  try {
72561  result = (faiss::VectorTransform *)faiss::read_VectorTransform((char const *)arg1);
72562  } catch(faiss::FaissException & e) {
72563  PyEval_RestoreThread(_save);
72564  PyErr_SetString(PyExc_RuntimeError, e.what());
72565  SWIG_fail;
72566  }
72567  Py_END_ALLOW_THREADS
72568  }
72569  {
72570  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72571  if (dynamic_cast<faiss::RemapDimensionsTransform *> (result)) {
72572  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RemapDimensionsTransform,SWIG_POINTER_OWN);
72573  } else
72574  /*@SWIG@*/
72575  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72576  if (dynamic_cast<faiss::OPQMatrix *> (result)) {
72577  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__OPQMatrix,SWIG_POINTER_OWN);
72578  } else
72579  /*@SWIG@*/
72580  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72581  if (dynamic_cast<faiss::PCAMatrix *> (result)) {
72582  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__PCAMatrix,SWIG_POINTER_OWN);
72583  } else
72584  /*@SWIG@*/
72585  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72586  if (dynamic_cast<faiss::RandomRotationMatrix *> (result)) {
72587  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RandomRotationMatrix,SWIG_POINTER_OWN);
72588  } else
72589  /*@SWIG@*/
72590  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72591  if (dynamic_cast<faiss::LinearTransform *> (result)) {
72592  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__LinearTransform,SWIG_POINTER_OWN);
72593  } else
72594  /*@SWIG@*/
72595  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72596  if (dynamic_cast<faiss::NormalizationTransform *> (result)) {
72597  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__NormalizationTransform,SWIG_POINTER_OWN);
72598  } else
72599  /*@SWIG@*/
72600  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
72601  if (dynamic_cast<faiss::VectorTransform *> (result)) {
72602  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__VectorTransform,SWIG_POINTER_OWN);
72603  } else
72604  /*@SWIG@*/
72605  {
72606  assert(false);
72607  }
72608 
72609 
72610 
72611  }
72612  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
72613  return resultobj;
72614 fail:
72615  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
72616  return NULL;
72617 }
72618 
72619 
72620 SWIGINTERN PyObject *_wrap_read_ProductQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72621  PyObject *resultobj = 0;
72622  char *arg1 = (char *) 0 ;
72623  int res1 ;
72624  char *buf1 = 0 ;
72625  int alloc1 = 0 ;
72626  PyObject * obj0 = 0 ;
72627  faiss::ProductQuantizer *result = 0 ;
72628 
72629  if (!PyArg_ParseTuple(args,(char *)"O:read_ProductQuantizer",&obj0)) SWIG_fail;
72630  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
72631  if (!SWIG_IsOK(res1)) {
72632  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_ProductQuantizer" "', argument " "1"" of type '" "char const *""'");
72633  }
72634  arg1 = reinterpret_cast< char * >(buf1);
72635  {
72636  Py_BEGIN_ALLOW_THREADS
72637  try {
72638  result = (faiss::ProductQuantizer *)faiss::read_ProductQuantizer((char const *)arg1);
72639  } catch(faiss::FaissException & e) {
72640  PyEval_RestoreThread(_save);
72641  PyErr_SetString(PyExc_RuntimeError, e.what());
72642  SWIG_fail;
72643  }
72644  Py_END_ALLOW_THREADS
72645  }
72646  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_OWN | 0 );
72647  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
72648  return resultobj;
72649 fail:
72650  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
72651  return NULL;
72652 }
72653 
72654 
72655 SWIGINTERN PyObject *_wrap_read_ProductQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72656  PyObject *resultobj = 0;
72657  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
72658  void *argp1 = 0 ;
72659  int res1 = 0 ;
72660  PyObject * obj0 = 0 ;
72661  faiss::ProductQuantizer *result = 0 ;
72662 
72663  if (!PyArg_ParseTuple(args,(char *)"O:read_ProductQuantizer",&obj0)) SWIG_fail;
72664  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
72665  if (!SWIG_IsOK(res1)) {
72666  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_ProductQuantizer" "', argument " "1"" of type '" "faiss::IOReader *""'");
72667  }
72668  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
72669  {
72670  Py_BEGIN_ALLOW_THREADS
72671  try {
72672  result = (faiss::ProductQuantizer *)faiss::read_ProductQuantizer(arg1);
72673  } catch(faiss::FaissException & e) {
72674  PyEval_RestoreThread(_save);
72675  PyErr_SetString(PyExc_RuntimeError, e.what());
72676  SWIG_fail;
72677  }
72678  Py_END_ALLOW_THREADS
72679  }
72680  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_OWN | 0 );
72681  return resultobj;
72682 fail:
72683  return NULL;
72684 }
72685 
72686 
72687 SWIGINTERN PyObject *_wrap_read_ProductQuantizer(PyObject *self, PyObject *args) {
72688  Py_ssize_t argc;
72689  PyObject *argv[2] = {
72690  0
72691  };
72692  Py_ssize_t ii;
72693 
72694  if (!PyTuple_Check(args)) SWIG_fail;
72695  argc = args ? PyObject_Length(args) : 0;
72696  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
72697  argv[ii] = PyTuple_GET_ITEM(args,ii);
72698  }
72699  if (argc == 1) {
72700  int _v;
72701  void *vptr = 0;
72702  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
72703  _v = SWIG_CheckState(res);
72704  if (_v) {
72705  return _wrap_read_ProductQuantizer__SWIG_1(self, args);
72706  }
72707  }
72708  if (argc == 1) {
72709  int _v;
72710  int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
72711  _v = SWIG_CheckState(res);
72712  if (_v) {
72713  return _wrap_read_ProductQuantizer__SWIG_0(self, args);
72714  }
72715  }
72716 
72717 fail:
72718  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_ProductQuantizer'.\n"
72719  " Possible C/C++ prototypes are:\n"
72720  " faiss::read_ProductQuantizer(char const *)\n"
72721  " faiss::read_ProductQuantizer(faiss::IOReader *)\n");
72722  return 0;
72723 }
72724 
72725 
72726 SWIGINTERN PyObject *_wrap_write_ProductQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72727  PyObject *resultobj = 0;
72729  char *arg2 = (char *) 0 ;
72730  void *argp1 = 0 ;
72731  int res1 = 0 ;
72732  int res2 ;
72733  char *buf2 = 0 ;
72734  int alloc2 = 0 ;
72735  PyObject * obj0 = 0 ;
72736  PyObject * obj1 = 0 ;
72737 
72738  if (!PyArg_ParseTuple(args,(char *)"OO:write_ProductQuantizer",&obj0,&obj1)) SWIG_fail;
72739  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
72740  if (!SWIG_IsOK(res1)) {
72741  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_ProductQuantizer" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
72742  }
72743  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
72744  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
72745  if (!SWIG_IsOK(res2)) {
72746  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_ProductQuantizer" "', argument " "2"" of type '" "char const *""'");
72747  }
72748  arg2 = reinterpret_cast< char * >(buf2);
72749  {
72750  Py_BEGIN_ALLOW_THREADS
72751  try {
72752  faiss::write_ProductQuantizer((faiss::ProductQuantizer const *)arg1,(char const *)arg2);
72753  } catch(faiss::FaissException & e) {
72754  PyEval_RestoreThread(_save);
72755  PyErr_SetString(PyExc_RuntimeError, e.what());
72756  SWIG_fail;
72757  }
72758  Py_END_ALLOW_THREADS
72759  }
72760  resultobj = SWIG_Py_Void();
72761  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
72762  return resultobj;
72763 fail:
72764  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
72765  return NULL;
72766 }
72767 
72768 
72769 SWIGINTERN PyObject *_wrap_write_ProductQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72770  PyObject *resultobj = 0;
72772  faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
72773  void *argp1 = 0 ;
72774  int res1 = 0 ;
72775  void *argp2 = 0 ;
72776  int res2 = 0 ;
72777  PyObject * obj0 = 0 ;
72778  PyObject * obj1 = 0 ;
72779 
72780  if (!PyArg_ParseTuple(args,(char *)"OO:write_ProductQuantizer",&obj0,&obj1)) SWIG_fail;
72781  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
72782  if (!SWIG_IsOK(res1)) {
72783  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_ProductQuantizer" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
72784  }
72785  arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
72786  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
72787  if (!SWIG_IsOK(res2)) {
72788  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_ProductQuantizer" "', argument " "2"" of type '" "faiss::IOWriter *""'");
72789  }
72790  arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
72791  {
72792  Py_BEGIN_ALLOW_THREADS
72793  try {
72794  faiss::write_ProductQuantizer((faiss::ProductQuantizer const *)arg1,arg2);
72795  } catch(faiss::FaissException & e) {
72796  PyEval_RestoreThread(_save);
72797  PyErr_SetString(PyExc_RuntimeError, e.what());
72798  SWIG_fail;
72799  }
72800  Py_END_ALLOW_THREADS
72801  }
72802  resultobj = SWIG_Py_Void();
72803  return resultobj;
72804 fail:
72805  return NULL;
72806 }
72807 
72808 
72809 SWIGINTERN PyObject *_wrap_write_ProductQuantizer(PyObject *self, PyObject *args) {
72810  Py_ssize_t argc;
72811  PyObject *argv[3] = {
72812  0
72813  };
72814  Py_ssize_t ii;
72815 
72816  if (!PyTuple_Check(args)) SWIG_fail;
72817  argc = args ? PyObject_Length(args) : 0;
72818  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
72819  argv[ii] = PyTuple_GET_ITEM(args,ii);
72820  }
72821  if (argc == 2) {
72822  int _v;
72823  void *vptr = 0;
72824  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
72825  _v = SWIG_CheckState(res);
72826  if (_v) {
72827  void *vptr = 0;
72828  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IOWriter, 0);
72829  _v = SWIG_CheckState(res);
72830  if (_v) {
72831  return _wrap_write_ProductQuantizer__SWIG_1(self, args);
72832  }
72833  }
72834  }
72835  if (argc == 2) {
72836  int _v;
72837  void *vptr = 0;
72838  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
72839  _v = SWIG_CheckState(res);
72840  if (_v) {
72841  int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
72842  _v = SWIG_CheckState(res);
72843  if (_v) {
72844  return _wrap_write_ProductQuantizer__SWIG_0(self, args);
72845  }
72846  }
72847  }
72848 
72849 fail:
72850  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'write_ProductQuantizer'.\n"
72851  " Possible C/C++ prototypes are:\n"
72852  " faiss::write_ProductQuantizer(faiss::ProductQuantizer const *,char const *)\n"
72853  " faiss::write_ProductQuantizer(faiss::ProductQuantizer const *,faiss::IOWriter *)\n");
72854  return 0;
72855 }
72856 
72857 
72858 SWIGINTERN PyObject *_wrap_write_InvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72859  PyObject *resultobj = 0;
72861  faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
72862  void *argp1 = 0 ;
72863  int res1 = 0 ;
72864  void *argp2 = 0 ;
72865  int res2 = 0 ;
72866  PyObject * obj0 = 0 ;
72867  PyObject * obj1 = 0 ;
72868 
72869  if (!PyArg_ParseTuple(args,(char *)"OO:write_InvertedLists",&obj0,&obj1)) SWIG_fail;
72870  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
72871  if (!SWIG_IsOK(res1)) {
72872  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_InvertedLists" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
72873  }
72874  arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
72875  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
72876  if (!SWIG_IsOK(res2)) {
72877  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_InvertedLists" "', argument " "2"" of type '" "faiss::IOWriter *""'");
72878  }
72879  arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
72880  {
72881  Py_BEGIN_ALLOW_THREADS
72882  try {
72883  faiss::write_InvertedLists((faiss::InvertedLists const *)arg1,arg2);
72884  } catch(faiss::FaissException & e) {
72885  PyEval_RestoreThread(_save);
72886  PyErr_SetString(PyExc_RuntimeError, e.what());
72887  SWIG_fail;
72888  }
72889  Py_END_ALLOW_THREADS
72890  }
72891  resultobj = SWIG_Py_Void();
72892  return resultobj;
72893 fail:
72894  return NULL;
72895 }
72896 
72897 
72898 SWIGINTERN PyObject *_wrap_read_InvertedLists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72899  PyObject *resultobj = 0;
72900  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
72901  int arg2 ;
72902  void *argp1 = 0 ;
72903  int res1 = 0 ;
72904  int val2 ;
72905  int ecode2 = 0 ;
72906  PyObject * obj0 = 0 ;
72907  PyObject * obj1 = 0 ;
72908  faiss::InvertedLists *result = 0 ;
72909 
72910  if (!PyArg_ParseTuple(args,(char *)"OO:read_InvertedLists",&obj0,&obj1)) SWIG_fail;
72911  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
72912  if (!SWIG_IsOK(res1)) {
72913  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_InvertedLists" "', argument " "1"" of type '" "faiss::IOReader *""'");
72914  }
72915  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
72916  ecode2 = SWIG_AsVal_int(obj1, &val2);
72917  if (!SWIG_IsOK(ecode2)) {
72918  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_InvertedLists" "', argument " "2"" of type '" "int""'");
72919  }
72920  arg2 = static_cast< int >(val2);
72921  {
72922  Py_BEGIN_ALLOW_THREADS
72923  try {
72924  result = (faiss::InvertedLists *)faiss::read_InvertedLists(arg1,arg2);
72925  } catch(faiss::FaissException & e) {
72926  PyEval_RestoreThread(_save);
72927  PyErr_SetString(PyExc_RuntimeError, e.what());
72928  SWIG_fail;
72929  }
72930  Py_END_ALLOW_THREADS
72931  }
72932  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
72933  return resultobj;
72934 fail:
72935  return NULL;
72936 }
72937 
72938 
72939 SWIGINTERN PyObject *_wrap_read_InvertedLists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72940  PyObject *resultobj = 0;
72941  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
72942  void *argp1 = 0 ;
72943  int res1 = 0 ;
72944  PyObject * obj0 = 0 ;
72945  faiss::InvertedLists *result = 0 ;
72946 
72947  if (!PyArg_ParseTuple(args,(char *)"O:read_InvertedLists",&obj0)) SWIG_fail;
72948  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
72949  if (!SWIG_IsOK(res1)) {
72950  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_InvertedLists" "', argument " "1"" of type '" "faiss::IOReader *""'");
72951  }
72952  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
72953  {
72954  Py_BEGIN_ALLOW_THREADS
72955  try {
72956  result = (faiss::InvertedLists *)faiss::read_InvertedLists(arg1);
72957  } catch(faiss::FaissException & e) {
72958  PyEval_RestoreThread(_save);
72959  PyErr_SetString(PyExc_RuntimeError, e.what());
72960  SWIG_fail;
72961  }
72962  Py_END_ALLOW_THREADS
72963  }
72964  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
72965  return resultobj;
72966 fail:
72967  return NULL;
72968 }
72969 
72970 
72971 SWIGINTERN PyObject *_wrap_read_InvertedLists(PyObject *self, PyObject *args) {
72972  Py_ssize_t argc;
72973  PyObject *argv[3] = {
72974  0
72975  };
72976  Py_ssize_t ii;
72977 
72978  if (!PyTuple_Check(args)) SWIG_fail;
72979  argc = args ? PyObject_Length(args) : 0;
72980  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
72981  argv[ii] = PyTuple_GET_ITEM(args,ii);
72982  }
72983  if (argc == 1) {
72984  int _v;
72985  void *vptr = 0;
72986  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
72987  _v = SWIG_CheckState(res);
72988  if (_v) {
72989  return _wrap_read_InvertedLists__SWIG_1(self, args);
72990  }
72991  }
72992  if (argc == 2) {
72993  int _v;
72994  void *vptr = 0;
72995  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
72996  _v = SWIG_CheckState(res);
72997  if (_v) {
72998  {
72999  int res = SWIG_AsVal_int(argv[1], NULL);
73000  _v = SWIG_CheckState(res);
73001  }
73002  if (_v) {
73003  return _wrap_read_InvertedLists__SWIG_0(self, args);
73004  }
73005  }
73006  }
73007 
73008 fail:
73009  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_InvertedLists'.\n"
73010  " Possible C/C++ prototypes are:\n"
73011  " faiss::read_InvertedLists(faiss::IOReader *,int)\n"
73012  " faiss::read_InvertedLists(faiss::IOReader *)\n");
73013  return 0;
73014 }
73015 
73016 
73017 SWIGINTERN PyObject *_wrap_clone_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73018  PyObject *resultobj = 0;
73019  faiss::Index *arg1 = (faiss::Index *) 0 ;
73020  void *argp1 = 0 ;
73021  int res1 = 0 ;
73022  PyObject * obj0 = 0 ;
73023  faiss::Index *result = 0 ;
73024 
73025  if (!PyArg_ParseTuple(args,(char *)"O:clone_index",&obj0)) SWIG_fail;
73026  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
73027  if (!SWIG_IsOK(res1)) {
73028  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_index" "', argument " "1"" of type '" "faiss::Index const *""'");
73029  }
73030  arg1 = reinterpret_cast< faiss::Index * >(argp1);
73031  {
73032  Py_BEGIN_ALLOW_THREADS
73033  try {
73034  result = (faiss::Index *)faiss::clone_index((faiss::Index const *)arg1);
73035  } catch(faiss::FaissException & e) {
73036  PyEval_RestoreThread(_save);
73037  PyErr_SetString(PyExc_RuntimeError, e.what());
73038  SWIG_fail;
73039  }
73040  Py_END_ALLOW_THREADS
73041  }
73042  {
73043  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73044  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
73045  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
73046  } else
73047  /*@SWIG@*/
73048  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73049  if (dynamic_cast<faiss::IndexShards *> (result)) {
73050  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
73051  } else
73052  /*@SWIG@*/
73053  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73054  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
73055  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
73056  } else
73057  /*@SWIG@*/
73058  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73059  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
73060  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
73061  } else
73062  /*@SWIG@*/
73063  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73064  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
73065  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
73066  } else
73067  /*@SWIG@*/
73068  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73069  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
73070  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
73071  } else
73072  /*@SWIG@*/
73073  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73074  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
73075  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
73076  } else
73077  /*@SWIG@*/
73078  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73079  if (dynamic_cast<faiss::IndexIVF *> (result)) {
73080  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
73081  } else
73082  /*@SWIG@*/
73083  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73084  if (dynamic_cast<faiss::IndexFlat *> (result)) {
73085  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
73086  } else
73087  /*@SWIG@*/
73088  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73089  if (dynamic_cast<faiss::IndexPQ *> (result)) {
73090  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
73091  } else
73092  /*@SWIG@*/
73093  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73094  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
73095  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
73096  } else
73097  /*@SWIG@*/
73098  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73099  if (dynamic_cast<faiss::IndexLSH *> (result)) {
73100  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
73101  } else
73102  /*@SWIG@*/
73103  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73104  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
73105  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
73106  } else
73107  /*@SWIG@*/
73108  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73109  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
73110  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
73111  } else
73112  /*@SWIG@*/
73113  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73114  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
73115  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
73116  } else
73117  /*@SWIG@*/
73118  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73119  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
73120  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
73121  } else
73122  /*@SWIG@*/
73123  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73124  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
73125  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
73126  } else
73127  /*@SWIG@*/
73128  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73129  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
73130  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
73131  } else
73132  /*@SWIG@*/
73133  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73134  if (dynamic_cast<faiss::Index2Layer *> (result)) {
73135  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
73136  } else
73137  /*@SWIG@*/
73138 
73139  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73140  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
73141  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
73142  } else
73143  /*@SWIG@*/
73144  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73145  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
73146  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
73147  } else
73148  /*@SWIG@*/
73149  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73150  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
73151  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
73152  } else
73153  /*@SWIG@*/
73154  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73155  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
73156  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
73157  } else
73158  /*@SWIG@*/
73159 
73160  // default for non-recognized classes
73161  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73162  if (dynamic_cast<faiss::Index *> (result)) {
73163  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
73164  } else
73165  /*@SWIG@*/
73166  if (result == NULL)
73167  {
73168  resultobj = SWIG_Py_Void();
73169 
73170  // Lua does not need a push for nil
73171  } else {
73172  assert(false);
73173  }
73174 
73175 
73176 
73177  }
73178  return resultobj;
73179 fail:
73180  return NULL;
73181 }
73182 
73183 
73184 SWIGINTERN PyObject *_wrap_Cloner_clone_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73185  PyObject *resultobj = 0;
73186  faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
73188  void *argp1 = 0 ;
73189  int res1 = 0 ;
73190  void *argp2 = 0 ;
73191  int res2 = 0 ;
73192  PyObject * obj0 = 0 ;
73193  PyObject * obj1 = 0 ;
73194  faiss::VectorTransform *result = 0 ;
73195 
73196  if (!PyArg_ParseTuple(args,(char *)"OO:Cloner_clone_VectorTransform",&obj0,&obj1)) SWIG_fail;
73197  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, 0 | 0 );
73198  if (!SWIG_IsOK(res1)) {
73199  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cloner_clone_VectorTransform" "', argument " "1"" of type '" "faiss::Cloner *""'");
73200  }
73201  arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
73202  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
73203  if (!SWIG_IsOK(res2)) {
73204  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cloner_clone_VectorTransform" "', argument " "2"" of type '" "faiss::VectorTransform const *""'");
73205  }
73206  arg2 = reinterpret_cast< faiss::VectorTransform * >(argp2);
73207  {
73208  Py_BEGIN_ALLOW_THREADS
73209  try {
73210  result = (faiss::VectorTransform *)(arg1)->clone_VectorTransform((faiss::VectorTransform const *)arg2);
73211  } catch(faiss::FaissException & e) {
73212  PyEval_RestoreThread(_save);
73213  PyErr_SetString(PyExc_RuntimeError, e.what());
73214  SWIG_fail;
73215  }
73216  Py_END_ALLOW_THREADS
73217  }
73218  {
73219  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73220  if (dynamic_cast<faiss::RemapDimensionsTransform *> (result)) {
73221  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RemapDimensionsTransform,SWIG_POINTER_OWN);
73222  } else
73223  /*@SWIG@*/
73224  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73225  if (dynamic_cast<faiss::OPQMatrix *> (result)) {
73226  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__OPQMatrix,SWIG_POINTER_OWN);
73227  } else
73228  /*@SWIG@*/
73229  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73230  if (dynamic_cast<faiss::PCAMatrix *> (result)) {
73231  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__PCAMatrix,SWIG_POINTER_OWN);
73232  } else
73233  /*@SWIG@*/
73234  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73235  if (dynamic_cast<faiss::RandomRotationMatrix *> (result)) {
73236  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RandomRotationMatrix,SWIG_POINTER_OWN);
73237  } else
73238  /*@SWIG@*/
73239  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73240  if (dynamic_cast<faiss::LinearTransform *> (result)) {
73241  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__LinearTransform,SWIG_POINTER_OWN);
73242  } else
73243  /*@SWIG@*/
73244  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73245  if (dynamic_cast<faiss::NormalizationTransform *> (result)) {
73246  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__NormalizationTransform,SWIG_POINTER_OWN);
73247  } else
73248  /*@SWIG@*/
73249  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73250  if (dynamic_cast<faiss::VectorTransform *> (result)) {
73251  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__VectorTransform,SWIG_POINTER_OWN);
73252  } else
73253  /*@SWIG@*/
73254  {
73255  assert(false);
73256  }
73257 
73258 
73259 
73260  }
73261  return resultobj;
73262 fail:
73263  return NULL;
73264 }
73265 
73266 
73267 SWIGINTERN PyObject *_wrap_Cloner_clone_Index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73268  PyObject *resultobj = 0;
73269  faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
73270  faiss::Index *arg2 = (faiss::Index *) 0 ;
73271  void *argp1 = 0 ;
73272  int res1 = 0 ;
73273  void *argp2 = 0 ;
73274  int res2 = 0 ;
73275  PyObject * obj0 = 0 ;
73276  PyObject * obj1 = 0 ;
73277  faiss::Index *result = 0 ;
73278 
73279  if (!PyArg_ParseTuple(args,(char *)"OO:Cloner_clone_Index",&obj0,&obj1)) SWIG_fail;
73280  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, 0 | 0 );
73281  if (!SWIG_IsOK(res1)) {
73282  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cloner_clone_Index" "', argument " "1"" of type '" "faiss::Cloner *""'");
73283  }
73284  arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
73285  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
73286  if (!SWIG_IsOK(res2)) {
73287  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cloner_clone_Index" "', argument " "2"" of type '" "faiss::Index const *""'");
73288  }
73289  arg2 = reinterpret_cast< faiss::Index * >(argp2);
73290  {
73291  Py_BEGIN_ALLOW_THREADS
73292  try {
73293  result = (faiss::Index *)(arg1)->clone_Index((faiss::Index const *)arg2);
73294  } catch(faiss::FaissException & e) {
73295  PyEval_RestoreThread(_save);
73296  PyErr_SetString(PyExc_RuntimeError, e.what());
73297  SWIG_fail;
73298  }
73299  Py_END_ALLOW_THREADS
73300  }
73301  {
73302  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73303  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
73304  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,0);
73305  } else
73306  /*@SWIG@*/
73307  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73308  if (dynamic_cast<faiss::IndexShards *> (result)) {
73309  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,0);
73310  } else
73311  /*@SWIG@*/
73312  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73313  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
73314  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,0);
73315  } else
73316  /*@SWIG@*/
73317  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73318  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
73319  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,0);
73320  } else
73321  /*@SWIG@*/
73322  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73323  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
73324  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,0);
73325  } else
73326  /*@SWIG@*/
73327  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73328  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
73329  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,0);
73330  } else
73331  /*@SWIG@*/
73332  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73333  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
73334  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,0);
73335  } else
73336  /*@SWIG@*/
73337  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73338  if (dynamic_cast<faiss::IndexIVF *> (result)) {
73339  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,0);
73340  } else
73341  /*@SWIG@*/
73342  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73343  if (dynamic_cast<faiss::IndexFlat *> (result)) {
73344  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,0);
73345  } else
73346  /*@SWIG@*/
73347  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73348  if (dynamic_cast<faiss::IndexPQ *> (result)) {
73349  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,0);
73350  } else
73351  /*@SWIG@*/
73352  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73353  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
73354  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,0);
73355  } else
73356  /*@SWIG@*/
73357  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73358  if (dynamic_cast<faiss::IndexLSH *> (result)) {
73359  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,0);
73360  } else
73361  /*@SWIG@*/
73362  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73363  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
73364  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,0);
73365  } else
73366  /*@SWIG@*/
73367  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73368  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
73369  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,0);
73370  } else
73371  /*@SWIG@*/
73372  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73373  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
73374  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,0);
73375  } else
73376  /*@SWIG@*/
73377  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73378  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
73379  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,0);
73380  } else
73381  /*@SWIG@*/
73382  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73383  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
73384  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,0);
73385  } else
73386  /*@SWIG@*/
73387  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73388  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
73389  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,0);
73390  } else
73391  /*@SWIG@*/
73392  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73393  if (dynamic_cast<faiss::Index2Layer *> (result)) {
73394  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,0);
73395  } else
73396  /*@SWIG@*/
73397 
73398  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73399  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
73400  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,0);
73401  } else
73402  /*@SWIG@*/
73403  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73404  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
73405  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,0);
73406  } else
73407  /*@SWIG@*/
73408  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73409  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
73410  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,0);
73411  } else
73412  /*@SWIG@*/
73413  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
73414  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
73415  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,0);
73416  } else
73417  /*@SWIG@*/
73418 
73419  // default for non-recognized classes
73420  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
73421  if (dynamic_cast<faiss::Index *> (result)) {
73422  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,0);
73423  } else
73424  /*@SWIG@*/
73425  if (result == NULL)
73426  {
73427  resultobj = SWIG_Py_Void();
73428 
73429  // Lua does not need a push for nil
73430  } else {
73431  assert(false);
73432  }
73433 
73434 
73435 
73436  }
73437  return resultobj;
73438 fail:
73439  return NULL;
73440 }
73441 
73442 
73443 SWIGINTERN PyObject *_wrap_Cloner_clone_IndexIVF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73444  PyObject *resultobj = 0;
73445  faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
73446  faiss::IndexIVF *arg2 = (faiss::IndexIVF *) 0 ;
73447  void *argp1 = 0 ;
73448  int res1 = 0 ;
73449  void *argp2 = 0 ;
73450  int res2 = 0 ;
73451  PyObject * obj0 = 0 ;
73452  PyObject * obj1 = 0 ;
73453  faiss::IndexIVF *result = 0 ;
73454 
73455  if (!PyArg_ParseTuple(args,(char *)"OO:Cloner_clone_IndexIVF",&obj0,&obj1)) SWIG_fail;
73456  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, 0 | 0 );
73457  if (!SWIG_IsOK(res1)) {
73458  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cloner_clone_IndexIVF" "', argument " "1"" of type '" "faiss::Cloner *""'");
73459  }
73460  arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
73461  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
73462  if (!SWIG_IsOK(res2)) {
73463  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cloner_clone_IndexIVF" "', argument " "2"" of type '" "faiss::IndexIVF const *""'");
73464  }
73465  arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
73466  {
73467  Py_BEGIN_ALLOW_THREADS
73468  try {
73469  result = (faiss::IndexIVF *)(arg1)->clone_IndexIVF((faiss::IndexIVF const *)arg2);
73470  } catch(faiss::FaissException & e) {
73471  PyEval_RestoreThread(_save);
73472  PyErr_SetString(PyExc_RuntimeError, e.what());
73473  SWIG_fail;
73474  }
73475  Py_END_ALLOW_THREADS
73476  }
73477  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
73478  return resultobj;
73479 fail:
73480  return NULL;
73481 }
73482 
73483 
73484 SWIGINTERN PyObject *_wrap_delete_Cloner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73485  PyObject *resultobj = 0;
73486  faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
73487  void *argp1 = 0 ;
73488  int res1 = 0 ;
73489  PyObject * obj0 = 0 ;
73490 
73491  if (!PyArg_ParseTuple(args,(char *)"O:delete_Cloner",&obj0)) SWIG_fail;
73492  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, SWIG_POINTER_DISOWN | 0 );
73493  if (!SWIG_IsOK(res1)) {
73494  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cloner" "', argument " "1"" of type '" "faiss::Cloner *""'");
73495  }
73496  arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
73497  {
73498  Py_BEGIN_ALLOW_THREADS
73499  try {
73500  delete arg1;
73501  } catch(faiss::FaissException & e) {
73502  PyEval_RestoreThread(_save);
73503  PyErr_SetString(PyExc_RuntimeError, e.what());
73504  SWIG_fail;
73505  }
73506  Py_END_ALLOW_THREADS
73507  }
73508  resultobj = SWIG_Py_Void();
73509  return resultobj;
73510 fail:
73511  return NULL;
73512 }
73513 
73514 
73515 SWIGINTERN PyObject *_wrap_new_Cloner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73516  PyObject *resultobj = 0;
73517  faiss::Cloner *result = 0 ;
73518 
73519  if (!PyArg_ParseTuple(args,(char *)":new_Cloner")) SWIG_fail;
73520  result = (faiss::Cloner *)new faiss::Cloner();
73521  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Cloner, SWIG_POINTER_NEW | 0 );
73522  return resultobj;
73523 fail:
73524  return NULL;
73525 }
73526 
73527 
73528 SWIGINTERN PyObject *Cloner_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73529  PyObject *obj;
73530  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
73531  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Cloner, SWIG_NewClientData(obj));
73532  return SWIG_Py_Void();
73533 }
73534 
73535 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73536  PyObject *resultobj = 0;
73538  faiss::AutoTuneCriterion::idx_t arg2 ;
73539  void *argp1 = 0 ;
73540  int res1 = 0 ;
73541  long val2 ;
73542  int ecode2 = 0 ;
73543  PyObject * obj0 = 0 ;
73544  PyObject * obj1 = 0 ;
73545 
73546  if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_nq_set",&obj0,&obj1)) SWIG_fail;
73547  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73548  if (!SWIG_IsOK(res1)) {
73549  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nq_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73550  }
73551  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73552  ecode2 = SWIG_AsVal_long(obj1, &val2);
73553  if (!SWIG_IsOK(ecode2)) {
73554  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_nq_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
73555  }
73556  arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
73557  if (arg1) (arg1)->nq = arg2;
73558  resultobj = SWIG_Py_Void();
73559  return resultobj;
73560 fail:
73561  return NULL;
73562 }
73563 
73564 
73565 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73566  PyObject *resultobj = 0;
73568  void *argp1 = 0 ;
73569  int res1 = 0 ;
73570  PyObject * obj0 = 0 ;
73571  faiss::AutoTuneCriterion::idx_t result;
73572 
73573  if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_nq_get",&obj0)) SWIG_fail;
73574  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73575  if (!SWIG_IsOK(res1)) {
73576  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nq_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73577  }
73578  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73579  result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->nq);
73580  resultobj = SWIG_From_long(static_cast< long >(result));
73581  return resultobj;
73582 fail:
73583  return NULL;
73584 }
73585 
73586 
73587 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nnn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73588  PyObject *resultobj = 0;
73590  faiss::AutoTuneCriterion::idx_t arg2 ;
73591  void *argp1 = 0 ;
73592  int res1 = 0 ;
73593  long val2 ;
73594  int ecode2 = 0 ;
73595  PyObject * obj0 = 0 ;
73596  PyObject * obj1 = 0 ;
73597 
73598  if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_nnn_set",&obj0,&obj1)) SWIG_fail;
73599  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73600  if (!SWIG_IsOK(res1)) {
73601  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nnn_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73602  }
73603  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73604  ecode2 = SWIG_AsVal_long(obj1, &val2);
73605  if (!SWIG_IsOK(ecode2)) {
73606  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_nnn_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
73607  }
73608  arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
73609  if (arg1) (arg1)->nnn = arg2;
73610  resultobj = SWIG_Py_Void();
73611  return resultobj;
73612 fail:
73613  return NULL;
73614 }
73615 
73616 
73617 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nnn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73618  PyObject *resultobj = 0;
73620  void *argp1 = 0 ;
73621  int res1 = 0 ;
73622  PyObject * obj0 = 0 ;
73623  faiss::AutoTuneCriterion::idx_t result;
73624 
73625  if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_nnn_get",&obj0)) SWIG_fail;
73626  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73627  if (!SWIG_IsOK(res1)) {
73628  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nnn_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73629  }
73630  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73631  result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->nnn);
73632  resultobj = SWIG_From_long(static_cast< long >(result));
73633  return resultobj;
73634 fail:
73635  return NULL;
73636 }
73637 
73638 
73639 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_nnn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73640  PyObject *resultobj = 0;
73642  faiss::AutoTuneCriterion::idx_t arg2 ;
73643  void *argp1 = 0 ;
73644  int res1 = 0 ;
73645  long val2 ;
73646  int ecode2 = 0 ;
73647  PyObject * obj0 = 0 ;
73648  PyObject * obj1 = 0 ;
73649 
73650  if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_gt_nnn_set",&obj0,&obj1)) SWIG_fail;
73651  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73652  if (!SWIG_IsOK(res1)) {
73653  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_nnn_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73654  }
73655  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73656  ecode2 = SWIG_AsVal_long(obj1, &val2);
73657  if (!SWIG_IsOK(ecode2)) {
73658  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_gt_nnn_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
73659  }
73660  arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
73661  if (arg1) (arg1)->gt_nnn = arg2;
73662  resultobj = SWIG_Py_Void();
73663  return resultobj;
73664 fail:
73665  return NULL;
73666 }
73667 
73668 
73669 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_nnn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73670  PyObject *resultobj = 0;
73672  void *argp1 = 0 ;
73673  int res1 = 0 ;
73674  PyObject * obj0 = 0 ;
73675  faiss::AutoTuneCriterion::idx_t result;
73676 
73677  if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_gt_nnn_get",&obj0)) SWIG_fail;
73678  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73679  if (!SWIG_IsOK(res1)) {
73680  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_nnn_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73681  }
73682  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73683  result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->gt_nnn);
73684  resultobj = SWIG_From_long(static_cast< long >(result));
73685  return resultobj;
73686 fail:
73687  return NULL;
73688 }
73689 
73690 
73691 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_D_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73692  PyObject *resultobj = 0;
73694  std::vector< float > *arg2 = (std::vector< float > *) 0 ;
73695  void *argp1 = 0 ;
73696  int res1 = 0 ;
73697  void *argp2 = 0 ;
73698  int res2 = 0 ;
73699  PyObject * obj0 = 0 ;
73700  PyObject * obj1 = 0 ;
73701 
73702  if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_gt_D_set",&obj0,&obj1)) SWIG_fail;
73703  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73704  if (!SWIG_IsOK(res1)) {
73705  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_D_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73706  }
73707  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73708  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
73709  if (!SWIG_IsOK(res2)) {
73710  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoTuneCriterion_gt_D_set" "', argument " "2"" of type '" "std::vector< float > *""'");
73711  }
73712  arg2 = reinterpret_cast< std::vector< float > * >(argp2);
73713  if (arg1) (arg1)->gt_D = *arg2;
73714  resultobj = SWIG_Py_Void();
73715  return resultobj;
73716 fail:
73717  return NULL;
73718 }
73719 
73720 
73721 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_D_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73722  PyObject *resultobj = 0;
73724  void *argp1 = 0 ;
73725  int res1 = 0 ;
73726  PyObject * obj0 = 0 ;
73727  std::vector< float > *result = 0 ;
73728 
73729  if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_gt_D_get",&obj0)) SWIG_fail;
73730  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73731  if (!SWIG_IsOK(res1)) {
73732  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_D_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73733  }
73734  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73735  result = (std::vector< float > *)& ((arg1)->gt_D);
73736  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
73737  return resultobj;
73738 fail:
73739  return NULL;
73740 }
73741 
73742 
73743 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_I_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73744  PyObject *resultobj = 0;
73746  std::vector< faiss::AutoTuneCriterion::idx_t > *arg2 = (std::vector< faiss::AutoTuneCriterion::idx_t > *) 0 ;
73747  void *argp1 = 0 ;
73748  int res1 = 0 ;
73749  void *argp2 = 0 ;
73750  int res2 = 0 ;
73751  PyObject * obj0 = 0 ;
73752  PyObject * obj1 = 0 ;
73753 
73754  if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_gt_I_set",&obj0,&obj1)) SWIG_fail;
73755  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73756  if (!SWIG_IsOK(res1)) {
73757  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_I_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73758  }
73759  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73760  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
73761  if (!SWIG_IsOK(res2)) {
73762  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoTuneCriterion_gt_I_set" "', argument " "2"" of type '" "std::vector< faiss::AutoTuneCriterion::idx_t > *""'");
73763  }
73764  arg2 = reinterpret_cast< std::vector< faiss::AutoTuneCriterion::idx_t > * >(argp2);
73765  if (arg1) (arg1)->gt_I = *arg2;
73766  resultobj = SWIG_Py_Void();
73767  return resultobj;
73768 fail:
73769  return NULL;
73770 }
73771 
73772 
73773 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_I_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73774  PyObject *resultobj = 0;
73776  void *argp1 = 0 ;
73777  int res1 = 0 ;
73778  PyObject * obj0 = 0 ;
73779  std::vector< faiss::AutoTuneCriterion::idx_t > *result = 0 ;
73780 
73781  if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_gt_I_get",&obj0)) SWIG_fail;
73782  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73783  if (!SWIG_IsOK(res1)) {
73784  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_I_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73785  }
73786  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73787  result = (std::vector< faiss::AutoTuneCriterion::idx_t > *)& ((arg1)->gt_I);
73788  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
73789  return resultobj;
73790 fail:
73791  return NULL;
73792 }
73793 
73794 
73795 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_set_groundtruth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73796  PyObject *resultobj = 0;
73798  int arg2 ;
73799  float *arg3 = (float *) 0 ;
73800  faiss::AutoTuneCriterion::idx_t *arg4 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
73801  void *argp1 = 0 ;
73802  int res1 = 0 ;
73803  int val2 ;
73804  int ecode2 = 0 ;
73805  void *argp3 = 0 ;
73806  int res3 = 0 ;
73807  void *argp4 = 0 ;
73808  int res4 = 0 ;
73809  PyObject * obj0 = 0 ;
73810  PyObject * obj1 = 0 ;
73811  PyObject * obj2 = 0 ;
73812  PyObject * obj3 = 0 ;
73813 
73814  if (!PyArg_ParseTuple(args,(char *)"OOOO:AutoTuneCriterion_set_groundtruth",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
73815  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73816  if (!SWIG_IsOK(res1)) {
73817  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73818  }
73819  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73820  ecode2 = SWIG_AsVal_int(obj1, &val2);
73821  if (!SWIG_IsOK(ecode2)) {
73822  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "2"" of type '" "int""'");
73823  }
73824  arg2 = static_cast< int >(val2);
73825  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
73826  if (!SWIG_IsOK(res3)) {
73827  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "3"" of type '" "float const *""'");
73828  }
73829  arg3 = reinterpret_cast< float * >(argp3);
73830  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
73831  if (!SWIG_IsOK(res4)) {
73832  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "4"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
73833  }
73834  arg4 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp4);
73835  {
73836  Py_BEGIN_ALLOW_THREADS
73837  try {
73838  (arg1)->set_groundtruth(arg2,(float const *)arg3,(faiss::AutoTuneCriterion::idx_t const *)arg4);
73839  } catch(faiss::FaissException & e) {
73840  PyEval_RestoreThread(_save);
73841  PyErr_SetString(PyExc_RuntimeError, e.what());
73842  SWIG_fail;
73843  }
73844  Py_END_ALLOW_THREADS
73845  }
73846  resultobj = SWIG_Py_Void();
73847  return resultobj;
73848 fail:
73849  return NULL;
73850 }
73851 
73852 
73853 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73854  PyObject *resultobj = 0;
73856  float *arg2 = (float *) 0 ;
73857  faiss::AutoTuneCriterion::idx_t *arg3 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
73858  void *argp1 = 0 ;
73859  int res1 = 0 ;
73860  void *argp2 = 0 ;
73861  int res2 = 0 ;
73862  void *argp3 = 0 ;
73863  int res3 = 0 ;
73864  PyObject * obj0 = 0 ;
73865  PyObject * obj1 = 0 ;
73866  PyObject * obj2 = 0 ;
73867  double result;
73868 
73869  if (!PyArg_ParseTuple(args,(char *)"OOO:AutoTuneCriterion_evaluate",&obj0,&obj1,&obj2)) SWIG_fail;
73870  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
73871  if (!SWIG_IsOK(res1)) {
73872  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_evaluate" "', argument " "1"" of type '" "faiss::AutoTuneCriterion const *""'");
73873  }
73874  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73875  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
73876  if (!SWIG_IsOK(res2)) {
73877  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoTuneCriterion_evaluate" "', argument " "2"" of type '" "float const *""'");
73878  }
73879  arg2 = reinterpret_cast< float * >(argp2);
73880  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
73881  if (!SWIG_IsOK(res3)) {
73882  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoTuneCriterion_evaluate" "', argument " "3"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
73883  }
73884  arg3 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp3);
73885  {
73886  Py_BEGIN_ALLOW_THREADS
73887  try {
73888  result = (double)((faiss::AutoTuneCriterion const *)arg1)->evaluate((float const *)arg2,(faiss::AutoTuneCriterion::idx_t const *)arg3);
73889  } catch(faiss::FaissException & e) {
73890  PyEval_RestoreThread(_save);
73891  PyErr_SetString(PyExc_RuntimeError, e.what());
73892  SWIG_fail;
73893  }
73894  Py_END_ALLOW_THREADS
73895  }
73896  resultobj = SWIG_From_double(static_cast< double >(result));
73897  return resultobj;
73898 fail:
73899  return NULL;
73900 }
73901 
73902 
73903 SWIGINTERN PyObject *_wrap_delete_AutoTuneCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73904  PyObject *resultobj = 0;
73906  void *argp1 = 0 ;
73907  int res1 = 0 ;
73908  PyObject * obj0 = 0 ;
73909 
73910  if (!PyArg_ParseTuple(args,(char *)"O:delete_AutoTuneCriterion",&obj0)) SWIG_fail;
73911  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, SWIG_POINTER_DISOWN | 0 );
73912  if (!SWIG_IsOK(res1)) {
73913  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AutoTuneCriterion" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
73914  }
73915  arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
73916  {
73917  Py_BEGIN_ALLOW_THREADS
73918  try {
73919  delete arg1;
73920  } catch(faiss::FaissException & e) {
73921  PyEval_RestoreThread(_save);
73922  PyErr_SetString(PyExc_RuntimeError, e.what());
73923  SWIG_fail;
73924  }
73925  Py_END_ALLOW_THREADS
73926  }
73927  resultobj = SWIG_Py_Void();
73928  return resultobj;
73929 fail:
73930  return NULL;
73931 }
73932 
73933 
73934 SWIGINTERN PyObject *AutoTuneCriterion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73935  PyObject *obj;
73936  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
73937  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__AutoTuneCriterion, SWIG_NewClientData(obj));
73938  return SWIG_Py_Void();
73939 }
73940 
73941 SWIGINTERN PyObject *_wrap_OneRecallAtRCriterion_R_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73942  PyObject *resultobj = 0;
73944  faiss::AutoTuneCriterion::idx_t arg2 ;
73945  void *argp1 = 0 ;
73946  int res1 = 0 ;
73947  long val2 ;
73948  int ecode2 = 0 ;
73949  PyObject * obj0 = 0 ;
73950  PyObject * obj1 = 0 ;
73951 
73952  if (!PyArg_ParseTuple(args,(char *)"OO:OneRecallAtRCriterion_R_set",&obj0,&obj1)) SWIG_fail;
73953  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, 0 | 0 );
73954  if (!SWIG_IsOK(res1)) {
73955  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OneRecallAtRCriterion_R_set" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion *""'");
73956  }
73957  arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
73958  ecode2 = SWIG_AsVal_long(obj1, &val2);
73959  if (!SWIG_IsOK(ecode2)) {
73960  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OneRecallAtRCriterion_R_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
73961  }
73962  arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
73963  if (arg1) (arg1)->R = arg2;
73964  resultobj = SWIG_Py_Void();
73965  return resultobj;
73966 fail:
73967  return NULL;
73968 }
73969 
73970 
73971 SWIGINTERN PyObject *_wrap_OneRecallAtRCriterion_R_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73972  PyObject *resultobj = 0;
73974  void *argp1 = 0 ;
73975  int res1 = 0 ;
73976  PyObject * obj0 = 0 ;
73977  faiss::AutoTuneCriterion::idx_t result;
73978 
73979  if (!PyArg_ParseTuple(args,(char *)"O:OneRecallAtRCriterion_R_get",&obj0)) SWIG_fail;
73980  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, 0 | 0 );
73981  if (!SWIG_IsOK(res1)) {
73982  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OneRecallAtRCriterion_R_get" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion *""'");
73983  }
73984  arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
73985  result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->R);
73986  resultobj = SWIG_From_long(static_cast< long >(result));
73987  return resultobj;
73988 fail:
73989  return NULL;
73990 }
73991 
73992 
73993 SWIGINTERN PyObject *_wrap_new_OneRecallAtRCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73994  PyObject *resultobj = 0;
73995  faiss::AutoTuneCriterion::idx_t arg1 ;
73996  faiss::AutoTuneCriterion::idx_t arg2 ;
73997  long val1 ;
73998  int ecode1 = 0 ;
73999  long val2 ;
74000  int ecode2 = 0 ;
74001  PyObject * obj0 = 0 ;
74002  PyObject * obj1 = 0 ;
74003  faiss::OneRecallAtRCriterion *result = 0 ;
74004 
74005  if (!PyArg_ParseTuple(args,(char *)"OO:new_OneRecallAtRCriterion",&obj0,&obj1)) SWIG_fail;
74006  ecode1 = SWIG_AsVal_long(obj0, &val1);
74007  if (!SWIG_IsOK(ecode1)) {
74008  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OneRecallAtRCriterion" "', argument " "1"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
74009  }
74010  arg1 = static_cast< faiss::AutoTuneCriterion::idx_t >(val1);
74011  ecode2 = SWIG_AsVal_long(obj1, &val2);
74012  if (!SWIG_IsOK(ecode2)) {
74013  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OneRecallAtRCriterion" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
74014  }
74015  arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
74016  {
74017  Py_BEGIN_ALLOW_THREADS
74018  try {
74020  } catch(faiss::FaissException & e) {
74021  PyEval_RestoreThread(_save);
74022  PyErr_SetString(PyExc_RuntimeError, e.what());
74023  SWIG_fail;
74024  }
74025  Py_END_ALLOW_THREADS
74026  }
74027  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OneRecallAtRCriterion, SWIG_POINTER_NEW | 0 );
74028  return resultobj;
74029 fail:
74030  return NULL;
74031 }
74032 
74033 
74034 SWIGINTERN PyObject *_wrap_OneRecallAtRCriterion_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74035  PyObject *resultobj = 0;
74037  float *arg2 = (float *) 0 ;
74038  faiss::AutoTuneCriterion::idx_t *arg3 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
74039  void *argp1 = 0 ;
74040  int res1 = 0 ;
74041  void *argp2 = 0 ;
74042  int res2 = 0 ;
74043  void *argp3 = 0 ;
74044  int res3 = 0 ;
74045  PyObject * obj0 = 0 ;
74046  PyObject * obj1 = 0 ;
74047  PyObject * obj2 = 0 ;
74048  double result;
74049 
74050  if (!PyArg_ParseTuple(args,(char *)"OOO:OneRecallAtRCriterion_evaluate",&obj0,&obj1,&obj2)) SWIG_fail;
74051  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, 0 | 0 );
74052  if (!SWIG_IsOK(res1)) {
74053  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OneRecallAtRCriterion_evaluate" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion const *""'");
74054  }
74055  arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
74056  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
74057  if (!SWIG_IsOK(res2)) {
74058  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OneRecallAtRCriterion_evaluate" "', argument " "2"" of type '" "float const *""'");
74059  }
74060  arg2 = reinterpret_cast< float * >(argp2);
74061  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
74062  if (!SWIG_IsOK(res3)) {
74063  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "OneRecallAtRCriterion_evaluate" "', argument " "3"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
74064  }
74065  arg3 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp3);
74066  {
74067  Py_BEGIN_ALLOW_THREADS
74068  try {
74069  result = (double)((faiss::OneRecallAtRCriterion const *)arg1)->evaluate((float const *)arg2,(faiss::AutoTuneCriterion::idx_t const *)arg3);
74070  } catch(faiss::FaissException & e) {
74071  PyEval_RestoreThread(_save);
74072  PyErr_SetString(PyExc_RuntimeError, e.what());
74073  SWIG_fail;
74074  }
74075  Py_END_ALLOW_THREADS
74076  }
74077  resultobj = SWIG_From_double(static_cast< double >(result));
74078  return resultobj;
74079 fail:
74080  return NULL;
74081 }
74082 
74083 
74084 SWIGINTERN PyObject *_wrap_delete_OneRecallAtRCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74085  PyObject *resultobj = 0;
74087  void *argp1 = 0 ;
74088  int res1 = 0 ;
74089  PyObject * obj0 = 0 ;
74090 
74091  if (!PyArg_ParseTuple(args,(char *)"O:delete_OneRecallAtRCriterion",&obj0)) SWIG_fail;
74092  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, SWIG_POINTER_DISOWN | 0 );
74093  if (!SWIG_IsOK(res1)) {
74094  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OneRecallAtRCriterion" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion *""'");
74095  }
74096  arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
74097  {
74098  Py_BEGIN_ALLOW_THREADS
74099  try {
74100  delete arg1;
74101  } catch(faiss::FaissException & e) {
74102  PyEval_RestoreThread(_save);
74103  PyErr_SetString(PyExc_RuntimeError, e.what());
74104  SWIG_fail;
74105  }
74106  Py_END_ALLOW_THREADS
74107  }
74108  resultobj = SWIG_Py_Void();
74109  return resultobj;
74110 fail:
74111  return NULL;
74112 }
74113 
74114 
74115 SWIGINTERN PyObject *OneRecallAtRCriterion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74116  PyObject *obj;
74117  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
74118  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OneRecallAtRCriterion, SWIG_NewClientData(obj));
74119  return SWIG_Py_Void();
74120 }
74121 
74122 SWIGINTERN PyObject *_wrap_IntersectionCriterion_R_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74123  PyObject *resultobj = 0;
74125  faiss::AutoTuneCriterion::idx_t arg2 ;
74126  void *argp1 = 0 ;
74127  int res1 = 0 ;
74128  long val2 ;
74129  int ecode2 = 0 ;
74130  PyObject * obj0 = 0 ;
74131  PyObject * obj1 = 0 ;
74132 
74133  if (!PyArg_ParseTuple(args,(char *)"OO:IntersectionCriterion_R_set",&obj0,&obj1)) SWIG_fail;
74134  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, 0 | 0 );
74135  if (!SWIG_IsOK(res1)) {
74136  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntersectionCriterion_R_set" "', argument " "1"" of type '" "faiss::IntersectionCriterion *""'");
74137  }
74138  arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
74139  ecode2 = SWIG_AsVal_long(obj1, &val2);
74140  if (!SWIG_IsOK(ecode2)) {
74141  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntersectionCriterion_R_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
74142  }
74143  arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
74144  if (arg1) (arg1)->R = arg2;
74145  resultobj = SWIG_Py_Void();
74146  return resultobj;
74147 fail:
74148  return NULL;
74149 }
74150 
74151 
74152 SWIGINTERN PyObject *_wrap_IntersectionCriterion_R_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74153  PyObject *resultobj = 0;
74155  void *argp1 = 0 ;
74156  int res1 = 0 ;
74157  PyObject * obj0 = 0 ;
74158  faiss::AutoTuneCriterion::idx_t result;
74159 
74160  if (!PyArg_ParseTuple(args,(char *)"O:IntersectionCriterion_R_get",&obj0)) SWIG_fail;
74161  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, 0 | 0 );
74162  if (!SWIG_IsOK(res1)) {
74163  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntersectionCriterion_R_get" "', argument " "1"" of type '" "faiss::IntersectionCriterion *""'");
74164  }
74165  arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
74166  result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->R);
74167  resultobj = SWIG_From_long(static_cast< long >(result));
74168  return resultobj;
74169 fail:
74170  return NULL;
74171 }
74172 
74173 
74174 SWIGINTERN PyObject *_wrap_new_IntersectionCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74175  PyObject *resultobj = 0;
74176  faiss::AutoTuneCriterion::idx_t arg1 ;
74177  faiss::AutoTuneCriterion::idx_t arg2 ;
74178  long val1 ;
74179  int ecode1 = 0 ;
74180  long val2 ;
74181  int ecode2 = 0 ;
74182  PyObject * obj0 = 0 ;
74183  PyObject * obj1 = 0 ;
74184  faiss::IntersectionCriterion *result = 0 ;
74185 
74186  if (!PyArg_ParseTuple(args,(char *)"OO:new_IntersectionCriterion",&obj0,&obj1)) SWIG_fail;
74187  ecode1 = SWIG_AsVal_long(obj0, &val1);
74188  if (!SWIG_IsOK(ecode1)) {
74189  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntersectionCriterion" "', argument " "1"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
74190  }
74191  arg1 = static_cast< faiss::AutoTuneCriterion::idx_t >(val1);
74192  ecode2 = SWIG_AsVal_long(obj1, &val2);
74193  if (!SWIG_IsOK(ecode2)) {
74194  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntersectionCriterion" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
74195  }
74196  arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
74197  {
74198  Py_BEGIN_ALLOW_THREADS
74199  try {
74201  } catch(faiss::FaissException & e) {
74202  PyEval_RestoreThread(_save);
74203  PyErr_SetString(PyExc_RuntimeError, e.what());
74204  SWIG_fail;
74205  }
74206  Py_END_ALLOW_THREADS
74207  }
74208  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IntersectionCriterion, SWIG_POINTER_NEW | 0 );
74209  return resultobj;
74210 fail:
74211  return NULL;
74212 }
74213 
74214 
74215 SWIGINTERN PyObject *_wrap_IntersectionCriterion_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74216  PyObject *resultobj = 0;
74218  float *arg2 = (float *) 0 ;
74219  faiss::AutoTuneCriterion::idx_t *arg3 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
74220  void *argp1 = 0 ;
74221  int res1 = 0 ;
74222  void *argp2 = 0 ;
74223  int res2 = 0 ;
74224  void *argp3 = 0 ;
74225  int res3 = 0 ;
74226  PyObject * obj0 = 0 ;
74227  PyObject * obj1 = 0 ;
74228  PyObject * obj2 = 0 ;
74229  double result;
74230 
74231  if (!PyArg_ParseTuple(args,(char *)"OOO:IntersectionCriterion_evaluate",&obj0,&obj1,&obj2)) SWIG_fail;
74232  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, 0 | 0 );
74233  if (!SWIG_IsOK(res1)) {
74234  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntersectionCriterion_evaluate" "', argument " "1"" of type '" "faiss::IntersectionCriterion const *""'");
74235  }
74236  arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
74237  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
74238  if (!SWIG_IsOK(res2)) {
74239  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntersectionCriterion_evaluate" "', argument " "2"" of type '" "float const *""'");
74240  }
74241  arg2 = reinterpret_cast< float * >(argp2);
74242  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
74243  if (!SWIG_IsOK(res3)) {
74244  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntersectionCriterion_evaluate" "', argument " "3"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
74245  }
74246  arg3 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp3);
74247  {
74248  Py_BEGIN_ALLOW_THREADS
74249  try {
74250  result = (double)((faiss::IntersectionCriterion const *)arg1)->evaluate((float const *)arg2,(faiss::AutoTuneCriterion::idx_t const *)arg3);
74251  } catch(faiss::FaissException & e) {
74252  PyEval_RestoreThread(_save);
74253  PyErr_SetString(PyExc_RuntimeError, e.what());
74254  SWIG_fail;
74255  }
74256  Py_END_ALLOW_THREADS
74257  }
74258  resultobj = SWIG_From_double(static_cast< double >(result));
74259  return resultobj;
74260 fail:
74261  return NULL;
74262 }
74263 
74264 
74265 SWIGINTERN PyObject *_wrap_delete_IntersectionCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74266  PyObject *resultobj = 0;
74268  void *argp1 = 0 ;
74269  int res1 = 0 ;
74270  PyObject * obj0 = 0 ;
74271 
74272  if (!PyArg_ParseTuple(args,(char *)"O:delete_IntersectionCriterion",&obj0)) SWIG_fail;
74273  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, SWIG_POINTER_DISOWN | 0 );
74274  if (!SWIG_IsOK(res1)) {
74275  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntersectionCriterion" "', argument " "1"" of type '" "faiss::IntersectionCriterion *""'");
74276  }
74277  arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
74278  {
74279  Py_BEGIN_ALLOW_THREADS
74280  try {
74281  delete arg1;
74282  } catch(faiss::FaissException & e) {
74283  PyEval_RestoreThread(_save);
74284  PyErr_SetString(PyExc_RuntimeError, e.what());
74285  SWIG_fail;
74286  }
74287  Py_END_ALLOW_THREADS
74288  }
74289  resultobj = SWIG_Py_Void();
74290  return resultobj;
74291 fail:
74292  return NULL;
74293 }
74294 
74295 
74296 SWIGINTERN PyObject *IntersectionCriterion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74297  PyObject *obj;
74298  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
74299  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IntersectionCriterion, SWIG_NewClientData(obj));
74300  return SWIG_Py_Void();
74301 }
74302 
74303 SWIGINTERN PyObject *_wrap_OperatingPoint_perf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74304  PyObject *resultobj = 0;
74306  double arg2 ;
74307  void *argp1 = 0 ;
74308  int res1 = 0 ;
74309  double val2 ;
74310  int ecode2 = 0 ;
74311  PyObject * obj0 = 0 ;
74312  PyObject * obj1 = 0 ;
74313 
74314  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_perf_set",&obj0,&obj1)) SWIG_fail;
74315  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74316  if (!SWIG_IsOK(res1)) {
74317  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_perf_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74318  }
74319  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74320  ecode2 = SWIG_AsVal_double(obj1, &val2);
74321  if (!SWIG_IsOK(ecode2)) {
74322  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoint_perf_set" "', argument " "2"" of type '" "double""'");
74323  }
74324  arg2 = static_cast< double >(val2);
74325  if (arg1) (arg1)->perf = arg2;
74326  resultobj = SWIG_Py_Void();
74327  return resultobj;
74328 fail:
74329  return NULL;
74330 }
74331 
74332 
74333 SWIGINTERN PyObject *_wrap_OperatingPoint_perf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74334  PyObject *resultobj = 0;
74336  void *argp1 = 0 ;
74337  int res1 = 0 ;
74338  PyObject * obj0 = 0 ;
74339  double result;
74340 
74341  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_perf_get",&obj0)) SWIG_fail;
74342  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74343  if (!SWIG_IsOK(res1)) {
74344  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_perf_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74345  }
74346  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74347  result = (double) ((arg1)->perf);
74348  resultobj = SWIG_From_double(static_cast< double >(result));
74349  return resultobj;
74350 fail:
74351  return NULL;
74352 }
74353 
74354 
74355 SWIGINTERN PyObject *_wrap_OperatingPoint_t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74356  PyObject *resultobj = 0;
74358  double arg2 ;
74359  void *argp1 = 0 ;
74360  int res1 = 0 ;
74361  double val2 ;
74362  int ecode2 = 0 ;
74363  PyObject * obj0 = 0 ;
74364  PyObject * obj1 = 0 ;
74365 
74366  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_t_set",&obj0,&obj1)) SWIG_fail;
74367  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74368  if (!SWIG_IsOK(res1)) {
74369  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_t_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74370  }
74371  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74372  ecode2 = SWIG_AsVal_double(obj1, &val2);
74373  if (!SWIG_IsOK(ecode2)) {
74374  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoint_t_set" "', argument " "2"" of type '" "double""'");
74375  }
74376  arg2 = static_cast< double >(val2);
74377  if (arg1) (arg1)->t = arg2;
74378  resultobj = SWIG_Py_Void();
74379  return resultobj;
74380 fail:
74381  return NULL;
74382 }
74383 
74384 
74385 SWIGINTERN PyObject *_wrap_OperatingPoint_t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74386  PyObject *resultobj = 0;
74388  void *argp1 = 0 ;
74389  int res1 = 0 ;
74390  PyObject * obj0 = 0 ;
74391  double result;
74392 
74393  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_t_get",&obj0)) SWIG_fail;
74394  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74395  if (!SWIG_IsOK(res1)) {
74396  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_t_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74397  }
74398  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74399  result = (double) ((arg1)->t);
74400  resultobj = SWIG_From_double(static_cast< double >(result));
74401  return resultobj;
74402 fail:
74403  return NULL;
74404 }
74405 
74406 
74407 SWIGINTERN PyObject *_wrap_OperatingPoint_key_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74408  PyObject *resultobj = 0;
74410  std::string *arg2 = 0 ;
74411  void *argp1 = 0 ;
74412  int res1 = 0 ;
74413  int res2 = SWIG_OLDOBJ ;
74414  PyObject * obj0 = 0 ;
74415  PyObject * obj1 = 0 ;
74416 
74417  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_key_set",&obj0,&obj1)) SWIG_fail;
74418  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74419  if (!SWIG_IsOK(res1)) {
74420  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_key_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74421  }
74422  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74423  {
74424  std::string *ptr = (std::string *)0;
74425  res2 = SWIG_AsPtr_std_string(obj1, &ptr);
74426  if (!SWIG_IsOK(res2)) {
74427  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoint_key_set" "', argument " "2"" of type '" "std::string const &""'");
74428  }
74429  if (!ptr) {
74430  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoint_key_set" "', argument " "2"" of type '" "std::string const &""'");
74431  }
74432  arg2 = ptr;
74433  }
74434  if (arg1) (arg1)->key = *arg2;
74435  resultobj = SWIG_Py_Void();
74436  if (SWIG_IsNewObj(res2)) delete arg2;
74437  return resultobj;
74438 fail:
74439  if (SWIG_IsNewObj(res2)) delete arg2;
74440  return NULL;
74441 }
74442 
74443 
74444 SWIGINTERN PyObject *_wrap_OperatingPoint_key_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74445  PyObject *resultobj = 0;
74447  void *argp1 = 0 ;
74448  int res1 = 0 ;
74449  PyObject * obj0 = 0 ;
74450  std::string *result = 0 ;
74451 
74452  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_key_get",&obj0)) SWIG_fail;
74453  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74454  if (!SWIG_IsOK(res1)) {
74455  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_key_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74456  }
74457  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74458  result = (std::string *) & ((arg1)->key);
74459  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
74460  return resultobj;
74461 fail:
74462  return NULL;
74463 }
74464 
74465 
74466 SWIGINTERN PyObject *_wrap_OperatingPoint_cno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74467  PyObject *resultobj = 0;
74469  long arg2 ;
74470  void *argp1 = 0 ;
74471  int res1 = 0 ;
74472  long val2 ;
74473  int ecode2 = 0 ;
74474  PyObject * obj0 = 0 ;
74475  PyObject * obj1 = 0 ;
74476 
74477  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_cno_set",&obj0,&obj1)) SWIG_fail;
74478  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74479  if (!SWIG_IsOK(res1)) {
74480  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_cno_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74481  }
74482  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74483  ecode2 = SWIG_AsVal_long(obj1, &val2);
74484  if (!SWIG_IsOK(ecode2)) {
74485  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoint_cno_set" "', argument " "2"" of type '" "long""'");
74486  }
74487  arg2 = static_cast< long >(val2);
74488  if (arg1) (arg1)->cno = arg2;
74489  resultobj = SWIG_Py_Void();
74490  return resultobj;
74491 fail:
74492  return NULL;
74493 }
74494 
74495 
74496 SWIGINTERN PyObject *_wrap_OperatingPoint_cno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74497  PyObject *resultobj = 0;
74499  void *argp1 = 0 ;
74500  int res1 = 0 ;
74501  PyObject * obj0 = 0 ;
74502  long result;
74503 
74504  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_cno_get",&obj0)) SWIG_fail;
74505  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
74506  if (!SWIG_IsOK(res1)) {
74507  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_cno_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74508  }
74509  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74510  result = (long) ((arg1)->cno);
74511  resultobj = SWIG_From_long(static_cast< long >(result));
74512  return resultobj;
74513 fail:
74514  return NULL;
74515 }
74516 
74517 
74518 SWIGINTERN PyObject *_wrap_new_OperatingPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74519  PyObject *resultobj = 0;
74520  faiss::OperatingPoint *result = 0 ;
74521 
74522  if (!PyArg_ParseTuple(args,(char *)":new_OperatingPoint")) SWIG_fail;
74523  result = (faiss::OperatingPoint *)new faiss::OperatingPoint();
74524  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OperatingPoint, SWIG_POINTER_NEW | 0 );
74525  return resultobj;
74526 fail:
74527  return NULL;
74528 }
74529 
74530 
74531 SWIGINTERN PyObject *_wrap_delete_OperatingPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74532  PyObject *resultobj = 0;
74534  void *argp1 = 0 ;
74535  int res1 = 0 ;
74536  PyObject * obj0 = 0 ;
74537 
74538  if (!PyArg_ParseTuple(args,(char *)"O:delete_OperatingPoint",&obj0)) SWIG_fail;
74539  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, SWIG_POINTER_DISOWN | 0 );
74540  if (!SWIG_IsOK(res1)) {
74541  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OperatingPoint" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
74542  }
74543  arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
74544  delete arg1;
74545  resultobj = SWIG_Py_Void();
74546  return resultobj;
74547 fail:
74548  return NULL;
74549 }
74550 
74551 
74552 SWIGINTERN PyObject *OperatingPoint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74553  PyObject *obj;
74554  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
74555  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OperatingPoint, SWIG_NewClientData(obj));
74556  return SWIG_Py_Void();
74557 }
74558 
74559 SWIGINTERN PyObject *_wrap_OperatingPoints_all_pts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74560  PyObject *resultobj = 0;
74562  std::vector< faiss::OperatingPoint > *arg2 = (std::vector< faiss::OperatingPoint > *) 0 ;
74563  void *argp1 = 0 ;
74564  int res1 = 0 ;
74565  void *argp2 = 0 ;
74566  int res2 = 0 ;
74567  PyObject * obj0 = 0 ;
74568  PyObject * obj1 = 0 ;
74569 
74570  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_all_pts_set",&obj0,&obj1)) SWIG_fail;
74571  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74572  if (!SWIG_IsOK(res1)) {
74573  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_all_pts_set" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74574  }
74575  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74576  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
74577  if (!SWIG_IsOK(res2)) {
74578  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_all_pts_set" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > *""'");
74579  }
74580  arg2 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp2);
74581  if (arg1) (arg1)->all_pts = *arg2;
74582  resultobj = SWIG_Py_Void();
74583  return resultobj;
74584 fail:
74585  return NULL;
74586 }
74587 
74588 
74589 SWIGINTERN PyObject *_wrap_OperatingPoints_all_pts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74590  PyObject *resultobj = 0;
74592  void *argp1 = 0 ;
74593  int res1 = 0 ;
74594  PyObject * obj0 = 0 ;
74595  std::vector< faiss::OperatingPoint > *result = 0 ;
74596 
74597  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_all_pts_get",&obj0)) SWIG_fail;
74598  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74599  if (!SWIG_IsOK(res1)) {
74600  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_all_pts_get" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74601  }
74602  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74603  result = (std::vector< faiss::OperatingPoint > *)& ((arg1)->all_pts);
74604  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
74605  return resultobj;
74606 fail:
74607  return NULL;
74608 }
74609 
74610 
74611 SWIGINTERN PyObject *_wrap_OperatingPoints_optimal_pts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74612  PyObject *resultobj = 0;
74614  std::vector< faiss::OperatingPoint > *arg2 = (std::vector< faiss::OperatingPoint > *) 0 ;
74615  void *argp1 = 0 ;
74616  int res1 = 0 ;
74617  void *argp2 = 0 ;
74618  int res2 = 0 ;
74619  PyObject * obj0 = 0 ;
74620  PyObject * obj1 = 0 ;
74621 
74622  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_optimal_pts_set",&obj0,&obj1)) SWIG_fail;
74623  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74624  if (!SWIG_IsOK(res1)) {
74625  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_optimal_pts_set" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74626  }
74627  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74628  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
74629  if (!SWIG_IsOK(res2)) {
74630  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_optimal_pts_set" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > *""'");
74631  }
74632  arg2 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp2);
74633  if (arg1) (arg1)->optimal_pts = *arg2;
74634  resultobj = SWIG_Py_Void();
74635  return resultobj;
74636 fail:
74637  return NULL;
74638 }
74639 
74640 
74641 SWIGINTERN PyObject *_wrap_OperatingPoints_optimal_pts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74642  PyObject *resultobj = 0;
74644  void *argp1 = 0 ;
74645  int res1 = 0 ;
74646  PyObject * obj0 = 0 ;
74647  std::vector< faiss::OperatingPoint > *result = 0 ;
74648 
74649  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_optimal_pts_get",&obj0)) SWIG_fail;
74650  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74651  if (!SWIG_IsOK(res1)) {
74652  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_optimal_pts_get" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74653  }
74654  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74655  result = (std::vector< faiss::OperatingPoint > *)& ((arg1)->optimal_pts);
74656  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
74657  return resultobj;
74658 fail:
74659  return NULL;
74660 }
74661 
74662 
74663 SWIGINTERN PyObject *_wrap_new_OperatingPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74664  PyObject *resultobj = 0;
74665  faiss::OperatingPoints *result = 0 ;
74666 
74667  if (!PyArg_ParseTuple(args,(char *)":new_OperatingPoints")) SWIG_fail;
74668  {
74669  Py_BEGIN_ALLOW_THREADS
74670  try {
74672  } catch(faiss::FaissException & e) {
74673  PyEval_RestoreThread(_save);
74674  PyErr_SetString(PyExc_RuntimeError, e.what());
74675  SWIG_fail;
74676  }
74677  Py_END_ALLOW_THREADS
74678  }
74679  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OperatingPoints, SWIG_POINTER_NEW | 0 );
74680  return resultobj;
74681 fail:
74682  return NULL;
74683 }
74684 
74685 
74686 SWIGINTERN PyObject *_wrap_OperatingPoints_merge_with__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74687  PyObject *resultobj = 0;
74689  faiss::OperatingPoints *arg2 = 0 ;
74690  std::string *arg3 = 0 ;
74691  void *argp1 = 0 ;
74692  int res1 = 0 ;
74693  void *argp2 = 0 ;
74694  int res2 = 0 ;
74695  int res3 = SWIG_OLDOBJ ;
74696  PyObject * obj0 = 0 ;
74697  PyObject * obj1 = 0 ;
74698  PyObject * obj2 = 0 ;
74699  int result;
74700 
74701  if (!PyArg_ParseTuple(args,(char *)"OOO:OperatingPoints_merge_with",&obj0,&obj1,&obj2)) SWIG_fail;
74702  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74703  if (!SWIG_IsOK(res1)) {
74704  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_merge_with" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74705  }
74706  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74707  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__OperatingPoints, 0 | 0);
74708  if (!SWIG_IsOK(res2)) {
74709  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
74710  }
74711  if (!argp2) {
74712  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
74713  }
74714  arg2 = reinterpret_cast< faiss::OperatingPoints * >(argp2);
74715  {
74716  std::string *ptr = (std::string *)0;
74717  res3 = SWIG_AsPtr_std_string(obj2, &ptr);
74718  if (!SWIG_IsOK(res3)) {
74719  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "OperatingPoints_merge_with" "', argument " "3"" of type '" "std::string const &""'");
74720  }
74721  if (!ptr) {
74722  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_merge_with" "', argument " "3"" of type '" "std::string const &""'");
74723  }
74724  arg3 = ptr;
74725  }
74726  {
74727  Py_BEGIN_ALLOW_THREADS
74728  try {
74729  result = (int)(arg1)->merge_with((faiss::OperatingPoints const &)*arg2,(std::string const &)*arg3);
74730  } catch(faiss::FaissException & e) {
74731  PyEval_RestoreThread(_save);
74732  PyErr_SetString(PyExc_RuntimeError, e.what());
74733  SWIG_fail;
74734  }
74735  Py_END_ALLOW_THREADS
74736  }
74737  resultobj = SWIG_From_int(static_cast< int >(result));
74738  if (SWIG_IsNewObj(res3)) delete arg3;
74739  return resultobj;
74740 fail:
74741  if (SWIG_IsNewObj(res3)) delete arg3;
74742  return NULL;
74743 }
74744 
74745 
74746 SWIGINTERN PyObject *_wrap_OperatingPoints_merge_with__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74747  PyObject *resultobj = 0;
74749  faiss::OperatingPoints *arg2 = 0 ;
74750  void *argp1 = 0 ;
74751  int res1 = 0 ;
74752  void *argp2 = 0 ;
74753  int res2 = 0 ;
74754  PyObject * obj0 = 0 ;
74755  PyObject * obj1 = 0 ;
74756  int result;
74757 
74758  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_merge_with",&obj0,&obj1)) SWIG_fail;
74759  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74760  if (!SWIG_IsOK(res1)) {
74761  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_merge_with" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74762  }
74763  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74764  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__OperatingPoints, 0 | 0);
74765  if (!SWIG_IsOK(res2)) {
74766  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
74767  }
74768  if (!argp2) {
74769  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
74770  }
74771  arg2 = reinterpret_cast< faiss::OperatingPoints * >(argp2);
74772  {
74773  Py_BEGIN_ALLOW_THREADS
74774  try {
74775  result = (int)(arg1)->merge_with((faiss::OperatingPoints const &)*arg2);
74776  } catch(faiss::FaissException & e) {
74777  PyEval_RestoreThread(_save);
74778  PyErr_SetString(PyExc_RuntimeError, e.what());
74779  SWIG_fail;
74780  }
74781  Py_END_ALLOW_THREADS
74782  }
74783  resultobj = SWIG_From_int(static_cast< int >(result));
74784  return resultobj;
74785 fail:
74786  return NULL;
74787 }
74788 
74789 
74790 SWIGINTERN PyObject *_wrap_OperatingPoints_merge_with(PyObject *self, PyObject *args) {
74791  Py_ssize_t argc;
74792  PyObject *argv[4] = {
74793  0
74794  };
74795  Py_ssize_t ii;
74796 
74797  if (!PyTuple_Check(args)) SWIG_fail;
74798  argc = args ? PyObject_Length(args) : 0;
74799  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
74800  argv[ii] = PyTuple_GET_ITEM(args,ii);
74801  }
74802  if (argc == 2) {
74803  int _v;
74804  void *vptr = 0;
74805  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
74806  _v = SWIG_CheckState(res);
74807  if (_v) {
74808  int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_faiss__OperatingPoints, 0);
74809  _v = SWIG_CheckState(res);
74810  if (_v) {
74811  return _wrap_OperatingPoints_merge_with__SWIG_1(self, args);
74812  }
74813  }
74814  }
74815  if (argc == 3) {
74816  int _v;
74817  void *vptr = 0;
74818  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
74819  _v = SWIG_CheckState(res);
74820  if (_v) {
74821  int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_faiss__OperatingPoints, 0);
74822  _v = SWIG_CheckState(res);
74823  if (_v) {
74824  int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
74825  _v = SWIG_CheckState(res);
74826  if (_v) {
74827  return _wrap_OperatingPoints_merge_with__SWIG_0(self, args);
74828  }
74829  }
74830  }
74831  }
74832 
74833 fail:
74834  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OperatingPoints_merge_with'.\n"
74835  " Possible C/C++ prototypes are:\n"
74836  " faiss::OperatingPoints::merge_with(faiss::OperatingPoints const &,std::string const &)\n"
74837  " faiss::OperatingPoints::merge_with(faiss::OperatingPoints const &)\n");
74838  return 0;
74839 }
74840 
74841 
74842 SWIGINTERN PyObject *_wrap_OperatingPoints_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74843  PyObject *resultobj = 0;
74845  void *argp1 = 0 ;
74846  int res1 = 0 ;
74847  PyObject * obj0 = 0 ;
74848 
74849  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_clear",&obj0)) SWIG_fail;
74850  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74851  if (!SWIG_IsOK(res1)) {
74852  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_clear" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74853  }
74854  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74855  {
74856  Py_BEGIN_ALLOW_THREADS
74857  try {
74858  (arg1)->clear();
74859  } catch(faiss::FaissException & e) {
74860  PyEval_RestoreThread(_save);
74861  PyErr_SetString(PyExc_RuntimeError, e.what());
74862  SWIG_fail;
74863  }
74864  Py_END_ALLOW_THREADS
74865  }
74866  resultobj = SWIG_Py_Void();
74867  return resultobj;
74868 fail:
74869  return NULL;
74870 }
74871 
74872 
74873 SWIGINTERN PyObject *_wrap_OperatingPoints_add__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74874  PyObject *resultobj = 0;
74876  double arg2 ;
74877  double arg3 ;
74878  std::string *arg4 = 0 ;
74879  size_t arg5 ;
74880  void *argp1 = 0 ;
74881  int res1 = 0 ;
74882  double val2 ;
74883  int ecode2 = 0 ;
74884  double val3 ;
74885  int ecode3 = 0 ;
74886  int res4 = SWIG_OLDOBJ ;
74887  size_t val5 ;
74888  int ecode5 = 0 ;
74889  PyObject * obj0 = 0 ;
74890  PyObject * obj1 = 0 ;
74891  PyObject * obj2 = 0 ;
74892  PyObject * obj3 = 0 ;
74893  PyObject * obj4 = 0 ;
74894  bool result;
74895 
74896  if (!PyArg_ParseTuple(args,(char *)"OOOOO:OperatingPoints_add",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
74897  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74898  if (!SWIG_IsOK(res1)) {
74899  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_add" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74900  }
74901  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74902  ecode2 = SWIG_AsVal_double(obj1, &val2);
74903  if (!SWIG_IsOK(ecode2)) {
74904  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_add" "', argument " "2"" of type '" "double""'");
74905  }
74906  arg2 = static_cast< double >(val2);
74907  ecode3 = SWIG_AsVal_double(obj2, &val3);
74908  if (!SWIG_IsOK(ecode3)) {
74909  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OperatingPoints_add" "', argument " "3"" of type '" "double""'");
74910  }
74911  arg3 = static_cast< double >(val3);
74912  {
74913  std::string *ptr = (std::string *)0;
74914  res4 = SWIG_AsPtr_std_string(obj3, &ptr);
74915  if (!SWIG_IsOK(res4)) {
74916  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
74917  }
74918  if (!ptr) {
74919  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
74920  }
74921  arg4 = ptr;
74922  }
74923  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
74924  if (!SWIG_IsOK(ecode5)) {
74925  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "OperatingPoints_add" "', argument " "5"" of type '" "size_t""'");
74926  }
74927  arg5 = static_cast< size_t >(val5);
74928  {
74929  Py_BEGIN_ALLOW_THREADS
74930  try {
74931  result = (bool)(arg1)->add(arg2,arg3,(std::string const &)*arg4,arg5);
74932  } catch(faiss::FaissException & e) {
74933  PyEval_RestoreThread(_save);
74934  PyErr_SetString(PyExc_RuntimeError, e.what());
74935  SWIG_fail;
74936  }
74937  Py_END_ALLOW_THREADS
74938  }
74939  resultobj = SWIG_From_bool(static_cast< bool >(result));
74940  if (SWIG_IsNewObj(res4)) delete arg4;
74941  return resultobj;
74942 fail:
74943  if (SWIG_IsNewObj(res4)) delete arg4;
74944  return NULL;
74945 }
74946 
74947 
74948 SWIGINTERN PyObject *_wrap_OperatingPoints_add__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74949  PyObject *resultobj = 0;
74951  double arg2 ;
74952  double arg3 ;
74953  std::string *arg4 = 0 ;
74954  void *argp1 = 0 ;
74955  int res1 = 0 ;
74956  double val2 ;
74957  int ecode2 = 0 ;
74958  double val3 ;
74959  int ecode3 = 0 ;
74960  int res4 = SWIG_OLDOBJ ;
74961  PyObject * obj0 = 0 ;
74962  PyObject * obj1 = 0 ;
74963  PyObject * obj2 = 0 ;
74964  PyObject * obj3 = 0 ;
74965  bool result;
74966 
74967  if (!PyArg_ParseTuple(args,(char *)"OOOO:OperatingPoints_add",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
74968  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
74969  if (!SWIG_IsOK(res1)) {
74970  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_add" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
74971  }
74972  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
74973  ecode2 = SWIG_AsVal_double(obj1, &val2);
74974  if (!SWIG_IsOK(ecode2)) {
74975  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_add" "', argument " "2"" of type '" "double""'");
74976  }
74977  arg2 = static_cast< double >(val2);
74978  ecode3 = SWIG_AsVal_double(obj2, &val3);
74979  if (!SWIG_IsOK(ecode3)) {
74980  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OperatingPoints_add" "', argument " "3"" of type '" "double""'");
74981  }
74982  arg3 = static_cast< double >(val3);
74983  {
74984  std::string *ptr = (std::string *)0;
74985  res4 = SWIG_AsPtr_std_string(obj3, &ptr);
74986  if (!SWIG_IsOK(res4)) {
74987  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
74988  }
74989  if (!ptr) {
74990  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
74991  }
74992  arg4 = ptr;
74993  }
74994  {
74995  Py_BEGIN_ALLOW_THREADS
74996  try {
74997  result = (bool)(arg1)->add(arg2,arg3,(std::string const &)*arg4);
74998  } catch(faiss::FaissException & e) {
74999  PyEval_RestoreThread(_save);
75000  PyErr_SetString(PyExc_RuntimeError, e.what());
75001  SWIG_fail;
75002  }
75003  Py_END_ALLOW_THREADS
75004  }
75005  resultobj = SWIG_From_bool(static_cast< bool >(result));
75006  if (SWIG_IsNewObj(res4)) delete arg4;
75007  return resultobj;
75008 fail:
75009  if (SWIG_IsNewObj(res4)) delete arg4;
75010  return NULL;
75011 }
75012 
75013 
75014 SWIGINTERN PyObject *_wrap_OperatingPoints_add(PyObject *self, PyObject *args) {
75015  Py_ssize_t argc;
75016  PyObject *argv[6] = {
75017  0
75018  };
75019  Py_ssize_t ii;
75020 
75021  if (!PyTuple_Check(args)) SWIG_fail;
75022  argc = args ? PyObject_Length(args) : 0;
75023  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
75024  argv[ii] = PyTuple_GET_ITEM(args,ii);
75025  }
75026  if (argc == 4) {
75027  int _v;
75028  void *vptr = 0;
75029  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
75030  _v = SWIG_CheckState(res);
75031  if (_v) {
75032  {
75033  int res = SWIG_AsVal_double(argv[1], NULL);
75034  _v = SWIG_CheckState(res);
75035  }
75036  if (_v) {
75037  {
75038  int res = SWIG_AsVal_double(argv[2], NULL);
75039  _v = SWIG_CheckState(res);
75040  }
75041  if (_v) {
75042  int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
75043  _v = SWIG_CheckState(res);
75044  if (_v) {
75045  return _wrap_OperatingPoints_add__SWIG_1(self, args);
75046  }
75047  }
75048  }
75049  }
75050  }
75051  if (argc == 5) {
75052  int _v;
75053  void *vptr = 0;
75054  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
75055  _v = SWIG_CheckState(res);
75056  if (_v) {
75057  {
75058  int res = SWIG_AsVal_double(argv[1], NULL);
75059  _v = SWIG_CheckState(res);
75060  }
75061  if (_v) {
75062  {
75063  int res = SWIG_AsVal_double(argv[2], NULL);
75064  _v = SWIG_CheckState(res);
75065  }
75066  if (_v) {
75067  int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
75068  _v = SWIG_CheckState(res);
75069  if (_v) {
75070  {
75071  int res = SWIG_AsVal_size_t(argv[4], NULL);
75072  _v = SWIG_CheckState(res);
75073  }
75074  if (_v) {
75075  return _wrap_OperatingPoints_add__SWIG_0(self, args);
75076  }
75077  }
75078  }
75079  }
75080  }
75081  }
75082 
75083 fail:
75084  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OperatingPoints_add'.\n"
75085  " Possible C/C++ prototypes are:\n"
75086  " faiss::OperatingPoints::add(double,double,std::string const &,size_t)\n"
75087  " faiss::OperatingPoints::add(double,double,std::string const &)\n");
75088  return 0;
75089 }
75090 
75091 
75092 SWIGINTERN PyObject *_wrap_OperatingPoints_t_for_perf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75093  PyObject *resultobj = 0;
75095  double arg2 ;
75096  void *argp1 = 0 ;
75097  int res1 = 0 ;
75098  double val2 ;
75099  int ecode2 = 0 ;
75100  PyObject * obj0 = 0 ;
75101  PyObject * obj1 = 0 ;
75102  double result;
75103 
75104  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_t_for_perf",&obj0,&obj1)) SWIG_fail;
75105  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
75106  if (!SWIG_IsOK(res1)) {
75107  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_t_for_perf" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
75108  }
75109  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
75110  ecode2 = SWIG_AsVal_double(obj1, &val2);
75111  if (!SWIG_IsOK(ecode2)) {
75112  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_t_for_perf" "', argument " "2"" of type '" "double""'");
75113  }
75114  arg2 = static_cast< double >(val2);
75115  {
75116  Py_BEGIN_ALLOW_THREADS
75117  try {
75118  result = (double)((faiss::OperatingPoints const *)arg1)->t_for_perf(arg2);
75119  } catch(faiss::FaissException & e) {
75120  PyEval_RestoreThread(_save);
75121  PyErr_SetString(PyExc_RuntimeError, e.what());
75122  SWIG_fail;
75123  }
75124  Py_END_ALLOW_THREADS
75125  }
75126  resultobj = SWIG_From_double(static_cast< double >(result));
75127  return resultobj;
75128 fail:
75129  return NULL;
75130 }
75131 
75132 
75133 SWIGINTERN PyObject *_wrap_OperatingPoints_display__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75134  PyObject *resultobj = 0;
75136  bool arg2 ;
75137  void *argp1 = 0 ;
75138  int res1 = 0 ;
75139  bool val2 ;
75140  int ecode2 = 0 ;
75141  PyObject * obj0 = 0 ;
75142  PyObject * obj1 = 0 ;
75143 
75144  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_display",&obj0,&obj1)) SWIG_fail;
75145  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
75146  if (!SWIG_IsOK(res1)) {
75147  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_display" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
75148  }
75149  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
75150  ecode2 = SWIG_AsVal_bool(obj1, &val2);
75151  if (!SWIG_IsOK(ecode2)) {
75152  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_display" "', argument " "2"" of type '" "bool""'");
75153  }
75154  arg2 = static_cast< bool >(val2);
75155  {
75156  Py_BEGIN_ALLOW_THREADS
75157  try {
75158  ((faiss::OperatingPoints const *)arg1)->display(arg2);
75159  } catch(faiss::FaissException & e) {
75160  PyEval_RestoreThread(_save);
75161  PyErr_SetString(PyExc_RuntimeError, e.what());
75162  SWIG_fail;
75163  }
75164  Py_END_ALLOW_THREADS
75165  }
75166  resultobj = SWIG_Py_Void();
75167  return resultobj;
75168 fail:
75169  return NULL;
75170 }
75171 
75172 
75173 SWIGINTERN PyObject *_wrap_OperatingPoints_display__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75174  PyObject *resultobj = 0;
75176  void *argp1 = 0 ;
75177  int res1 = 0 ;
75178  PyObject * obj0 = 0 ;
75179 
75180  if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_display",&obj0)) SWIG_fail;
75181  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
75182  if (!SWIG_IsOK(res1)) {
75183  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_display" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
75184  }
75185  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
75186  {
75187  Py_BEGIN_ALLOW_THREADS
75188  try {
75189  ((faiss::OperatingPoints const *)arg1)->display();
75190  } catch(faiss::FaissException & e) {
75191  PyEval_RestoreThread(_save);
75192  PyErr_SetString(PyExc_RuntimeError, e.what());
75193  SWIG_fail;
75194  }
75195  Py_END_ALLOW_THREADS
75196  }
75197  resultobj = SWIG_Py_Void();
75198  return resultobj;
75199 fail:
75200  return NULL;
75201 }
75202 
75203 
75204 SWIGINTERN PyObject *_wrap_OperatingPoints_display(PyObject *self, PyObject *args) {
75205  Py_ssize_t argc;
75206  PyObject *argv[3] = {
75207  0
75208  };
75209  Py_ssize_t ii;
75210 
75211  if (!PyTuple_Check(args)) SWIG_fail;
75212  argc = args ? PyObject_Length(args) : 0;
75213  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
75214  argv[ii] = PyTuple_GET_ITEM(args,ii);
75215  }
75216  if (argc == 1) {
75217  int _v;
75218  void *vptr = 0;
75219  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
75220  _v = SWIG_CheckState(res);
75221  if (_v) {
75222  return _wrap_OperatingPoints_display__SWIG_1(self, args);
75223  }
75224  }
75225  if (argc == 2) {
75226  int _v;
75227  void *vptr = 0;
75228  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
75229  _v = SWIG_CheckState(res);
75230  if (_v) {
75231  {
75232  int res = SWIG_AsVal_bool(argv[1], NULL);
75233  _v = SWIG_CheckState(res);
75234  }
75235  if (_v) {
75236  return _wrap_OperatingPoints_display__SWIG_0(self, args);
75237  }
75238  }
75239  }
75240 
75241 fail:
75242  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OperatingPoints_display'.\n"
75243  " Possible C/C++ prototypes are:\n"
75244  " faiss::OperatingPoints::display(bool) const\n"
75245  " faiss::OperatingPoints::display() const\n");
75246  return 0;
75247 }
75248 
75249 
75250 SWIGINTERN PyObject *_wrap_OperatingPoints_all_to_gnuplot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75251  PyObject *resultobj = 0;
75253  char *arg2 = (char *) 0 ;
75254  void *argp1 = 0 ;
75255  int res1 = 0 ;
75256  int res2 ;
75257  char *buf2 = 0 ;
75258  int alloc2 = 0 ;
75259  PyObject * obj0 = 0 ;
75260  PyObject * obj1 = 0 ;
75261 
75262  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_all_to_gnuplot",&obj0,&obj1)) SWIG_fail;
75263  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
75264  if (!SWIG_IsOK(res1)) {
75265  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_all_to_gnuplot" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
75266  }
75267  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
75268  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
75269  if (!SWIG_IsOK(res2)) {
75270  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_all_to_gnuplot" "', argument " "2"" of type '" "char const *""'");
75271  }
75272  arg2 = reinterpret_cast< char * >(buf2);
75273  {
75274  Py_BEGIN_ALLOW_THREADS
75275  try {
75276  ((faiss::OperatingPoints const *)arg1)->all_to_gnuplot((char const *)arg2);
75277  } catch(faiss::FaissException & e) {
75278  PyEval_RestoreThread(_save);
75279  PyErr_SetString(PyExc_RuntimeError, e.what());
75280  SWIG_fail;
75281  }
75282  Py_END_ALLOW_THREADS
75283  }
75284  resultobj = SWIG_Py_Void();
75285  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
75286  return resultobj;
75287 fail:
75288  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
75289  return NULL;
75290 }
75291 
75292 
75293 SWIGINTERN PyObject *_wrap_OperatingPoints_optimal_to_gnuplot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75294  PyObject *resultobj = 0;
75296  char *arg2 = (char *) 0 ;
75297  void *argp1 = 0 ;
75298  int res1 = 0 ;
75299  int res2 ;
75300  char *buf2 = 0 ;
75301  int alloc2 = 0 ;
75302  PyObject * obj0 = 0 ;
75303  PyObject * obj1 = 0 ;
75304 
75305  if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_optimal_to_gnuplot",&obj0,&obj1)) SWIG_fail;
75306  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
75307  if (!SWIG_IsOK(res1)) {
75308  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_optimal_to_gnuplot" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
75309  }
75310  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
75311  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
75312  if (!SWIG_IsOK(res2)) {
75313  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_optimal_to_gnuplot" "', argument " "2"" of type '" "char const *""'");
75314  }
75315  arg2 = reinterpret_cast< char * >(buf2);
75316  {
75317  Py_BEGIN_ALLOW_THREADS
75318  try {
75319  ((faiss::OperatingPoints const *)arg1)->optimal_to_gnuplot((char const *)arg2);
75320  } catch(faiss::FaissException & e) {
75321  PyEval_RestoreThread(_save);
75322  PyErr_SetString(PyExc_RuntimeError, e.what());
75323  SWIG_fail;
75324  }
75325  Py_END_ALLOW_THREADS
75326  }
75327  resultobj = SWIG_Py_Void();
75328  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
75329  return resultobj;
75330 fail:
75331  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
75332  return NULL;
75333 }
75334 
75335 
75336 SWIGINTERN PyObject *_wrap_delete_OperatingPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75337  PyObject *resultobj = 0;
75339  void *argp1 = 0 ;
75340  int res1 = 0 ;
75341  PyObject * obj0 = 0 ;
75342 
75343  if (!PyArg_ParseTuple(args,(char *)"O:delete_OperatingPoints",&obj0)) SWIG_fail;
75344  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, SWIG_POINTER_DISOWN | 0 );
75345  if (!SWIG_IsOK(res1)) {
75346  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OperatingPoints" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
75347  }
75348  arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
75349  delete arg1;
75350  resultobj = SWIG_Py_Void();
75351  return resultobj;
75352 fail:
75353  return NULL;
75354 }
75355 
75356 
75357 SWIGINTERN PyObject *OperatingPoints_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75358  PyObject *obj;
75359  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
75360  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OperatingPoints, SWIG_NewClientData(obj));
75361  return SWIG_Py_Void();
75362 }
75363 
75364 SWIGINTERN PyObject *_wrap_ParameterRange_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75365  PyObject *resultobj = 0;
75367  std::string *arg2 = 0 ;
75368  void *argp1 = 0 ;
75369  int res1 = 0 ;
75370  int res2 = SWIG_OLDOBJ ;
75371  PyObject * obj0 = 0 ;
75372  PyObject * obj1 = 0 ;
75373 
75374  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterRange_name_set",&obj0,&obj1)) SWIG_fail;
75375  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
75376  if (!SWIG_IsOK(res1)) {
75377  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_name_set" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
75378  }
75379  arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
75380  {
75381  std::string *ptr = (std::string *)0;
75382  res2 = SWIG_AsPtr_std_string(obj1, &ptr);
75383  if (!SWIG_IsOK(res2)) {
75384  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterRange_name_set" "', argument " "2"" of type '" "std::string const &""'");
75385  }
75386  if (!ptr) {
75387  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterRange_name_set" "', argument " "2"" of type '" "std::string const &""'");
75388  }
75389  arg2 = ptr;
75390  }
75391  if (arg1) (arg1)->name = *arg2;
75392  resultobj = SWIG_Py_Void();
75393  if (SWIG_IsNewObj(res2)) delete arg2;
75394  return resultobj;
75395 fail:
75396  if (SWIG_IsNewObj(res2)) delete arg2;
75397  return NULL;
75398 }
75399 
75400 
75401 SWIGINTERN PyObject *_wrap_ParameterRange_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75402  PyObject *resultobj = 0;
75404  void *argp1 = 0 ;
75405  int res1 = 0 ;
75406  PyObject * obj0 = 0 ;
75407  std::string *result = 0 ;
75408 
75409  if (!PyArg_ParseTuple(args,(char *)"O:ParameterRange_name_get",&obj0)) SWIG_fail;
75410  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
75411  if (!SWIG_IsOK(res1)) {
75412  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_name_get" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
75413  }
75414  arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
75415  result = (std::string *) & ((arg1)->name);
75416  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
75417  return resultobj;
75418 fail:
75419  return NULL;
75420 }
75421 
75422 
75423 SWIGINTERN PyObject *_wrap_ParameterRange_values_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75424  PyObject *resultobj = 0;
75426  std::vector< double > *arg2 = (std::vector< double > *) 0 ;
75427  void *argp1 = 0 ;
75428  int res1 = 0 ;
75429  void *argp2 = 0 ;
75430  int res2 = 0 ;
75431  PyObject * obj0 = 0 ;
75432  PyObject * obj1 = 0 ;
75433 
75434  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterRange_values_set",&obj0,&obj1)) SWIG_fail;
75435  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
75436  if (!SWIG_IsOK(res1)) {
75437  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_values_set" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
75438  }
75439  arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
75440  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
75441  if (!SWIG_IsOK(res2)) {
75442  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterRange_values_set" "', argument " "2"" of type '" "std::vector< double > *""'");
75443  }
75444  arg2 = reinterpret_cast< std::vector< double > * >(argp2);
75445  if (arg1) (arg1)->values = *arg2;
75446  resultobj = SWIG_Py_Void();
75447  return resultobj;
75448 fail:
75449  return NULL;
75450 }
75451 
75452 
75453 SWIGINTERN PyObject *_wrap_ParameterRange_values_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75454  PyObject *resultobj = 0;
75456  void *argp1 = 0 ;
75457  int res1 = 0 ;
75458  PyObject * obj0 = 0 ;
75459  std::vector< double > *result = 0 ;
75460 
75461  if (!PyArg_ParseTuple(args,(char *)"O:ParameterRange_values_get",&obj0)) SWIG_fail;
75462  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
75463  if (!SWIG_IsOK(res1)) {
75464  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_values_get" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
75465  }
75466  arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
75467  result = (std::vector< double > *)& ((arg1)->values);
75468  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
75469  return resultobj;
75470 fail:
75471  return NULL;
75472 }
75473 
75474 
75475 SWIGINTERN PyObject *_wrap_new_ParameterRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75476  PyObject *resultobj = 0;
75477  faiss::ParameterRange *result = 0 ;
75478 
75479  if (!PyArg_ParseTuple(args,(char *)":new_ParameterRange")) SWIG_fail;
75480  result = (faiss::ParameterRange *)new faiss::ParameterRange();
75481  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ParameterRange, SWIG_POINTER_NEW | 0 );
75482  return resultobj;
75483 fail:
75484  return NULL;
75485 }
75486 
75487 
75488 SWIGINTERN PyObject *_wrap_delete_ParameterRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75489  PyObject *resultobj = 0;
75491  void *argp1 = 0 ;
75492  int res1 = 0 ;
75493  PyObject * obj0 = 0 ;
75494 
75495  if (!PyArg_ParseTuple(args,(char *)"O:delete_ParameterRange",&obj0)) SWIG_fail;
75496  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, SWIG_POINTER_DISOWN | 0 );
75497  if (!SWIG_IsOK(res1)) {
75498  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParameterRange" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
75499  }
75500  arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
75501  delete arg1;
75502  resultobj = SWIG_Py_Void();
75503  return resultobj;
75504 fail:
75505  return NULL;
75506 }
75507 
75508 
75509 SWIGINTERN PyObject *ParameterRange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75510  PyObject *obj;
75511  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
75512  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ParameterRange, SWIG_NewClientData(obj));
75513  return SWIG_Py_Void();
75514 }
75515 
75516 SWIGINTERN PyObject *_wrap_ParameterSpace_parameter_ranges_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75517  PyObject *resultobj = 0;
75519  std::vector< faiss::ParameterRange > *arg2 = (std::vector< faiss::ParameterRange > *) 0 ;
75520  void *argp1 = 0 ;
75521  int res1 = 0 ;
75522  void *argp2 = 0 ;
75523  int res2 = 0 ;
75524  PyObject * obj0 = 0 ;
75525  PyObject * obj1 = 0 ;
75526 
75527  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_parameter_ranges_set",&obj0,&obj1)) SWIG_fail;
75528  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75529  if (!SWIG_IsOK(res1)) {
75530  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_parameter_ranges_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75531  }
75532  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75533  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__ParameterRange_t, 0 | 0 );
75534  if (!SWIG_IsOK(res2)) {
75535  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_parameter_ranges_set" "', argument " "2"" of type '" "std::vector< faiss::ParameterRange > *""'");
75536  }
75537  arg2 = reinterpret_cast< std::vector< faiss::ParameterRange > * >(argp2);
75538  if (arg1) (arg1)->parameter_ranges = *arg2;
75539  resultobj = SWIG_Py_Void();
75540  return resultobj;
75541 fail:
75542  return NULL;
75543 }
75544 
75545 
75546 SWIGINTERN PyObject *_wrap_ParameterSpace_parameter_ranges_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75547  PyObject *resultobj = 0;
75549  void *argp1 = 0 ;
75550  int res1 = 0 ;
75551  PyObject * obj0 = 0 ;
75552  std::vector< faiss::ParameterRange > *result = 0 ;
75553 
75554  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_parameter_ranges_get",&obj0)) SWIG_fail;
75555  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75556  if (!SWIG_IsOK(res1)) {
75557  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_parameter_ranges_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75558  }
75559  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75560  result = (std::vector< faiss::ParameterRange > *)& ((arg1)->parameter_ranges);
75561  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__ParameterRange_t, 0 | 0 );
75562  return resultobj;
75563 fail:
75564  return NULL;
75565 }
75566 
75567 
75568 SWIGINTERN PyObject *_wrap_ParameterSpace_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75569  PyObject *resultobj = 0;
75571  int arg2 ;
75572  void *argp1 = 0 ;
75573  int res1 = 0 ;
75574  int val2 ;
75575  int ecode2 = 0 ;
75576  PyObject * obj0 = 0 ;
75577  PyObject * obj1 = 0 ;
75578 
75579  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_verbose_set",&obj0,&obj1)) SWIG_fail;
75580  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75581  if (!SWIG_IsOK(res1)) {
75582  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_verbose_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75583  }
75584  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75585  ecode2 = SWIG_AsVal_int(obj1, &val2);
75586  if (!SWIG_IsOK(ecode2)) {
75587  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_verbose_set" "', argument " "2"" of type '" "int""'");
75588  }
75589  arg2 = static_cast< int >(val2);
75590  if (arg1) (arg1)->verbose = arg2;
75591  resultobj = SWIG_Py_Void();
75592  return resultobj;
75593 fail:
75594  return NULL;
75595 }
75596 
75597 
75598 SWIGINTERN PyObject *_wrap_ParameterSpace_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75599  PyObject *resultobj = 0;
75601  void *argp1 = 0 ;
75602  int res1 = 0 ;
75603  PyObject * obj0 = 0 ;
75604  int result;
75605 
75606  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_verbose_get",&obj0)) SWIG_fail;
75607  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75608  if (!SWIG_IsOK(res1)) {
75609  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_verbose_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75610  }
75611  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75612  result = (int) ((arg1)->verbose);
75613  resultobj = SWIG_From_int(static_cast< int >(result));
75614  return resultobj;
75615 fail:
75616  return NULL;
75617 }
75618 
75619 
75620 SWIGINTERN PyObject *_wrap_ParameterSpace_n_experiments_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75621  PyObject *resultobj = 0;
75623  int arg2 ;
75624  void *argp1 = 0 ;
75625  int res1 = 0 ;
75626  int val2 ;
75627  int ecode2 = 0 ;
75628  PyObject * obj0 = 0 ;
75629  PyObject * obj1 = 0 ;
75630 
75631  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_n_experiments_set",&obj0,&obj1)) SWIG_fail;
75632  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75633  if (!SWIG_IsOK(res1)) {
75634  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_n_experiments_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75635  }
75636  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75637  ecode2 = SWIG_AsVal_int(obj1, &val2);
75638  if (!SWIG_IsOK(ecode2)) {
75639  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_n_experiments_set" "', argument " "2"" of type '" "int""'");
75640  }
75641  arg2 = static_cast< int >(val2);
75642  if (arg1) (arg1)->n_experiments = arg2;
75643  resultobj = SWIG_Py_Void();
75644  return resultobj;
75645 fail:
75646  return NULL;
75647 }
75648 
75649 
75650 SWIGINTERN PyObject *_wrap_ParameterSpace_n_experiments_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75651  PyObject *resultobj = 0;
75653  void *argp1 = 0 ;
75654  int res1 = 0 ;
75655  PyObject * obj0 = 0 ;
75656  int result;
75657 
75658  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_n_experiments_get",&obj0)) SWIG_fail;
75659  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75660  if (!SWIG_IsOK(res1)) {
75661  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_n_experiments_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75662  }
75663  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75664  result = (int) ((arg1)->n_experiments);
75665  resultobj = SWIG_From_int(static_cast< int >(result));
75666  return resultobj;
75667 fail:
75668  return NULL;
75669 }
75670 
75671 
75672 SWIGINTERN PyObject *_wrap_ParameterSpace_batchsize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75673  PyObject *resultobj = 0;
75675  size_t arg2 ;
75676  void *argp1 = 0 ;
75677  int res1 = 0 ;
75678  size_t val2 ;
75679  int ecode2 = 0 ;
75680  PyObject * obj0 = 0 ;
75681  PyObject * obj1 = 0 ;
75682 
75683  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_batchsize_set",&obj0,&obj1)) SWIG_fail;
75684  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75685  if (!SWIG_IsOK(res1)) {
75686  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_batchsize_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75687  }
75688  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75689  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
75690  if (!SWIG_IsOK(ecode2)) {
75691  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_batchsize_set" "', argument " "2"" of type '" "size_t""'");
75692  }
75693  arg2 = static_cast< size_t >(val2);
75694  if (arg1) (arg1)->batchsize = arg2;
75695  resultobj = SWIG_Py_Void();
75696  return resultobj;
75697 fail:
75698  return NULL;
75699 }
75700 
75701 
75702 SWIGINTERN PyObject *_wrap_ParameterSpace_batchsize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75703  PyObject *resultobj = 0;
75705  void *argp1 = 0 ;
75706  int res1 = 0 ;
75707  PyObject * obj0 = 0 ;
75708  size_t result;
75709 
75710  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_batchsize_get",&obj0)) SWIG_fail;
75711  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75712  if (!SWIG_IsOK(res1)) {
75713  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_batchsize_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75714  }
75715  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75716  result = (size_t) ((arg1)->batchsize);
75717  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
75718  return resultobj;
75719 fail:
75720  return NULL;
75721 }
75722 
75723 
75724 SWIGINTERN PyObject *_wrap_ParameterSpace_thread_over_batches_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75725  PyObject *resultobj = 0;
75727  bool arg2 ;
75728  void *argp1 = 0 ;
75729  int res1 = 0 ;
75730  bool val2 ;
75731  int ecode2 = 0 ;
75732  PyObject * obj0 = 0 ;
75733  PyObject * obj1 = 0 ;
75734 
75735  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_thread_over_batches_set",&obj0,&obj1)) SWIG_fail;
75736  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75737  if (!SWIG_IsOK(res1)) {
75738  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_thread_over_batches_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75739  }
75740  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75741  ecode2 = SWIG_AsVal_bool(obj1, &val2);
75742  if (!SWIG_IsOK(ecode2)) {
75743  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_thread_over_batches_set" "', argument " "2"" of type '" "bool""'");
75744  }
75745  arg2 = static_cast< bool >(val2);
75746  if (arg1) (arg1)->thread_over_batches = arg2;
75747  resultobj = SWIG_Py_Void();
75748  return resultobj;
75749 fail:
75750  return NULL;
75751 }
75752 
75753 
75754 SWIGINTERN PyObject *_wrap_ParameterSpace_thread_over_batches_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75755  PyObject *resultobj = 0;
75757  void *argp1 = 0 ;
75758  int res1 = 0 ;
75759  PyObject * obj0 = 0 ;
75760  bool result;
75761 
75762  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_thread_over_batches_get",&obj0)) SWIG_fail;
75763  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75764  if (!SWIG_IsOK(res1)) {
75765  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_thread_over_batches_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75766  }
75767  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75768  result = (bool) ((arg1)->thread_over_batches);
75769  resultobj = SWIG_From_bool(static_cast< bool >(result));
75770  return resultobj;
75771 fail:
75772  return NULL;
75773 }
75774 
75775 
75776 SWIGINTERN PyObject *_wrap_ParameterSpace_min_test_duration_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75777  PyObject *resultobj = 0;
75779  double arg2 ;
75780  void *argp1 = 0 ;
75781  int res1 = 0 ;
75782  double val2 ;
75783  int ecode2 = 0 ;
75784  PyObject * obj0 = 0 ;
75785  PyObject * obj1 = 0 ;
75786 
75787  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_min_test_duration_set",&obj0,&obj1)) SWIG_fail;
75788  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75789  if (!SWIG_IsOK(res1)) {
75790  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_min_test_duration_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75791  }
75792  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75793  ecode2 = SWIG_AsVal_double(obj1, &val2);
75794  if (!SWIG_IsOK(ecode2)) {
75795  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_min_test_duration_set" "', argument " "2"" of type '" "double""'");
75796  }
75797  arg2 = static_cast< double >(val2);
75798  if (arg1) (arg1)->min_test_duration = arg2;
75799  resultobj = SWIG_Py_Void();
75800  return resultobj;
75801 fail:
75802  return NULL;
75803 }
75804 
75805 
75806 SWIGINTERN PyObject *_wrap_ParameterSpace_min_test_duration_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75807  PyObject *resultobj = 0;
75809  void *argp1 = 0 ;
75810  int res1 = 0 ;
75811  PyObject * obj0 = 0 ;
75812  double result;
75813 
75814  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_min_test_duration_get",&obj0)) SWIG_fail;
75815  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75816  if (!SWIG_IsOK(res1)) {
75817  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_min_test_duration_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
75818  }
75819  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75820  result = (double) ((arg1)->min_test_duration);
75821  resultobj = SWIG_From_double(static_cast< double >(result));
75822  return resultobj;
75823 fail:
75824  return NULL;
75825 }
75826 
75827 
75828 SWIGINTERN PyObject *_wrap_new_ParameterSpace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75829  PyObject *resultobj = 0;
75830  faiss::ParameterSpace *result = 0 ;
75831 
75832  if (!PyArg_ParseTuple(args,(char *)":new_ParameterSpace")) SWIG_fail;
75833  {
75834  Py_BEGIN_ALLOW_THREADS
75835  try {
75836  result = (faiss::ParameterSpace *)new faiss::ParameterSpace();
75837  } catch(faiss::FaissException & e) {
75838  PyEval_RestoreThread(_save);
75839  PyErr_SetString(PyExc_RuntimeError, e.what());
75840  SWIG_fail;
75841  }
75842  Py_END_ALLOW_THREADS
75843  }
75844  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ParameterSpace, SWIG_POINTER_NEW | 0 );
75845  return resultobj;
75846 fail:
75847  return NULL;
75848 }
75849 
75850 
75851 SWIGINTERN PyObject *_wrap_ParameterSpace_n_combinations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75852  PyObject *resultobj = 0;
75854  void *argp1 = 0 ;
75855  int res1 = 0 ;
75856  PyObject * obj0 = 0 ;
75857  size_t result;
75858 
75859  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_n_combinations",&obj0)) SWIG_fail;
75860  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75861  if (!SWIG_IsOK(res1)) {
75862  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_n_combinations" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
75863  }
75864  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75865  {
75866  Py_BEGIN_ALLOW_THREADS
75867  try {
75868  result = (size_t)((faiss::ParameterSpace const *)arg1)->n_combinations();
75869  } catch(faiss::FaissException & e) {
75870  PyEval_RestoreThread(_save);
75871  PyErr_SetString(PyExc_RuntimeError, e.what());
75872  SWIG_fail;
75873  }
75874  Py_END_ALLOW_THREADS
75875  }
75876  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
75877  return resultobj;
75878 fail:
75879  return NULL;
75880 }
75881 
75882 
75883 SWIGINTERN PyObject *_wrap_ParameterSpace_combination_ge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75884  PyObject *resultobj = 0;
75886  size_t arg2 ;
75887  size_t arg3 ;
75888  void *argp1 = 0 ;
75889  int res1 = 0 ;
75890  size_t val2 ;
75891  int ecode2 = 0 ;
75892  size_t val3 ;
75893  int ecode3 = 0 ;
75894  PyObject * obj0 = 0 ;
75895  PyObject * obj1 = 0 ;
75896  PyObject * obj2 = 0 ;
75897  bool result;
75898 
75899  if (!PyArg_ParseTuple(args,(char *)"OOO:ParameterSpace_combination_ge",&obj0,&obj1,&obj2)) SWIG_fail;
75900  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75901  if (!SWIG_IsOK(res1)) {
75902  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_combination_ge" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
75903  }
75904  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75905  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
75906  if (!SWIG_IsOK(ecode2)) {
75907  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_combination_ge" "', argument " "2"" of type '" "size_t""'");
75908  }
75909  arg2 = static_cast< size_t >(val2);
75910  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
75911  if (!SWIG_IsOK(ecode3)) {
75912  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParameterSpace_combination_ge" "', argument " "3"" of type '" "size_t""'");
75913  }
75914  arg3 = static_cast< size_t >(val3);
75915  {
75916  Py_BEGIN_ALLOW_THREADS
75917  try {
75918  result = (bool)((faiss::ParameterSpace const *)arg1)->combination_ge(arg2,arg3);
75919  } catch(faiss::FaissException & e) {
75920  PyEval_RestoreThread(_save);
75921  PyErr_SetString(PyExc_RuntimeError, e.what());
75922  SWIG_fail;
75923  }
75924  Py_END_ALLOW_THREADS
75925  }
75926  resultobj = SWIG_From_bool(static_cast< bool >(result));
75927  return resultobj;
75928 fail:
75929  return NULL;
75930 }
75931 
75932 
75933 SWIGINTERN PyObject *_wrap_ParameterSpace_combination_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75934  PyObject *resultobj = 0;
75936  size_t arg2 ;
75937  void *argp1 = 0 ;
75938  int res1 = 0 ;
75939  size_t val2 ;
75940  int ecode2 = 0 ;
75941  PyObject * obj0 = 0 ;
75942  PyObject * obj1 = 0 ;
75943  std::string result;
75944 
75945  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_combination_name",&obj0,&obj1)) SWIG_fail;
75946  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75947  if (!SWIG_IsOK(res1)) {
75948  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_combination_name" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
75949  }
75950  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75951  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
75952  if (!SWIG_IsOK(ecode2)) {
75953  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_combination_name" "', argument " "2"" of type '" "size_t""'");
75954  }
75955  arg2 = static_cast< size_t >(val2);
75956  {
75957  Py_BEGIN_ALLOW_THREADS
75958  try {
75959  result = ((faiss::ParameterSpace const *)arg1)->combination_name(arg2);
75960  } catch(faiss::FaissException & e) {
75961  PyEval_RestoreThread(_save);
75962  PyErr_SetString(PyExc_RuntimeError, e.what());
75963  SWIG_fail;
75964  }
75965  Py_END_ALLOW_THREADS
75966  }
75967  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
75968  return resultobj;
75969 fail:
75970  return NULL;
75971 }
75972 
75973 
75974 SWIGINTERN PyObject *_wrap_ParameterSpace_display(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75975  PyObject *resultobj = 0;
75977  void *argp1 = 0 ;
75978  int res1 = 0 ;
75979  PyObject * obj0 = 0 ;
75980 
75981  if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_display",&obj0)) SWIG_fail;
75982  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
75983  if (!SWIG_IsOK(res1)) {
75984  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_display" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
75985  }
75986  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
75987  {
75988  Py_BEGIN_ALLOW_THREADS
75989  try {
75990  ((faiss::ParameterSpace const *)arg1)->display();
75991  } catch(faiss::FaissException & e) {
75992  PyEval_RestoreThread(_save);
75993  PyErr_SetString(PyExc_RuntimeError, e.what());
75994  SWIG_fail;
75995  }
75996  Py_END_ALLOW_THREADS
75997  }
75998  resultobj = SWIG_Py_Void();
75999  return resultobj;
76000 fail:
76001  return NULL;
76002 }
76003 
76004 
76005 SWIGINTERN PyObject *_wrap_ParameterSpace_add_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76006  PyObject *resultobj = 0;
76008  char *arg2 = (char *) 0 ;
76009  void *argp1 = 0 ;
76010  int res1 = 0 ;
76011  int res2 ;
76012  char *buf2 = 0 ;
76013  int alloc2 = 0 ;
76014  PyObject * obj0 = 0 ;
76015  PyObject * obj1 = 0 ;
76016  faiss::ParameterRange *result = 0 ;
76017 
76018  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_add_range",&obj0,&obj1)) SWIG_fail;
76019  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
76020  if (!SWIG_IsOK(res1)) {
76021  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_add_range" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
76022  }
76023  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76024  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
76025  if (!SWIG_IsOK(res2)) {
76026  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_add_range" "', argument " "2"" of type '" "char const *""'");
76027  }
76028  arg2 = reinterpret_cast< char * >(buf2);
76029  {
76030  Py_BEGIN_ALLOW_THREADS
76031  try {
76032  result = (faiss::ParameterRange *) &(arg1)->add_range((char const *)arg2);
76033  } catch(faiss::FaissException & e) {
76034  PyEval_RestoreThread(_save);
76035  PyErr_SetString(PyExc_RuntimeError, e.what());
76036  SWIG_fail;
76037  }
76038  Py_END_ALLOW_THREADS
76039  }
76040  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
76041  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
76042  return resultobj;
76043 fail:
76044  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
76045  return NULL;
76046 }
76047 
76048 
76049 SWIGINTERN PyObject *_wrap_ParameterSpace_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76050  PyObject *resultobj = 0;
76052  faiss::Index *arg2 = (faiss::Index *) 0 ;
76053  void *argp1 = 0 ;
76054  int res1 = 0 ;
76055  void *argp2 = 0 ;
76056  int res2 = 0 ;
76057  PyObject * obj0 = 0 ;
76058  PyObject * obj1 = 0 ;
76059 
76060  if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_initialize",&obj0,&obj1)) SWIG_fail;
76061  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
76062  if (!SWIG_IsOK(res1)) {
76063  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_initialize" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
76064  }
76065  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76066  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
76067  if (!SWIG_IsOK(res2)) {
76068  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_initialize" "', argument " "2"" of type '" "faiss::Index const *""'");
76069  }
76070  arg2 = reinterpret_cast< faiss::Index * >(argp2);
76071  {
76072  Py_BEGIN_ALLOW_THREADS
76073  try {
76074  (arg1)->initialize((faiss::Index const *)arg2);
76075  } catch(faiss::FaissException & e) {
76076  PyEval_RestoreThread(_save);
76077  PyErr_SetString(PyExc_RuntimeError, e.what());
76078  SWIG_fail;
76079  }
76080  Py_END_ALLOW_THREADS
76081  }
76082  resultobj = SWIG_Py_Void();
76083  return resultobj;
76084 fail:
76085  return NULL;
76086 }
76087 
76088 
76089 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameters__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76090  PyObject *resultobj = 0;
76092  faiss::Index *arg2 = (faiss::Index *) 0 ;
76093  size_t arg3 ;
76094  void *argp1 = 0 ;
76095  int res1 = 0 ;
76096  void *argp2 = 0 ;
76097  int res2 = 0 ;
76098  size_t val3 ;
76099  int ecode3 = 0 ;
76100  PyObject * obj0 = 0 ;
76101  PyObject * obj1 = 0 ;
76102  PyObject * obj2 = 0 ;
76103 
76104  if (!PyArg_ParseTuple(args,(char *)"OOO:ParameterSpace_set_index_parameters",&obj0,&obj1,&obj2)) SWIG_fail;
76105  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
76106  if (!SWIG_IsOK(res1)) {
76107  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_set_index_parameters" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
76108  }
76109  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76110  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
76111  if (!SWIG_IsOK(res2)) {
76112  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_set_index_parameters" "', argument " "2"" of type '" "faiss::Index *""'");
76113  }
76114  arg2 = reinterpret_cast< faiss::Index * >(argp2);
76115  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
76116  if (!SWIG_IsOK(ecode3)) {
76117  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParameterSpace_set_index_parameters" "', argument " "3"" of type '" "size_t""'");
76118  }
76119  arg3 = static_cast< size_t >(val3);
76120  {
76121  Py_BEGIN_ALLOW_THREADS
76122  try {
76123  ((faiss::ParameterSpace const *)arg1)->set_index_parameters(arg2,arg3);
76124  } catch(faiss::FaissException & e) {
76125  PyEval_RestoreThread(_save);
76126  PyErr_SetString(PyExc_RuntimeError, e.what());
76127  SWIG_fail;
76128  }
76129  Py_END_ALLOW_THREADS
76130  }
76131  resultobj = SWIG_Py_Void();
76132  return resultobj;
76133 fail:
76134  return NULL;
76135 }
76136 
76137 
76138 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameters__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76139  PyObject *resultobj = 0;
76141  faiss::Index *arg2 = (faiss::Index *) 0 ;
76142  char *arg3 = (char *) 0 ;
76143  void *argp1 = 0 ;
76144  int res1 = 0 ;
76145  void *argp2 = 0 ;
76146  int res2 = 0 ;
76147  int res3 ;
76148  char *buf3 = 0 ;
76149  int alloc3 = 0 ;
76150  PyObject * obj0 = 0 ;
76151  PyObject * obj1 = 0 ;
76152  PyObject * obj2 = 0 ;
76153 
76154  if (!PyArg_ParseTuple(args,(char *)"OOO:ParameterSpace_set_index_parameters",&obj0,&obj1,&obj2)) SWIG_fail;
76155  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
76156  if (!SWIG_IsOK(res1)) {
76157  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_set_index_parameters" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
76158  }
76159  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76160  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
76161  if (!SWIG_IsOK(res2)) {
76162  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_set_index_parameters" "', argument " "2"" of type '" "faiss::Index *""'");
76163  }
76164  arg2 = reinterpret_cast< faiss::Index * >(argp2);
76165  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
76166  if (!SWIG_IsOK(res3)) {
76167  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParameterSpace_set_index_parameters" "', argument " "3"" of type '" "char const *""'");
76168  }
76169  arg3 = reinterpret_cast< char * >(buf3);
76170  {
76171  Py_BEGIN_ALLOW_THREADS
76172  try {
76173  ((faiss::ParameterSpace const *)arg1)->set_index_parameters(arg2,(char const *)arg3);
76174  } catch(faiss::FaissException & e) {
76175  PyEval_RestoreThread(_save);
76176  PyErr_SetString(PyExc_RuntimeError, e.what());
76177  SWIG_fail;
76178  }
76179  Py_END_ALLOW_THREADS
76180  }
76181  resultobj = SWIG_Py_Void();
76182  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
76183  return resultobj;
76184 fail:
76185  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
76186  return NULL;
76187 }
76188 
76189 
76190 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameters(PyObject *self, PyObject *args) {
76191  Py_ssize_t argc;
76192  PyObject *argv[4] = {
76193  0
76194  };
76195  Py_ssize_t ii;
76196 
76197  if (!PyTuple_Check(args)) SWIG_fail;
76198  argc = args ? PyObject_Length(args) : 0;
76199  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
76200  argv[ii] = PyTuple_GET_ITEM(args,ii);
76201  }
76202  if (argc == 3) {
76203  int _v;
76204  void *vptr = 0;
76205  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ParameterSpace, 0);
76206  _v = SWIG_CheckState(res);
76207  if (_v) {
76208  void *vptr = 0;
76209  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__Index, 0);
76210  _v = SWIG_CheckState(res);
76211  if (_v) {
76212  {
76213  int res = SWIG_AsVal_size_t(argv[2], NULL);
76214  _v = SWIG_CheckState(res);
76215  }
76216  if (_v) {
76217  return _wrap_ParameterSpace_set_index_parameters__SWIG_0(self, args);
76218  }
76219  }
76220  }
76221  }
76222  if (argc == 3) {
76223  int _v;
76224  void *vptr = 0;
76225  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ParameterSpace, 0);
76226  _v = SWIG_CheckState(res);
76227  if (_v) {
76228  void *vptr = 0;
76229  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__Index, 0);
76230  _v = SWIG_CheckState(res);
76231  if (_v) {
76232  int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
76233  _v = SWIG_CheckState(res);
76234  if (_v) {
76235  return _wrap_ParameterSpace_set_index_parameters__SWIG_1(self, args);
76236  }
76237  }
76238  }
76239  }
76240 
76241 fail:
76242  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ParameterSpace_set_index_parameters'.\n"
76243  " Possible C/C++ prototypes are:\n"
76244  " faiss::ParameterSpace::set_index_parameters(faiss::Index *,size_t) const\n"
76245  " faiss::ParameterSpace::set_index_parameters(faiss::Index *,char const *) const\n");
76246  return 0;
76247 }
76248 
76249 
76250 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76251  PyObject *resultobj = 0;
76253  faiss::Index *arg2 = (faiss::Index *) 0 ;
76254  std::string *arg3 = 0 ;
76255  double arg4 ;
76256  void *argp1 = 0 ;
76257  int res1 = 0 ;
76258  void *argp2 = 0 ;
76259  int res2 = 0 ;
76260  int res3 = SWIG_OLDOBJ ;
76261  double val4 ;
76262  int ecode4 = 0 ;
76263  PyObject * obj0 = 0 ;
76264  PyObject * obj1 = 0 ;
76265  PyObject * obj2 = 0 ;
76266  PyObject * obj3 = 0 ;
76267 
76268  if (!PyArg_ParseTuple(args,(char *)"OOOO:ParameterSpace_set_index_parameter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
76269  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
76270  if (!SWIG_IsOK(res1)) {
76271  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_set_index_parameter" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
76272  }
76273  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76274  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
76275  if (!SWIG_IsOK(res2)) {
76276  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_set_index_parameter" "', argument " "2"" of type '" "faiss::Index *""'");
76277  }
76278  arg2 = reinterpret_cast< faiss::Index * >(argp2);
76279  {
76280  std::string *ptr = (std::string *)0;
76281  res3 = SWIG_AsPtr_std_string(obj2, &ptr);
76282  if (!SWIG_IsOK(res3)) {
76283  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParameterSpace_set_index_parameter" "', argument " "3"" of type '" "std::string const &""'");
76284  }
76285  if (!ptr) {
76286  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterSpace_set_index_parameter" "', argument " "3"" of type '" "std::string const &""'");
76287  }
76288  arg3 = ptr;
76289  }
76290  ecode4 = SWIG_AsVal_double(obj3, &val4);
76291  if (!SWIG_IsOK(ecode4)) {
76292  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ParameterSpace_set_index_parameter" "', argument " "4"" of type '" "double""'");
76293  }
76294  arg4 = static_cast< double >(val4);
76295  {
76296  Py_BEGIN_ALLOW_THREADS
76297  try {
76298  ((faiss::ParameterSpace const *)arg1)->set_index_parameter(arg2,(std::string const &)*arg3,arg4);
76299  } catch(faiss::FaissException & e) {
76300  PyEval_RestoreThread(_save);
76301  PyErr_SetString(PyExc_RuntimeError, e.what());
76302  SWIG_fail;
76303  }
76304  Py_END_ALLOW_THREADS
76305  }
76306  resultobj = SWIG_Py_Void();
76307  if (SWIG_IsNewObj(res3)) delete arg3;
76308  return resultobj;
76309 fail:
76310  if (SWIG_IsNewObj(res3)) delete arg3;
76311  return NULL;
76312 }
76313 
76314 
76315 SWIGINTERN PyObject *_wrap_ParameterSpace_update_bounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76316  PyObject *resultobj = 0;
76318  size_t arg2 ;
76319  faiss::OperatingPoint *arg3 = 0 ;
76320  double *arg4 = (double *) 0 ;
76321  double *arg5 = (double *) 0 ;
76322  void *argp1 = 0 ;
76323  int res1 = 0 ;
76324  size_t val2 ;
76325  int ecode2 = 0 ;
76326  void *argp3 = 0 ;
76327  int res3 = 0 ;
76328  void *argp4 = 0 ;
76329  int res4 = 0 ;
76330  void *argp5 = 0 ;
76331  int res5 = 0 ;
76332  PyObject * obj0 = 0 ;
76333  PyObject * obj1 = 0 ;
76334  PyObject * obj2 = 0 ;
76335  PyObject * obj3 = 0 ;
76336  PyObject * obj4 = 0 ;
76337 
76338  if (!PyArg_ParseTuple(args,(char *)"OOOOO:ParameterSpace_update_bounds",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
76339  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
76340  if (!SWIG_IsOK(res1)) {
76341  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_update_bounds" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
76342  }
76343  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76344  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
76345  if (!SWIG_IsOK(ecode2)) {
76346  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_update_bounds" "', argument " "2"" of type '" "size_t""'");
76347  }
76348  arg2 = static_cast< size_t >(val2);
76349  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__OperatingPoint, 0 | 0);
76350  if (!SWIG_IsOK(res3)) {
76351  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParameterSpace_update_bounds" "', argument " "3"" of type '" "faiss::OperatingPoint const &""'");
76352  }
76353  if (!argp3) {
76354  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterSpace_update_bounds" "', argument " "3"" of type '" "faiss::OperatingPoint const &""'");
76355  }
76356  arg3 = reinterpret_cast< faiss::OperatingPoint * >(argp3);
76357  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 );
76358  if (!SWIG_IsOK(res4)) {
76359  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ParameterSpace_update_bounds" "', argument " "4"" of type '" "double *""'");
76360  }
76361  arg4 = reinterpret_cast< double * >(argp4);
76362  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 );
76363  if (!SWIG_IsOK(res5)) {
76364  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ParameterSpace_update_bounds" "', argument " "5"" of type '" "double *""'");
76365  }
76366  arg5 = reinterpret_cast< double * >(argp5);
76367  {
76368  Py_BEGIN_ALLOW_THREADS
76369  try {
76370  ((faiss::ParameterSpace const *)arg1)->update_bounds(arg2,(faiss::OperatingPoint const &)*arg3,arg4,arg5);
76371  } catch(faiss::FaissException & e) {
76372  PyEval_RestoreThread(_save);
76373  PyErr_SetString(PyExc_RuntimeError, e.what());
76374  SWIG_fail;
76375  }
76376  Py_END_ALLOW_THREADS
76377  }
76378  resultobj = SWIG_Py_Void();
76379  return resultobj;
76380 fail:
76381  return NULL;
76382 }
76383 
76384 
76385 SWIGINTERN PyObject *_wrap_ParameterSpace_explore(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76386  PyObject *resultobj = 0;
76388  faiss::Index *arg2 = (faiss::Index *) 0 ;
76389  size_t arg3 ;
76390  float *arg4 = (float *) 0 ;
76391  faiss::AutoTuneCriterion *arg5 = 0 ;
76393  void *argp1 = 0 ;
76394  int res1 = 0 ;
76395  void *argp2 = 0 ;
76396  int res2 = 0 ;
76397  size_t val3 ;
76398  int ecode3 = 0 ;
76399  void *argp4 = 0 ;
76400  int res4 = 0 ;
76401  void *argp5 = 0 ;
76402  int res5 = 0 ;
76403  void *argp6 = 0 ;
76404  int res6 = 0 ;
76405  PyObject * obj0 = 0 ;
76406  PyObject * obj1 = 0 ;
76407  PyObject * obj2 = 0 ;
76408  PyObject * obj3 = 0 ;
76409  PyObject * obj4 = 0 ;
76410  PyObject * obj5 = 0 ;
76411 
76412  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ParameterSpace_explore",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
76413  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
76414  if (!SWIG_IsOK(res1)) {
76415  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_explore" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
76416  }
76417  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76418  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
76419  if (!SWIG_IsOK(res2)) {
76420  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_explore" "', argument " "2"" of type '" "faiss::Index *""'");
76421  }
76422  arg2 = reinterpret_cast< faiss::Index * >(argp2);
76423  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
76424  if (!SWIG_IsOK(ecode3)) {
76425  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParameterSpace_explore" "', argument " "3"" of type '" "size_t""'");
76426  }
76427  arg3 = static_cast< size_t >(val3);
76428  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
76429  if (!SWIG_IsOK(res4)) {
76430  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ParameterSpace_explore" "', argument " "4"" of type '" "float const *""'");
76431  }
76432  arg4 = reinterpret_cast< float * >(argp4);
76433  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0);
76434  if (!SWIG_IsOK(res5)) {
76435  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ParameterSpace_explore" "', argument " "5"" of type '" "faiss::AutoTuneCriterion const &""'");
76436  }
76437  if (!argp5) {
76438  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterSpace_explore" "', argument " "5"" of type '" "faiss::AutoTuneCriterion const &""'");
76439  }
76440  arg5 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp5);
76441  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
76442  if (!SWIG_IsOK(res6)) {
76443  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ParameterSpace_explore" "', argument " "6"" of type '" "faiss::OperatingPoints *""'");
76444  }
76445  arg6 = reinterpret_cast< faiss::OperatingPoints * >(argp6);
76446  {
76447  Py_BEGIN_ALLOW_THREADS
76448  try {
76449  ((faiss::ParameterSpace const *)arg1)->explore(arg2,arg3,(float const *)arg4,(faiss::AutoTuneCriterion const &)*arg5,arg6);
76450  } catch(faiss::FaissException & e) {
76451  PyEval_RestoreThread(_save);
76452  PyErr_SetString(PyExc_RuntimeError, e.what());
76453  SWIG_fail;
76454  }
76455  Py_END_ALLOW_THREADS
76456  }
76457  resultobj = SWIG_Py_Void();
76458  return resultobj;
76459 fail:
76460  return NULL;
76461 }
76462 
76463 
76464 SWIGINTERN PyObject *_wrap_delete_ParameterSpace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76465  PyObject *resultobj = 0;
76467  void *argp1 = 0 ;
76468  int res1 = 0 ;
76469  PyObject * obj0 = 0 ;
76470 
76471  if (!PyArg_ParseTuple(args,(char *)"O:delete_ParameterSpace",&obj0)) SWIG_fail;
76472  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, SWIG_POINTER_DISOWN | 0 );
76473  if (!SWIG_IsOK(res1)) {
76474  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParameterSpace" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
76475  }
76476  arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
76477  {
76478  Py_BEGIN_ALLOW_THREADS
76479  try {
76480  delete arg1;
76481  } catch(faiss::FaissException & e) {
76482  PyEval_RestoreThread(_save);
76483  PyErr_SetString(PyExc_RuntimeError, e.what());
76484  SWIG_fail;
76485  }
76486  Py_END_ALLOW_THREADS
76487  }
76488  resultobj = SWIG_Py_Void();
76489  return resultobj;
76490 fail:
76491  return NULL;
76492 }
76493 
76494 
76495 SWIGINTERN PyObject *ParameterSpace_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76496  PyObject *obj;
76497  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
76498  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ParameterSpace, SWIG_NewClientData(obj));
76499  return SWIG_Py_Void();
76500 }
76501 
76502 SWIGINTERN PyObject *_wrap_index_factory__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76503  PyObject *resultobj = 0;
76504  int arg1 ;
76505  char *arg2 = (char *) 0 ;
76506  faiss::MetricType arg3 ;
76507  int val1 ;
76508  int ecode1 = 0 ;
76509  int res2 ;
76510  char *buf2 = 0 ;
76511  int alloc2 = 0 ;
76512  int val3 ;
76513  int ecode3 = 0 ;
76514  PyObject * obj0 = 0 ;
76515  PyObject * obj1 = 0 ;
76516  PyObject * obj2 = 0 ;
76517  faiss::Index *result = 0 ;
76518 
76519  if (!PyArg_ParseTuple(args,(char *)"OOO:index_factory",&obj0,&obj1,&obj2)) SWIG_fail;
76520  ecode1 = SWIG_AsVal_int(obj0, &val1);
76521  if (!SWIG_IsOK(ecode1)) {
76522  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "index_factory" "', argument " "1"" of type '" "int""'");
76523  }
76524  arg1 = static_cast< int >(val1);
76525  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
76526  if (!SWIG_IsOK(res2)) {
76527  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_factory" "', argument " "2"" of type '" "char const *""'");
76528  }
76529  arg2 = reinterpret_cast< char * >(buf2);
76530  ecode3 = SWIG_AsVal_int(obj2, &val3);
76531  if (!SWIG_IsOK(ecode3)) {
76532  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "index_factory" "', argument " "3"" of type '" "faiss::MetricType""'");
76533  }
76534  arg3 = static_cast< faiss::MetricType >(val3);
76535  {
76536  Py_BEGIN_ALLOW_THREADS
76537  try {
76538  result = (faiss::Index *)faiss::index_factory(arg1,(char const *)arg2,arg3);
76539  } catch(faiss::FaissException & e) {
76540  PyEval_RestoreThread(_save);
76541  PyErr_SetString(PyExc_RuntimeError, e.what());
76542  SWIG_fail;
76543  }
76544  Py_END_ALLOW_THREADS
76545  }
76546  {
76547  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76548  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
76549  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
76550  } else
76551  /*@SWIG@*/
76552  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76553  if (dynamic_cast<faiss::IndexShards *> (result)) {
76554  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
76555  } else
76556  /*@SWIG@*/
76557  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76558  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
76559  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
76560  } else
76561  /*@SWIG@*/
76562  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76563  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
76564  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
76565  } else
76566  /*@SWIG@*/
76567  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76568  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
76569  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
76570  } else
76571  /*@SWIG@*/
76572  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76573  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
76574  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
76575  } else
76576  /*@SWIG@*/
76577  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76578  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
76579  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
76580  } else
76581  /*@SWIG@*/
76582  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76583  if (dynamic_cast<faiss::IndexIVF *> (result)) {
76584  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
76585  } else
76586  /*@SWIG@*/
76587  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76588  if (dynamic_cast<faiss::IndexFlat *> (result)) {
76589  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
76590  } else
76591  /*@SWIG@*/
76592  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76593  if (dynamic_cast<faiss::IndexPQ *> (result)) {
76594  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
76595  } else
76596  /*@SWIG@*/
76597  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76598  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
76599  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
76600  } else
76601  /*@SWIG@*/
76602  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76603  if (dynamic_cast<faiss::IndexLSH *> (result)) {
76604  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
76605  } else
76606  /*@SWIG@*/
76607  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76608  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
76609  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
76610  } else
76611  /*@SWIG@*/
76612  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76613  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
76614  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
76615  } else
76616  /*@SWIG@*/
76617  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76618  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
76619  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
76620  } else
76621  /*@SWIG@*/
76622  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76623  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
76624  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
76625  } else
76626  /*@SWIG@*/
76627  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76628  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
76629  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
76630  } else
76631  /*@SWIG@*/
76632  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76633  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
76634  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
76635  } else
76636  /*@SWIG@*/
76637  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76638  if (dynamic_cast<faiss::Index2Layer *> (result)) {
76639  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
76640  } else
76641  /*@SWIG@*/
76642 
76643  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76644  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
76645  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
76646  } else
76647  /*@SWIG@*/
76648  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76649  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
76650  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
76651  } else
76652  /*@SWIG@*/
76653  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76654  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
76655  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
76656  } else
76657  /*@SWIG@*/
76658  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76659  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
76660  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
76661  } else
76662  /*@SWIG@*/
76663 
76664  // default for non-recognized classes
76665  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76666  if (dynamic_cast<faiss::Index *> (result)) {
76667  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
76668  } else
76669  /*@SWIG@*/
76670  if (result == NULL)
76671  {
76672  resultobj = SWIG_Py_Void();
76673 
76674  // Lua does not need a push for nil
76675  } else {
76676  assert(false);
76677  }
76678 
76679 
76680 
76681  }
76682  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
76683  return resultobj;
76684 fail:
76685  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
76686  return NULL;
76687 }
76688 
76689 
76690 SWIGINTERN PyObject *_wrap_index_factory__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76691  PyObject *resultobj = 0;
76692  int arg1 ;
76693  char *arg2 = (char *) 0 ;
76694  int val1 ;
76695  int ecode1 = 0 ;
76696  int res2 ;
76697  char *buf2 = 0 ;
76698  int alloc2 = 0 ;
76699  PyObject * obj0 = 0 ;
76700  PyObject * obj1 = 0 ;
76701  faiss::Index *result = 0 ;
76702 
76703  if (!PyArg_ParseTuple(args,(char *)"OO:index_factory",&obj0,&obj1)) SWIG_fail;
76704  ecode1 = SWIG_AsVal_int(obj0, &val1);
76705  if (!SWIG_IsOK(ecode1)) {
76706  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "index_factory" "', argument " "1"" of type '" "int""'");
76707  }
76708  arg1 = static_cast< int >(val1);
76709  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
76710  if (!SWIG_IsOK(res2)) {
76711  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_factory" "', argument " "2"" of type '" "char const *""'");
76712  }
76713  arg2 = reinterpret_cast< char * >(buf2);
76714  {
76715  Py_BEGIN_ALLOW_THREADS
76716  try {
76717  result = (faiss::Index *)faiss::index_factory(arg1,(char const *)arg2);
76718  } catch(faiss::FaissException & e) {
76719  PyEval_RestoreThread(_save);
76720  PyErr_SetString(PyExc_RuntimeError, e.what());
76721  SWIG_fail;
76722  }
76723  Py_END_ALLOW_THREADS
76724  }
76725  {
76726  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76727  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
76728  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
76729  } else
76730  /*@SWIG@*/
76731  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76732  if (dynamic_cast<faiss::IndexShards *> (result)) {
76733  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
76734  } else
76735  /*@SWIG@*/
76736  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76737  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
76738  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
76739  } else
76740  /*@SWIG@*/
76741  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76742  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
76743  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
76744  } else
76745  /*@SWIG@*/
76746  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76747  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
76748  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
76749  } else
76750  /*@SWIG@*/
76751  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76752  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
76753  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
76754  } else
76755  /*@SWIG@*/
76756  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76757  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
76758  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
76759  } else
76760  /*@SWIG@*/
76761  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76762  if (dynamic_cast<faiss::IndexIVF *> (result)) {
76763  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
76764  } else
76765  /*@SWIG@*/
76766  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76767  if (dynamic_cast<faiss::IndexFlat *> (result)) {
76768  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
76769  } else
76770  /*@SWIG@*/
76771  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76772  if (dynamic_cast<faiss::IndexPQ *> (result)) {
76773  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
76774  } else
76775  /*@SWIG@*/
76776  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76777  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
76778  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
76779  } else
76780  /*@SWIG@*/
76781  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76782  if (dynamic_cast<faiss::IndexLSH *> (result)) {
76783  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
76784  } else
76785  /*@SWIG@*/
76786  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76787  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
76788  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
76789  } else
76790  /*@SWIG@*/
76791  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76792  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
76793  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
76794  } else
76795  /*@SWIG@*/
76796  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76797  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
76798  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
76799  } else
76800  /*@SWIG@*/
76801  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76802  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
76803  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
76804  } else
76805  /*@SWIG@*/
76806  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76807  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
76808  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
76809  } else
76810  /*@SWIG@*/
76811  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76812  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
76813  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
76814  } else
76815  /*@SWIG@*/
76816  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76817  if (dynamic_cast<faiss::Index2Layer *> (result)) {
76818  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
76819  } else
76820  /*@SWIG@*/
76821 
76822  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76823  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
76824  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
76825  } else
76826  /*@SWIG@*/
76827  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76828  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
76829  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
76830  } else
76831  /*@SWIG@*/
76832  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76833  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
76834  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
76835  } else
76836  /*@SWIG@*/
76837  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76838  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
76839  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
76840  } else
76841  /*@SWIG@*/
76842 
76843  // default for non-recognized classes
76844  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76845  if (dynamic_cast<faiss::Index *> (result)) {
76846  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
76847  } else
76848  /*@SWIG@*/
76849  if (result == NULL)
76850  {
76851  resultobj = SWIG_Py_Void();
76852 
76853  // Lua does not need a push for nil
76854  } else {
76855  assert(false);
76856  }
76857 
76858 
76859 
76860  }
76861  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
76862  return resultobj;
76863 fail:
76864  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
76865  return NULL;
76866 }
76867 
76868 
76869 SWIGINTERN PyObject *_wrap_index_factory(PyObject *self, PyObject *args) {
76870  Py_ssize_t argc;
76871  PyObject *argv[4] = {
76872  0
76873  };
76874  Py_ssize_t ii;
76875 
76876  if (!PyTuple_Check(args)) SWIG_fail;
76877  argc = args ? PyObject_Length(args) : 0;
76878  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
76879  argv[ii] = PyTuple_GET_ITEM(args,ii);
76880  }
76881  if (argc == 2) {
76882  int _v;
76883  {
76884  int res = SWIG_AsVal_int(argv[0], NULL);
76885  _v = SWIG_CheckState(res);
76886  }
76887  if (_v) {
76888  int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
76889  _v = SWIG_CheckState(res);
76890  if (_v) {
76891  return _wrap_index_factory__SWIG_1(self, args);
76892  }
76893  }
76894  }
76895  if (argc == 3) {
76896  int _v;
76897  {
76898  int res = SWIG_AsVal_int(argv[0], NULL);
76899  _v = SWIG_CheckState(res);
76900  }
76901  if (_v) {
76902  int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
76903  _v = SWIG_CheckState(res);
76904  if (_v) {
76905  {
76906  int res = SWIG_AsVal_int(argv[2], NULL);
76907  _v = SWIG_CheckState(res);
76908  }
76909  if (_v) {
76910  return _wrap_index_factory__SWIG_0(self, args);
76911  }
76912  }
76913  }
76914  }
76915 
76916 fail:
76917  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'index_factory'.\n"
76918  " Possible C/C++ prototypes are:\n"
76919  " faiss::index_factory(int,char const *,faiss::MetricType)\n"
76920  " faiss::index_factory(int,char const *)\n");
76921  return 0;
76922 }
76923 
76924 
76925 SWIGINTERN PyObject *_wrap_index_binary_factory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76926  PyObject *resultobj = 0;
76927  int arg1 ;
76928  char *arg2 = (char *) 0 ;
76929  int val1 ;
76930  int ecode1 = 0 ;
76931  int res2 ;
76932  char *buf2 = 0 ;
76933  int alloc2 = 0 ;
76934  PyObject * obj0 = 0 ;
76935  PyObject * obj1 = 0 ;
76936  faiss::IndexBinary *result = 0 ;
76937 
76938  if (!PyArg_ParseTuple(args,(char *)"OO:index_binary_factory",&obj0,&obj1)) SWIG_fail;
76939  ecode1 = SWIG_AsVal_int(obj0, &val1);
76940  if (!SWIG_IsOK(ecode1)) {
76941  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "index_binary_factory" "', argument " "1"" of type '" "int""'");
76942  }
76943  arg1 = static_cast< int >(val1);
76944  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
76945  if (!SWIG_IsOK(res2)) {
76946  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_binary_factory" "', argument " "2"" of type '" "char const *""'");
76947  }
76948  arg2 = reinterpret_cast< char * >(buf2);
76949  {
76950  Py_BEGIN_ALLOW_THREADS
76951  try {
76952  result = (faiss::IndexBinary *)faiss::index_binary_factory(arg1,(char const *)arg2);
76953  } catch(faiss::FaissException & e) {
76954  PyEval_RestoreThread(_save);
76955  PyErr_SetString(PyExc_RuntimeError, e.what());
76956  SWIG_fail;
76957  }
76958  Py_END_ALLOW_THREADS
76959  }
76960  {
76961  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76962  if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
76963  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
76964  } else
76965  /*@SWIG@*/
76966  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76967  if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
76968  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
76969  } else
76970  /*@SWIG@*/
76971  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76972  if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
76973  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
76974  } else
76975  /*@SWIG@*/
76976  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76977  if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
76978  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
76979  } else
76980  /*@SWIG@*/
76981 
76982  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
76983  if (dynamic_cast<faiss::gpu::GpuIndexBinaryFlat *> (result)) {
76984  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexBinaryFlat,SWIG_POINTER_OWN);
76985  } else
76986  /*@SWIG@*/
76987 
76988  // default for non-recognized classes
76989  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
76990  if (dynamic_cast<faiss::IndexBinary *> (result)) {
76991  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
76992  } else
76993  /*@SWIG@*/
76994  if (result == NULL)
76995  {
76996  resultobj = SWIG_Py_Void();
76997 
76998  // Lua does not need a push for nil
76999  } else {
77000  assert(false);
77001  }
77002 
77003 
77004 
77005  }
77006  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77007  return resultobj;
77008 fail:
77009  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
77010  return NULL;
77011 }
77012 
77013 
77014 SWIGINTERN PyObject *_wrap_index_gpu_to_cpu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77015  PyObject *resultobj = 0;
77016  faiss::Index *arg1 = (faiss::Index *) 0 ;
77017  void *argp1 = 0 ;
77018  int res1 = 0 ;
77019  PyObject * obj0 = 0 ;
77020  faiss::Index *result = 0 ;
77021 
77022  if (!PyArg_ParseTuple(args,(char *)"O:index_gpu_to_cpu",&obj0)) SWIG_fail;
77023  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
77024  if (!SWIG_IsOK(res1)) {
77025  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_gpu_to_cpu" "', argument " "1"" of type '" "faiss::Index const *""'");
77026  }
77027  arg1 = reinterpret_cast< faiss::Index * >(argp1);
77028  {
77029  Py_BEGIN_ALLOW_THREADS
77030  try {
77031  result = (faiss::Index *)faiss::gpu::index_gpu_to_cpu((faiss::Index const *)arg1);
77032  } catch(faiss::FaissException & e) {
77033  PyEval_RestoreThread(_save);
77034  PyErr_SetString(PyExc_RuntimeError, e.what());
77035  SWIG_fail;
77036  }
77037  Py_END_ALLOW_THREADS
77038  }
77039  {
77040  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77041  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
77042  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
77043  } else
77044  /*@SWIG@*/
77045  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77046  if (dynamic_cast<faiss::IndexShards *> (result)) {
77047  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
77048  } else
77049  /*@SWIG@*/
77050  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77051  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
77052  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
77053  } else
77054  /*@SWIG@*/
77055  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77056  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
77057  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
77058  } else
77059  /*@SWIG@*/
77060  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77061  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
77062  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
77063  } else
77064  /*@SWIG@*/
77065  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77066  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
77067  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
77068  } else
77069  /*@SWIG@*/
77070  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77071  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
77072  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
77073  } else
77074  /*@SWIG@*/
77075  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77076  if (dynamic_cast<faiss::IndexIVF *> (result)) {
77077  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
77078  } else
77079  /*@SWIG@*/
77080  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77081  if (dynamic_cast<faiss::IndexFlat *> (result)) {
77082  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
77083  } else
77084  /*@SWIG@*/
77085  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77086  if (dynamic_cast<faiss::IndexPQ *> (result)) {
77087  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
77088  } else
77089  /*@SWIG@*/
77090  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77091  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
77092  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
77093  } else
77094  /*@SWIG@*/
77095  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77096  if (dynamic_cast<faiss::IndexLSH *> (result)) {
77097  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
77098  } else
77099  /*@SWIG@*/
77100  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77101  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
77102  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
77103  } else
77104  /*@SWIG@*/
77105  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77106  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
77107  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
77108  } else
77109  /*@SWIG@*/
77110  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77111  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
77112  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
77113  } else
77114  /*@SWIG@*/
77115  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77116  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
77117  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
77118  } else
77119  /*@SWIG@*/
77120  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77121  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
77122  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
77123  } else
77124  /*@SWIG@*/
77125  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77126  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
77127  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
77128  } else
77129  /*@SWIG@*/
77130  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77131  if (dynamic_cast<faiss::Index2Layer *> (result)) {
77132  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
77133  } else
77134  /*@SWIG@*/
77135 
77136  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77137  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
77138  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
77139  } else
77140  /*@SWIG@*/
77141  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77142  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
77143  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
77144  } else
77145  /*@SWIG@*/
77146  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77147  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
77148  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
77149  } else
77150  /*@SWIG@*/
77151  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77152  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
77153  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
77154  } else
77155  /*@SWIG@*/
77156 
77157  // default for non-recognized classes
77158  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77159  if (dynamic_cast<faiss::Index *> (result)) {
77160  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
77161  } else
77162  /*@SWIG@*/
77163  if (result == NULL)
77164  {
77165  resultobj = SWIG_Py_Void();
77166 
77167  // Lua does not need a push for nil
77168  } else {
77169  assert(false);
77170  }
77171 
77172 
77173 
77174  }
77175  return resultobj;
77176 fail:
77177  return NULL;
77178 }
77179 
77180 
77181 SWIGINTERN PyObject *_wrap_index_cpu_to_gpu__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77182  PyObject *resultobj = 0;
77184  int arg2 ;
77185  faiss::Index *arg3 = (faiss::Index *) 0 ;
77187  void *argp1 = 0 ;
77188  int res1 = 0 ;
77189  int val2 ;
77190  int ecode2 = 0 ;
77191  void *argp3 = 0 ;
77192  int res3 = 0 ;
77193  void *argp4 = 0 ;
77194  int res4 = 0 ;
77195  PyObject * obj0 = 0 ;
77196  PyObject * obj1 = 0 ;
77197  PyObject * obj2 = 0 ;
77198  PyObject * obj3 = 0 ;
77199  faiss::Index *result = 0 ;
77200 
77201  if (!PyArg_ParseTuple(args,(char *)"OOOO:index_cpu_to_gpu",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
77202  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
77203  if (!SWIG_IsOK(res1)) {
77204  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_cpu_to_gpu" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
77205  }
77206  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
77207  ecode2 = SWIG_AsVal_int(obj1, &val2);
77208  if (!SWIG_IsOK(ecode2)) {
77209  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_cpu_to_gpu" "', argument " "2"" of type '" "int""'");
77210  }
77211  arg2 = static_cast< int >(val2);
77212  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_faiss__Index, 0 | 0 );
77213  if (!SWIG_IsOK(res3)) {
77214  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "index_cpu_to_gpu" "', argument " "3"" of type '" "faiss::Index const *""'");
77215  }
77216  arg3 = reinterpret_cast< faiss::Index * >(argp3);
77217  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0 | 0 );
77218  if (!SWIG_IsOK(res4)) {
77219  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "index_cpu_to_gpu" "', argument " "4"" of type '" "faiss::gpu::GpuClonerOptions const *""'");
77220  }
77221  arg4 = reinterpret_cast< faiss::gpu::GpuClonerOptions * >(argp4);
77222  {
77223  Py_BEGIN_ALLOW_THREADS
77224  try {
77225  result = (faiss::Index *)faiss::gpu::index_cpu_to_gpu(arg1,arg2,(faiss::Index const *)arg3,(faiss::gpu::GpuClonerOptions const *)arg4);
77226  } catch(faiss::FaissException & e) {
77227  PyEval_RestoreThread(_save);
77228  PyErr_SetString(PyExc_RuntimeError, e.what());
77229  SWIG_fail;
77230  }
77231  Py_END_ALLOW_THREADS
77232  }
77233  {
77234  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77235  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
77236  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
77237  } else
77238  /*@SWIG@*/
77239  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77240  if (dynamic_cast<faiss::IndexShards *> (result)) {
77241  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
77242  } else
77243  /*@SWIG@*/
77244  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77245  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
77246  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
77247  } else
77248  /*@SWIG@*/
77249  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77250  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
77251  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
77252  } else
77253  /*@SWIG@*/
77254  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77255  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
77256  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
77257  } else
77258  /*@SWIG@*/
77259  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77260  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
77261  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
77262  } else
77263  /*@SWIG@*/
77264  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77265  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
77266  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
77267  } else
77268  /*@SWIG@*/
77269  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77270  if (dynamic_cast<faiss::IndexIVF *> (result)) {
77271  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
77272  } else
77273  /*@SWIG@*/
77274  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77275  if (dynamic_cast<faiss::IndexFlat *> (result)) {
77276  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
77277  } else
77278  /*@SWIG@*/
77279  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77280  if (dynamic_cast<faiss::IndexPQ *> (result)) {
77281  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
77282  } else
77283  /*@SWIG@*/
77284  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77285  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
77286  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
77287  } else
77288  /*@SWIG@*/
77289  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77290  if (dynamic_cast<faiss::IndexLSH *> (result)) {
77291  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
77292  } else
77293  /*@SWIG@*/
77294  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77295  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
77296  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
77297  } else
77298  /*@SWIG@*/
77299  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77300  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
77301  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
77302  } else
77303  /*@SWIG@*/
77304  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77305  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
77306  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
77307  } else
77308  /*@SWIG@*/
77309  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77310  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
77311  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
77312  } else
77313  /*@SWIG@*/
77314  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77315  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
77316  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
77317  } else
77318  /*@SWIG@*/
77319  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77320  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
77321  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
77322  } else
77323  /*@SWIG@*/
77324  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77325  if (dynamic_cast<faiss::Index2Layer *> (result)) {
77326  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
77327  } else
77328  /*@SWIG@*/
77329 
77330  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77331  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
77332  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
77333  } else
77334  /*@SWIG@*/
77335  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77336  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
77337  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
77338  } else
77339  /*@SWIG@*/
77340  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77341  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
77342  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
77343  } else
77344  /*@SWIG@*/
77345  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77346  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
77347  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
77348  } else
77349  /*@SWIG@*/
77350 
77351  // default for non-recognized classes
77352  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77353  if (dynamic_cast<faiss::Index *> (result)) {
77354  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
77355  } else
77356  /*@SWIG@*/
77357  if (result == NULL)
77358  {
77359  resultobj = SWIG_Py_Void();
77360 
77361  // Lua does not need a push for nil
77362  } else {
77363  assert(false);
77364  }
77365 
77366 
77367 
77368  }
77369  return resultobj;
77370 fail:
77371  return NULL;
77372 }
77373 
77374 
77375 SWIGINTERN PyObject *_wrap_index_cpu_to_gpu__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77376  PyObject *resultobj = 0;
77378  int arg2 ;
77379  faiss::Index *arg3 = (faiss::Index *) 0 ;
77380  void *argp1 = 0 ;
77381  int res1 = 0 ;
77382  int val2 ;
77383  int ecode2 = 0 ;
77384  void *argp3 = 0 ;
77385  int res3 = 0 ;
77386  PyObject * obj0 = 0 ;
77387  PyObject * obj1 = 0 ;
77388  PyObject * obj2 = 0 ;
77389  faiss::Index *result = 0 ;
77390 
77391  if (!PyArg_ParseTuple(args,(char *)"OOO:index_cpu_to_gpu",&obj0,&obj1,&obj2)) SWIG_fail;
77392  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuResources, 0 | 0 );
77393  if (!SWIG_IsOK(res1)) {
77394  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_cpu_to_gpu" "', argument " "1"" of type '" "faiss::gpu::GpuResources *""'");
77395  }
77396  arg1 = reinterpret_cast< faiss::gpu::GpuResources * >(argp1);
77397  ecode2 = SWIG_AsVal_int(obj1, &val2);
77398  if (!SWIG_IsOK(ecode2)) {
77399  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_cpu_to_gpu" "', argument " "2"" of type '" "int""'");
77400  }
77401  arg2 = static_cast< int >(val2);
77402  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_faiss__Index, 0 | 0 );
77403  if (!SWIG_IsOK(res3)) {
77404  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "index_cpu_to_gpu" "', argument " "3"" of type '" "faiss::Index const *""'");
77405  }
77406  arg3 = reinterpret_cast< faiss::Index * >(argp3);
77407  {
77408  Py_BEGIN_ALLOW_THREADS
77409  try {
77410  result = (faiss::Index *)faiss::gpu::index_cpu_to_gpu(arg1,arg2,(faiss::Index const *)arg3);
77411  } catch(faiss::FaissException & e) {
77412  PyEval_RestoreThread(_save);
77413  PyErr_SetString(PyExc_RuntimeError, e.what());
77414  SWIG_fail;
77415  }
77416  Py_END_ALLOW_THREADS
77417  }
77418  {
77419  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77420  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
77421  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
77422  } else
77423  /*@SWIG@*/
77424  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77425  if (dynamic_cast<faiss::IndexShards *> (result)) {
77426  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
77427  } else
77428  /*@SWIG@*/
77429  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77430  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
77431  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
77432  } else
77433  /*@SWIG@*/
77434  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77435  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
77436  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
77437  } else
77438  /*@SWIG@*/
77439  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77440  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
77441  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
77442  } else
77443  /*@SWIG@*/
77444  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77445  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
77446  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
77447  } else
77448  /*@SWIG@*/
77449  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77450  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
77451  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
77452  } else
77453  /*@SWIG@*/
77454  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77455  if (dynamic_cast<faiss::IndexIVF *> (result)) {
77456  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
77457  } else
77458  /*@SWIG@*/
77459  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77460  if (dynamic_cast<faiss::IndexFlat *> (result)) {
77461  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
77462  } else
77463  /*@SWIG@*/
77464  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77465  if (dynamic_cast<faiss::IndexPQ *> (result)) {
77466  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
77467  } else
77468  /*@SWIG@*/
77469  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77470  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
77471  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
77472  } else
77473  /*@SWIG@*/
77474  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77475  if (dynamic_cast<faiss::IndexLSH *> (result)) {
77476  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
77477  } else
77478  /*@SWIG@*/
77479  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77480  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
77481  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
77482  } else
77483  /*@SWIG@*/
77484  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77485  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
77486  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
77487  } else
77488  /*@SWIG@*/
77489  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77490  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
77491  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
77492  } else
77493  /*@SWIG@*/
77494  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77495  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
77496  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
77497  } else
77498  /*@SWIG@*/
77499  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77500  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
77501  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
77502  } else
77503  /*@SWIG@*/
77504  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77505  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
77506  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
77507  } else
77508  /*@SWIG@*/
77509  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77510  if (dynamic_cast<faiss::Index2Layer *> (result)) {
77511  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
77512  } else
77513  /*@SWIG@*/
77514 
77515  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77516  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
77517  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
77518  } else
77519  /*@SWIG@*/
77520  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77521  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
77522  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
77523  } else
77524  /*@SWIG@*/
77525  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77526  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
77527  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
77528  } else
77529  /*@SWIG@*/
77530  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77531  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
77532  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
77533  } else
77534  /*@SWIG@*/
77535 
77536  // default for non-recognized classes
77537  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77538  if (dynamic_cast<faiss::Index *> (result)) {
77539  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
77540  } else
77541  /*@SWIG@*/
77542  if (result == NULL)
77543  {
77544  resultobj = SWIG_Py_Void();
77545 
77546  // Lua does not need a push for nil
77547  } else {
77548  assert(false);
77549  }
77550 
77551 
77552 
77553  }
77554  return resultobj;
77555 fail:
77556  return NULL;
77557 }
77558 
77559 
77560 SWIGINTERN PyObject *_wrap_index_cpu_to_gpu(PyObject *self, PyObject *args) {
77561  Py_ssize_t argc;
77562  PyObject *argv[5] = {
77563  0
77564  };
77565  Py_ssize_t ii;
77566 
77567  if (!PyTuple_Check(args)) SWIG_fail;
77568  argc = args ? PyObject_Length(args) : 0;
77569  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
77570  argv[ii] = PyTuple_GET_ITEM(args,ii);
77571  }
77572  if (argc == 3) {
77573  int _v;
77574  void *vptr = 0;
77575  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
77576  _v = SWIG_CheckState(res);
77577  if (_v) {
77578  {
77579  int res = SWIG_AsVal_int(argv[1], NULL);
77580  _v = SWIG_CheckState(res);
77581  }
77582  if (_v) {
77583  void *vptr = 0;
77584  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_faiss__Index, 0);
77585  _v = SWIG_CheckState(res);
77586  if (_v) {
77587  return _wrap_index_cpu_to_gpu__SWIG_1(self, args);
77588  }
77589  }
77590  }
77591  }
77592  if (argc == 4) {
77593  int _v;
77594  void *vptr = 0;
77595  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__gpu__GpuResources, 0);
77596  _v = SWIG_CheckState(res);
77597  if (_v) {
77598  {
77599  int res = SWIG_AsVal_int(argv[1], NULL);
77600  _v = SWIG_CheckState(res);
77601  }
77602  if (_v) {
77603  void *vptr = 0;
77604  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_faiss__Index, 0);
77605  _v = SWIG_CheckState(res);
77606  if (_v) {
77607  void *vptr = 0;
77608  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_faiss__gpu__GpuClonerOptions, 0);
77609  _v = SWIG_CheckState(res);
77610  if (_v) {
77611  return _wrap_index_cpu_to_gpu__SWIG_0(self, args);
77612  }
77613  }
77614  }
77615  }
77616  }
77617 
77618 fail:
77619  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'index_cpu_to_gpu'.\n"
77620  " Possible C/C++ prototypes are:\n"
77621  " faiss::gpu::index_cpu_to_gpu(faiss::gpu::GpuResources *,int,faiss::Index const *,faiss::gpu::GpuClonerOptions const *)\n"
77622  " faiss::gpu::index_cpu_to_gpu(faiss::gpu::GpuResources *,int,faiss::Index const *)\n");
77623  return 0;
77624 }
77625 
77626 
77627 SWIGINTERN PyObject *_wrap_index_cpu_to_gpu_multiple__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77628  PyObject *resultobj = 0;
77629  std::vector< faiss::gpu::GpuResources * > *arg1 = 0 ;
77630  std::vector< int > *arg2 = 0 ;
77631  faiss::Index *arg3 = (faiss::Index *) 0 ;
77633  void *argp1 = 0 ;
77634  int res1 = 0 ;
77635  void *argp2 = 0 ;
77636  int res2 = 0 ;
77637  void *argp3 = 0 ;
77638  int res3 = 0 ;
77639  void *argp4 = 0 ;
77640  int res4 = 0 ;
77641  PyObject * obj0 = 0 ;
77642  PyObject * obj1 = 0 ;
77643  PyObject * obj2 = 0 ;
77644  PyObject * obj3 = 0 ;
77645  faiss::Index *result = 0 ;
77646 
77647  if (!PyArg_ParseTuple(args,(char *)"OOOO:index_cpu_to_gpu_multiple",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
77648  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 );
77649  if (!SWIG_IsOK(res1)) {
77650  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_cpu_to_gpu_multiple" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > &""'");
77651  }
77652  if (!argp1) {
77653  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "index_cpu_to_gpu_multiple" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > &""'");
77654  }
77655  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
77656  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_t, 0 );
77657  if (!SWIG_IsOK(res2)) {
77658  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_cpu_to_gpu_multiple" "', argument " "2"" of type '" "std::vector< int > &""'");
77659  }
77660  if (!argp2) {
77661  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "index_cpu_to_gpu_multiple" "', argument " "2"" of type '" "std::vector< int > &""'");
77662  }
77663  arg2 = reinterpret_cast< std::vector< int > * >(argp2);
77664  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_faiss__Index, 0 | 0 );
77665  if (!SWIG_IsOK(res3)) {
77666  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "index_cpu_to_gpu_multiple" "', argument " "3"" of type '" "faiss::Index const *""'");
77667  }
77668  arg3 = reinterpret_cast< faiss::Index * >(argp3);
77669  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, 0 | 0 );
77670  if (!SWIG_IsOK(res4)) {
77671  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "index_cpu_to_gpu_multiple" "', argument " "4"" of type '" "faiss::gpu::GpuMultipleClonerOptions const *""'");
77672  }
77673  arg4 = reinterpret_cast< faiss::gpu::GpuMultipleClonerOptions * >(argp4);
77674  {
77675  Py_BEGIN_ALLOW_THREADS
77676  try {
77677  result = (faiss::Index *)faiss::gpu::index_cpu_to_gpu_multiple(*arg1,*arg2,(faiss::Index const *)arg3,(faiss::gpu::GpuMultipleClonerOptions const *)arg4);
77678  } catch(faiss::FaissException & e) {
77679  PyEval_RestoreThread(_save);
77680  PyErr_SetString(PyExc_RuntimeError, e.what());
77681  SWIG_fail;
77682  }
77683  Py_END_ALLOW_THREADS
77684  }
77685  {
77686  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77687  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
77688  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
77689  } else
77690  /*@SWIG@*/
77691  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77692  if (dynamic_cast<faiss::IndexShards *> (result)) {
77693  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
77694  } else
77695  /*@SWIG@*/
77696  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77697  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
77698  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
77699  } else
77700  /*@SWIG@*/
77701  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77702  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
77703  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
77704  } else
77705  /*@SWIG@*/
77706  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77707  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
77708  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
77709  } else
77710  /*@SWIG@*/
77711  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77712  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
77713  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
77714  } else
77715  /*@SWIG@*/
77716  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77717  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
77718  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
77719  } else
77720  /*@SWIG@*/
77721  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77722  if (dynamic_cast<faiss::IndexIVF *> (result)) {
77723  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
77724  } else
77725  /*@SWIG@*/
77726  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77727  if (dynamic_cast<faiss::IndexFlat *> (result)) {
77728  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
77729  } else
77730  /*@SWIG@*/
77731  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77732  if (dynamic_cast<faiss::IndexPQ *> (result)) {
77733  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
77734  } else
77735  /*@SWIG@*/
77736  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77737  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
77738  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
77739  } else
77740  /*@SWIG@*/
77741  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77742  if (dynamic_cast<faiss::IndexLSH *> (result)) {
77743  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
77744  } else
77745  /*@SWIG@*/
77746  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77747  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
77748  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
77749  } else
77750  /*@SWIG@*/
77751  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77752  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
77753  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
77754  } else
77755  /*@SWIG@*/
77756  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77757  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
77758  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
77759  } else
77760  /*@SWIG@*/
77761  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77762  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
77763  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
77764  } else
77765  /*@SWIG@*/
77766  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77767  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
77768  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
77769  } else
77770  /*@SWIG@*/
77771  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77772  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
77773  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
77774  } else
77775  /*@SWIG@*/
77776  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77777  if (dynamic_cast<faiss::Index2Layer *> (result)) {
77778  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
77779  } else
77780  /*@SWIG@*/
77781 
77782  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77783  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
77784  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
77785  } else
77786  /*@SWIG@*/
77787  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77788  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
77789  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
77790  } else
77791  /*@SWIG@*/
77792  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77793  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
77794  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
77795  } else
77796  /*@SWIG@*/
77797  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77798  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
77799  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
77800  } else
77801  /*@SWIG@*/
77802 
77803  // default for non-recognized classes
77804  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77805  if (dynamic_cast<faiss::Index *> (result)) {
77806  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
77807  } else
77808  /*@SWIG@*/
77809  if (result == NULL)
77810  {
77811  resultobj = SWIG_Py_Void();
77812 
77813  // Lua does not need a push for nil
77814  } else {
77815  assert(false);
77816  }
77817 
77818 
77819 
77820  }
77821  return resultobj;
77822 fail:
77823  return NULL;
77824 }
77825 
77826 
77827 SWIGINTERN PyObject *_wrap_index_cpu_to_gpu_multiple__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
77828  PyObject *resultobj = 0;
77829  std::vector< faiss::gpu::GpuResources * > *arg1 = 0 ;
77830  std::vector< int > *arg2 = 0 ;
77831  faiss::Index *arg3 = (faiss::Index *) 0 ;
77832  void *argp1 = 0 ;
77833  int res1 = 0 ;
77834  void *argp2 = 0 ;
77835  int res2 = 0 ;
77836  void *argp3 = 0 ;
77837  int res3 = 0 ;
77838  PyObject * obj0 = 0 ;
77839  PyObject * obj1 = 0 ;
77840  PyObject * obj2 = 0 ;
77841  faiss::Index *result = 0 ;
77842 
77843  if (!PyArg_ParseTuple(args,(char *)"OOO:index_cpu_to_gpu_multiple",&obj0,&obj1,&obj2)) SWIG_fail;
77844  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0 );
77845  if (!SWIG_IsOK(res1)) {
77846  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_cpu_to_gpu_multiple" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > &""'");
77847  }
77848  if (!argp1) {
77849  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "index_cpu_to_gpu_multiple" "', argument " "1"" of type '" "std::vector< faiss::gpu::GpuResources * > &""'");
77850  }
77851  arg1 = reinterpret_cast< std::vector< faiss::gpu::GpuResources * > * >(argp1);
77852  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_t, 0 );
77853  if (!SWIG_IsOK(res2)) {
77854  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_cpu_to_gpu_multiple" "', argument " "2"" of type '" "std::vector< int > &""'");
77855  }
77856  if (!argp2) {
77857  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "index_cpu_to_gpu_multiple" "', argument " "2"" of type '" "std::vector< int > &""'");
77858  }
77859  arg2 = reinterpret_cast< std::vector< int > * >(argp2);
77860  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_faiss__Index, 0 | 0 );
77861  if (!SWIG_IsOK(res3)) {
77862  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "index_cpu_to_gpu_multiple" "', argument " "3"" of type '" "faiss::Index const *""'");
77863  }
77864  arg3 = reinterpret_cast< faiss::Index * >(argp3);
77865  {
77866  Py_BEGIN_ALLOW_THREADS
77867  try {
77868  result = (faiss::Index *)faiss::gpu::index_cpu_to_gpu_multiple(*arg1,*arg2,(faiss::Index const *)arg3);
77869  } catch(faiss::FaissException & e) {
77870  PyEval_RestoreThread(_save);
77871  PyErr_SetString(PyExc_RuntimeError, e.what());
77872  SWIG_fail;
77873  }
77874  Py_END_ALLOW_THREADS
77875  }
77876  {
77877  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77878  if (dynamic_cast<faiss::IndexIDMap *> (result)) {
77879  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
77880  } else
77881  /*@SWIG@*/
77882  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77883  if (dynamic_cast<faiss::IndexShards *> (result)) {
77884  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
77885  } else
77886  /*@SWIG@*/
77887  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77888  if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
77889  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
77890  } else
77891  /*@SWIG@*/
77892  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77893  if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
77894  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
77895  } else
77896  /*@SWIG@*/
77897  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77898  if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
77899  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
77900  } else
77901  /*@SWIG@*/
77902  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77903  if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
77904  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
77905  } else
77906  /*@SWIG@*/
77907  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77908  if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
77909  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
77910  } else
77911  /*@SWIG@*/
77912  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77913  if (dynamic_cast<faiss::IndexIVF *> (result)) {
77914  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
77915  } else
77916  /*@SWIG@*/
77917  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77918  if (dynamic_cast<faiss::IndexFlat *> (result)) {
77919  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
77920  } else
77921  /*@SWIG@*/
77922  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77923  if (dynamic_cast<faiss::IndexPQ *> (result)) {
77924  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
77925  } else
77926  /*@SWIG@*/
77927  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77928  if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
77929  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
77930  } else
77931  /*@SWIG@*/
77932  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77933  if (dynamic_cast<faiss::IndexLSH *> (result)) {
77934  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
77935  } else
77936  /*@SWIG@*/
77937  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77938  if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
77939  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
77940  } else
77941  /*@SWIG@*/
77942  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77943  if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
77944  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
77945  } else
77946  /*@SWIG@*/
77947  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77948  if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
77949  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
77950  } else
77951  /*@SWIG@*/
77952  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77953  if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
77954  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
77955  } else
77956  /*@SWIG@*/
77957  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77958  if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
77959  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
77960  } else
77961  /*@SWIG@*/
77962  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77963  if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
77964  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
77965  } else
77966  /*@SWIG@*/
77967  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77968  if (dynamic_cast<faiss::Index2Layer *> (result)) {
77969  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
77970  } else
77971  /*@SWIG@*/
77972 
77973  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77974  if (dynamic_cast<faiss::gpu::IndexProxy *> (result)) {
77975  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__IndexProxy,SWIG_POINTER_OWN);
77976  } else
77977  /*@SWIG@*/
77978  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77979  if (dynamic_cast<faiss::gpu::GpuIndexIVFPQ *> (result)) {
77980  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFPQ,SWIG_POINTER_OWN);
77981  } else
77982  /*@SWIG@*/
77983  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77984  if (dynamic_cast<faiss::gpu::GpuIndexIVFFlat *> (result)) {
77985  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexIVFFlat,SWIG_POINTER_OWN);
77986  } else
77987  /*@SWIG@*/
77988  /*@SWIG:swigfaiss.swig,443,DOWNCAST_GPU@*/
77989  if (dynamic_cast<faiss::gpu::GpuIndexFlat *> (result)) {
77990  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__gpu__GpuIndexFlat,SWIG_POINTER_OWN);
77991  } else
77992  /*@SWIG@*/
77993 
77994  // default for non-recognized classes
77995  /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
77996  if (dynamic_cast<faiss::Index *> (result)) {
77997  resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
77998  } else
77999  /*@SWIG@*/
78000  if (result == NULL)
78001  {
78002  resultobj = SWIG_Py_Void();
78003 
78004  // Lua does not need a push for nil
78005  } else {
78006  assert(false);
78007  }
78008 
78009 
78010 
78011  }
78012  return resultobj;
78013 fail:
78014  return NULL;
78015 }
78016 
78017 
78018 SWIGINTERN PyObject *_wrap_index_cpu_to_gpu_multiple(PyObject *self, PyObject *args) {
78019  Py_ssize_t argc;
78020  PyObject *argv[5] = {
78021  0
78022  };
78023  Py_ssize_t ii;
78024 
78025  if (!PyTuple_Check(args)) SWIG_fail;
78026  argc = args ? PyObject_Length(args) : 0;
78027  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
78028  argv[ii] = PyTuple_GET_ITEM(args,ii);
78029  }
78030  if (argc == 3) {
78031  int _v;
78032  void *vptr = 0;
78033  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0);
78034  _v = SWIG_CheckState(res);
78035  if (_v) {
78036  void *vptr = 0;
78037  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_int_t, 0);
78038  _v = SWIG_CheckState(res);
78039  if (_v) {
78040  void *vptr = 0;
78041  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_faiss__Index, 0);
78042  _v = SWIG_CheckState(res);
78043  if (_v) {
78044  return _wrap_index_cpu_to_gpu_multiple__SWIG_1(self, args);
78045  }
78046  }
78047  }
78048  }
78049  if (argc == 4) {
78050  int _v;
78051  void *vptr = 0;
78052  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__vectorT_faiss__gpu__GpuResources_p_t, 0);
78053  _v = SWIG_CheckState(res);
78054  if (_v) {
78055  void *vptr = 0;
78056  int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__vectorT_int_t, 0);
78057  _v = SWIG_CheckState(res);
78058  if (_v) {
78059  void *vptr = 0;
78060  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_faiss__Index, 0);
78061  _v = SWIG_CheckState(res);
78062  if (_v) {
78063  void *vptr = 0;
78064  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_faiss__gpu__GpuMultipleClonerOptions, 0);
78065  _v = SWIG_CheckState(res);
78066  if (_v) {
78067  return _wrap_index_cpu_to_gpu_multiple__SWIG_0(self, args);
78068  }
78069  }
78070  }
78071  }
78072  }
78073 
78074 fail:
78075  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'index_cpu_to_gpu_multiple'.\n"
78076  " Possible C/C++ prototypes are:\n"
78077  " faiss::gpu::index_cpu_to_gpu_multiple(std::vector< faiss::gpu::GpuResources * > &,std::vector< int > &,faiss::Index const *,faiss::gpu::GpuMultipleClonerOptions const *)\n"
78078  " faiss::gpu::index_cpu_to_gpu_multiple(std::vector< faiss::gpu::GpuResources * > &,std::vector< int > &,faiss::Index const *)\n");
78079  return 0;
78080 }
78081 
78082 
78083 SWIGINTERN PyObject *_wrap_GpuParameterSpace_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78084  PyObject *resultobj = 0;
78086  faiss::Index *arg2 = (faiss::Index *) 0 ;
78087  void *argp1 = 0 ;
78088  int res1 = 0 ;
78089  void *argp2 = 0 ;
78090  int res2 = 0 ;
78091  PyObject * obj0 = 0 ;
78092  PyObject * obj1 = 0 ;
78093 
78094  if (!PyArg_ParseTuple(args,(char *)"OO:GpuParameterSpace_initialize",&obj0,&obj1)) SWIG_fail;
78095  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuParameterSpace, 0 | 0 );
78096  if (!SWIG_IsOK(res1)) {
78097  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuParameterSpace_initialize" "', argument " "1"" of type '" "faiss::gpu::GpuParameterSpace *""'");
78098  }
78099  arg1 = reinterpret_cast< faiss::gpu::GpuParameterSpace * >(argp1);
78100  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
78101  if (!SWIG_IsOK(res2)) {
78102  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuParameterSpace_initialize" "', argument " "2"" of type '" "faiss::Index const *""'");
78103  }
78104  arg2 = reinterpret_cast< faiss::Index * >(argp2);
78105  {
78106  Py_BEGIN_ALLOW_THREADS
78107  try {
78108  (arg1)->initialize((faiss::Index const *)arg2);
78109  } catch(faiss::FaissException & e) {
78110  PyEval_RestoreThread(_save);
78111  PyErr_SetString(PyExc_RuntimeError, e.what());
78112  SWIG_fail;
78113  }
78114  Py_END_ALLOW_THREADS
78115  }
78116  resultobj = SWIG_Py_Void();
78117  return resultobj;
78118 fail:
78119  return NULL;
78120 }
78121 
78122 
78123 SWIGINTERN PyObject *_wrap_GpuParameterSpace_set_index_parameter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78124  PyObject *resultobj = 0;
78126  faiss::Index *arg2 = (faiss::Index *) 0 ;
78127  std::string *arg3 = 0 ;
78128  double arg4 ;
78129  void *argp1 = 0 ;
78130  int res1 = 0 ;
78131  void *argp2 = 0 ;
78132  int res2 = 0 ;
78133  int res3 = SWIG_OLDOBJ ;
78134  double val4 ;
78135  int ecode4 = 0 ;
78136  PyObject * obj0 = 0 ;
78137  PyObject * obj1 = 0 ;
78138  PyObject * obj2 = 0 ;
78139  PyObject * obj3 = 0 ;
78140 
78141  if (!PyArg_ParseTuple(args,(char *)"OOOO:GpuParameterSpace_set_index_parameter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
78142  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuParameterSpace, 0 | 0 );
78143  if (!SWIG_IsOK(res1)) {
78144  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GpuParameterSpace_set_index_parameter" "', argument " "1"" of type '" "faiss::gpu::GpuParameterSpace const *""'");
78145  }
78146  arg1 = reinterpret_cast< faiss::gpu::GpuParameterSpace * >(argp1);
78147  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
78148  if (!SWIG_IsOK(res2)) {
78149  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GpuParameterSpace_set_index_parameter" "', argument " "2"" of type '" "faiss::Index *""'");
78150  }
78151  arg2 = reinterpret_cast< faiss::Index * >(argp2);
78152  {
78153  std::string *ptr = (std::string *)0;
78154  res3 = SWIG_AsPtr_std_string(obj2, &ptr);
78155  if (!SWIG_IsOK(res3)) {
78156  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GpuParameterSpace_set_index_parameter" "', argument " "3"" of type '" "std::string const &""'");
78157  }
78158  if (!ptr) {
78159  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GpuParameterSpace_set_index_parameter" "', argument " "3"" of type '" "std::string const &""'");
78160  }
78161  arg3 = ptr;
78162  }
78163  ecode4 = SWIG_AsVal_double(obj3, &val4);
78164  if (!SWIG_IsOK(ecode4)) {
78165  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GpuParameterSpace_set_index_parameter" "', argument " "4"" of type '" "double""'");
78166  }
78167  arg4 = static_cast< double >(val4);
78168  {
78169  Py_BEGIN_ALLOW_THREADS
78170  try {
78171  ((faiss::gpu::GpuParameterSpace const *)arg1)->set_index_parameter(arg2,(std::string const &)*arg3,arg4);
78172  } catch(faiss::FaissException & e) {
78173  PyEval_RestoreThread(_save);
78174  PyErr_SetString(PyExc_RuntimeError, e.what());
78175  SWIG_fail;
78176  }
78177  Py_END_ALLOW_THREADS
78178  }
78179  resultobj = SWIG_Py_Void();
78180  if (SWIG_IsNewObj(res3)) delete arg3;
78181  return resultobj;
78182 fail:
78183  if (SWIG_IsNewObj(res3)) delete arg3;
78184  return NULL;
78185 }
78186 
78187 
78188 SWIGINTERN PyObject *_wrap_new_GpuParameterSpace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78189  PyObject *resultobj = 0;
78190  faiss::gpu::GpuParameterSpace *result = 0 ;
78191 
78192  if (!PyArg_ParseTuple(args,(char *)":new_GpuParameterSpace")) SWIG_fail;
78194  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__gpu__GpuParameterSpace, SWIG_POINTER_NEW | 0 );
78195  return resultobj;
78196 fail:
78197  return NULL;
78198 }
78199 
78200 
78201 SWIGINTERN PyObject *_wrap_delete_GpuParameterSpace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78202  PyObject *resultobj = 0;
78204  void *argp1 = 0 ;
78205  int res1 = 0 ;
78206  PyObject * obj0 = 0 ;
78207 
78208  if (!PyArg_ParseTuple(args,(char *)"O:delete_GpuParameterSpace",&obj0)) SWIG_fail;
78209  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__gpu__GpuParameterSpace, SWIG_POINTER_DISOWN | 0 );
78210  if (!SWIG_IsOK(res1)) {
78211  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GpuParameterSpace" "', argument " "1"" of type '" "faiss::gpu::GpuParameterSpace *""'");
78212  }
78213  arg1 = reinterpret_cast< faiss::gpu::GpuParameterSpace * >(argp1);
78214  delete arg1;
78215  resultobj = SWIG_Py_Void();
78216  return resultobj;
78217 fail:
78218  return NULL;
78219 }
78220 
78221 
78222 SWIGINTERN PyObject *GpuParameterSpace_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78223  PyObject *obj;
78224  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
78225  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__gpu__GpuParameterSpace, SWIG_NewClientData(obj));
78226  return SWIG_Py_Void();
78227 }
78228 
78229 SWIGINTERN PyObject *_wrap_swig_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78230  PyObject *resultobj = 0;
78231  PyObject *arg1 = (PyObject *) 0 ;
78232  PyObject * obj0 = 0 ;
78233  PyObject *result = 0 ;
78234 
78235  if (!PyArg_ParseTuple(args,(char *)"O:swig_ptr",&obj0)) SWIG_fail;
78236  arg1 = obj0;
78237  result = (PyObject *)swig_ptr(arg1);
78238  resultobj = result;
78239  return resultobj;
78240 fail:
78241  return NULL;
78242 }
78243 
78244 
78245 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78246  PyObject *resultobj = 0;
78247  float *arg1 = (float *) 0 ;
78248  size_t arg2 ;
78249  void *argp1 = 0 ;
78250  int res1 = 0 ;
78251  size_t val2 ;
78252  int ecode2 = 0 ;
78253  PyObject * obj0 = 0 ;
78254  PyObject * obj1 = 0 ;
78255  PyObject *result = 0 ;
78256 
78257  if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
78258  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
78259  if (!SWIG_IsOK(res1)) {
78260  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "float *""'");
78261  }
78262  arg1 = reinterpret_cast< float * >(argp1);
78263  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78264  if (!SWIG_IsOK(ecode2)) {
78265  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
78266  }
78267  arg2 = static_cast< size_t >(val2);
78268  result = (PyObject *)rev_swig_ptr(arg1,arg2);
78269  resultobj = result;
78270  return resultobj;
78271 fail:
78272  return NULL;
78273 }
78274 
78275 
78276 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78277  PyObject *resultobj = 0;
78278  int *arg1 = (int *) 0 ;
78279  size_t arg2 ;
78280  void *argp1 = 0 ;
78281  int res1 = 0 ;
78282  size_t val2 ;
78283  int ecode2 = 0 ;
78284  PyObject * obj0 = 0 ;
78285  PyObject * obj1 = 0 ;
78286  PyObject *result = 0 ;
78287 
78288  if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
78289  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 );
78290  if (!SWIG_IsOK(res1)) {
78291  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "int *""'");
78292  }
78293  arg1 = reinterpret_cast< int * >(argp1);
78294  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78295  if (!SWIG_IsOK(ecode2)) {
78296  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
78297  }
78298  arg2 = static_cast< size_t >(val2);
78299  result = (PyObject *)rev_swig_ptr(arg1,arg2);
78300  resultobj = result;
78301  return resultobj;
78302 fail:
78303  return NULL;
78304 }
78305 
78306 
78307 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78308  PyObject *resultobj = 0;
78309  unsigned char *arg1 = (unsigned char *) 0 ;
78310  size_t arg2 ;
78311  void *argp1 = 0 ;
78312  int res1 = 0 ;
78313  size_t val2 ;
78314  int ecode2 = 0 ;
78315  PyObject * obj0 = 0 ;
78316  PyObject * obj1 = 0 ;
78317  PyObject *result = 0 ;
78318 
78319  if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
78320  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
78321  if (!SWIG_IsOK(res1)) {
78322  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "unsigned char *""'");
78323  }
78324  arg1 = reinterpret_cast< unsigned char * >(argp1);
78325  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78326  if (!SWIG_IsOK(ecode2)) {
78327  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
78328  }
78329  arg2 = static_cast< size_t >(val2);
78330  result = (PyObject *)rev_swig_ptr(arg1,arg2);
78331  resultobj = result;
78332  return resultobj;
78333 fail:
78334  return NULL;
78335 }
78336 
78337 
78338 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78339  PyObject *resultobj = 0;
78340  unsigned long *arg1 = (unsigned long *) 0 ;
78341  size_t arg2 ;
78342  void *argp1 = 0 ;
78343  int res1 = 0 ;
78344  size_t val2 ;
78345  int ecode2 = 0 ;
78346  PyObject * obj0 = 0 ;
78347  PyObject * obj1 = 0 ;
78348  PyObject *result = 0 ;
78349 
78350  if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
78351  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_long, 0 | 0 );
78352  if (!SWIG_IsOK(res1)) {
78353  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "unsigned long *""'");
78354  }
78355  arg1 = reinterpret_cast< unsigned long * >(argp1);
78356  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78357  if (!SWIG_IsOK(ecode2)) {
78358  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
78359  }
78360  arg2 = static_cast< size_t >(val2);
78361  result = (PyObject *)rev_swig_ptr(arg1,arg2);
78362  resultobj = result;
78363  return resultobj;
78364 fail:
78365  return NULL;
78366 }
78367 
78368 
78369 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78370  PyObject *resultobj = 0;
78371  long *arg1 = (long *) 0 ;
78372  size_t arg2 ;
78373  void *argp1 = 0 ;
78374  int res1 = 0 ;
78375  size_t val2 ;
78376  int ecode2 = 0 ;
78377  PyObject * obj0 = 0 ;
78378  PyObject * obj1 = 0 ;
78379  PyObject *result = 0 ;
78380 
78381  if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
78382  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_long, 0 | 0 );
78383  if (!SWIG_IsOK(res1)) {
78384  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "long *""'");
78385  }
78386  arg1 = reinterpret_cast< long * >(argp1);
78387  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78388  if (!SWIG_IsOK(ecode2)) {
78389  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
78390  }
78391  arg2 = static_cast< size_t >(val2);
78392  result = (PyObject *)rev_swig_ptr(arg1,arg2);
78393  resultobj = result;
78394  return resultobj;
78395 fail:
78396  return NULL;
78397 }
78398 
78399 
78400 SWIGINTERN PyObject *_wrap_rev_swig_ptr(PyObject *self, PyObject *args) {
78401  Py_ssize_t argc;
78402  PyObject *argv[3] = {
78403  0
78404  };
78405  Py_ssize_t ii;
78406 
78407  if (!PyTuple_Check(args)) SWIG_fail;
78408  argc = args ? PyObject_Length(args) : 0;
78409  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
78410  argv[ii] = PyTuple_GET_ITEM(args,ii);
78411  }
78412  if (argc == 2) {
78413  int _v;
78414  void *vptr = 0;
78415  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_float, 0);
78416  _v = SWIG_CheckState(res);
78417  if (_v) {
78418  {
78419  int res = SWIG_AsVal_size_t(argv[1], NULL);
78420  _v = SWIG_CheckState(res);
78421  }
78422  if (_v) {
78423  return _wrap_rev_swig_ptr__SWIG_0(self, args);
78424  }
78425  }
78426  }
78427  if (argc == 2) {
78428  int _v;
78429  void *vptr = 0;
78430  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_int, 0);
78431  _v = SWIG_CheckState(res);
78432  if (_v) {
78433  {
78434  int res = SWIG_AsVal_size_t(argv[1], NULL);
78435  _v = SWIG_CheckState(res);
78436  }
78437  if (_v) {
78438  return _wrap_rev_swig_ptr__SWIG_1(self, args);
78439  }
78440  }
78441  }
78442  if (argc == 2) {
78443  int _v;
78444  void *vptr = 0;
78445  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
78446  _v = SWIG_CheckState(res);
78447  if (_v) {
78448  {
78449  int res = SWIG_AsVal_size_t(argv[1], NULL);
78450  _v = SWIG_CheckState(res);
78451  }
78452  if (_v) {
78453  return _wrap_rev_swig_ptr__SWIG_2(self, args);
78454  }
78455  }
78456  }
78457  if (argc == 2) {
78458  int _v;
78459  void *vptr = 0;
78460  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_long, 0);
78461  _v = SWIG_CheckState(res);
78462  if (_v) {
78463  {
78464  int res = SWIG_AsVal_size_t(argv[1], NULL);
78465  _v = SWIG_CheckState(res);
78466  }
78467  if (_v) {
78468  return _wrap_rev_swig_ptr__SWIG_3(self, args);
78469  }
78470  }
78471  }
78472  if (argc == 2) {
78473  int _v;
78474  void *vptr = 0;
78475  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_long, 0);
78476  _v = SWIG_CheckState(res);
78477  if (_v) {
78478  {
78479  int res = SWIG_AsVal_size_t(argv[1], NULL);
78480  _v = SWIG_CheckState(res);
78481  }
78482  if (_v) {
78483  return _wrap_rev_swig_ptr__SWIG_4(self, args);
78484  }
78485  }
78486  }
78487 
78488 fail:
78489  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'rev_swig_ptr'.\n"
78490  " Possible C/C++ prototypes are:\n"
78491  " rev_swig_ptr(float *,size_t)\n"
78492  " rev_swig_ptr(int *,size_t)\n"
78493  " rev_swig_ptr(unsigned char *,size_t)\n"
78494  " rev_swig_ptr(unsigned long *,size_t)\n"
78495  " rev_swig_ptr(long *,size_t)\n");
78496  return 0;
78497 }
78498 
78499 
78500 SWIGINTERN PyObject *_wrap_float_minheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78501  PyObject *resultobj = 0;
78503  size_t arg2 ;
78504  void *argp1 = 0 ;
78505  int res1 = 0 ;
78506  size_t val2 ;
78507  int ecode2 = 0 ;
78508  PyObject * obj0 = 0 ;
78509  PyObject * obj1 = 0 ;
78510 
78511  if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
78512  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78513  if (!SWIG_IsOK(res1)) {
78514  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78515  }
78516  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78517  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78518  if (!SWIG_IsOK(ecode2)) {
78519  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
78520  }
78521  arg2 = static_cast< size_t >(val2);
78522  if (arg1) (arg1)->nh = arg2;
78523  resultobj = SWIG_Py_Void();
78524  return resultobj;
78525 fail:
78526  return NULL;
78527 }
78528 
78529 
78530 SWIGINTERN PyObject *_wrap_float_minheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78531  PyObject *resultobj = 0;
78533  void *argp1 = 0 ;
78534  int res1 = 0 ;
78535  PyObject * obj0 = 0 ;
78536  size_t result;
78537 
78538  if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_nh_get",&obj0)) SWIG_fail;
78539  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78540  if (!SWIG_IsOK(res1)) {
78541  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78542  }
78543  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78544  result = (size_t) ((arg1)->nh);
78545  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
78546  return resultobj;
78547 fail:
78548  return NULL;
78549 }
78550 
78551 
78552 SWIGINTERN PyObject *_wrap_float_minheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78553  PyObject *resultobj = 0;
78555  size_t arg2 ;
78556  void *argp1 = 0 ;
78557  int res1 = 0 ;
78558  size_t val2 ;
78559  int ecode2 = 0 ;
78560  PyObject * obj0 = 0 ;
78561  PyObject * obj1 = 0 ;
78562 
78563  if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
78564  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78565  if (!SWIG_IsOK(res1)) {
78566  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78567  }
78568  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78569  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78570  if (!SWIG_IsOK(ecode2)) {
78571  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
78572  }
78573  arg2 = static_cast< size_t >(val2);
78574  if (arg1) (arg1)->k = arg2;
78575  resultobj = SWIG_Py_Void();
78576  return resultobj;
78577 fail:
78578  return NULL;
78579 }
78580 
78581 
78582 SWIGINTERN PyObject *_wrap_float_minheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78583  PyObject *resultobj = 0;
78585  void *argp1 = 0 ;
78586  int res1 = 0 ;
78587  PyObject * obj0 = 0 ;
78588  size_t result;
78589 
78590  if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_k_get",&obj0)) SWIG_fail;
78591  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78592  if (!SWIG_IsOK(res1)) {
78593  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78594  }
78595  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78596  result = (size_t) ((arg1)->k);
78597  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
78598  return resultobj;
78599 fail:
78600  return NULL;
78601 }
78602 
78603 
78604 SWIGINTERN PyObject *_wrap_float_minheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78605  PyObject *resultobj = 0;
78608  void *argp1 = 0 ;
78609  int res1 = 0 ;
78610  void *argp2 = 0 ;
78611  int res2 = 0 ;
78612  PyObject * obj0 = 0 ;
78613  PyObject * obj1 = 0 ;
78614 
78615  if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
78616  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78617  if (!SWIG_IsOK(res1)) {
78618  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78619  }
78620  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78621  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
78622  if (!SWIG_IsOK(res2)) {
78623  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_minheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI *""'");
78624  }
78625  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp2);
78626  if (arg1) (arg1)->ids = arg2;
78627  resultobj = SWIG_Py_Void();
78628  return resultobj;
78629 fail:
78630  return NULL;
78631 }
78632 
78633 
78634 SWIGINTERN PyObject *_wrap_float_minheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78635  PyObject *resultobj = 0;
78637  void *argp1 = 0 ;
78638  int res1 = 0 ;
78639  PyObject * obj0 = 0 ;
78641 
78642  if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_ids_get",&obj0)) SWIG_fail;
78643  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78644  if (!SWIG_IsOK(res1)) {
78645  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78646  }
78647  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78648  result = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) ((arg1)->ids);
78649  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
78650  return resultobj;
78651 fail:
78652  return NULL;
78653 }
78654 
78655 
78656 SWIGINTERN PyObject *_wrap_float_minheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78657  PyObject *resultobj = 0;
78660  void *argp1 = 0 ;
78661  int res1 = 0 ;
78662  void *argp2 = 0 ;
78663  int res2 = 0 ;
78664  PyObject * obj0 = 0 ;
78665  PyObject * obj1 = 0 ;
78666 
78667  if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
78668  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78669  if (!SWIG_IsOK(res1)) {
78670  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78671  }
78672  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78673  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN | 0 );
78674  if (!SWIG_IsOK(res2)) {
78675  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_minheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T *""'");
78676  }
78677  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp2);
78678  if (arg1) (arg1)->val = arg2;
78679  resultobj = SWIG_Py_Void();
78680  return resultobj;
78681 fail:
78682  return NULL;
78683 }
78684 
78685 
78686 SWIGINTERN PyObject *_wrap_float_minheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78687  PyObject *resultobj = 0;
78689  void *argp1 = 0 ;
78690  int res1 = 0 ;
78691  PyObject * obj0 = 0 ;
78693 
78694  if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_val_get",&obj0)) SWIG_fail;
78695  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78696  if (!SWIG_IsOK(res1)) {
78697  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78698  }
78699  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78700  result = (faiss::HeapArray< faiss::CMin< float,long > >::T *) ((arg1)->val);
78701  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
78702  return resultobj;
78703 fail:
78704  return NULL;
78705 }
78706 
78707 
78708 SWIGINTERN PyObject *_wrap_float_minheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78709  PyObject *resultobj = 0;
78711  size_t arg2 ;
78712  void *argp1 = 0 ;
78713  int res1 = 0 ;
78714  size_t val2 ;
78715  int ecode2 = 0 ;
78716  PyObject * obj0 = 0 ;
78717  PyObject * obj1 = 0 ;
78719 
78720  if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
78721  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78722  if (!SWIG_IsOK(res1)) {
78723  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78724  }
78725  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78726  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78727  if (!SWIG_IsOK(ecode2)) {
78728  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
78729  }
78730  arg2 = static_cast< size_t >(val2);
78731  result = (faiss::HeapArray< faiss::CMin< float,long > >::T *)(arg1)->get_val(arg2);
78732  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
78733  return resultobj;
78734 fail:
78735  return NULL;
78736 }
78737 
78738 
78739 SWIGINTERN PyObject *_wrap_float_minheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78740  PyObject *resultobj = 0;
78742  size_t arg2 ;
78743  void *argp1 = 0 ;
78744  int res1 = 0 ;
78745  size_t val2 ;
78746  int ecode2 = 0 ;
78747  PyObject * obj0 = 0 ;
78748  PyObject * obj1 = 0 ;
78750 
78751  if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
78752  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78753  if (!SWIG_IsOK(res1)) {
78754  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78755  }
78756  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78757  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78758  if (!SWIG_IsOK(ecode2)) {
78759  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
78760  }
78761  arg2 = static_cast< size_t >(val2);
78762  result = (faiss::HeapArray< faiss::CMin< float,long > >::TI *)(arg1)->get_ids(arg2);
78763  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
78764  return resultobj;
78765 fail:
78766  return NULL;
78767 }
78768 
78769 
78770 SWIGINTERN PyObject *_wrap_float_minheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78771  PyObject *resultobj = 0;
78773  void *argp1 = 0 ;
78774  int res1 = 0 ;
78775  PyObject * obj0 = 0 ;
78776 
78777  if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_heapify",&obj0)) SWIG_fail;
78778  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78779  if (!SWIG_IsOK(res1)) {
78780  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78781  }
78782  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78783  (arg1)->heapify();
78784  resultobj = SWIG_Py_Void();
78785  return resultobj;
78786 fail:
78787  return NULL;
78788 }
78789 
78790 
78791 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78792  PyObject *resultobj = 0;
78794  size_t arg2 ;
78797  size_t arg5 ;
78798  long arg6 ;
78799  void *argp1 = 0 ;
78800  int res1 = 0 ;
78801  size_t val2 ;
78802  int ecode2 = 0 ;
78803  void *argp3 = 0 ;
78804  int res3 = 0 ;
78805  long val4 ;
78806  int ecode4 = 0 ;
78807  size_t val5 ;
78808  int ecode5 = 0 ;
78809  long val6 ;
78810  int ecode6 = 0 ;
78811  PyObject * obj0 = 0 ;
78812  PyObject * obj1 = 0 ;
78813  PyObject * obj2 = 0 ;
78814  PyObject * obj3 = 0 ;
78815  PyObject * obj4 = 0 ;
78816  PyObject * obj5 = 0 ;
78817 
78818  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
78819  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78820  if (!SWIG_IsOK(res1)) {
78821  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78822  }
78823  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78824  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78825  if (!SWIG_IsOK(ecode2)) {
78826  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
78827  }
78828  arg2 = static_cast< size_t >(val2);
78829  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
78830  if (!SWIG_IsOK(res3)) {
78831  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
78832  }
78833  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
78834  ecode4 = SWIG_AsVal_long(obj3, &val4);
78835  if (!SWIG_IsOK(ecode4)) {
78836  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI""'");
78837  }
78838  arg4 = static_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI >(val4);
78839  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
78840  if (!SWIG_IsOK(ecode5)) {
78841  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
78842  }
78843  arg5 = static_cast< size_t >(val5);
78844  ecode6 = SWIG_AsVal_long(obj5, &val6);
78845  if (!SWIG_IsOK(ecode6)) {
78846  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_minheap_array_t_addn" "', argument " "6"" of type '" "long""'");
78847  }
78848  arg6 = static_cast< long >(val6);
78849  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,arg4,arg5,arg6);
78850  resultobj = SWIG_Py_Void();
78851  return resultobj;
78852 fail:
78853  return NULL;
78854 }
78855 
78856 
78857 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78858  PyObject *resultobj = 0;
78860  size_t arg2 ;
78863  size_t arg5 ;
78864  void *argp1 = 0 ;
78865  int res1 = 0 ;
78866  size_t val2 ;
78867  int ecode2 = 0 ;
78868  void *argp3 = 0 ;
78869  int res3 = 0 ;
78870  long val4 ;
78871  int ecode4 = 0 ;
78872  size_t val5 ;
78873  int ecode5 = 0 ;
78874  PyObject * obj0 = 0 ;
78875  PyObject * obj1 = 0 ;
78876  PyObject * obj2 = 0 ;
78877  PyObject * obj3 = 0 ;
78878  PyObject * obj4 = 0 ;
78879 
78880  if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
78881  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78882  if (!SWIG_IsOK(res1)) {
78883  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78884  }
78885  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78886  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78887  if (!SWIG_IsOK(ecode2)) {
78888  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
78889  }
78890  arg2 = static_cast< size_t >(val2);
78891  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
78892  if (!SWIG_IsOK(res3)) {
78893  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
78894  }
78895  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
78896  ecode4 = SWIG_AsVal_long(obj3, &val4);
78897  if (!SWIG_IsOK(ecode4)) {
78898  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI""'");
78899  }
78900  arg4 = static_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI >(val4);
78901  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
78902  if (!SWIG_IsOK(ecode5)) {
78903  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
78904  }
78905  arg5 = static_cast< size_t >(val5);
78906  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,arg4,arg5);
78907  resultobj = SWIG_Py_Void();
78908  return resultobj;
78909 fail:
78910  return NULL;
78911 }
78912 
78913 
78914 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78915  PyObject *resultobj = 0;
78917  size_t arg2 ;
78920  void *argp1 = 0 ;
78921  int res1 = 0 ;
78922  size_t val2 ;
78923  int ecode2 = 0 ;
78924  void *argp3 = 0 ;
78925  int res3 = 0 ;
78926  long val4 ;
78927  int ecode4 = 0 ;
78928  PyObject * obj0 = 0 ;
78929  PyObject * obj1 = 0 ;
78930  PyObject * obj2 = 0 ;
78931  PyObject * obj3 = 0 ;
78932 
78933  if (!PyArg_ParseTuple(args,(char *)"OOOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
78934  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78935  if (!SWIG_IsOK(res1)) {
78936  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78937  }
78938  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78939  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78940  if (!SWIG_IsOK(ecode2)) {
78941  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
78942  }
78943  arg2 = static_cast< size_t >(val2);
78944  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
78945  if (!SWIG_IsOK(res3)) {
78946  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
78947  }
78948  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
78949  ecode4 = SWIG_AsVal_long(obj3, &val4);
78950  if (!SWIG_IsOK(ecode4)) {
78951  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI""'");
78952  }
78953  arg4 = static_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI >(val4);
78954  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,arg4);
78955  resultobj = SWIG_Py_Void();
78956  return resultobj;
78957 fail:
78958  return NULL;
78959 }
78960 
78961 
78962 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
78963  PyObject *resultobj = 0;
78965  size_t arg2 ;
78967  void *argp1 = 0 ;
78968  int res1 = 0 ;
78969  size_t val2 ;
78970  int ecode2 = 0 ;
78971  void *argp3 = 0 ;
78972  int res3 = 0 ;
78973  PyObject * obj0 = 0 ;
78974  PyObject * obj1 = 0 ;
78975  PyObject * obj2 = 0 ;
78976 
78977  if (!PyArg_ParseTuple(args,(char *)"OOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
78978  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
78979  if (!SWIG_IsOK(res1)) {
78980  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
78981  }
78982  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
78983  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
78984  if (!SWIG_IsOK(ecode2)) {
78985  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
78986  }
78987  arg2 = static_cast< size_t >(val2);
78988  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
78989  if (!SWIG_IsOK(res3)) {
78990  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
78991  }
78992  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
78993  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3);
78994  resultobj = SWIG_Py_Void();
78995  return resultobj;
78996 fail:
78997  return NULL;
78998 }
78999 
79000 
79001 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn(PyObject *self, PyObject *args) {
79002  Py_ssize_t argc;
79003  PyObject *argv[7] = {
79004  0
79005  };
79006  Py_ssize_t ii;
79007 
79008  if (!PyTuple_Check(args)) SWIG_fail;
79009  argc = args ? PyObject_Length(args) : 0;
79010  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
79011  argv[ii] = PyTuple_GET_ITEM(args,ii);
79012  }
79013  if (argc == 3) {
79014  int _v;
79015  void *vptr = 0;
79016  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79017  _v = SWIG_CheckState(res);
79018  if (_v) {
79019  {
79020  int res = SWIG_AsVal_size_t(argv[1], NULL);
79021  _v = SWIG_CheckState(res);
79022  }
79023  if (_v) {
79024  void *vptr = 0;
79025  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79026  _v = SWIG_CheckState(res);
79027  if (_v) {
79028  return _wrap_float_minheap_array_t_addn__SWIG_3(self, args);
79029  }
79030  }
79031  }
79032  }
79033  if (argc == 4) {
79034  int _v;
79035  void *vptr = 0;
79036  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79037  _v = SWIG_CheckState(res);
79038  if (_v) {
79039  {
79040  int res = SWIG_AsVal_size_t(argv[1], NULL);
79041  _v = SWIG_CheckState(res);
79042  }
79043  if (_v) {
79044  void *vptr = 0;
79045  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79046  _v = SWIG_CheckState(res);
79047  if (_v) {
79048  {
79049  int res = SWIG_AsVal_long(argv[3], NULL);
79050  _v = SWIG_CheckState(res);
79051  }
79052  if (_v) {
79053  return _wrap_float_minheap_array_t_addn__SWIG_2(self, args);
79054  }
79055  }
79056  }
79057  }
79058  }
79059  if (argc == 5) {
79060  int _v;
79061  void *vptr = 0;
79062  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79063  _v = SWIG_CheckState(res);
79064  if (_v) {
79065  {
79066  int res = SWIG_AsVal_size_t(argv[1], NULL);
79067  _v = SWIG_CheckState(res);
79068  }
79069  if (_v) {
79070  void *vptr = 0;
79071  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79072  _v = SWIG_CheckState(res);
79073  if (_v) {
79074  {
79075  int res = SWIG_AsVal_long(argv[3], NULL);
79076  _v = SWIG_CheckState(res);
79077  }
79078  if (_v) {
79079  {
79080  int res = SWIG_AsVal_size_t(argv[4], NULL);
79081  _v = SWIG_CheckState(res);
79082  }
79083  if (_v) {
79084  return _wrap_float_minheap_array_t_addn__SWIG_1(self, args);
79085  }
79086  }
79087  }
79088  }
79089  }
79090  }
79091  if (argc == 6) {
79092  int _v;
79093  void *vptr = 0;
79094  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79095  _v = SWIG_CheckState(res);
79096  if (_v) {
79097  {
79098  int res = SWIG_AsVal_size_t(argv[1], NULL);
79099  _v = SWIG_CheckState(res);
79100  }
79101  if (_v) {
79102  void *vptr = 0;
79103  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79104  _v = SWIG_CheckState(res);
79105  if (_v) {
79106  {
79107  int res = SWIG_AsVal_long(argv[3], NULL);
79108  _v = SWIG_CheckState(res);
79109  }
79110  if (_v) {
79111  {
79112  int res = SWIG_AsVal_size_t(argv[4], NULL);
79113  _v = SWIG_CheckState(res);
79114  }
79115  if (_v) {
79116  {
79117  int res = SWIG_AsVal_long(argv[5], NULL);
79118  _v = SWIG_CheckState(res);
79119  }
79120  if (_v) {
79121  return _wrap_float_minheap_array_t_addn__SWIG_0(self, args);
79122  }
79123  }
79124  }
79125  }
79126  }
79127  }
79128  }
79129 
79130 fail:
79131  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_minheap_array_t_addn'.\n"
79132  " Possible C/C++ prototypes are:\n"
79133  " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI,size_t,long)\n"
79134  " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI,size_t)\n"
79135  " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI)\n"
79136  " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *)\n");
79137  return 0;
79138 }
79139 
79140 
79141 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79142  PyObject *resultobj = 0;
79144  size_t arg2 ;
79147  long arg5 ;
79148  size_t arg6 ;
79149  long arg7 ;
79150  void *argp1 = 0 ;
79151  int res1 = 0 ;
79152  size_t val2 ;
79153  int ecode2 = 0 ;
79154  void *argp3 = 0 ;
79155  int res3 = 0 ;
79156  void *argp4 = 0 ;
79157  int res4 = 0 ;
79158  long val5 ;
79159  int ecode5 = 0 ;
79160  size_t val6 ;
79161  int ecode6 = 0 ;
79162  long val7 ;
79163  int ecode7 = 0 ;
79164  PyObject * obj0 = 0 ;
79165  PyObject * obj1 = 0 ;
79166  PyObject * obj2 = 0 ;
79167  PyObject * obj3 = 0 ;
79168  PyObject * obj4 = 0 ;
79169  PyObject * obj5 = 0 ;
79170  PyObject * obj6 = 0 ;
79171 
79172  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
79173  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
79174  if (!SWIG_IsOK(res1)) {
79175  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
79176  }
79177  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79178  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79179  if (!SWIG_IsOK(ecode2)) {
79180  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
79181  }
79182  arg2 = static_cast< size_t >(val2);
79183  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
79184  if (!SWIG_IsOK(res3)) {
79185  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
79186  }
79187  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
79188  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
79189  if (!SWIG_IsOK(res4)) {
79190  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
79191  }
79192  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
79193  ecode5 = SWIG_AsVal_long(obj4, &val5);
79194  if (!SWIG_IsOK(ecode5)) {
79195  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
79196  }
79197  arg5 = static_cast< long >(val5);
79198  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
79199  if (!SWIG_IsOK(ecode6)) {
79200  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
79201  }
79202  arg6 = static_cast< size_t >(val6);
79203  ecode7 = SWIG_AsVal_long(obj6, &val7);
79204  if (!SWIG_IsOK(ecode7)) {
79205  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
79206  }
79207  arg7 = static_cast< long >(val7);
79208  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4,arg5,arg6,arg7);
79209  resultobj = SWIG_Py_Void();
79210  return resultobj;
79211 fail:
79212  return NULL;
79213 }
79214 
79215 
79216 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79217  PyObject *resultobj = 0;
79219  size_t arg2 ;
79222  long arg5 ;
79223  size_t arg6 ;
79224  void *argp1 = 0 ;
79225  int res1 = 0 ;
79226  size_t val2 ;
79227  int ecode2 = 0 ;
79228  void *argp3 = 0 ;
79229  int res3 = 0 ;
79230  void *argp4 = 0 ;
79231  int res4 = 0 ;
79232  long val5 ;
79233  int ecode5 = 0 ;
79234  size_t val6 ;
79235  int ecode6 = 0 ;
79236  PyObject * obj0 = 0 ;
79237  PyObject * obj1 = 0 ;
79238  PyObject * obj2 = 0 ;
79239  PyObject * obj3 = 0 ;
79240  PyObject * obj4 = 0 ;
79241  PyObject * obj5 = 0 ;
79242 
79243  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
79244  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
79245  if (!SWIG_IsOK(res1)) {
79246  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
79247  }
79248  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79249  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79250  if (!SWIG_IsOK(ecode2)) {
79251  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
79252  }
79253  arg2 = static_cast< size_t >(val2);
79254  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
79255  if (!SWIG_IsOK(res3)) {
79256  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
79257  }
79258  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
79259  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
79260  if (!SWIG_IsOK(res4)) {
79261  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
79262  }
79263  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
79264  ecode5 = SWIG_AsVal_long(obj4, &val5);
79265  if (!SWIG_IsOK(ecode5)) {
79266  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
79267  }
79268  arg5 = static_cast< long >(val5);
79269  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
79270  if (!SWIG_IsOK(ecode6)) {
79271  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
79272  }
79273  arg6 = static_cast< size_t >(val6);
79274  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4,arg5,arg6);
79275  resultobj = SWIG_Py_Void();
79276  return resultobj;
79277 fail:
79278  return NULL;
79279 }
79280 
79281 
79282 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79283  PyObject *resultobj = 0;
79285  size_t arg2 ;
79288  long arg5 ;
79289  void *argp1 = 0 ;
79290  int res1 = 0 ;
79291  size_t val2 ;
79292  int ecode2 = 0 ;
79293  void *argp3 = 0 ;
79294  int res3 = 0 ;
79295  void *argp4 = 0 ;
79296  int res4 = 0 ;
79297  long val5 ;
79298  int ecode5 = 0 ;
79299  PyObject * obj0 = 0 ;
79300  PyObject * obj1 = 0 ;
79301  PyObject * obj2 = 0 ;
79302  PyObject * obj3 = 0 ;
79303  PyObject * obj4 = 0 ;
79304 
79305  if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
79306  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
79307  if (!SWIG_IsOK(res1)) {
79308  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
79309  }
79310  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79311  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79312  if (!SWIG_IsOK(ecode2)) {
79313  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
79314  }
79315  arg2 = static_cast< size_t >(val2);
79316  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
79317  if (!SWIG_IsOK(res3)) {
79318  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
79319  }
79320  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
79321  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
79322  if (!SWIG_IsOK(res4)) {
79323  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
79324  }
79325  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
79326  ecode5 = SWIG_AsVal_long(obj4, &val5);
79327  if (!SWIG_IsOK(ecode5)) {
79328  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
79329  }
79330  arg5 = static_cast< long >(val5);
79331  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4,arg5);
79332  resultobj = SWIG_Py_Void();
79333  return resultobj;
79334 fail:
79335  return NULL;
79336 }
79337 
79338 
79339 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79340  PyObject *resultobj = 0;
79342  size_t arg2 ;
79345  void *argp1 = 0 ;
79346  int res1 = 0 ;
79347  size_t val2 ;
79348  int ecode2 = 0 ;
79349  void *argp3 = 0 ;
79350  int res3 = 0 ;
79351  void *argp4 = 0 ;
79352  int res4 = 0 ;
79353  PyObject * obj0 = 0 ;
79354  PyObject * obj1 = 0 ;
79355  PyObject * obj2 = 0 ;
79356  PyObject * obj3 = 0 ;
79357 
79358  if (!PyArg_ParseTuple(args,(char *)"OOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
79359  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
79360  if (!SWIG_IsOK(res1)) {
79361  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
79362  }
79363  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79364  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79365  if (!SWIG_IsOK(ecode2)) {
79366  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
79367  }
79368  arg2 = static_cast< size_t >(val2);
79369  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
79370  if (!SWIG_IsOK(res3)) {
79371  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
79372  }
79373  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
79374  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
79375  if (!SWIG_IsOK(res4)) {
79376  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
79377  }
79378  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
79379  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4);
79380  resultobj = SWIG_Py_Void();
79381  return resultobj;
79382 fail:
79383  return NULL;
79384 }
79385 
79386 
79387 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79388  PyObject *resultobj = 0;
79390  size_t arg2 ;
79392  void *argp1 = 0 ;
79393  int res1 = 0 ;
79394  size_t val2 ;
79395  int ecode2 = 0 ;
79396  void *argp3 = 0 ;
79397  int res3 = 0 ;
79398  PyObject * obj0 = 0 ;
79399  PyObject * obj1 = 0 ;
79400  PyObject * obj2 = 0 ;
79401 
79402  if (!PyArg_ParseTuple(args,(char *)"OOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
79403  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
79404  if (!SWIG_IsOK(res1)) {
79405  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
79406  }
79407  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79408  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79409  if (!SWIG_IsOK(ecode2)) {
79410  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
79411  }
79412  arg2 = static_cast< size_t >(val2);
79413  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
79414  if (!SWIG_IsOK(res3)) {
79415  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
79416  }
79417  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
79418  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3);
79419  resultobj = SWIG_Py_Void();
79420  return resultobj;
79421 fail:
79422  return NULL;
79423 }
79424 
79425 
79426 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
79427  Py_ssize_t argc;
79428  PyObject *argv[8] = {
79429  0
79430  };
79431  Py_ssize_t ii;
79432 
79433  if (!PyTuple_Check(args)) SWIG_fail;
79434  argc = args ? PyObject_Length(args) : 0;
79435  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
79436  argv[ii] = PyTuple_GET_ITEM(args,ii);
79437  }
79438  if (argc == 3) {
79439  int _v;
79440  void *vptr = 0;
79441  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79442  _v = SWIG_CheckState(res);
79443  if (_v) {
79444  {
79445  int res = SWIG_AsVal_size_t(argv[1], NULL);
79446  _v = SWIG_CheckState(res);
79447  }
79448  if (_v) {
79449  void *vptr = 0;
79450  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79451  _v = SWIG_CheckState(res);
79452  if (_v) {
79453  return _wrap_float_minheap_array_t_addn_with_ids__SWIG_4(self, args);
79454  }
79455  }
79456  }
79457  }
79458  if (argc == 4) {
79459  int _v;
79460  void *vptr = 0;
79461  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79462  _v = SWIG_CheckState(res);
79463  if (_v) {
79464  {
79465  int res = SWIG_AsVal_size_t(argv[1], NULL);
79466  _v = SWIG_CheckState(res);
79467  }
79468  if (_v) {
79469  void *vptr = 0;
79470  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79471  _v = SWIG_CheckState(res);
79472  if (_v) {
79473  void *vptr = 0;
79474  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
79475  _v = SWIG_CheckState(res);
79476  if (_v) {
79477  return _wrap_float_minheap_array_t_addn_with_ids__SWIG_3(self, args);
79478  }
79479  }
79480  }
79481  }
79482  }
79483  if (argc == 5) {
79484  int _v;
79485  void *vptr = 0;
79486  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79487  _v = SWIG_CheckState(res);
79488  if (_v) {
79489  {
79490  int res = SWIG_AsVal_size_t(argv[1], NULL);
79491  _v = SWIG_CheckState(res);
79492  }
79493  if (_v) {
79494  void *vptr = 0;
79495  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79496  _v = SWIG_CheckState(res);
79497  if (_v) {
79498  void *vptr = 0;
79499  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
79500  _v = SWIG_CheckState(res);
79501  if (_v) {
79502  {
79503  int res = SWIG_AsVal_long(argv[4], NULL);
79504  _v = SWIG_CheckState(res);
79505  }
79506  if (_v) {
79507  return _wrap_float_minheap_array_t_addn_with_ids__SWIG_2(self, args);
79508  }
79509  }
79510  }
79511  }
79512  }
79513  }
79514  if (argc == 6) {
79515  int _v;
79516  void *vptr = 0;
79517  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79518  _v = SWIG_CheckState(res);
79519  if (_v) {
79520  {
79521  int res = SWIG_AsVal_size_t(argv[1], NULL);
79522  _v = SWIG_CheckState(res);
79523  }
79524  if (_v) {
79525  void *vptr = 0;
79526  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79527  _v = SWIG_CheckState(res);
79528  if (_v) {
79529  void *vptr = 0;
79530  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
79531  _v = SWIG_CheckState(res);
79532  if (_v) {
79533  {
79534  int res = SWIG_AsVal_long(argv[4], NULL);
79535  _v = SWIG_CheckState(res);
79536  }
79537  if (_v) {
79538  {
79539  int res = SWIG_AsVal_size_t(argv[5], NULL);
79540  _v = SWIG_CheckState(res);
79541  }
79542  if (_v) {
79543  return _wrap_float_minheap_array_t_addn_with_ids__SWIG_1(self, args);
79544  }
79545  }
79546  }
79547  }
79548  }
79549  }
79550  }
79551  if (argc == 7) {
79552  int _v;
79553  void *vptr = 0;
79554  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
79555  _v = SWIG_CheckState(res);
79556  if (_v) {
79557  {
79558  int res = SWIG_AsVal_size_t(argv[1], NULL);
79559  _v = SWIG_CheckState(res);
79560  }
79561  if (_v) {
79562  void *vptr = 0;
79563  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
79564  _v = SWIG_CheckState(res);
79565  if (_v) {
79566  void *vptr = 0;
79567  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
79568  _v = SWIG_CheckState(res);
79569  if (_v) {
79570  {
79571  int res = SWIG_AsVal_long(argv[4], NULL);
79572  _v = SWIG_CheckState(res);
79573  }
79574  if (_v) {
79575  {
79576  int res = SWIG_AsVal_size_t(argv[5], NULL);
79577  _v = SWIG_CheckState(res);
79578  }
79579  if (_v) {
79580  {
79581  int res = SWIG_AsVal_long(argv[6], NULL);
79582  _v = SWIG_CheckState(res);
79583  }
79584  if (_v) {
79585  return _wrap_float_minheap_array_t_addn_with_ids__SWIG_0(self, args);
79586  }
79587  }
79588  }
79589  }
79590  }
79591  }
79592  }
79593  }
79594 
79595 fail:
79596  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_minheap_array_t_addn_with_ids'.\n"
79597  " Possible C/C++ prototypes are:\n"
79598  " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *,long,size_t,long)\n"
79599  " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *,long,size_t)\n"
79600  " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *,long)\n"
79601  " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *)\n"
79602  " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *)\n");
79603  return 0;
79604 }
79605 
79606 
79607 SWIGINTERN PyObject *_wrap_float_minheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79608  PyObject *resultobj = 0;
79610  void *argp1 = 0 ;
79611  int res1 = 0 ;
79612  PyObject * obj0 = 0 ;
79613 
79614  if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_reorder",&obj0)) SWIG_fail;
79615  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
79616  if (!SWIG_IsOK(res1)) {
79617  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
79618  }
79619  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79620  (arg1)->reorder();
79621  resultobj = SWIG_Py_Void();
79622  return resultobj;
79623 fail:
79624  return NULL;
79625 }
79626 
79627 
79628 SWIGINTERN PyObject *_wrap_float_minheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79629  PyObject *resultobj = 0;
79633  void *argp1 = 0 ;
79634  int res1 = 0 ;
79635  void *argp2 = 0 ;
79636  int res2 = 0 ;
79637  void *argp3 = 0 ;
79638  int res3 = 0 ;
79639  PyObject * obj0 = 0 ;
79640  PyObject * obj1 = 0 ;
79641  PyObject * obj2 = 0 ;
79642 
79643  if (!PyArg_ParseTuple(args,(char *)"OOO:float_minheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
79644  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
79645  if (!SWIG_IsOK(res1)) {
79646  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > const *""'");
79647  }
79648  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79649  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
79650  if (!SWIG_IsOK(res2)) {
79651  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_minheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T *""'");
79652  }
79653  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp2);
79654  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
79655  if (!SWIG_IsOK(res3)) {
79656  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI *""'");
79657  }
79658  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp3);
79659  ((faiss::HeapArray< faiss::CMin< float,long > > const *)arg1)->per_line_extrema(arg2,arg3);
79660  resultobj = SWIG_Py_Void();
79661  return resultobj;
79662 fail:
79663  return NULL;
79664 }
79665 
79666 
79667 SWIGINTERN PyObject *_wrap_new_float_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79668  PyObject *resultobj = 0;
79670 
79671  if (!PyArg_ParseTuple(args,(char *)":new_float_minheap_array_t")) SWIG_fail;
79673  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, SWIG_POINTER_NEW | 0 );
79674  return resultobj;
79675 fail:
79676  return NULL;
79677 }
79678 
79679 
79680 SWIGINTERN PyObject *_wrap_delete_float_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79681  PyObject *resultobj = 0;
79683  void *argp1 = 0 ;
79684  int res1 = 0 ;
79685  PyObject * obj0 = 0 ;
79686 
79687  if (!PyArg_ParseTuple(args,(char *)"O:delete_float_minheap_array_t",&obj0)) SWIG_fail;
79688  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, SWIG_POINTER_DISOWN | 0 );
79689  if (!SWIG_IsOK(res1)) {
79690  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_float_minheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
79691  }
79692  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
79693  delete arg1;
79694  resultobj = SWIG_Py_Void();
79695  return resultobj;
79696 fail:
79697  return NULL;
79698 }
79699 
79700 
79701 SWIGINTERN PyObject *float_minheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79702  PyObject *obj;
79703  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
79704  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, SWIG_NewClientData(obj));
79705  return SWIG_Py_Void();
79706 }
79707 
79708 SWIGINTERN PyObject *_wrap_int_minheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79709  PyObject *resultobj = 0;
79711  size_t arg2 ;
79712  void *argp1 = 0 ;
79713  int res1 = 0 ;
79714  size_t val2 ;
79715  int ecode2 = 0 ;
79716  PyObject * obj0 = 0 ;
79717  PyObject * obj1 = 0 ;
79718 
79719  if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
79720  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79721  if (!SWIG_IsOK(res1)) {
79722  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79723  }
79724  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79725  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79726  if (!SWIG_IsOK(ecode2)) {
79727  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
79728  }
79729  arg2 = static_cast< size_t >(val2);
79730  if (arg1) (arg1)->nh = arg2;
79731  resultobj = SWIG_Py_Void();
79732  return resultobj;
79733 fail:
79734  return NULL;
79735 }
79736 
79737 
79738 SWIGINTERN PyObject *_wrap_int_minheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79739  PyObject *resultobj = 0;
79741  void *argp1 = 0 ;
79742  int res1 = 0 ;
79743  PyObject * obj0 = 0 ;
79744  size_t result;
79745 
79746  if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_nh_get",&obj0)) SWIG_fail;
79747  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79748  if (!SWIG_IsOK(res1)) {
79749  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79750  }
79751  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79752  result = (size_t) ((arg1)->nh);
79753  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
79754  return resultobj;
79755 fail:
79756  return NULL;
79757 }
79758 
79759 
79760 SWIGINTERN PyObject *_wrap_int_minheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79761  PyObject *resultobj = 0;
79763  size_t arg2 ;
79764  void *argp1 = 0 ;
79765  int res1 = 0 ;
79766  size_t val2 ;
79767  int ecode2 = 0 ;
79768  PyObject * obj0 = 0 ;
79769  PyObject * obj1 = 0 ;
79770 
79771  if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
79772  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79773  if (!SWIG_IsOK(res1)) {
79774  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79775  }
79776  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79777  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79778  if (!SWIG_IsOK(ecode2)) {
79779  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
79780  }
79781  arg2 = static_cast< size_t >(val2);
79782  if (arg1) (arg1)->k = arg2;
79783  resultobj = SWIG_Py_Void();
79784  return resultobj;
79785 fail:
79786  return NULL;
79787 }
79788 
79789 
79790 SWIGINTERN PyObject *_wrap_int_minheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79791  PyObject *resultobj = 0;
79793  void *argp1 = 0 ;
79794  int res1 = 0 ;
79795  PyObject * obj0 = 0 ;
79796  size_t result;
79797 
79798  if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_k_get",&obj0)) SWIG_fail;
79799  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79800  if (!SWIG_IsOK(res1)) {
79801  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79802  }
79803  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79804  result = (size_t) ((arg1)->k);
79805  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
79806  return resultobj;
79807 fail:
79808  return NULL;
79809 }
79810 
79811 
79812 SWIGINTERN PyObject *_wrap_int_minheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79813  PyObject *resultobj = 0;
79816  void *argp1 = 0 ;
79817  int res1 = 0 ;
79818  void *argp2 = 0 ;
79819  int res2 = 0 ;
79820  PyObject * obj0 = 0 ;
79821  PyObject * obj1 = 0 ;
79822 
79823  if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
79824  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79825  if (!SWIG_IsOK(res1)) {
79826  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79827  }
79828  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79829  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
79830  if (!SWIG_IsOK(res2)) {
79831  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_minheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI *""'");
79832  }
79833  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp2);
79834  if (arg1) (arg1)->ids = arg2;
79835  resultobj = SWIG_Py_Void();
79836  return resultobj;
79837 fail:
79838  return NULL;
79839 }
79840 
79841 
79842 SWIGINTERN PyObject *_wrap_int_minheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79843  PyObject *resultobj = 0;
79845  void *argp1 = 0 ;
79846  int res1 = 0 ;
79847  PyObject * obj0 = 0 ;
79848  faiss::HeapArray< faiss::CMin< int,long > >::TI *result = 0 ;
79849 
79850  if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_ids_get",&obj0)) SWIG_fail;
79851  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79852  if (!SWIG_IsOK(res1)) {
79853  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79854  }
79855  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79856  result = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) ((arg1)->ids);
79857  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
79858  return resultobj;
79859 fail:
79860  return NULL;
79861 }
79862 
79863 
79864 SWIGINTERN PyObject *_wrap_int_minheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79865  PyObject *resultobj = 0;
79868  void *argp1 = 0 ;
79869  int res1 = 0 ;
79870  void *argp2 = 0 ;
79871  int res2 = 0 ;
79872  PyObject * obj0 = 0 ;
79873  PyObject * obj1 = 0 ;
79874 
79875  if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
79876  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79877  if (!SWIG_IsOK(res1)) {
79878  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79879  }
79880  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79881  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN | 0 );
79882  if (!SWIG_IsOK(res2)) {
79883  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_minheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T *""'");
79884  }
79885  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp2);
79886  if (arg1) (arg1)->val = arg2;
79887  resultobj = SWIG_Py_Void();
79888  return resultobj;
79889 fail:
79890  return NULL;
79891 }
79892 
79893 
79894 SWIGINTERN PyObject *_wrap_int_minheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79895  PyObject *resultobj = 0;
79897  void *argp1 = 0 ;
79898  int res1 = 0 ;
79899  PyObject * obj0 = 0 ;
79901 
79902  if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_val_get",&obj0)) SWIG_fail;
79903  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79904  if (!SWIG_IsOK(res1)) {
79905  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79906  }
79907  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79908  result = (faiss::HeapArray< faiss::CMin< int,long > >::T *) ((arg1)->val);
79909  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
79910  return resultobj;
79911 fail:
79912  return NULL;
79913 }
79914 
79915 
79916 SWIGINTERN PyObject *_wrap_int_minheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79917  PyObject *resultobj = 0;
79919  size_t arg2 ;
79920  void *argp1 = 0 ;
79921  int res1 = 0 ;
79922  size_t val2 ;
79923  int ecode2 = 0 ;
79924  PyObject * obj0 = 0 ;
79925  PyObject * obj1 = 0 ;
79927 
79928  if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
79929  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79930  if (!SWIG_IsOK(res1)) {
79931  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79932  }
79933  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79934  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79935  if (!SWIG_IsOK(ecode2)) {
79936  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
79937  }
79938  arg2 = static_cast< size_t >(val2);
79939  result = (faiss::HeapArray< faiss::CMin< int,long > >::T *)(arg1)->get_val(arg2);
79940  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
79941  return resultobj;
79942 fail:
79943  return NULL;
79944 }
79945 
79946 
79947 SWIGINTERN PyObject *_wrap_int_minheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79948  PyObject *resultobj = 0;
79950  size_t arg2 ;
79951  void *argp1 = 0 ;
79952  int res1 = 0 ;
79953  size_t val2 ;
79954  int ecode2 = 0 ;
79955  PyObject * obj0 = 0 ;
79956  PyObject * obj1 = 0 ;
79957  faiss::HeapArray< faiss::CMin< int,long > >::TI *result = 0 ;
79958 
79959  if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
79960  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79961  if (!SWIG_IsOK(res1)) {
79962  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79963  }
79964  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79965  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
79966  if (!SWIG_IsOK(ecode2)) {
79967  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
79968  }
79969  arg2 = static_cast< size_t >(val2);
79970  result = (faiss::HeapArray< faiss::CMin< int,long > >::TI *)(arg1)->get_ids(arg2);
79971  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
79972  return resultobj;
79973 fail:
79974  return NULL;
79975 }
79976 
79977 
79978 SWIGINTERN PyObject *_wrap_int_minheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
79979  PyObject *resultobj = 0;
79981  void *argp1 = 0 ;
79982  int res1 = 0 ;
79983  PyObject * obj0 = 0 ;
79984 
79985  if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_heapify",&obj0)) SWIG_fail;
79986  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
79987  if (!SWIG_IsOK(res1)) {
79988  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
79989  }
79990  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
79991  (arg1)->heapify();
79992  resultobj = SWIG_Py_Void();
79993  return resultobj;
79994 fail:
79995  return NULL;
79996 }
79997 
79998 
79999 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80000  PyObject *resultobj = 0;
80002  size_t arg2 ;
80005  size_t arg5 ;
80006  long arg6 ;
80007  void *argp1 = 0 ;
80008  int res1 = 0 ;
80009  size_t val2 ;
80010  int ecode2 = 0 ;
80011  void *argp3 = 0 ;
80012  int res3 = 0 ;
80013  long val4 ;
80014  int ecode4 = 0 ;
80015  size_t val5 ;
80016  int ecode5 = 0 ;
80017  long val6 ;
80018  int ecode6 = 0 ;
80019  PyObject * obj0 = 0 ;
80020  PyObject * obj1 = 0 ;
80021  PyObject * obj2 = 0 ;
80022  PyObject * obj3 = 0 ;
80023  PyObject * obj4 = 0 ;
80024  PyObject * obj5 = 0 ;
80025 
80026  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
80027  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80028  if (!SWIG_IsOK(res1)) {
80029  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80030  }
80031  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80032  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80033  if (!SWIG_IsOK(ecode2)) {
80034  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
80035  }
80036  arg2 = static_cast< size_t >(val2);
80037  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80038  if (!SWIG_IsOK(res3)) {
80039  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80040  }
80041  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80042  ecode4 = SWIG_AsVal_long(obj3, &val4);
80043  if (!SWIG_IsOK(ecode4)) {
80044  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI""'");
80045  }
80046  arg4 = static_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI >(val4);
80047  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
80048  if (!SWIG_IsOK(ecode5)) {
80049  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
80050  }
80051  arg5 = static_cast< size_t >(val5);
80052  ecode6 = SWIG_AsVal_long(obj5, &val6);
80053  if (!SWIG_IsOK(ecode6)) {
80054  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_minheap_array_t_addn" "', argument " "6"" of type '" "long""'");
80055  }
80056  arg6 = static_cast< long >(val6);
80057  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,arg4,arg5,arg6);
80058  resultobj = SWIG_Py_Void();
80059  return resultobj;
80060 fail:
80061  return NULL;
80062 }
80063 
80064 
80065 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80066  PyObject *resultobj = 0;
80068  size_t arg2 ;
80071  size_t arg5 ;
80072  void *argp1 = 0 ;
80073  int res1 = 0 ;
80074  size_t val2 ;
80075  int ecode2 = 0 ;
80076  void *argp3 = 0 ;
80077  int res3 = 0 ;
80078  long val4 ;
80079  int ecode4 = 0 ;
80080  size_t val5 ;
80081  int ecode5 = 0 ;
80082  PyObject * obj0 = 0 ;
80083  PyObject * obj1 = 0 ;
80084  PyObject * obj2 = 0 ;
80085  PyObject * obj3 = 0 ;
80086  PyObject * obj4 = 0 ;
80087 
80088  if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
80089  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80090  if (!SWIG_IsOK(res1)) {
80091  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80092  }
80093  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80094  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80095  if (!SWIG_IsOK(ecode2)) {
80096  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
80097  }
80098  arg2 = static_cast< size_t >(val2);
80099  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80100  if (!SWIG_IsOK(res3)) {
80101  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80102  }
80103  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80104  ecode4 = SWIG_AsVal_long(obj3, &val4);
80105  if (!SWIG_IsOK(ecode4)) {
80106  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI""'");
80107  }
80108  arg4 = static_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI >(val4);
80109  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
80110  if (!SWIG_IsOK(ecode5)) {
80111  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
80112  }
80113  arg5 = static_cast< size_t >(val5);
80114  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,arg4,arg5);
80115  resultobj = SWIG_Py_Void();
80116  return resultobj;
80117 fail:
80118  return NULL;
80119 }
80120 
80121 
80122 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80123  PyObject *resultobj = 0;
80125  size_t arg2 ;
80128  void *argp1 = 0 ;
80129  int res1 = 0 ;
80130  size_t val2 ;
80131  int ecode2 = 0 ;
80132  void *argp3 = 0 ;
80133  int res3 = 0 ;
80134  long val4 ;
80135  int ecode4 = 0 ;
80136  PyObject * obj0 = 0 ;
80137  PyObject * obj1 = 0 ;
80138  PyObject * obj2 = 0 ;
80139  PyObject * obj3 = 0 ;
80140 
80141  if (!PyArg_ParseTuple(args,(char *)"OOOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
80142  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80143  if (!SWIG_IsOK(res1)) {
80144  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80145  }
80146  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80147  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80148  if (!SWIG_IsOK(ecode2)) {
80149  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
80150  }
80151  arg2 = static_cast< size_t >(val2);
80152  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80153  if (!SWIG_IsOK(res3)) {
80154  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80155  }
80156  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80157  ecode4 = SWIG_AsVal_long(obj3, &val4);
80158  if (!SWIG_IsOK(ecode4)) {
80159  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI""'");
80160  }
80161  arg4 = static_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI >(val4);
80162  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,arg4);
80163  resultobj = SWIG_Py_Void();
80164  return resultobj;
80165 fail:
80166  return NULL;
80167 }
80168 
80169 
80170 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80171  PyObject *resultobj = 0;
80173  size_t arg2 ;
80175  void *argp1 = 0 ;
80176  int res1 = 0 ;
80177  size_t val2 ;
80178  int ecode2 = 0 ;
80179  void *argp3 = 0 ;
80180  int res3 = 0 ;
80181  PyObject * obj0 = 0 ;
80182  PyObject * obj1 = 0 ;
80183  PyObject * obj2 = 0 ;
80184 
80185  if (!PyArg_ParseTuple(args,(char *)"OOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
80186  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80187  if (!SWIG_IsOK(res1)) {
80188  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80189  }
80190  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80191  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80192  if (!SWIG_IsOK(ecode2)) {
80193  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
80194  }
80195  arg2 = static_cast< size_t >(val2);
80196  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80197  if (!SWIG_IsOK(res3)) {
80198  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80199  }
80200  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80201  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3);
80202  resultobj = SWIG_Py_Void();
80203  return resultobj;
80204 fail:
80205  return NULL;
80206 }
80207 
80208 
80209 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn(PyObject *self, PyObject *args) {
80210  Py_ssize_t argc;
80211  PyObject *argv[7] = {
80212  0
80213  };
80214  Py_ssize_t ii;
80215 
80216  if (!PyTuple_Check(args)) SWIG_fail;
80217  argc = args ? PyObject_Length(args) : 0;
80218  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
80219  argv[ii] = PyTuple_GET_ITEM(args,ii);
80220  }
80221  if (argc == 3) {
80222  int _v;
80223  void *vptr = 0;
80224  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80225  _v = SWIG_CheckState(res);
80226  if (_v) {
80227  {
80228  int res = SWIG_AsVal_size_t(argv[1], NULL);
80229  _v = SWIG_CheckState(res);
80230  }
80231  if (_v) {
80232  void *vptr = 0;
80233  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80234  _v = SWIG_CheckState(res);
80235  if (_v) {
80236  return _wrap_int_minheap_array_t_addn__SWIG_3(self, args);
80237  }
80238  }
80239  }
80240  }
80241  if (argc == 4) {
80242  int _v;
80243  void *vptr = 0;
80244  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80245  _v = SWIG_CheckState(res);
80246  if (_v) {
80247  {
80248  int res = SWIG_AsVal_size_t(argv[1], NULL);
80249  _v = SWIG_CheckState(res);
80250  }
80251  if (_v) {
80252  void *vptr = 0;
80253  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80254  _v = SWIG_CheckState(res);
80255  if (_v) {
80256  {
80257  int res = SWIG_AsVal_long(argv[3], NULL);
80258  _v = SWIG_CheckState(res);
80259  }
80260  if (_v) {
80261  return _wrap_int_minheap_array_t_addn__SWIG_2(self, args);
80262  }
80263  }
80264  }
80265  }
80266  }
80267  if (argc == 5) {
80268  int _v;
80269  void *vptr = 0;
80270  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80271  _v = SWIG_CheckState(res);
80272  if (_v) {
80273  {
80274  int res = SWIG_AsVal_size_t(argv[1], NULL);
80275  _v = SWIG_CheckState(res);
80276  }
80277  if (_v) {
80278  void *vptr = 0;
80279  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80280  _v = SWIG_CheckState(res);
80281  if (_v) {
80282  {
80283  int res = SWIG_AsVal_long(argv[3], NULL);
80284  _v = SWIG_CheckState(res);
80285  }
80286  if (_v) {
80287  {
80288  int res = SWIG_AsVal_size_t(argv[4], NULL);
80289  _v = SWIG_CheckState(res);
80290  }
80291  if (_v) {
80292  return _wrap_int_minheap_array_t_addn__SWIG_1(self, args);
80293  }
80294  }
80295  }
80296  }
80297  }
80298  }
80299  if (argc == 6) {
80300  int _v;
80301  void *vptr = 0;
80302  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80303  _v = SWIG_CheckState(res);
80304  if (_v) {
80305  {
80306  int res = SWIG_AsVal_size_t(argv[1], NULL);
80307  _v = SWIG_CheckState(res);
80308  }
80309  if (_v) {
80310  void *vptr = 0;
80311  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80312  _v = SWIG_CheckState(res);
80313  if (_v) {
80314  {
80315  int res = SWIG_AsVal_long(argv[3], NULL);
80316  _v = SWIG_CheckState(res);
80317  }
80318  if (_v) {
80319  {
80320  int res = SWIG_AsVal_size_t(argv[4], NULL);
80321  _v = SWIG_CheckState(res);
80322  }
80323  if (_v) {
80324  {
80325  int res = SWIG_AsVal_long(argv[5], NULL);
80326  _v = SWIG_CheckState(res);
80327  }
80328  if (_v) {
80329  return _wrap_int_minheap_array_t_addn__SWIG_0(self, args);
80330  }
80331  }
80332  }
80333  }
80334  }
80335  }
80336  }
80337 
80338 fail:
80339  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_minheap_array_t_addn'.\n"
80340  " Possible C/C++ prototypes are:\n"
80341  " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI,size_t,long)\n"
80342  " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI,size_t)\n"
80343  " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI)\n"
80344  " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *)\n");
80345  return 0;
80346 }
80347 
80348 
80349 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80350  PyObject *resultobj = 0;
80352  size_t arg2 ;
80355  long arg5 ;
80356  size_t arg6 ;
80357  long arg7 ;
80358  void *argp1 = 0 ;
80359  int res1 = 0 ;
80360  size_t val2 ;
80361  int ecode2 = 0 ;
80362  void *argp3 = 0 ;
80363  int res3 = 0 ;
80364  void *argp4 = 0 ;
80365  int res4 = 0 ;
80366  long val5 ;
80367  int ecode5 = 0 ;
80368  size_t val6 ;
80369  int ecode6 = 0 ;
80370  long val7 ;
80371  int ecode7 = 0 ;
80372  PyObject * obj0 = 0 ;
80373  PyObject * obj1 = 0 ;
80374  PyObject * obj2 = 0 ;
80375  PyObject * obj3 = 0 ;
80376  PyObject * obj4 = 0 ;
80377  PyObject * obj5 = 0 ;
80378  PyObject * obj6 = 0 ;
80379 
80380  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
80381  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80382  if (!SWIG_IsOK(res1)) {
80383  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80384  }
80385  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80386  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80387  if (!SWIG_IsOK(ecode2)) {
80388  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
80389  }
80390  arg2 = static_cast< size_t >(val2);
80391  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80392  if (!SWIG_IsOK(res3)) {
80393  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80394  }
80395  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80396  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
80397  if (!SWIG_IsOK(res4)) {
80398  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
80399  }
80400  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
80401  ecode5 = SWIG_AsVal_long(obj4, &val5);
80402  if (!SWIG_IsOK(ecode5)) {
80403  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
80404  }
80405  arg5 = static_cast< long >(val5);
80406  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
80407  if (!SWIG_IsOK(ecode6)) {
80408  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
80409  }
80410  arg6 = static_cast< size_t >(val6);
80411  ecode7 = SWIG_AsVal_long(obj6, &val7);
80412  if (!SWIG_IsOK(ecode7)) {
80413  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
80414  }
80415  arg7 = static_cast< long >(val7);
80416  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4,arg5,arg6,arg7);
80417  resultobj = SWIG_Py_Void();
80418  return resultobj;
80419 fail:
80420  return NULL;
80421 }
80422 
80423 
80424 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80425  PyObject *resultobj = 0;
80427  size_t arg2 ;
80430  long arg5 ;
80431  size_t arg6 ;
80432  void *argp1 = 0 ;
80433  int res1 = 0 ;
80434  size_t val2 ;
80435  int ecode2 = 0 ;
80436  void *argp3 = 0 ;
80437  int res3 = 0 ;
80438  void *argp4 = 0 ;
80439  int res4 = 0 ;
80440  long val5 ;
80441  int ecode5 = 0 ;
80442  size_t val6 ;
80443  int ecode6 = 0 ;
80444  PyObject * obj0 = 0 ;
80445  PyObject * obj1 = 0 ;
80446  PyObject * obj2 = 0 ;
80447  PyObject * obj3 = 0 ;
80448  PyObject * obj4 = 0 ;
80449  PyObject * obj5 = 0 ;
80450 
80451  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
80452  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80453  if (!SWIG_IsOK(res1)) {
80454  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80455  }
80456  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80457  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80458  if (!SWIG_IsOK(ecode2)) {
80459  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
80460  }
80461  arg2 = static_cast< size_t >(val2);
80462  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80463  if (!SWIG_IsOK(res3)) {
80464  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80465  }
80466  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80467  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
80468  if (!SWIG_IsOK(res4)) {
80469  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
80470  }
80471  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
80472  ecode5 = SWIG_AsVal_long(obj4, &val5);
80473  if (!SWIG_IsOK(ecode5)) {
80474  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
80475  }
80476  arg5 = static_cast< long >(val5);
80477  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
80478  if (!SWIG_IsOK(ecode6)) {
80479  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
80480  }
80481  arg6 = static_cast< size_t >(val6);
80482  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4,arg5,arg6);
80483  resultobj = SWIG_Py_Void();
80484  return resultobj;
80485 fail:
80486  return NULL;
80487 }
80488 
80489 
80490 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80491  PyObject *resultobj = 0;
80493  size_t arg2 ;
80496  long arg5 ;
80497  void *argp1 = 0 ;
80498  int res1 = 0 ;
80499  size_t val2 ;
80500  int ecode2 = 0 ;
80501  void *argp3 = 0 ;
80502  int res3 = 0 ;
80503  void *argp4 = 0 ;
80504  int res4 = 0 ;
80505  long val5 ;
80506  int ecode5 = 0 ;
80507  PyObject * obj0 = 0 ;
80508  PyObject * obj1 = 0 ;
80509  PyObject * obj2 = 0 ;
80510  PyObject * obj3 = 0 ;
80511  PyObject * obj4 = 0 ;
80512 
80513  if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
80514  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80515  if (!SWIG_IsOK(res1)) {
80516  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80517  }
80518  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80519  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80520  if (!SWIG_IsOK(ecode2)) {
80521  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
80522  }
80523  arg2 = static_cast< size_t >(val2);
80524  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80525  if (!SWIG_IsOK(res3)) {
80526  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80527  }
80528  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80529  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
80530  if (!SWIG_IsOK(res4)) {
80531  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
80532  }
80533  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
80534  ecode5 = SWIG_AsVal_long(obj4, &val5);
80535  if (!SWIG_IsOK(ecode5)) {
80536  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
80537  }
80538  arg5 = static_cast< long >(val5);
80539  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4,arg5);
80540  resultobj = SWIG_Py_Void();
80541  return resultobj;
80542 fail:
80543  return NULL;
80544 }
80545 
80546 
80547 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80548  PyObject *resultobj = 0;
80550  size_t arg2 ;
80553  void *argp1 = 0 ;
80554  int res1 = 0 ;
80555  size_t val2 ;
80556  int ecode2 = 0 ;
80557  void *argp3 = 0 ;
80558  int res3 = 0 ;
80559  void *argp4 = 0 ;
80560  int res4 = 0 ;
80561  PyObject * obj0 = 0 ;
80562  PyObject * obj1 = 0 ;
80563  PyObject * obj2 = 0 ;
80564  PyObject * obj3 = 0 ;
80565 
80566  if (!PyArg_ParseTuple(args,(char *)"OOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
80567  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80568  if (!SWIG_IsOK(res1)) {
80569  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80570  }
80571  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80572  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80573  if (!SWIG_IsOK(ecode2)) {
80574  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
80575  }
80576  arg2 = static_cast< size_t >(val2);
80577  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80578  if (!SWIG_IsOK(res3)) {
80579  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80580  }
80581  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80582  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
80583  if (!SWIG_IsOK(res4)) {
80584  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
80585  }
80586  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
80587  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4);
80588  resultobj = SWIG_Py_Void();
80589  return resultobj;
80590 fail:
80591  return NULL;
80592 }
80593 
80594 
80595 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80596  PyObject *resultobj = 0;
80598  size_t arg2 ;
80600  void *argp1 = 0 ;
80601  int res1 = 0 ;
80602  size_t val2 ;
80603  int ecode2 = 0 ;
80604  void *argp3 = 0 ;
80605  int res3 = 0 ;
80606  PyObject * obj0 = 0 ;
80607  PyObject * obj1 = 0 ;
80608  PyObject * obj2 = 0 ;
80609 
80610  if (!PyArg_ParseTuple(args,(char *)"OOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
80611  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80612  if (!SWIG_IsOK(res1)) {
80613  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80614  }
80615  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80616  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80617  if (!SWIG_IsOK(ecode2)) {
80618  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
80619  }
80620  arg2 = static_cast< size_t >(val2);
80621  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
80622  if (!SWIG_IsOK(res3)) {
80623  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
80624  }
80625  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
80626  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3);
80627  resultobj = SWIG_Py_Void();
80628  return resultobj;
80629 fail:
80630  return NULL;
80631 }
80632 
80633 
80634 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
80635  Py_ssize_t argc;
80636  PyObject *argv[8] = {
80637  0
80638  };
80639  Py_ssize_t ii;
80640 
80641  if (!PyTuple_Check(args)) SWIG_fail;
80642  argc = args ? PyObject_Length(args) : 0;
80643  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
80644  argv[ii] = PyTuple_GET_ITEM(args,ii);
80645  }
80646  if (argc == 3) {
80647  int _v;
80648  void *vptr = 0;
80649  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80650  _v = SWIG_CheckState(res);
80651  if (_v) {
80652  {
80653  int res = SWIG_AsVal_size_t(argv[1], NULL);
80654  _v = SWIG_CheckState(res);
80655  }
80656  if (_v) {
80657  void *vptr = 0;
80658  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80659  _v = SWIG_CheckState(res);
80660  if (_v) {
80661  return _wrap_int_minheap_array_t_addn_with_ids__SWIG_4(self, args);
80662  }
80663  }
80664  }
80665  }
80666  if (argc == 4) {
80667  int _v;
80668  void *vptr = 0;
80669  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80670  _v = SWIG_CheckState(res);
80671  if (_v) {
80672  {
80673  int res = SWIG_AsVal_size_t(argv[1], NULL);
80674  _v = SWIG_CheckState(res);
80675  }
80676  if (_v) {
80677  void *vptr = 0;
80678  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80679  _v = SWIG_CheckState(res);
80680  if (_v) {
80681  void *vptr = 0;
80682  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
80683  _v = SWIG_CheckState(res);
80684  if (_v) {
80685  return _wrap_int_minheap_array_t_addn_with_ids__SWIG_3(self, args);
80686  }
80687  }
80688  }
80689  }
80690  }
80691  if (argc == 5) {
80692  int _v;
80693  void *vptr = 0;
80694  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80695  _v = SWIG_CheckState(res);
80696  if (_v) {
80697  {
80698  int res = SWIG_AsVal_size_t(argv[1], NULL);
80699  _v = SWIG_CheckState(res);
80700  }
80701  if (_v) {
80702  void *vptr = 0;
80703  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80704  _v = SWIG_CheckState(res);
80705  if (_v) {
80706  void *vptr = 0;
80707  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
80708  _v = SWIG_CheckState(res);
80709  if (_v) {
80710  {
80711  int res = SWIG_AsVal_long(argv[4], NULL);
80712  _v = SWIG_CheckState(res);
80713  }
80714  if (_v) {
80715  return _wrap_int_minheap_array_t_addn_with_ids__SWIG_2(self, args);
80716  }
80717  }
80718  }
80719  }
80720  }
80721  }
80722  if (argc == 6) {
80723  int _v;
80724  void *vptr = 0;
80725  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80726  _v = SWIG_CheckState(res);
80727  if (_v) {
80728  {
80729  int res = SWIG_AsVal_size_t(argv[1], NULL);
80730  _v = SWIG_CheckState(res);
80731  }
80732  if (_v) {
80733  void *vptr = 0;
80734  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80735  _v = SWIG_CheckState(res);
80736  if (_v) {
80737  void *vptr = 0;
80738  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
80739  _v = SWIG_CheckState(res);
80740  if (_v) {
80741  {
80742  int res = SWIG_AsVal_long(argv[4], NULL);
80743  _v = SWIG_CheckState(res);
80744  }
80745  if (_v) {
80746  {
80747  int res = SWIG_AsVal_size_t(argv[5], NULL);
80748  _v = SWIG_CheckState(res);
80749  }
80750  if (_v) {
80751  return _wrap_int_minheap_array_t_addn_with_ids__SWIG_1(self, args);
80752  }
80753  }
80754  }
80755  }
80756  }
80757  }
80758  }
80759  if (argc == 7) {
80760  int _v;
80761  void *vptr = 0;
80762  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
80763  _v = SWIG_CheckState(res);
80764  if (_v) {
80765  {
80766  int res = SWIG_AsVal_size_t(argv[1], NULL);
80767  _v = SWIG_CheckState(res);
80768  }
80769  if (_v) {
80770  void *vptr = 0;
80771  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
80772  _v = SWIG_CheckState(res);
80773  if (_v) {
80774  void *vptr = 0;
80775  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
80776  _v = SWIG_CheckState(res);
80777  if (_v) {
80778  {
80779  int res = SWIG_AsVal_long(argv[4], NULL);
80780  _v = SWIG_CheckState(res);
80781  }
80782  if (_v) {
80783  {
80784  int res = SWIG_AsVal_size_t(argv[5], NULL);
80785  _v = SWIG_CheckState(res);
80786  }
80787  if (_v) {
80788  {
80789  int res = SWIG_AsVal_long(argv[6], NULL);
80790  _v = SWIG_CheckState(res);
80791  }
80792  if (_v) {
80793  return _wrap_int_minheap_array_t_addn_with_ids__SWIG_0(self, args);
80794  }
80795  }
80796  }
80797  }
80798  }
80799  }
80800  }
80801  }
80802 
80803 fail:
80804  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_minheap_array_t_addn_with_ids'.\n"
80805  " Possible C/C++ prototypes are:\n"
80806  " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *,long,size_t,long)\n"
80807  " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *,long,size_t)\n"
80808  " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *,long)\n"
80809  " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *)\n"
80810  " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *)\n");
80811  return 0;
80812 }
80813 
80814 
80815 SWIGINTERN PyObject *_wrap_int_minheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80816  PyObject *resultobj = 0;
80818  void *argp1 = 0 ;
80819  int res1 = 0 ;
80820  PyObject * obj0 = 0 ;
80821 
80822  if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_reorder",&obj0)) SWIG_fail;
80823  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80824  if (!SWIG_IsOK(res1)) {
80825  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80826  }
80827  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80828  (arg1)->reorder();
80829  resultobj = SWIG_Py_Void();
80830  return resultobj;
80831 fail:
80832  return NULL;
80833 }
80834 
80835 
80836 SWIGINTERN PyObject *_wrap_int_minheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80837  PyObject *resultobj = 0;
80841  void *argp1 = 0 ;
80842  int res1 = 0 ;
80843  void *argp2 = 0 ;
80844  int res2 = 0 ;
80845  void *argp3 = 0 ;
80846  int res3 = 0 ;
80847  PyObject * obj0 = 0 ;
80848  PyObject * obj1 = 0 ;
80849  PyObject * obj2 = 0 ;
80850 
80851  if (!PyArg_ParseTuple(args,(char *)"OOO:int_minheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
80852  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
80853  if (!SWIG_IsOK(res1)) {
80854  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > const *""'");
80855  }
80856  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80857  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
80858  if (!SWIG_IsOK(res2)) {
80859  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_minheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T *""'");
80860  }
80861  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp2);
80862  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
80863  if (!SWIG_IsOK(res3)) {
80864  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI *""'");
80865  }
80866  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp3);
80867  ((faiss::HeapArray< faiss::CMin< int,long > > const *)arg1)->per_line_extrema(arg2,arg3);
80868  resultobj = SWIG_Py_Void();
80869  return resultobj;
80870 fail:
80871  return NULL;
80872 }
80873 
80874 
80875 SWIGINTERN PyObject *_wrap_new_int_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80876  PyObject *resultobj = 0;
80878 
80879  if (!PyArg_ParseTuple(args,(char *)":new_int_minheap_array_t")) SWIG_fail;
80881  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, SWIG_POINTER_NEW | 0 );
80882  return resultobj;
80883 fail:
80884  return NULL;
80885 }
80886 
80887 
80888 SWIGINTERN PyObject *_wrap_delete_int_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80889  PyObject *resultobj = 0;
80891  void *argp1 = 0 ;
80892  int res1 = 0 ;
80893  PyObject * obj0 = 0 ;
80894 
80895  if (!PyArg_ParseTuple(args,(char *)"O:delete_int_minheap_array_t",&obj0)) SWIG_fail;
80896  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, SWIG_POINTER_DISOWN | 0 );
80897  if (!SWIG_IsOK(res1)) {
80898  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_int_minheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
80899  }
80900  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
80901  delete arg1;
80902  resultobj = SWIG_Py_Void();
80903  return resultobj;
80904 fail:
80905  return NULL;
80906 }
80907 
80908 
80909 SWIGINTERN PyObject *int_minheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80910  PyObject *obj;
80911  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
80912  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, SWIG_NewClientData(obj));
80913  return SWIG_Py_Void();
80914 }
80915 
80916 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80917  PyObject *resultobj = 0;
80919  size_t arg2 ;
80920  void *argp1 = 0 ;
80921  int res1 = 0 ;
80922  size_t val2 ;
80923  int ecode2 = 0 ;
80924  PyObject * obj0 = 0 ;
80925  PyObject * obj1 = 0 ;
80926 
80927  if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
80928  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
80929  if (!SWIG_IsOK(res1)) {
80930  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
80931  }
80932  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
80933  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80934  if (!SWIG_IsOK(ecode2)) {
80935  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
80936  }
80937  arg2 = static_cast< size_t >(val2);
80938  if (arg1) (arg1)->nh = arg2;
80939  resultobj = SWIG_Py_Void();
80940  return resultobj;
80941 fail:
80942  return NULL;
80943 }
80944 
80945 
80946 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80947  PyObject *resultobj = 0;
80949  void *argp1 = 0 ;
80950  int res1 = 0 ;
80951  PyObject * obj0 = 0 ;
80952  size_t result;
80953 
80954  if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_nh_get",&obj0)) SWIG_fail;
80955  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
80956  if (!SWIG_IsOK(res1)) {
80957  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
80958  }
80959  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
80960  result = (size_t) ((arg1)->nh);
80961  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
80962  return resultobj;
80963 fail:
80964  return NULL;
80965 }
80966 
80967 
80968 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80969  PyObject *resultobj = 0;
80971  size_t arg2 ;
80972  void *argp1 = 0 ;
80973  int res1 = 0 ;
80974  size_t val2 ;
80975  int ecode2 = 0 ;
80976  PyObject * obj0 = 0 ;
80977  PyObject * obj1 = 0 ;
80978 
80979  if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
80980  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
80981  if (!SWIG_IsOK(res1)) {
80982  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
80983  }
80984  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
80985  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
80986  if (!SWIG_IsOK(ecode2)) {
80987  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
80988  }
80989  arg2 = static_cast< size_t >(val2);
80990  if (arg1) (arg1)->k = arg2;
80991  resultobj = SWIG_Py_Void();
80992  return resultobj;
80993 fail:
80994  return NULL;
80995 }
80996 
80997 
80998 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
80999  PyObject *resultobj = 0;
81001  void *argp1 = 0 ;
81002  int res1 = 0 ;
81003  PyObject * obj0 = 0 ;
81004  size_t result;
81005 
81006  if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_k_get",&obj0)) SWIG_fail;
81007  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81008  if (!SWIG_IsOK(res1)) {
81009  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81010  }
81011  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81012  result = (size_t) ((arg1)->k);
81013  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
81014  return resultobj;
81015 fail:
81016  return NULL;
81017 }
81018 
81019 
81020 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81021  PyObject *resultobj = 0;
81024  void *argp1 = 0 ;
81025  int res1 = 0 ;
81026  void *argp2 = 0 ;
81027  int res2 = 0 ;
81028  PyObject * obj0 = 0 ;
81029  PyObject * obj1 = 0 ;
81030 
81031  if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
81032  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81033  if (!SWIG_IsOK(res1)) {
81034  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81035  }
81036  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81037  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
81038  if (!SWIG_IsOK(res2)) {
81039  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_maxheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI *""'");
81040  }
81041  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp2);
81042  if (arg1) (arg1)->ids = arg2;
81043  resultobj = SWIG_Py_Void();
81044  return resultobj;
81045 fail:
81046  return NULL;
81047 }
81048 
81049 
81050 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81051  PyObject *resultobj = 0;
81053  void *argp1 = 0 ;
81054  int res1 = 0 ;
81055  PyObject * obj0 = 0 ;
81057 
81058  if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_ids_get",&obj0)) SWIG_fail;
81059  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81060  if (!SWIG_IsOK(res1)) {
81061  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81062  }
81063  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81064  result = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) ((arg1)->ids);
81065  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
81066  return resultobj;
81067 fail:
81068  return NULL;
81069 }
81070 
81071 
81072 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81073  PyObject *resultobj = 0;
81076  void *argp1 = 0 ;
81077  int res1 = 0 ;
81078  void *argp2 = 0 ;
81079  int res2 = 0 ;
81080  PyObject * obj0 = 0 ;
81081  PyObject * obj1 = 0 ;
81082 
81083  if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
81084  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81085  if (!SWIG_IsOK(res1)) {
81086  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81087  }
81088  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81089  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN | 0 );
81090  if (!SWIG_IsOK(res2)) {
81091  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_maxheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T *""'");
81092  }
81093  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp2);
81094  if (arg1) (arg1)->val = arg2;
81095  resultobj = SWIG_Py_Void();
81096  return resultobj;
81097 fail:
81098  return NULL;
81099 }
81100 
81101 
81102 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81103  PyObject *resultobj = 0;
81105  void *argp1 = 0 ;
81106  int res1 = 0 ;
81107  PyObject * obj0 = 0 ;
81109 
81110  if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_val_get",&obj0)) SWIG_fail;
81111  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81112  if (!SWIG_IsOK(res1)) {
81113  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81114  }
81115  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81116  result = (faiss::HeapArray< faiss::CMax< float,long > >::T *) ((arg1)->val);
81117  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
81118  return resultobj;
81119 fail:
81120  return NULL;
81121 }
81122 
81123 
81124 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81125  PyObject *resultobj = 0;
81127  size_t arg2 ;
81128  void *argp1 = 0 ;
81129  int res1 = 0 ;
81130  size_t val2 ;
81131  int ecode2 = 0 ;
81132  PyObject * obj0 = 0 ;
81133  PyObject * obj1 = 0 ;
81135 
81136  if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
81137  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81138  if (!SWIG_IsOK(res1)) {
81139  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81140  }
81141  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81142  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81143  if (!SWIG_IsOK(ecode2)) {
81144  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
81145  }
81146  arg2 = static_cast< size_t >(val2);
81147  result = (faiss::HeapArray< faiss::CMax< float,long > >::T *)(arg1)->get_val(arg2);
81148  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
81149  return resultobj;
81150 fail:
81151  return NULL;
81152 }
81153 
81154 
81155 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81156  PyObject *resultobj = 0;
81158  size_t arg2 ;
81159  void *argp1 = 0 ;
81160  int res1 = 0 ;
81161  size_t val2 ;
81162  int ecode2 = 0 ;
81163  PyObject * obj0 = 0 ;
81164  PyObject * obj1 = 0 ;
81166 
81167  if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
81168  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81169  if (!SWIG_IsOK(res1)) {
81170  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81171  }
81172  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81173  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81174  if (!SWIG_IsOK(ecode2)) {
81175  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
81176  }
81177  arg2 = static_cast< size_t >(val2);
81178  result = (faiss::HeapArray< faiss::CMax< float,long > >::TI *)(arg1)->get_ids(arg2);
81179  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
81180  return resultobj;
81181 fail:
81182  return NULL;
81183 }
81184 
81185 
81186 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81187  PyObject *resultobj = 0;
81189  void *argp1 = 0 ;
81190  int res1 = 0 ;
81191  PyObject * obj0 = 0 ;
81192 
81193  if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_heapify",&obj0)) SWIG_fail;
81194  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81195  if (!SWIG_IsOK(res1)) {
81196  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81197  }
81198  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81199  (arg1)->heapify();
81200  resultobj = SWIG_Py_Void();
81201  return resultobj;
81202 fail:
81203  return NULL;
81204 }
81205 
81206 
81207 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81208  PyObject *resultobj = 0;
81210  size_t arg2 ;
81213  size_t arg5 ;
81214  long arg6 ;
81215  void *argp1 = 0 ;
81216  int res1 = 0 ;
81217  size_t val2 ;
81218  int ecode2 = 0 ;
81219  void *argp3 = 0 ;
81220  int res3 = 0 ;
81221  long val4 ;
81222  int ecode4 = 0 ;
81223  size_t val5 ;
81224  int ecode5 = 0 ;
81225  long val6 ;
81226  int ecode6 = 0 ;
81227  PyObject * obj0 = 0 ;
81228  PyObject * obj1 = 0 ;
81229  PyObject * obj2 = 0 ;
81230  PyObject * obj3 = 0 ;
81231  PyObject * obj4 = 0 ;
81232  PyObject * obj5 = 0 ;
81233 
81234  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
81235  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81236  if (!SWIG_IsOK(res1)) {
81237  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81238  }
81239  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81240  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81241  if (!SWIG_IsOK(ecode2)) {
81242  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
81243  }
81244  arg2 = static_cast< size_t >(val2);
81245  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81246  if (!SWIG_IsOK(res3)) {
81247  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81248  }
81249  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81250  ecode4 = SWIG_AsVal_long(obj3, &val4);
81251  if (!SWIG_IsOK(ecode4)) {
81252  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI""'");
81253  }
81254  arg4 = static_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI >(val4);
81255  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
81256  if (!SWIG_IsOK(ecode5)) {
81257  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
81258  }
81259  arg5 = static_cast< size_t >(val5);
81260  ecode6 = SWIG_AsVal_long(obj5, &val6);
81261  if (!SWIG_IsOK(ecode6)) {
81262  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_maxheap_array_t_addn" "', argument " "6"" of type '" "long""'");
81263  }
81264  arg6 = static_cast< long >(val6);
81265  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,arg4,arg5,arg6);
81266  resultobj = SWIG_Py_Void();
81267  return resultobj;
81268 fail:
81269  return NULL;
81270 }
81271 
81272 
81273 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81274  PyObject *resultobj = 0;
81276  size_t arg2 ;
81279  size_t arg5 ;
81280  void *argp1 = 0 ;
81281  int res1 = 0 ;
81282  size_t val2 ;
81283  int ecode2 = 0 ;
81284  void *argp3 = 0 ;
81285  int res3 = 0 ;
81286  long val4 ;
81287  int ecode4 = 0 ;
81288  size_t val5 ;
81289  int ecode5 = 0 ;
81290  PyObject * obj0 = 0 ;
81291  PyObject * obj1 = 0 ;
81292  PyObject * obj2 = 0 ;
81293  PyObject * obj3 = 0 ;
81294  PyObject * obj4 = 0 ;
81295 
81296  if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
81297  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81298  if (!SWIG_IsOK(res1)) {
81299  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81300  }
81301  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81302  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81303  if (!SWIG_IsOK(ecode2)) {
81304  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
81305  }
81306  arg2 = static_cast< size_t >(val2);
81307  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81308  if (!SWIG_IsOK(res3)) {
81309  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81310  }
81311  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81312  ecode4 = SWIG_AsVal_long(obj3, &val4);
81313  if (!SWIG_IsOK(ecode4)) {
81314  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI""'");
81315  }
81316  arg4 = static_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI >(val4);
81317  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
81318  if (!SWIG_IsOK(ecode5)) {
81319  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
81320  }
81321  arg5 = static_cast< size_t >(val5);
81322  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,arg4,arg5);
81323  resultobj = SWIG_Py_Void();
81324  return resultobj;
81325 fail:
81326  return NULL;
81327 }
81328 
81329 
81330 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81331  PyObject *resultobj = 0;
81333  size_t arg2 ;
81336  void *argp1 = 0 ;
81337  int res1 = 0 ;
81338  size_t val2 ;
81339  int ecode2 = 0 ;
81340  void *argp3 = 0 ;
81341  int res3 = 0 ;
81342  long val4 ;
81343  int ecode4 = 0 ;
81344  PyObject * obj0 = 0 ;
81345  PyObject * obj1 = 0 ;
81346  PyObject * obj2 = 0 ;
81347  PyObject * obj3 = 0 ;
81348 
81349  if (!PyArg_ParseTuple(args,(char *)"OOOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
81350  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81351  if (!SWIG_IsOK(res1)) {
81352  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81353  }
81354  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81355  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81356  if (!SWIG_IsOK(ecode2)) {
81357  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
81358  }
81359  arg2 = static_cast< size_t >(val2);
81360  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81361  if (!SWIG_IsOK(res3)) {
81362  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81363  }
81364  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81365  ecode4 = SWIG_AsVal_long(obj3, &val4);
81366  if (!SWIG_IsOK(ecode4)) {
81367  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI""'");
81368  }
81369  arg4 = static_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI >(val4);
81370  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,arg4);
81371  resultobj = SWIG_Py_Void();
81372  return resultobj;
81373 fail:
81374  return NULL;
81375 }
81376 
81377 
81378 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81379  PyObject *resultobj = 0;
81381  size_t arg2 ;
81383  void *argp1 = 0 ;
81384  int res1 = 0 ;
81385  size_t val2 ;
81386  int ecode2 = 0 ;
81387  void *argp3 = 0 ;
81388  int res3 = 0 ;
81389  PyObject * obj0 = 0 ;
81390  PyObject * obj1 = 0 ;
81391  PyObject * obj2 = 0 ;
81392 
81393  if (!PyArg_ParseTuple(args,(char *)"OOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
81394  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81395  if (!SWIG_IsOK(res1)) {
81396  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81397  }
81398  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81399  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81400  if (!SWIG_IsOK(ecode2)) {
81401  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
81402  }
81403  arg2 = static_cast< size_t >(val2);
81404  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81405  if (!SWIG_IsOK(res3)) {
81406  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81407  }
81408  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81409  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3);
81410  resultobj = SWIG_Py_Void();
81411  return resultobj;
81412 fail:
81413  return NULL;
81414 }
81415 
81416 
81417 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn(PyObject *self, PyObject *args) {
81418  Py_ssize_t argc;
81419  PyObject *argv[7] = {
81420  0
81421  };
81422  Py_ssize_t ii;
81423 
81424  if (!PyTuple_Check(args)) SWIG_fail;
81425  argc = args ? PyObject_Length(args) : 0;
81426  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
81427  argv[ii] = PyTuple_GET_ITEM(args,ii);
81428  }
81429  if (argc == 3) {
81430  int _v;
81431  void *vptr = 0;
81432  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81433  _v = SWIG_CheckState(res);
81434  if (_v) {
81435  {
81436  int res = SWIG_AsVal_size_t(argv[1], NULL);
81437  _v = SWIG_CheckState(res);
81438  }
81439  if (_v) {
81440  void *vptr = 0;
81441  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81442  _v = SWIG_CheckState(res);
81443  if (_v) {
81444  return _wrap_float_maxheap_array_t_addn__SWIG_3(self, args);
81445  }
81446  }
81447  }
81448  }
81449  if (argc == 4) {
81450  int _v;
81451  void *vptr = 0;
81452  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81453  _v = SWIG_CheckState(res);
81454  if (_v) {
81455  {
81456  int res = SWIG_AsVal_size_t(argv[1], NULL);
81457  _v = SWIG_CheckState(res);
81458  }
81459  if (_v) {
81460  void *vptr = 0;
81461  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81462  _v = SWIG_CheckState(res);
81463  if (_v) {
81464  {
81465  int res = SWIG_AsVal_long(argv[3], NULL);
81466  _v = SWIG_CheckState(res);
81467  }
81468  if (_v) {
81469  return _wrap_float_maxheap_array_t_addn__SWIG_2(self, args);
81470  }
81471  }
81472  }
81473  }
81474  }
81475  if (argc == 5) {
81476  int _v;
81477  void *vptr = 0;
81478  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81479  _v = SWIG_CheckState(res);
81480  if (_v) {
81481  {
81482  int res = SWIG_AsVal_size_t(argv[1], NULL);
81483  _v = SWIG_CheckState(res);
81484  }
81485  if (_v) {
81486  void *vptr = 0;
81487  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81488  _v = SWIG_CheckState(res);
81489  if (_v) {
81490  {
81491  int res = SWIG_AsVal_long(argv[3], NULL);
81492  _v = SWIG_CheckState(res);
81493  }
81494  if (_v) {
81495  {
81496  int res = SWIG_AsVal_size_t(argv[4], NULL);
81497  _v = SWIG_CheckState(res);
81498  }
81499  if (_v) {
81500  return _wrap_float_maxheap_array_t_addn__SWIG_1(self, args);
81501  }
81502  }
81503  }
81504  }
81505  }
81506  }
81507  if (argc == 6) {
81508  int _v;
81509  void *vptr = 0;
81510  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81511  _v = SWIG_CheckState(res);
81512  if (_v) {
81513  {
81514  int res = SWIG_AsVal_size_t(argv[1], NULL);
81515  _v = SWIG_CheckState(res);
81516  }
81517  if (_v) {
81518  void *vptr = 0;
81519  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81520  _v = SWIG_CheckState(res);
81521  if (_v) {
81522  {
81523  int res = SWIG_AsVal_long(argv[3], NULL);
81524  _v = SWIG_CheckState(res);
81525  }
81526  if (_v) {
81527  {
81528  int res = SWIG_AsVal_size_t(argv[4], NULL);
81529  _v = SWIG_CheckState(res);
81530  }
81531  if (_v) {
81532  {
81533  int res = SWIG_AsVal_long(argv[5], NULL);
81534  _v = SWIG_CheckState(res);
81535  }
81536  if (_v) {
81537  return _wrap_float_maxheap_array_t_addn__SWIG_0(self, args);
81538  }
81539  }
81540  }
81541  }
81542  }
81543  }
81544  }
81545 
81546 fail:
81547  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_maxheap_array_t_addn'.\n"
81548  " Possible C/C++ prototypes are:\n"
81549  " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI,size_t,long)\n"
81550  " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI,size_t)\n"
81551  " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI)\n"
81552  " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *)\n");
81553  return 0;
81554 }
81555 
81556 
81557 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81558  PyObject *resultobj = 0;
81560  size_t arg2 ;
81563  long arg5 ;
81564  size_t arg6 ;
81565  long arg7 ;
81566  void *argp1 = 0 ;
81567  int res1 = 0 ;
81568  size_t val2 ;
81569  int ecode2 = 0 ;
81570  void *argp3 = 0 ;
81571  int res3 = 0 ;
81572  void *argp4 = 0 ;
81573  int res4 = 0 ;
81574  long val5 ;
81575  int ecode5 = 0 ;
81576  size_t val6 ;
81577  int ecode6 = 0 ;
81578  long val7 ;
81579  int ecode7 = 0 ;
81580  PyObject * obj0 = 0 ;
81581  PyObject * obj1 = 0 ;
81582  PyObject * obj2 = 0 ;
81583  PyObject * obj3 = 0 ;
81584  PyObject * obj4 = 0 ;
81585  PyObject * obj5 = 0 ;
81586  PyObject * obj6 = 0 ;
81587 
81588  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
81589  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81590  if (!SWIG_IsOK(res1)) {
81591  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81592  }
81593  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81594  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81595  if (!SWIG_IsOK(ecode2)) {
81596  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
81597  }
81598  arg2 = static_cast< size_t >(val2);
81599  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81600  if (!SWIG_IsOK(res3)) {
81601  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81602  }
81603  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81604  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
81605  if (!SWIG_IsOK(res4)) {
81606  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
81607  }
81608  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
81609  ecode5 = SWIG_AsVal_long(obj4, &val5);
81610  if (!SWIG_IsOK(ecode5)) {
81611  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
81612  }
81613  arg5 = static_cast< long >(val5);
81614  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
81615  if (!SWIG_IsOK(ecode6)) {
81616  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
81617  }
81618  arg6 = static_cast< size_t >(val6);
81619  ecode7 = SWIG_AsVal_long(obj6, &val7);
81620  if (!SWIG_IsOK(ecode7)) {
81621  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
81622  }
81623  arg7 = static_cast< long >(val7);
81624  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4,arg5,arg6,arg7);
81625  resultobj = SWIG_Py_Void();
81626  return resultobj;
81627 fail:
81628  return NULL;
81629 }
81630 
81631 
81632 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81633  PyObject *resultobj = 0;
81635  size_t arg2 ;
81638  long arg5 ;
81639  size_t arg6 ;
81640  void *argp1 = 0 ;
81641  int res1 = 0 ;
81642  size_t val2 ;
81643  int ecode2 = 0 ;
81644  void *argp3 = 0 ;
81645  int res3 = 0 ;
81646  void *argp4 = 0 ;
81647  int res4 = 0 ;
81648  long val5 ;
81649  int ecode5 = 0 ;
81650  size_t val6 ;
81651  int ecode6 = 0 ;
81652  PyObject * obj0 = 0 ;
81653  PyObject * obj1 = 0 ;
81654  PyObject * obj2 = 0 ;
81655  PyObject * obj3 = 0 ;
81656  PyObject * obj4 = 0 ;
81657  PyObject * obj5 = 0 ;
81658 
81659  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
81660  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81661  if (!SWIG_IsOK(res1)) {
81662  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81663  }
81664  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81665  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81666  if (!SWIG_IsOK(ecode2)) {
81667  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
81668  }
81669  arg2 = static_cast< size_t >(val2);
81670  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81671  if (!SWIG_IsOK(res3)) {
81672  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81673  }
81674  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81675  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
81676  if (!SWIG_IsOK(res4)) {
81677  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
81678  }
81679  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
81680  ecode5 = SWIG_AsVal_long(obj4, &val5);
81681  if (!SWIG_IsOK(ecode5)) {
81682  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
81683  }
81684  arg5 = static_cast< long >(val5);
81685  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
81686  if (!SWIG_IsOK(ecode6)) {
81687  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
81688  }
81689  arg6 = static_cast< size_t >(val6);
81690  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4,arg5,arg6);
81691  resultobj = SWIG_Py_Void();
81692  return resultobj;
81693 fail:
81694  return NULL;
81695 }
81696 
81697 
81698 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81699  PyObject *resultobj = 0;
81701  size_t arg2 ;
81704  long arg5 ;
81705  void *argp1 = 0 ;
81706  int res1 = 0 ;
81707  size_t val2 ;
81708  int ecode2 = 0 ;
81709  void *argp3 = 0 ;
81710  int res3 = 0 ;
81711  void *argp4 = 0 ;
81712  int res4 = 0 ;
81713  long val5 ;
81714  int ecode5 = 0 ;
81715  PyObject * obj0 = 0 ;
81716  PyObject * obj1 = 0 ;
81717  PyObject * obj2 = 0 ;
81718  PyObject * obj3 = 0 ;
81719  PyObject * obj4 = 0 ;
81720 
81721  if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
81722  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81723  if (!SWIG_IsOK(res1)) {
81724  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81725  }
81726  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81727  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81728  if (!SWIG_IsOK(ecode2)) {
81729  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
81730  }
81731  arg2 = static_cast< size_t >(val2);
81732  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81733  if (!SWIG_IsOK(res3)) {
81734  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81735  }
81736  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81737  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
81738  if (!SWIG_IsOK(res4)) {
81739  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
81740  }
81741  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
81742  ecode5 = SWIG_AsVal_long(obj4, &val5);
81743  if (!SWIG_IsOK(ecode5)) {
81744  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
81745  }
81746  arg5 = static_cast< long >(val5);
81747  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4,arg5);
81748  resultobj = SWIG_Py_Void();
81749  return resultobj;
81750 fail:
81751  return NULL;
81752 }
81753 
81754 
81755 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81756  PyObject *resultobj = 0;
81758  size_t arg2 ;
81761  void *argp1 = 0 ;
81762  int res1 = 0 ;
81763  size_t val2 ;
81764  int ecode2 = 0 ;
81765  void *argp3 = 0 ;
81766  int res3 = 0 ;
81767  void *argp4 = 0 ;
81768  int res4 = 0 ;
81769  PyObject * obj0 = 0 ;
81770  PyObject * obj1 = 0 ;
81771  PyObject * obj2 = 0 ;
81772  PyObject * obj3 = 0 ;
81773 
81774  if (!PyArg_ParseTuple(args,(char *)"OOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
81775  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81776  if (!SWIG_IsOK(res1)) {
81777  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81778  }
81779  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81780  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81781  if (!SWIG_IsOK(ecode2)) {
81782  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
81783  }
81784  arg2 = static_cast< size_t >(val2);
81785  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81786  if (!SWIG_IsOK(res3)) {
81787  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81788  }
81789  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81790  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
81791  if (!SWIG_IsOK(res4)) {
81792  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
81793  }
81794  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
81795  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4);
81796  resultobj = SWIG_Py_Void();
81797  return resultobj;
81798 fail:
81799  return NULL;
81800 }
81801 
81802 
81803 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
81804  PyObject *resultobj = 0;
81806  size_t arg2 ;
81808  void *argp1 = 0 ;
81809  int res1 = 0 ;
81810  size_t val2 ;
81811  int ecode2 = 0 ;
81812  void *argp3 = 0 ;
81813  int res3 = 0 ;
81814  PyObject * obj0 = 0 ;
81815  PyObject * obj1 = 0 ;
81816  PyObject * obj2 = 0 ;
81817 
81818  if (!PyArg_ParseTuple(args,(char *)"OOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
81819  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
81820  if (!SWIG_IsOK(res1)) {
81821  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
81822  }
81823  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
81824  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
81825  if (!SWIG_IsOK(ecode2)) {
81826  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
81827  }
81828  arg2 = static_cast< size_t >(val2);
81829  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
81830  if (!SWIG_IsOK(res3)) {
81831  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
81832  }
81833  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
81834  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3);
81835  resultobj = SWIG_Py_Void();
81836  return resultobj;
81837 fail:
81838  return NULL;
81839 }
81840 
81841 
81842 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
81843  Py_ssize_t argc;
81844  PyObject *argv[8] = {
81845  0
81846  };
81847  Py_ssize_t ii;
81848 
81849  if (!PyTuple_Check(args)) SWIG_fail;
81850  argc = args ? PyObject_Length(args) : 0;
81851  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
81852  argv[ii] = PyTuple_GET_ITEM(args,ii);
81853  }
81854  if (argc == 3) {
81855  int _v;
81856  void *vptr = 0;
81857  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81858  _v = SWIG_CheckState(res);
81859  if (_v) {
81860  {
81861  int res = SWIG_AsVal_size_t(argv[1], NULL);
81862  _v = SWIG_CheckState(res);
81863  }
81864  if (_v) {
81865  void *vptr = 0;
81866  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81867  _v = SWIG_CheckState(res);
81868  if (_v) {
81869  return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_4(self, args);
81870  }
81871  }
81872  }
81873  }
81874  if (argc == 4) {
81875  int _v;
81876  void *vptr = 0;
81877  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81878  _v = SWIG_CheckState(res);
81879  if (_v) {
81880  {
81881  int res = SWIG_AsVal_size_t(argv[1], NULL);
81882  _v = SWIG_CheckState(res);
81883  }
81884  if (_v) {
81885  void *vptr = 0;
81886  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81887  _v = SWIG_CheckState(res);
81888  if (_v) {
81889  void *vptr = 0;
81890  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
81891  _v = SWIG_CheckState(res);
81892  if (_v) {
81893  return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_3(self, args);
81894  }
81895  }
81896  }
81897  }
81898  }
81899  if (argc == 5) {
81900  int _v;
81901  void *vptr = 0;
81902  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81903  _v = SWIG_CheckState(res);
81904  if (_v) {
81905  {
81906  int res = SWIG_AsVal_size_t(argv[1], NULL);
81907  _v = SWIG_CheckState(res);
81908  }
81909  if (_v) {
81910  void *vptr = 0;
81911  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81912  _v = SWIG_CheckState(res);
81913  if (_v) {
81914  void *vptr = 0;
81915  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
81916  _v = SWIG_CheckState(res);
81917  if (_v) {
81918  {
81919  int res = SWIG_AsVal_long(argv[4], NULL);
81920  _v = SWIG_CheckState(res);
81921  }
81922  if (_v) {
81923  return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_2(self, args);
81924  }
81925  }
81926  }
81927  }
81928  }
81929  }
81930  if (argc == 6) {
81931  int _v;
81932  void *vptr = 0;
81933  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81934  _v = SWIG_CheckState(res);
81935  if (_v) {
81936  {
81937  int res = SWIG_AsVal_size_t(argv[1], NULL);
81938  _v = SWIG_CheckState(res);
81939  }
81940  if (_v) {
81941  void *vptr = 0;
81942  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81943  _v = SWIG_CheckState(res);
81944  if (_v) {
81945  void *vptr = 0;
81946  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
81947  _v = SWIG_CheckState(res);
81948  if (_v) {
81949  {
81950  int res = SWIG_AsVal_long(argv[4], NULL);
81951  _v = SWIG_CheckState(res);
81952  }
81953  if (_v) {
81954  {
81955  int res = SWIG_AsVal_size_t(argv[5], NULL);
81956  _v = SWIG_CheckState(res);
81957  }
81958  if (_v) {
81959  return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_1(self, args);
81960  }
81961  }
81962  }
81963  }
81964  }
81965  }
81966  }
81967  if (argc == 7) {
81968  int _v;
81969  void *vptr = 0;
81970  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
81971  _v = SWIG_CheckState(res);
81972  if (_v) {
81973  {
81974  int res = SWIG_AsVal_size_t(argv[1], NULL);
81975  _v = SWIG_CheckState(res);
81976  }
81977  if (_v) {
81978  void *vptr = 0;
81979  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
81980  _v = SWIG_CheckState(res);
81981  if (_v) {
81982  void *vptr = 0;
81983  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
81984  _v = SWIG_CheckState(res);
81985  if (_v) {
81986  {
81987  int res = SWIG_AsVal_long(argv[4], NULL);
81988  _v = SWIG_CheckState(res);
81989  }
81990  if (_v) {
81991  {
81992  int res = SWIG_AsVal_size_t(argv[5], NULL);
81993  _v = SWIG_CheckState(res);
81994  }
81995  if (_v) {
81996  {
81997  int res = SWIG_AsVal_long(argv[6], NULL);
81998  _v = SWIG_CheckState(res);
81999  }
82000  if (_v) {
82001  return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_0(self, args);
82002  }
82003  }
82004  }
82005  }
82006  }
82007  }
82008  }
82009  }
82010 
82011 fail:
82012  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_maxheap_array_t_addn_with_ids'.\n"
82013  " Possible C/C++ prototypes are:\n"
82014  " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *,long,size_t,long)\n"
82015  " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *,long,size_t)\n"
82016  " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *,long)\n"
82017  " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *)\n"
82018  " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *)\n");
82019  return 0;
82020 }
82021 
82022 
82023 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82024  PyObject *resultobj = 0;
82026  void *argp1 = 0 ;
82027  int res1 = 0 ;
82028  PyObject * obj0 = 0 ;
82029 
82030  if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_reorder",&obj0)) SWIG_fail;
82031  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
82032  if (!SWIG_IsOK(res1)) {
82033  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
82034  }
82035  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
82036  (arg1)->reorder();
82037  resultobj = SWIG_Py_Void();
82038  return resultobj;
82039 fail:
82040  return NULL;
82041 }
82042 
82043 
82044 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82045  PyObject *resultobj = 0;
82049  void *argp1 = 0 ;
82050  int res1 = 0 ;
82051  void *argp2 = 0 ;
82052  int res2 = 0 ;
82053  void *argp3 = 0 ;
82054  int res3 = 0 ;
82055  PyObject * obj0 = 0 ;
82056  PyObject * obj1 = 0 ;
82057  PyObject * obj2 = 0 ;
82058 
82059  if (!PyArg_ParseTuple(args,(char *)"OOO:float_maxheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
82060  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
82061  if (!SWIG_IsOK(res1)) {
82062  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > const *""'");
82063  }
82064  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
82065  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
82066  if (!SWIG_IsOK(res2)) {
82067  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_maxheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T *""'");
82068  }
82069  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp2);
82070  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
82071  if (!SWIG_IsOK(res3)) {
82072  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI *""'");
82073  }
82074  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp3);
82075  ((faiss::HeapArray< faiss::CMax< float,long > > const *)arg1)->per_line_extrema(arg2,arg3);
82076  resultobj = SWIG_Py_Void();
82077  return resultobj;
82078 fail:
82079  return NULL;
82080 }
82081 
82082 
82083 SWIGINTERN PyObject *_wrap_new_float_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82084  PyObject *resultobj = 0;
82086 
82087  if (!PyArg_ParseTuple(args,(char *)":new_float_maxheap_array_t")) SWIG_fail;
82089  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, SWIG_POINTER_NEW | 0 );
82090  return resultobj;
82091 fail:
82092  return NULL;
82093 }
82094 
82095 
82096 SWIGINTERN PyObject *_wrap_delete_float_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82097  PyObject *resultobj = 0;
82099  void *argp1 = 0 ;
82100  int res1 = 0 ;
82101  PyObject * obj0 = 0 ;
82102 
82103  if (!PyArg_ParseTuple(args,(char *)"O:delete_float_maxheap_array_t",&obj0)) SWIG_fail;
82104  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, SWIG_POINTER_DISOWN | 0 );
82105  if (!SWIG_IsOK(res1)) {
82106  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_float_maxheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
82107  }
82108  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
82109  delete arg1;
82110  resultobj = SWIG_Py_Void();
82111  return resultobj;
82112 fail:
82113  return NULL;
82114 }
82115 
82116 
82117 SWIGINTERN PyObject *float_maxheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82118  PyObject *obj;
82119  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
82120  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, SWIG_NewClientData(obj));
82121  return SWIG_Py_Void();
82122 }
82123 
82124 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82125  PyObject *resultobj = 0;
82127  size_t arg2 ;
82128  void *argp1 = 0 ;
82129  int res1 = 0 ;
82130  size_t val2 ;
82131  int ecode2 = 0 ;
82132  PyObject * obj0 = 0 ;
82133  PyObject * obj1 = 0 ;
82134 
82135  if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
82136  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82137  if (!SWIG_IsOK(res1)) {
82138  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82139  }
82140  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82141  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82142  if (!SWIG_IsOK(ecode2)) {
82143  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
82144  }
82145  arg2 = static_cast< size_t >(val2);
82146  if (arg1) (arg1)->nh = arg2;
82147  resultobj = SWIG_Py_Void();
82148  return resultobj;
82149 fail:
82150  return NULL;
82151 }
82152 
82153 
82154 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82155  PyObject *resultobj = 0;
82157  void *argp1 = 0 ;
82158  int res1 = 0 ;
82159  PyObject * obj0 = 0 ;
82160  size_t result;
82161 
82162  if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_nh_get",&obj0)) SWIG_fail;
82163  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82164  if (!SWIG_IsOK(res1)) {
82165  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82166  }
82167  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82168  result = (size_t) ((arg1)->nh);
82169  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
82170  return resultobj;
82171 fail:
82172  return NULL;
82173 }
82174 
82175 
82176 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82177  PyObject *resultobj = 0;
82179  size_t arg2 ;
82180  void *argp1 = 0 ;
82181  int res1 = 0 ;
82182  size_t val2 ;
82183  int ecode2 = 0 ;
82184  PyObject * obj0 = 0 ;
82185  PyObject * obj1 = 0 ;
82186 
82187  if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
82188  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82189  if (!SWIG_IsOK(res1)) {
82190  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82191  }
82192  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82193  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82194  if (!SWIG_IsOK(ecode2)) {
82195  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
82196  }
82197  arg2 = static_cast< size_t >(val2);
82198  if (arg1) (arg1)->k = arg2;
82199  resultobj = SWIG_Py_Void();
82200  return resultobj;
82201 fail:
82202  return NULL;
82203 }
82204 
82205 
82206 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82207  PyObject *resultobj = 0;
82209  void *argp1 = 0 ;
82210  int res1 = 0 ;
82211  PyObject * obj0 = 0 ;
82212  size_t result;
82213 
82214  if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_k_get",&obj0)) SWIG_fail;
82215  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82216  if (!SWIG_IsOK(res1)) {
82217  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82218  }
82219  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82220  result = (size_t) ((arg1)->k);
82221  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
82222  return resultobj;
82223 fail:
82224  return NULL;
82225 }
82226 
82227 
82228 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82229  PyObject *resultobj = 0;
82232  void *argp1 = 0 ;
82233  int res1 = 0 ;
82234  void *argp2 = 0 ;
82235  int res2 = 0 ;
82236  PyObject * obj0 = 0 ;
82237  PyObject * obj1 = 0 ;
82238 
82239  if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
82240  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82241  if (!SWIG_IsOK(res1)) {
82242  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82243  }
82244  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82245  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
82246  if (!SWIG_IsOK(res2)) {
82247  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_maxheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI *""'");
82248  }
82249  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp2);
82250  if (arg1) (arg1)->ids = arg2;
82251  resultobj = SWIG_Py_Void();
82252  return resultobj;
82253 fail:
82254  return NULL;
82255 }
82256 
82257 
82258 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82259  PyObject *resultobj = 0;
82261  void *argp1 = 0 ;
82262  int res1 = 0 ;
82263  PyObject * obj0 = 0 ;
82264  faiss::HeapArray< faiss::CMax< int,long > >::TI *result = 0 ;
82265 
82266  if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_ids_get",&obj0)) SWIG_fail;
82267  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82268  if (!SWIG_IsOK(res1)) {
82269  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82270  }
82271  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82272  result = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) ((arg1)->ids);
82273  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
82274  return resultobj;
82275 fail:
82276  return NULL;
82277 }
82278 
82279 
82280 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82281  PyObject *resultobj = 0;
82284  void *argp1 = 0 ;
82285  int res1 = 0 ;
82286  void *argp2 = 0 ;
82287  int res2 = 0 ;
82288  PyObject * obj0 = 0 ;
82289  PyObject * obj1 = 0 ;
82290 
82291  if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
82292  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82293  if (!SWIG_IsOK(res1)) {
82294  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82295  }
82296  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82297  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN | 0 );
82298  if (!SWIG_IsOK(res2)) {
82299  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_maxheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T *""'");
82300  }
82301  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp2);
82302  if (arg1) (arg1)->val = arg2;
82303  resultobj = SWIG_Py_Void();
82304  return resultobj;
82305 fail:
82306  return NULL;
82307 }
82308 
82309 
82310 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82311  PyObject *resultobj = 0;
82313  void *argp1 = 0 ;
82314  int res1 = 0 ;
82315  PyObject * obj0 = 0 ;
82317 
82318  if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_val_get",&obj0)) SWIG_fail;
82319  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82320  if (!SWIG_IsOK(res1)) {
82321  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82322  }
82323  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82324  result = (faiss::HeapArray< faiss::CMax< int,long > >::T *) ((arg1)->val);
82325  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
82326  return resultobj;
82327 fail:
82328  return NULL;
82329 }
82330 
82331 
82332 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82333  PyObject *resultobj = 0;
82335  size_t arg2 ;
82336  void *argp1 = 0 ;
82337  int res1 = 0 ;
82338  size_t val2 ;
82339  int ecode2 = 0 ;
82340  PyObject * obj0 = 0 ;
82341  PyObject * obj1 = 0 ;
82343 
82344  if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
82345  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82346  if (!SWIG_IsOK(res1)) {
82347  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82348  }
82349  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82350  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82351  if (!SWIG_IsOK(ecode2)) {
82352  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
82353  }
82354  arg2 = static_cast< size_t >(val2);
82355  result = (faiss::HeapArray< faiss::CMax< int,long > >::T *)(arg1)->get_val(arg2);
82356  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
82357  return resultobj;
82358 fail:
82359  return NULL;
82360 }
82361 
82362 
82363 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82364  PyObject *resultobj = 0;
82366  size_t arg2 ;
82367  void *argp1 = 0 ;
82368  int res1 = 0 ;
82369  size_t val2 ;
82370  int ecode2 = 0 ;
82371  PyObject * obj0 = 0 ;
82372  PyObject * obj1 = 0 ;
82373  faiss::HeapArray< faiss::CMax< int,long > >::TI *result = 0 ;
82374 
82375  if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
82376  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82377  if (!SWIG_IsOK(res1)) {
82378  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82379  }
82380  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82381  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82382  if (!SWIG_IsOK(ecode2)) {
82383  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
82384  }
82385  arg2 = static_cast< size_t >(val2);
82386  result = (faiss::HeapArray< faiss::CMax< int,long > >::TI *)(arg1)->get_ids(arg2);
82387  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
82388  return resultobj;
82389 fail:
82390  return NULL;
82391 }
82392 
82393 
82394 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82395  PyObject *resultobj = 0;
82397  void *argp1 = 0 ;
82398  int res1 = 0 ;
82399  PyObject * obj0 = 0 ;
82400 
82401  if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_heapify",&obj0)) SWIG_fail;
82402  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82403  if (!SWIG_IsOK(res1)) {
82404  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82405  }
82406  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82407  (arg1)->heapify();
82408  resultobj = SWIG_Py_Void();
82409  return resultobj;
82410 fail:
82411  return NULL;
82412 }
82413 
82414 
82415 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82416  PyObject *resultobj = 0;
82418  size_t arg2 ;
82421  size_t arg5 ;
82422  long arg6 ;
82423  void *argp1 = 0 ;
82424  int res1 = 0 ;
82425  size_t val2 ;
82426  int ecode2 = 0 ;
82427  void *argp3 = 0 ;
82428  int res3 = 0 ;
82429  long val4 ;
82430  int ecode4 = 0 ;
82431  size_t val5 ;
82432  int ecode5 = 0 ;
82433  long val6 ;
82434  int ecode6 = 0 ;
82435  PyObject * obj0 = 0 ;
82436  PyObject * obj1 = 0 ;
82437  PyObject * obj2 = 0 ;
82438  PyObject * obj3 = 0 ;
82439  PyObject * obj4 = 0 ;
82440  PyObject * obj5 = 0 ;
82441 
82442  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
82443  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82444  if (!SWIG_IsOK(res1)) {
82445  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82446  }
82447  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82448  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82449  if (!SWIG_IsOK(ecode2)) {
82450  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
82451  }
82452  arg2 = static_cast< size_t >(val2);
82453  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82454  if (!SWIG_IsOK(res3)) {
82455  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82456  }
82457  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82458  ecode4 = SWIG_AsVal_long(obj3, &val4);
82459  if (!SWIG_IsOK(ecode4)) {
82460  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI""'");
82461  }
82462  arg4 = static_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI >(val4);
82463  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
82464  if (!SWIG_IsOK(ecode5)) {
82465  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
82466  }
82467  arg5 = static_cast< size_t >(val5);
82468  ecode6 = SWIG_AsVal_long(obj5, &val6);
82469  if (!SWIG_IsOK(ecode6)) {
82470  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_maxheap_array_t_addn" "', argument " "6"" of type '" "long""'");
82471  }
82472  arg6 = static_cast< long >(val6);
82473  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,arg4,arg5,arg6);
82474  resultobj = SWIG_Py_Void();
82475  return resultobj;
82476 fail:
82477  return NULL;
82478 }
82479 
82480 
82481 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82482  PyObject *resultobj = 0;
82484  size_t arg2 ;
82487  size_t arg5 ;
82488  void *argp1 = 0 ;
82489  int res1 = 0 ;
82490  size_t val2 ;
82491  int ecode2 = 0 ;
82492  void *argp3 = 0 ;
82493  int res3 = 0 ;
82494  long val4 ;
82495  int ecode4 = 0 ;
82496  size_t val5 ;
82497  int ecode5 = 0 ;
82498  PyObject * obj0 = 0 ;
82499  PyObject * obj1 = 0 ;
82500  PyObject * obj2 = 0 ;
82501  PyObject * obj3 = 0 ;
82502  PyObject * obj4 = 0 ;
82503 
82504  if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
82505  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82506  if (!SWIG_IsOK(res1)) {
82507  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82508  }
82509  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82510  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82511  if (!SWIG_IsOK(ecode2)) {
82512  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
82513  }
82514  arg2 = static_cast< size_t >(val2);
82515  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82516  if (!SWIG_IsOK(res3)) {
82517  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82518  }
82519  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82520  ecode4 = SWIG_AsVal_long(obj3, &val4);
82521  if (!SWIG_IsOK(ecode4)) {
82522  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI""'");
82523  }
82524  arg4 = static_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI >(val4);
82525  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
82526  if (!SWIG_IsOK(ecode5)) {
82527  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
82528  }
82529  arg5 = static_cast< size_t >(val5);
82530  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,arg4,arg5);
82531  resultobj = SWIG_Py_Void();
82532  return resultobj;
82533 fail:
82534  return NULL;
82535 }
82536 
82537 
82538 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82539  PyObject *resultobj = 0;
82541  size_t arg2 ;
82544  void *argp1 = 0 ;
82545  int res1 = 0 ;
82546  size_t val2 ;
82547  int ecode2 = 0 ;
82548  void *argp3 = 0 ;
82549  int res3 = 0 ;
82550  long val4 ;
82551  int ecode4 = 0 ;
82552  PyObject * obj0 = 0 ;
82553  PyObject * obj1 = 0 ;
82554  PyObject * obj2 = 0 ;
82555  PyObject * obj3 = 0 ;
82556 
82557  if (!PyArg_ParseTuple(args,(char *)"OOOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
82558  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82559  if (!SWIG_IsOK(res1)) {
82560  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82561  }
82562  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82563  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82564  if (!SWIG_IsOK(ecode2)) {
82565  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
82566  }
82567  arg2 = static_cast< size_t >(val2);
82568  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82569  if (!SWIG_IsOK(res3)) {
82570  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82571  }
82572  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82573  ecode4 = SWIG_AsVal_long(obj3, &val4);
82574  if (!SWIG_IsOK(ecode4)) {
82575  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI""'");
82576  }
82577  arg4 = static_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI >(val4);
82578  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,arg4);
82579  resultobj = SWIG_Py_Void();
82580  return resultobj;
82581 fail:
82582  return NULL;
82583 }
82584 
82585 
82586 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82587  PyObject *resultobj = 0;
82589  size_t arg2 ;
82591  void *argp1 = 0 ;
82592  int res1 = 0 ;
82593  size_t val2 ;
82594  int ecode2 = 0 ;
82595  void *argp3 = 0 ;
82596  int res3 = 0 ;
82597  PyObject * obj0 = 0 ;
82598  PyObject * obj1 = 0 ;
82599  PyObject * obj2 = 0 ;
82600 
82601  if (!PyArg_ParseTuple(args,(char *)"OOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
82602  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82603  if (!SWIG_IsOK(res1)) {
82604  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82605  }
82606  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82607  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82608  if (!SWIG_IsOK(ecode2)) {
82609  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
82610  }
82611  arg2 = static_cast< size_t >(val2);
82612  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82613  if (!SWIG_IsOK(res3)) {
82614  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82615  }
82616  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82617  (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3);
82618  resultobj = SWIG_Py_Void();
82619  return resultobj;
82620 fail:
82621  return NULL;
82622 }
82623 
82624 
82625 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn(PyObject *self, PyObject *args) {
82626  Py_ssize_t argc;
82627  PyObject *argv[7] = {
82628  0
82629  };
82630  Py_ssize_t ii;
82631 
82632  if (!PyTuple_Check(args)) SWIG_fail;
82633  argc = args ? PyObject_Length(args) : 0;
82634  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
82635  argv[ii] = PyTuple_GET_ITEM(args,ii);
82636  }
82637  if (argc == 3) {
82638  int _v;
82639  void *vptr = 0;
82640  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
82641  _v = SWIG_CheckState(res);
82642  if (_v) {
82643  {
82644  int res = SWIG_AsVal_size_t(argv[1], NULL);
82645  _v = SWIG_CheckState(res);
82646  }
82647  if (_v) {
82648  void *vptr = 0;
82649  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
82650  _v = SWIG_CheckState(res);
82651  if (_v) {
82652  return _wrap_int_maxheap_array_t_addn__SWIG_3(self, args);
82653  }
82654  }
82655  }
82656  }
82657  if (argc == 4) {
82658  int _v;
82659  void *vptr = 0;
82660  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
82661  _v = SWIG_CheckState(res);
82662  if (_v) {
82663  {
82664  int res = SWIG_AsVal_size_t(argv[1], NULL);
82665  _v = SWIG_CheckState(res);
82666  }
82667  if (_v) {
82668  void *vptr = 0;
82669  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
82670  _v = SWIG_CheckState(res);
82671  if (_v) {
82672  {
82673  int res = SWIG_AsVal_long(argv[3], NULL);
82674  _v = SWIG_CheckState(res);
82675  }
82676  if (_v) {
82677  return _wrap_int_maxheap_array_t_addn__SWIG_2(self, args);
82678  }
82679  }
82680  }
82681  }
82682  }
82683  if (argc == 5) {
82684  int _v;
82685  void *vptr = 0;
82686  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
82687  _v = SWIG_CheckState(res);
82688  if (_v) {
82689  {
82690  int res = SWIG_AsVal_size_t(argv[1], NULL);
82691  _v = SWIG_CheckState(res);
82692  }
82693  if (_v) {
82694  void *vptr = 0;
82695  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
82696  _v = SWIG_CheckState(res);
82697  if (_v) {
82698  {
82699  int res = SWIG_AsVal_long(argv[3], NULL);
82700  _v = SWIG_CheckState(res);
82701  }
82702  if (_v) {
82703  {
82704  int res = SWIG_AsVal_size_t(argv[4], NULL);
82705  _v = SWIG_CheckState(res);
82706  }
82707  if (_v) {
82708  return _wrap_int_maxheap_array_t_addn__SWIG_1(self, args);
82709  }
82710  }
82711  }
82712  }
82713  }
82714  }
82715  if (argc == 6) {
82716  int _v;
82717  void *vptr = 0;
82718  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
82719  _v = SWIG_CheckState(res);
82720  if (_v) {
82721  {
82722  int res = SWIG_AsVal_size_t(argv[1], NULL);
82723  _v = SWIG_CheckState(res);
82724  }
82725  if (_v) {
82726  void *vptr = 0;
82727  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
82728  _v = SWIG_CheckState(res);
82729  if (_v) {
82730  {
82731  int res = SWIG_AsVal_long(argv[3], NULL);
82732  _v = SWIG_CheckState(res);
82733  }
82734  if (_v) {
82735  {
82736  int res = SWIG_AsVal_size_t(argv[4], NULL);
82737  _v = SWIG_CheckState(res);
82738  }
82739  if (_v) {
82740  {
82741  int res = SWIG_AsVal_long(argv[5], NULL);
82742  _v = SWIG_CheckState(res);
82743  }
82744  if (_v) {
82745  return _wrap_int_maxheap_array_t_addn__SWIG_0(self, args);
82746  }
82747  }
82748  }
82749  }
82750  }
82751  }
82752  }
82753 
82754 fail:
82755  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_maxheap_array_t_addn'.\n"
82756  " Possible C/C++ prototypes are:\n"
82757  " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI,size_t,long)\n"
82758  " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI,size_t)\n"
82759  " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI)\n"
82760  " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *)\n");
82761  return 0;
82762 }
82763 
82764 
82765 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82766  PyObject *resultobj = 0;
82768  size_t arg2 ;
82771  long arg5 ;
82772  size_t arg6 ;
82773  long arg7 ;
82774  void *argp1 = 0 ;
82775  int res1 = 0 ;
82776  size_t val2 ;
82777  int ecode2 = 0 ;
82778  void *argp3 = 0 ;
82779  int res3 = 0 ;
82780  void *argp4 = 0 ;
82781  int res4 = 0 ;
82782  long val5 ;
82783  int ecode5 = 0 ;
82784  size_t val6 ;
82785  int ecode6 = 0 ;
82786  long val7 ;
82787  int ecode7 = 0 ;
82788  PyObject * obj0 = 0 ;
82789  PyObject * obj1 = 0 ;
82790  PyObject * obj2 = 0 ;
82791  PyObject * obj3 = 0 ;
82792  PyObject * obj4 = 0 ;
82793  PyObject * obj5 = 0 ;
82794  PyObject * obj6 = 0 ;
82795 
82796  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
82797  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82798  if (!SWIG_IsOK(res1)) {
82799  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82800  }
82801  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82802  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82803  if (!SWIG_IsOK(ecode2)) {
82804  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
82805  }
82806  arg2 = static_cast< size_t >(val2);
82807  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82808  if (!SWIG_IsOK(res3)) {
82809  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82810  }
82811  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82812  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
82813  if (!SWIG_IsOK(res4)) {
82814  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
82815  }
82816  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
82817  ecode5 = SWIG_AsVal_long(obj4, &val5);
82818  if (!SWIG_IsOK(ecode5)) {
82819  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
82820  }
82821  arg5 = static_cast< long >(val5);
82822  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
82823  if (!SWIG_IsOK(ecode6)) {
82824  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
82825  }
82826  arg6 = static_cast< size_t >(val6);
82827  ecode7 = SWIG_AsVal_long(obj6, &val7);
82828  if (!SWIG_IsOK(ecode7)) {
82829  SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
82830  }
82831  arg7 = static_cast< long >(val7);
82832  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4,arg5,arg6,arg7);
82833  resultobj = SWIG_Py_Void();
82834  return resultobj;
82835 fail:
82836  return NULL;
82837 }
82838 
82839 
82840 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82841  PyObject *resultobj = 0;
82843  size_t arg2 ;
82846  long arg5 ;
82847  size_t arg6 ;
82848  void *argp1 = 0 ;
82849  int res1 = 0 ;
82850  size_t val2 ;
82851  int ecode2 = 0 ;
82852  void *argp3 = 0 ;
82853  int res3 = 0 ;
82854  void *argp4 = 0 ;
82855  int res4 = 0 ;
82856  long val5 ;
82857  int ecode5 = 0 ;
82858  size_t val6 ;
82859  int ecode6 = 0 ;
82860  PyObject * obj0 = 0 ;
82861  PyObject * obj1 = 0 ;
82862  PyObject * obj2 = 0 ;
82863  PyObject * obj3 = 0 ;
82864  PyObject * obj4 = 0 ;
82865  PyObject * obj5 = 0 ;
82866 
82867  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
82868  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82869  if (!SWIG_IsOK(res1)) {
82870  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82871  }
82872  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82873  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82874  if (!SWIG_IsOK(ecode2)) {
82875  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
82876  }
82877  arg2 = static_cast< size_t >(val2);
82878  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82879  if (!SWIG_IsOK(res3)) {
82880  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82881  }
82882  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82883  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
82884  if (!SWIG_IsOK(res4)) {
82885  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
82886  }
82887  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
82888  ecode5 = SWIG_AsVal_long(obj4, &val5);
82889  if (!SWIG_IsOK(ecode5)) {
82890  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
82891  }
82892  arg5 = static_cast< long >(val5);
82893  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
82894  if (!SWIG_IsOK(ecode6)) {
82895  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
82896  }
82897  arg6 = static_cast< size_t >(val6);
82898  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4,arg5,arg6);
82899  resultobj = SWIG_Py_Void();
82900  return resultobj;
82901 fail:
82902  return NULL;
82903 }
82904 
82905 
82906 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82907  PyObject *resultobj = 0;
82909  size_t arg2 ;
82912  long arg5 ;
82913  void *argp1 = 0 ;
82914  int res1 = 0 ;
82915  size_t val2 ;
82916  int ecode2 = 0 ;
82917  void *argp3 = 0 ;
82918  int res3 = 0 ;
82919  void *argp4 = 0 ;
82920  int res4 = 0 ;
82921  long val5 ;
82922  int ecode5 = 0 ;
82923  PyObject * obj0 = 0 ;
82924  PyObject * obj1 = 0 ;
82925  PyObject * obj2 = 0 ;
82926  PyObject * obj3 = 0 ;
82927  PyObject * obj4 = 0 ;
82928 
82929  if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
82930  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82931  if (!SWIG_IsOK(res1)) {
82932  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82933  }
82934  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82935  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82936  if (!SWIG_IsOK(ecode2)) {
82937  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
82938  }
82939  arg2 = static_cast< size_t >(val2);
82940  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82941  if (!SWIG_IsOK(res3)) {
82942  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82943  }
82944  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82945  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
82946  if (!SWIG_IsOK(res4)) {
82947  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
82948  }
82949  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
82950  ecode5 = SWIG_AsVal_long(obj4, &val5);
82951  if (!SWIG_IsOK(ecode5)) {
82952  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
82953  }
82954  arg5 = static_cast< long >(val5);
82955  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4,arg5);
82956  resultobj = SWIG_Py_Void();
82957  return resultobj;
82958 fail:
82959  return NULL;
82960 }
82961 
82962 
82963 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
82964  PyObject *resultobj = 0;
82966  size_t arg2 ;
82969  void *argp1 = 0 ;
82970  int res1 = 0 ;
82971  size_t val2 ;
82972  int ecode2 = 0 ;
82973  void *argp3 = 0 ;
82974  int res3 = 0 ;
82975  void *argp4 = 0 ;
82976  int res4 = 0 ;
82977  PyObject * obj0 = 0 ;
82978  PyObject * obj1 = 0 ;
82979  PyObject * obj2 = 0 ;
82980  PyObject * obj3 = 0 ;
82981 
82982  if (!PyArg_ParseTuple(args,(char *)"OOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
82983  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
82984  if (!SWIG_IsOK(res1)) {
82985  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
82986  }
82987  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
82988  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
82989  if (!SWIG_IsOK(ecode2)) {
82990  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
82991  }
82992  arg2 = static_cast< size_t >(val2);
82993  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
82994  if (!SWIG_IsOK(res3)) {
82995  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
82996  }
82997  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
82998  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
82999  if (!SWIG_IsOK(res4)) {
83000  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
83001  }
83002  arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
83003  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4);
83004  resultobj = SWIG_Py_Void();
83005  return resultobj;
83006 fail:
83007  return NULL;
83008 }
83009 
83010 
83011 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83012  PyObject *resultobj = 0;
83014  size_t arg2 ;
83016  void *argp1 = 0 ;
83017  int res1 = 0 ;
83018  size_t val2 ;
83019  int ecode2 = 0 ;
83020  void *argp3 = 0 ;
83021  int res3 = 0 ;
83022  PyObject * obj0 = 0 ;
83023  PyObject * obj1 = 0 ;
83024  PyObject * obj2 = 0 ;
83025 
83026  if (!PyArg_ParseTuple(args,(char *)"OOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
83027  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
83028  if (!SWIG_IsOK(res1)) {
83029  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
83030  }
83031  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
83032  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
83033  if (!SWIG_IsOK(ecode2)) {
83034  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
83035  }
83036  arg2 = static_cast< size_t >(val2);
83037  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
83038  if (!SWIG_IsOK(res3)) {
83039  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
83040  }
83041  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
83042  (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3);
83043  resultobj = SWIG_Py_Void();
83044  return resultobj;
83045 fail:
83046  return NULL;
83047 }
83048 
83049 
83050 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
83051  Py_ssize_t argc;
83052  PyObject *argv[8] = {
83053  0
83054  };
83055  Py_ssize_t ii;
83056 
83057  if (!PyTuple_Check(args)) SWIG_fail;
83058  argc = args ? PyObject_Length(args) : 0;
83059  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
83060  argv[ii] = PyTuple_GET_ITEM(args,ii);
83061  }
83062  if (argc == 3) {
83063  int _v;
83064  void *vptr = 0;
83065  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
83066  _v = SWIG_CheckState(res);
83067  if (_v) {
83068  {
83069  int res = SWIG_AsVal_size_t(argv[1], NULL);
83070  _v = SWIG_CheckState(res);
83071  }
83072  if (_v) {
83073  void *vptr = 0;
83074  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
83075  _v = SWIG_CheckState(res);
83076  if (_v) {
83077  return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_4(self, args);
83078  }
83079  }
83080  }
83081  }
83082  if (argc == 4) {
83083  int _v;
83084  void *vptr = 0;
83085  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
83086  _v = SWIG_CheckState(res);
83087  if (_v) {
83088  {
83089  int res = SWIG_AsVal_size_t(argv[1], NULL);
83090  _v = SWIG_CheckState(res);
83091  }
83092  if (_v) {
83093  void *vptr = 0;
83094  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
83095  _v = SWIG_CheckState(res);
83096  if (_v) {
83097  void *vptr = 0;
83098  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
83099  _v = SWIG_CheckState(res);
83100  if (_v) {
83101  return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_3(self, args);
83102  }
83103  }
83104  }
83105  }
83106  }
83107  if (argc == 5) {
83108  int _v;
83109  void *vptr = 0;
83110  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
83111  _v = SWIG_CheckState(res);
83112  if (_v) {
83113  {
83114  int res = SWIG_AsVal_size_t(argv[1], NULL);
83115  _v = SWIG_CheckState(res);
83116  }
83117  if (_v) {
83118  void *vptr = 0;
83119  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
83120  _v = SWIG_CheckState(res);
83121  if (_v) {
83122  void *vptr = 0;
83123  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
83124  _v = SWIG_CheckState(res);
83125  if (_v) {
83126  {
83127  int res = SWIG_AsVal_long(argv[4], NULL);
83128  _v = SWIG_CheckState(res);
83129  }
83130  if (_v) {
83131  return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_2(self, args);
83132  }
83133  }
83134  }
83135  }
83136  }
83137  }
83138  if (argc == 6) {
83139  int _v;
83140  void *vptr = 0;
83141  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
83142  _v = SWIG_CheckState(res);
83143  if (_v) {
83144  {
83145  int res = SWIG_AsVal_size_t(argv[1], NULL);
83146  _v = SWIG_CheckState(res);
83147  }
83148  if (_v) {
83149  void *vptr = 0;
83150  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
83151  _v = SWIG_CheckState(res);
83152  if (_v) {
83153  void *vptr = 0;
83154  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
83155  _v = SWIG_CheckState(res);
83156  if (_v) {
83157  {
83158  int res = SWIG_AsVal_long(argv[4], NULL);
83159  _v = SWIG_CheckState(res);
83160  }
83161  if (_v) {
83162  {
83163  int res = SWIG_AsVal_size_t(argv[5], NULL);
83164  _v = SWIG_CheckState(res);
83165  }
83166  if (_v) {
83167  return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_1(self, args);
83168  }
83169  }
83170  }
83171  }
83172  }
83173  }
83174  }
83175  if (argc == 7) {
83176  int _v;
83177  void *vptr = 0;
83178  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
83179  _v = SWIG_CheckState(res);
83180  if (_v) {
83181  {
83182  int res = SWIG_AsVal_size_t(argv[1], NULL);
83183  _v = SWIG_CheckState(res);
83184  }
83185  if (_v) {
83186  void *vptr = 0;
83187  int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
83188  _v = SWIG_CheckState(res);
83189  if (_v) {
83190  void *vptr = 0;
83191  int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
83192  _v = SWIG_CheckState(res);
83193  if (_v) {
83194  {
83195  int res = SWIG_AsVal_long(argv[4], NULL);
83196  _v = SWIG_CheckState(res);
83197  }
83198  if (_v) {
83199  {
83200  int res = SWIG_AsVal_size_t(argv[5], NULL);
83201  _v = SWIG_CheckState(res);
83202  }
83203  if (_v) {
83204  {
83205  int res = SWIG_AsVal_long(argv[6], NULL);
83206  _v = SWIG_CheckState(res);
83207  }
83208  if (_v) {
83209  return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_0(self, args);
83210  }
83211  }
83212  }
83213  }
83214  }
83215  }
83216  }
83217  }
83218 
83219 fail:
83220  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_maxheap_array_t_addn_with_ids'.\n"
83221  " Possible C/C++ prototypes are:\n"
83222  " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *,long,size_t,long)\n"
83223  " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *,long,size_t)\n"
83224  " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *,long)\n"
83225  " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *)\n"
83226  " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *)\n");
83227  return 0;
83228 }
83229 
83230 
83231 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83232  PyObject *resultobj = 0;
83234  void *argp1 = 0 ;
83235  int res1 = 0 ;
83236  PyObject * obj0 = 0 ;
83237 
83238  if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_reorder",&obj0)) SWIG_fail;
83239  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
83240  if (!SWIG_IsOK(res1)) {
83241  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
83242  }
83243  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
83244  (arg1)->reorder();
83245  resultobj = SWIG_Py_Void();
83246  return resultobj;
83247 fail:
83248  return NULL;
83249 }
83250 
83251 
83252 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83253  PyObject *resultobj = 0;
83257  void *argp1 = 0 ;
83258  int res1 = 0 ;
83259  void *argp2 = 0 ;
83260  int res2 = 0 ;
83261  void *argp3 = 0 ;
83262  int res3 = 0 ;
83263  PyObject * obj0 = 0 ;
83264  PyObject * obj1 = 0 ;
83265  PyObject * obj2 = 0 ;
83266 
83267  if (!PyArg_ParseTuple(args,(char *)"OOO:int_maxheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
83268  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
83269  if (!SWIG_IsOK(res1)) {
83270  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > const *""'");
83271  }
83272  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
83273  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
83274  if (!SWIG_IsOK(res2)) {
83275  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_maxheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T *""'");
83276  }
83277  arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp2);
83278  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
83279  if (!SWIG_IsOK(res3)) {
83280  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI *""'");
83281  }
83282  arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp3);
83283  ((faiss::HeapArray< faiss::CMax< int,long > > const *)arg1)->per_line_extrema(arg2,arg3);
83284  resultobj = SWIG_Py_Void();
83285  return resultobj;
83286 fail:
83287  return NULL;
83288 }
83289 
83290 
83291 SWIGINTERN PyObject *_wrap_new_int_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83292  PyObject *resultobj = 0;
83294 
83295  if (!PyArg_ParseTuple(args,(char *)":new_int_maxheap_array_t")) SWIG_fail;
83297  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, SWIG_POINTER_NEW | 0 );
83298  return resultobj;
83299 fail:
83300  return NULL;
83301 }
83302 
83303 
83304 SWIGINTERN PyObject *_wrap_delete_int_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83305  PyObject *resultobj = 0;
83307  void *argp1 = 0 ;
83308  int res1 = 0 ;
83309  PyObject * obj0 = 0 ;
83310 
83311  if (!PyArg_ParseTuple(args,(char *)"O:delete_int_maxheap_array_t",&obj0)) SWIG_fail;
83312  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, SWIG_POINTER_DISOWN | 0 );
83313  if (!SWIG_IsOK(res1)) {
83314  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_int_maxheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
83315  }
83316  arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
83317  delete arg1;
83318  resultobj = SWIG_Py_Void();
83319  return resultobj;
83320 fail:
83321  return NULL;
83322 }
83323 
83324 
83325 SWIGINTERN PyObject *int_maxheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83326  PyObject *obj;
83327  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
83328  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, SWIG_NewClientData(obj));
83329  return SWIG_Py_Void();
83330 }
83331 
83332 SWIGINTERN PyObject *_wrap_omp_set_num_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83333  PyObject *resultobj = 0;
83334  int arg1 ;
83335  int val1 ;
83336  int ecode1 = 0 ;
83337  PyObject * obj0 = 0 ;
83338 
83339  if (!PyArg_ParseTuple(args,(char *)"O:omp_set_num_threads",&obj0)) SWIG_fail;
83340  ecode1 = SWIG_AsVal_int(obj0, &val1);
83341  if (!SWIG_IsOK(ecode1)) {
83342  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "omp_set_num_threads" "', argument " "1"" of type '" "int""'");
83343  }
83344  arg1 = static_cast< int >(val1);
83345  omp_set_num_threads(arg1);
83346  resultobj = SWIG_Py_Void();
83347  return resultobj;
83348 fail:
83349  return NULL;
83350 }
83351 
83352 
83353 SWIGINTERN PyObject *_wrap_omp_get_max_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83354  PyObject *resultobj = 0;
83355  int result;
83356 
83357  if (!PyArg_ParseTuple(args,(char *)":omp_get_max_threads")) SWIG_fail;
83358  result = (int)omp_get_max_threads();
83359  resultobj = SWIG_From_int(static_cast< int >(result));
83360  return resultobj;
83361 fail:
83362  return NULL;
83363 }
83364 
83365 
83366 SWIGINTERN PyObject *_wrap_memcpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83367  PyObject *resultobj = 0;
83368  void *arg1 = (void *) 0 ;
83369  void *arg2 = (void *) 0 ;
83370  size_t arg3 ;
83371  int res1 ;
83372  int res2 ;
83373  size_t val3 ;
83374  int ecode3 = 0 ;
83375  PyObject * obj0 = 0 ;
83376  PyObject * obj1 = 0 ;
83377  PyObject * obj2 = 0 ;
83378  void *result = 0 ;
83379 
83380  if (!PyArg_ParseTuple(args,(char *)"OOO:memcpy",&obj0,&obj1,&obj2)) SWIG_fail;
83381  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
83382  if (!SWIG_IsOK(res1)) {
83383  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcpy" "', argument " "1"" of type '" "void *""'");
83384  }
83385  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
83386  if (!SWIG_IsOK(res2)) {
83387  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcpy" "', argument " "2"" of type '" "void const *""'");
83388  }
83389  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
83390  if (!SWIG_IsOK(ecode3)) {
83391  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "memcpy" "', argument " "3"" of type '" "size_t""'");
83392  }
83393  arg3 = static_cast< size_t >(val3);
83394  result = (void *)memcpy(arg1,(void const *)arg2,arg3);
83395  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
83396  return resultobj;
83397 fail:
83398  return NULL;
83399 }
83400 
83401 
83402 SWIGINTERN PyObject *_wrap_cast_integer_to_float_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83403  PyObject *resultobj = 0;
83404  long arg1 ;
83405  long val1 ;
83406  int ecode1 = 0 ;
83407  PyObject * obj0 = 0 ;
83408  float *result = 0 ;
83409 
83410  if (!PyArg_ParseTuple(args,(char *)"O:cast_integer_to_float_ptr",&obj0)) SWIG_fail;
83411  ecode1 = SWIG_AsVal_long(obj0, &val1);
83412  if (!SWIG_IsOK(ecode1)) {
83413  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cast_integer_to_float_ptr" "', argument " "1"" of type '" "long""'");
83414  }
83415  arg1 = static_cast< long >(val1);
83416  result = (float *)cast_integer_to_float_ptr(arg1);
83417  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
83418  return resultobj;
83419 fail:
83420  return NULL;
83421 }
83422 
83423 
83424 SWIGINTERN PyObject *_wrap_cast_integer_to_long_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83425  PyObject *resultobj = 0;
83426  long arg1 ;
83427  long val1 ;
83428  int ecode1 = 0 ;
83429  PyObject * obj0 = 0 ;
83430  long *result = 0 ;
83431 
83432  if (!PyArg_ParseTuple(args,(char *)"O:cast_integer_to_long_ptr",&obj0)) SWIG_fail;
83433  ecode1 = SWIG_AsVal_long(obj0, &val1);
83434  if (!SWIG_IsOK(ecode1)) {
83435  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cast_integer_to_long_ptr" "', argument " "1"" of type '" "long""'");
83436  }
83437  arg1 = static_cast< long >(val1);
83438  result = (long *)cast_integer_to_long_ptr(arg1);
83439  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
83440  return resultobj;
83441 fail:
83442  return NULL;
83443 }
83444 
83445 
83446 SWIGINTERN PyObject *_wrap_cast_integer_to_int_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83447  PyObject *resultobj = 0;
83448  long arg1 ;
83449  long val1 ;
83450  int ecode1 = 0 ;
83451  PyObject * obj0 = 0 ;
83452  int *result = 0 ;
83453 
83454  if (!PyArg_ParseTuple(args,(char *)"O:cast_integer_to_int_ptr",&obj0)) SWIG_fail;
83455  ecode1 = SWIG_AsVal_long(obj0, &val1);
83456  if (!SWIG_IsOK(ecode1)) {
83457  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cast_integer_to_int_ptr" "', argument " "1"" of type '" "long""'");
83458  }
83459  arg1 = static_cast< long >(val1);
83460  result = (int *)cast_integer_to_int_ptr(arg1);
83461  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
83462  return resultobj;
83463 fail:
83464  return NULL;
83465 }
83466 
83467 
83468 SWIGINTERN PyObject *_wrap_RangeSearchResult_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83469  PyObject *resultobj = 0;
83471  size_t arg2 ;
83472  void *argp1 = 0 ;
83473  int res1 = 0 ;
83474  size_t val2 ;
83475  int ecode2 = 0 ;
83476  PyObject * obj0 = 0 ;
83477  PyObject * obj1 = 0 ;
83478 
83479  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_nq_set",&obj0,&obj1)) SWIG_fail;
83480  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83481  if (!SWIG_IsOK(res1)) {
83482  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_nq_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83483  }
83484  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83485  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
83486  if (!SWIG_IsOK(ecode2)) {
83487  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchResult_nq_set" "', argument " "2"" of type '" "size_t""'");
83488  }
83489  arg2 = static_cast< size_t >(val2);
83490  if (arg1) (arg1)->nq = arg2;
83491  resultobj = SWIG_Py_Void();
83492  return resultobj;
83493 fail:
83494  return NULL;
83495 }
83496 
83497 
83498 SWIGINTERN PyObject *_wrap_RangeSearchResult_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83499  PyObject *resultobj = 0;
83501  void *argp1 = 0 ;
83502  int res1 = 0 ;
83503  PyObject * obj0 = 0 ;
83504  size_t result;
83505 
83506  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_nq_get",&obj0)) SWIG_fail;
83507  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83508  if (!SWIG_IsOK(res1)) {
83509  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_nq_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83510  }
83511  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83512  result = (size_t) ((arg1)->nq);
83513  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
83514  return resultobj;
83515 fail:
83516  return NULL;
83517 }
83518 
83519 
83520 SWIGINTERN PyObject *_wrap_RangeSearchResult_lims_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83521  PyObject *resultobj = 0;
83523  size_t *arg2 = (size_t *) 0 ;
83524  void *argp1 = 0 ;
83525  int res1 = 0 ;
83526  void *argp2 = 0 ;
83527  int res2 = 0 ;
83528  PyObject * obj0 = 0 ;
83529  PyObject * obj1 = 0 ;
83530 
83531  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_lims_set",&obj0,&obj1)) SWIG_fail;
83532  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83533  if (!SWIG_IsOK(res1)) {
83534  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_lims_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83535  }
83536  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83537  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
83538  if (!SWIG_IsOK(res2)) {
83539  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchResult_lims_set" "', argument " "2"" of type '" "size_t *""'");
83540  }
83541  arg2 = reinterpret_cast< size_t * >(argp2);
83542  if (arg1) (arg1)->lims = arg2;
83543  resultobj = SWIG_Py_Void();
83544  return resultobj;
83545 fail:
83546  return NULL;
83547 }
83548 
83549 
83550 SWIGINTERN PyObject *_wrap_RangeSearchResult_lims_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83551  PyObject *resultobj = 0;
83553  void *argp1 = 0 ;
83554  int res1 = 0 ;
83555  PyObject * obj0 = 0 ;
83556  size_t *result = 0 ;
83557 
83558  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_lims_get",&obj0)) SWIG_fail;
83559  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83560  if (!SWIG_IsOK(res1)) {
83561  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_lims_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83562  }
83563  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83564  result = (size_t *) ((arg1)->lims);
83565  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
83566  return resultobj;
83567 fail:
83568  return NULL;
83569 }
83570 
83571 
83572 SWIGINTERN PyObject *_wrap_RangeSearchResult_labels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83573  PyObject *resultobj = 0;
83575  faiss::RangeSearchResult::idx_t *arg2 = (faiss::RangeSearchResult::idx_t *) 0 ;
83576  void *argp1 = 0 ;
83577  int res1 = 0 ;
83578  void *argp2 = 0 ;
83579  int res2 = 0 ;
83580  PyObject * obj0 = 0 ;
83581  PyObject * obj1 = 0 ;
83582 
83583  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_labels_set",&obj0,&obj1)) SWIG_fail;
83584  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83585  if (!SWIG_IsOK(res1)) {
83586  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_labels_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83587  }
83588  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83589  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
83590  if (!SWIG_IsOK(res2)) {
83591  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchResult_labels_set" "', argument " "2"" of type '" "faiss::RangeSearchResult::idx_t *""'");
83592  }
83593  arg2 = reinterpret_cast< faiss::RangeSearchResult::idx_t * >(argp2);
83594  if (arg1) (arg1)->labels = arg2;
83595  resultobj = SWIG_Py_Void();
83596  return resultobj;
83597 fail:
83598  return NULL;
83599 }
83600 
83601 
83602 SWIGINTERN PyObject *_wrap_RangeSearchResult_labels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83603  PyObject *resultobj = 0;
83605  void *argp1 = 0 ;
83606  int res1 = 0 ;
83607  PyObject * obj0 = 0 ;
83608  faiss::RangeSearchResult::idx_t *result = 0 ;
83609 
83610  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_labels_get",&obj0)) SWIG_fail;
83611  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83612  if (!SWIG_IsOK(res1)) {
83613  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_labels_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83614  }
83615  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83616  result = (faiss::RangeSearchResult::idx_t *) ((arg1)->labels);
83617  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
83618  return resultobj;
83619 fail:
83620  return NULL;
83621 }
83622 
83623 
83624 SWIGINTERN PyObject *_wrap_RangeSearchResult_distances_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83625  PyObject *resultobj = 0;
83627  float *arg2 = (float *) 0 ;
83628  void *argp1 = 0 ;
83629  int res1 = 0 ;
83630  void *argp2 = 0 ;
83631  int res2 = 0 ;
83632  PyObject * obj0 = 0 ;
83633  PyObject * obj1 = 0 ;
83634 
83635  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_distances_set",&obj0,&obj1)) SWIG_fail;
83636  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83637  if (!SWIG_IsOK(res1)) {
83638  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_distances_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83639  }
83640  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83641  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN | 0 );
83642  if (!SWIG_IsOK(res2)) {
83643  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchResult_distances_set" "', argument " "2"" of type '" "float *""'");
83644  }
83645  arg2 = reinterpret_cast< float * >(argp2);
83646  if (arg1) (arg1)->distances = arg2;
83647  resultobj = SWIG_Py_Void();
83648  return resultobj;
83649 fail:
83650  return NULL;
83651 }
83652 
83653 
83654 SWIGINTERN PyObject *_wrap_RangeSearchResult_distances_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83655  PyObject *resultobj = 0;
83657  void *argp1 = 0 ;
83658  int res1 = 0 ;
83659  PyObject * obj0 = 0 ;
83660  float *result = 0 ;
83661 
83662  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_distances_get",&obj0)) SWIG_fail;
83663  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83664  if (!SWIG_IsOK(res1)) {
83665  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_distances_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83666  }
83667  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83668  result = (float *) ((arg1)->distances);
83669  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
83670  return resultobj;
83671 fail:
83672  return NULL;
83673 }
83674 
83675 
83676 SWIGINTERN PyObject *_wrap_RangeSearchResult_buffer_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83677  PyObject *resultobj = 0;
83679  size_t arg2 ;
83680  void *argp1 = 0 ;
83681  int res1 = 0 ;
83682  size_t val2 ;
83683  int ecode2 = 0 ;
83684  PyObject * obj0 = 0 ;
83685  PyObject * obj1 = 0 ;
83686 
83687  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_buffer_size_set",&obj0,&obj1)) SWIG_fail;
83688  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83689  if (!SWIG_IsOK(res1)) {
83690  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_buffer_size_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83691  }
83692  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83693  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
83694  if (!SWIG_IsOK(ecode2)) {
83695  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchResult_buffer_size_set" "', argument " "2"" of type '" "size_t""'");
83696  }
83697  arg2 = static_cast< size_t >(val2);
83698  if (arg1) (arg1)->buffer_size = arg2;
83699  resultobj = SWIG_Py_Void();
83700  return resultobj;
83701 fail:
83702  return NULL;
83703 }
83704 
83705 
83706 SWIGINTERN PyObject *_wrap_RangeSearchResult_buffer_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83707  PyObject *resultobj = 0;
83709  void *argp1 = 0 ;
83710  int res1 = 0 ;
83711  PyObject * obj0 = 0 ;
83712  size_t result;
83713 
83714  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_buffer_size_get",&obj0)) SWIG_fail;
83715  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83716  if (!SWIG_IsOK(res1)) {
83717  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_buffer_size_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83718  }
83719  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83720  result = (size_t) ((arg1)->buffer_size);
83721  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
83722  return resultobj;
83723 fail:
83724  return NULL;
83725 }
83726 
83727 
83728 SWIGINTERN PyObject *_wrap_new_RangeSearchResult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83729  PyObject *resultobj = 0;
83730  faiss::RangeSearchResult::idx_t arg1 ;
83731  bool arg2 ;
83732  long val1 ;
83733  int ecode1 = 0 ;
83734  bool val2 ;
83735  int ecode2 = 0 ;
83736  PyObject * obj0 = 0 ;
83737  PyObject * obj1 = 0 ;
83738  faiss::RangeSearchResult *result = 0 ;
83739 
83740  if (!PyArg_ParseTuple(args,(char *)"OO:new_RangeSearchResult",&obj0,&obj1)) SWIG_fail;
83741  ecode1 = SWIG_AsVal_long(obj0, &val1);
83742  if (!SWIG_IsOK(ecode1)) {
83743  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RangeSearchResult" "', argument " "1"" of type '" "faiss::RangeSearchResult::idx_t""'");
83744  }
83745  arg1 = static_cast< faiss::RangeSearchResult::idx_t >(val1);
83746  ecode2 = SWIG_AsVal_bool(obj1, &val2);
83747  if (!SWIG_IsOK(ecode2)) {
83748  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RangeSearchResult" "', argument " "2"" of type '" "bool""'");
83749  }
83750  arg2 = static_cast< bool >(val2);
83751  result = (faiss::RangeSearchResult *)new faiss::RangeSearchResult(arg1,arg2);
83752  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_NEW | 0 );
83753  return resultobj;
83754 fail:
83755  return NULL;
83756 }
83757 
83758 
83759 SWIGINTERN PyObject *_wrap_new_RangeSearchResult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83760  PyObject *resultobj = 0;
83761  faiss::RangeSearchResult::idx_t arg1 ;
83762  long val1 ;
83763  int ecode1 = 0 ;
83764  PyObject * obj0 = 0 ;
83765  faiss::RangeSearchResult *result = 0 ;
83766 
83767  if (!PyArg_ParseTuple(args,(char *)"O:new_RangeSearchResult",&obj0)) SWIG_fail;
83768  ecode1 = SWIG_AsVal_long(obj0, &val1);
83769  if (!SWIG_IsOK(ecode1)) {
83770  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RangeSearchResult" "', argument " "1"" of type '" "faiss::RangeSearchResult::idx_t""'");
83771  }
83772  arg1 = static_cast< faiss::RangeSearchResult::idx_t >(val1);
83773  result = (faiss::RangeSearchResult *)new faiss::RangeSearchResult(arg1);
83774  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_NEW | 0 );
83775  return resultobj;
83776 fail:
83777  return NULL;
83778 }
83779 
83780 
83781 SWIGINTERN PyObject *_wrap_new_RangeSearchResult(PyObject *self, PyObject *args) {
83782  Py_ssize_t argc;
83783  PyObject *argv[3] = {
83784  0
83785  };
83786  Py_ssize_t ii;
83787 
83788  if (!PyTuple_Check(args)) SWIG_fail;
83789  argc = args ? PyObject_Length(args) : 0;
83790  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
83791  argv[ii] = PyTuple_GET_ITEM(args,ii);
83792  }
83793  if (argc == 1) {
83794  int _v;
83795  {
83796  int res = SWIG_AsVal_long(argv[0], NULL);
83797  _v = SWIG_CheckState(res);
83798  }
83799  if (_v) {
83800  return _wrap_new_RangeSearchResult__SWIG_1(self, args);
83801  }
83802  }
83803  if (argc == 2) {
83804  int _v;
83805  {
83806  int res = SWIG_AsVal_long(argv[0], NULL);
83807  _v = SWIG_CheckState(res);
83808  }
83809  if (_v) {
83810  {
83811  int res = SWIG_AsVal_bool(argv[1], NULL);
83812  _v = SWIG_CheckState(res);
83813  }
83814  if (_v) {
83815  return _wrap_new_RangeSearchResult__SWIG_0(self, args);
83816  }
83817  }
83818  }
83819 
83820 fail:
83821  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RangeSearchResult'.\n"
83822  " Possible C/C++ prototypes are:\n"
83823  " faiss::RangeSearchResult::RangeSearchResult(faiss::RangeSearchResult::idx_t,bool)\n"
83824  " faiss::RangeSearchResult::RangeSearchResult(faiss::RangeSearchResult::idx_t)\n");
83825  return 0;
83826 }
83827 
83828 
83829 SWIGINTERN PyObject *_wrap_RangeSearchResult_do_allocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83830  PyObject *resultobj = 0;
83832  void *argp1 = 0 ;
83833  int res1 = 0 ;
83834  PyObject * obj0 = 0 ;
83835 
83836  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_do_allocation",&obj0)) SWIG_fail;
83837  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
83838  if (!SWIG_IsOK(res1)) {
83839  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_do_allocation" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83840  }
83841  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83842  (arg1)->do_allocation();
83843  resultobj = SWIG_Py_Void();
83844  return resultobj;
83845 fail:
83846  return NULL;
83847 }
83848 
83849 
83850 SWIGINTERN PyObject *_wrap_delete_RangeSearchResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83851  PyObject *resultobj = 0;
83853  void *argp1 = 0 ;
83854  int res1 = 0 ;
83855  PyObject * obj0 = 0 ;
83856 
83857  if (!PyArg_ParseTuple(args,(char *)"O:delete_RangeSearchResult",&obj0)) SWIG_fail;
83858  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_DISOWN | 0 );
83859  if (!SWIG_IsOK(res1)) {
83860  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RangeSearchResult" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
83861  }
83862  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
83863  delete arg1;
83864  resultobj = SWIG_Py_Void();
83865  return resultobj;
83866 fail:
83867  return NULL;
83868 }
83869 
83870 
83871 SWIGINTERN PyObject *RangeSearchResult_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83872  PyObject *obj;
83873  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
83874  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RangeSearchResult, SWIG_NewClientData(obj));
83875  return SWIG_Py_Void();
83876 }
83877 
83878 SWIGINTERN PyObject *_wrap_IDSelector_is_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83879  PyObject *resultobj = 0;
83880  faiss::IDSelector *arg1 = (faiss::IDSelector *) 0 ;
83881  faiss::IDSelector::idx_t arg2 ;
83882  void *argp1 = 0 ;
83883  int res1 = 0 ;
83884  long val2 ;
83885  int ecode2 = 0 ;
83886  PyObject * obj0 = 0 ;
83887  PyObject * obj1 = 0 ;
83888  bool result;
83889 
83890  if (!PyArg_ParseTuple(args,(char *)"OO:IDSelector_is_member",&obj0,&obj1)) SWIG_fail;
83891  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelector, 0 | 0 );
83892  if (!SWIG_IsOK(res1)) {
83893  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelector_is_member" "', argument " "1"" of type '" "faiss::IDSelector const *""'");
83894  }
83895  arg1 = reinterpret_cast< faiss::IDSelector * >(argp1);
83896  ecode2 = SWIG_AsVal_long(obj1, &val2);
83897  if (!SWIG_IsOK(ecode2)) {
83898  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelector_is_member" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
83899  }
83900  arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
83901  result = (bool)((faiss::IDSelector const *)arg1)->is_member(arg2);
83902  resultobj = SWIG_From_bool(static_cast< bool >(result));
83903  return resultobj;
83904 fail:
83905  return NULL;
83906 }
83907 
83908 
83909 SWIGINTERN PyObject *_wrap_delete_IDSelector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83910  PyObject *resultobj = 0;
83911  faiss::IDSelector *arg1 = (faiss::IDSelector *) 0 ;
83912  void *argp1 = 0 ;
83913  int res1 = 0 ;
83914  PyObject * obj0 = 0 ;
83915 
83916  if (!PyArg_ParseTuple(args,(char *)"O:delete_IDSelector",&obj0)) SWIG_fail;
83917  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelector, SWIG_POINTER_DISOWN | 0 );
83918  if (!SWIG_IsOK(res1)) {
83919  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDSelector" "', argument " "1"" of type '" "faiss::IDSelector *""'");
83920  }
83921  arg1 = reinterpret_cast< faiss::IDSelector * >(argp1);
83922  delete arg1;
83923  resultobj = SWIG_Py_Void();
83924  return resultobj;
83925 fail:
83926  return NULL;
83927 }
83928 
83929 
83930 SWIGINTERN PyObject *IDSelector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83931  PyObject *obj;
83932  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
83933  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IDSelector, SWIG_NewClientData(obj));
83934  return SWIG_Py_Void();
83935 }
83936 
83937 SWIGINTERN PyObject *_wrap_IDSelectorRange_imin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83938  PyObject *resultobj = 0;
83940  faiss::IDSelector::idx_t arg2 ;
83941  void *argp1 = 0 ;
83942  int res1 = 0 ;
83943  long val2 ;
83944  int ecode2 = 0 ;
83945  PyObject * obj0 = 0 ;
83946  PyObject * obj1 = 0 ;
83947 
83948  if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorRange_imin_set",&obj0,&obj1)) SWIG_fail;
83949  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
83950  if (!SWIG_IsOK(res1)) {
83951  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imin_set" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
83952  }
83953  arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
83954  ecode2 = SWIG_AsVal_long(obj1, &val2);
83955  if (!SWIG_IsOK(ecode2)) {
83956  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorRange_imin_set" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
83957  }
83958  arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
83959  if (arg1) (arg1)->imin = arg2;
83960  resultobj = SWIG_Py_Void();
83961  return resultobj;
83962 fail:
83963  return NULL;
83964 }
83965 
83966 
83967 SWIGINTERN PyObject *_wrap_IDSelectorRange_imin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83968  PyObject *resultobj = 0;
83970  void *argp1 = 0 ;
83971  int res1 = 0 ;
83972  PyObject * obj0 = 0 ;
83973  faiss::IDSelector::idx_t result;
83974 
83975  if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorRange_imin_get",&obj0)) SWIG_fail;
83976  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
83977  if (!SWIG_IsOK(res1)) {
83978  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imin_get" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
83979  }
83980  arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
83981  result = (faiss::IDSelector::idx_t) ((arg1)->imin);
83982  resultobj = SWIG_From_long(static_cast< long >(result));
83983  return resultobj;
83984 fail:
83985  return NULL;
83986 }
83987 
83988 
83989 SWIGINTERN PyObject *_wrap_IDSelectorRange_imax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
83990  PyObject *resultobj = 0;
83992  faiss::IDSelector::idx_t arg2 ;
83993  void *argp1 = 0 ;
83994  int res1 = 0 ;
83995  long val2 ;
83996  int ecode2 = 0 ;
83997  PyObject * obj0 = 0 ;
83998  PyObject * obj1 = 0 ;
83999 
84000  if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorRange_imax_set",&obj0,&obj1)) SWIG_fail;
84001  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
84002  if (!SWIG_IsOK(res1)) {
84003  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imax_set" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
84004  }
84005  arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
84006  ecode2 = SWIG_AsVal_long(obj1, &val2);
84007  if (!SWIG_IsOK(ecode2)) {
84008  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorRange_imax_set" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
84009  }
84010  arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
84011  if (arg1) (arg1)->imax = arg2;
84012  resultobj = SWIG_Py_Void();
84013  return resultobj;
84014 fail:
84015  return NULL;
84016 }
84017 
84018 
84019 SWIGINTERN PyObject *_wrap_IDSelectorRange_imax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84020  PyObject *resultobj = 0;
84022  void *argp1 = 0 ;
84023  int res1 = 0 ;
84024  PyObject * obj0 = 0 ;
84025  faiss::IDSelector::idx_t result;
84026 
84027  if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorRange_imax_get",&obj0)) SWIG_fail;
84028  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
84029  if (!SWIG_IsOK(res1)) {
84030  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imax_get" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
84031  }
84032  arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
84033  result = (faiss::IDSelector::idx_t) ((arg1)->imax);
84034  resultobj = SWIG_From_long(static_cast< long >(result));
84035  return resultobj;
84036 fail:
84037  return NULL;
84038 }
84039 
84040 
84041 SWIGINTERN PyObject *_wrap_new_IDSelectorRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84042  PyObject *resultobj = 0;
84043  faiss::IDSelector::idx_t arg1 ;
84044  faiss::IDSelector::idx_t arg2 ;
84045  long val1 ;
84046  int ecode1 = 0 ;
84047  long val2 ;
84048  int ecode2 = 0 ;
84049  PyObject * obj0 = 0 ;
84050  PyObject * obj1 = 0 ;
84051  faiss::IDSelectorRange *result = 0 ;
84052 
84053  if (!PyArg_ParseTuple(args,(char *)"OO:new_IDSelectorRange",&obj0,&obj1)) SWIG_fail;
84054  ecode1 = SWIG_AsVal_long(obj0, &val1);
84055  if (!SWIG_IsOK(ecode1)) {
84056  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDSelectorRange" "', argument " "1"" of type '" "faiss::IDSelector::idx_t""'");
84057  }
84058  arg1 = static_cast< faiss::IDSelector::idx_t >(val1);
84059  ecode2 = SWIG_AsVal_long(obj1, &val2);
84060  if (!SWIG_IsOK(ecode2)) {
84061  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IDSelectorRange" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
84062  }
84063  arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
84064  result = (faiss::IDSelectorRange *)new faiss::IDSelectorRange(arg1,arg2);
84065  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IDSelectorRange, SWIG_POINTER_NEW | 0 );
84066  return resultobj;
84067 fail:
84068  return NULL;
84069 }
84070 
84071 
84072 SWIGINTERN PyObject *_wrap_IDSelectorRange_is_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84073  PyObject *resultobj = 0;
84075  faiss::IDSelector::idx_t arg2 ;
84076  void *argp1 = 0 ;
84077  int res1 = 0 ;
84078  long val2 ;
84079  int ecode2 = 0 ;
84080  PyObject * obj0 = 0 ;
84081  PyObject * obj1 = 0 ;
84082  bool result;
84083 
84084  if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorRange_is_member",&obj0,&obj1)) SWIG_fail;
84085  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
84086  if (!SWIG_IsOK(res1)) {
84087  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_is_member" "', argument " "1"" of type '" "faiss::IDSelectorRange const *""'");
84088  }
84089  arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
84090  ecode2 = SWIG_AsVal_long(obj1, &val2);
84091  if (!SWIG_IsOK(ecode2)) {
84092  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorRange_is_member" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
84093  }
84094  arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
84095  result = (bool)((faiss::IDSelectorRange const *)arg1)->is_member(arg2);
84096  resultobj = SWIG_From_bool(static_cast< bool >(result));
84097  return resultobj;
84098 fail:
84099  return NULL;
84100 }
84101 
84102 
84103 SWIGINTERN PyObject *_wrap_delete_IDSelectorRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84104  PyObject *resultobj = 0;
84106  void *argp1 = 0 ;
84107  int res1 = 0 ;
84108  PyObject * obj0 = 0 ;
84109 
84110  if (!PyArg_ParseTuple(args,(char *)"O:delete_IDSelectorRange",&obj0)) SWIG_fail;
84111  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, SWIG_POINTER_DISOWN | 0 );
84112  if (!SWIG_IsOK(res1)) {
84113  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDSelectorRange" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
84114  }
84115  arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
84116  delete arg1;
84117  resultobj = SWIG_Py_Void();
84118  return resultobj;
84119 fail:
84120  return NULL;
84121 }
84122 
84123 
84124 SWIGINTERN PyObject *IDSelectorRange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84125  PyObject *obj;
84126  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
84127  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IDSelectorRange, SWIG_NewClientData(obj));
84128  return SWIG_Py_Void();
84129 }
84130 
84131 SWIGINTERN PyObject *_wrap_IDSelectorBatch_nbits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84132  PyObject *resultobj = 0;
84134  int arg2 ;
84135  void *argp1 = 0 ;
84136  int res1 = 0 ;
84137  int val2 ;
84138  int ecode2 = 0 ;
84139  PyObject * obj0 = 0 ;
84140  PyObject * obj1 = 0 ;
84141 
84142  if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorBatch_nbits_set",&obj0,&obj1)) SWIG_fail;
84143  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
84144  if (!SWIG_IsOK(res1)) {
84145  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_nbits_set" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
84146  }
84147  arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
84148  ecode2 = SWIG_AsVal_int(obj1, &val2);
84149  if (!SWIG_IsOK(ecode2)) {
84150  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorBatch_nbits_set" "', argument " "2"" of type '" "int""'");
84151  }
84152  arg2 = static_cast< int >(val2);
84153  if (arg1) (arg1)->nbits = arg2;
84154  resultobj = SWIG_Py_Void();
84155  return resultobj;
84156 fail:
84157  return NULL;
84158 }
84159 
84160 
84161 SWIGINTERN PyObject *_wrap_IDSelectorBatch_nbits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84162  PyObject *resultobj = 0;
84164  void *argp1 = 0 ;
84165  int res1 = 0 ;
84166  PyObject * obj0 = 0 ;
84167  int result;
84168 
84169  if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorBatch_nbits_get",&obj0)) SWIG_fail;
84170  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
84171  if (!SWIG_IsOK(res1)) {
84172  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_nbits_get" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
84173  }
84174  arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
84175  result = (int) ((arg1)->nbits);
84176  resultobj = SWIG_From_int(static_cast< int >(result));
84177  return resultobj;
84178 fail:
84179  return NULL;
84180 }
84181 
84182 
84183 SWIGINTERN PyObject *_wrap_IDSelectorBatch_mask_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84184  PyObject *resultobj = 0;
84186  faiss::IDSelector::idx_t arg2 ;
84187  void *argp1 = 0 ;
84188  int res1 = 0 ;
84189  long val2 ;
84190  int ecode2 = 0 ;
84191  PyObject * obj0 = 0 ;
84192  PyObject * obj1 = 0 ;
84193 
84194  if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorBatch_mask_set",&obj0,&obj1)) SWIG_fail;
84195  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
84196  if (!SWIG_IsOK(res1)) {
84197  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_mask_set" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
84198  }
84199  arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
84200  ecode2 = SWIG_AsVal_long(obj1, &val2);
84201  if (!SWIG_IsOK(ecode2)) {
84202  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorBatch_mask_set" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
84203  }
84204  arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
84205  if (arg1) (arg1)->mask = arg2;
84206  resultobj = SWIG_Py_Void();
84207  return resultobj;
84208 fail:
84209  return NULL;
84210 }
84211 
84212 
84213 SWIGINTERN PyObject *_wrap_IDSelectorBatch_mask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84214  PyObject *resultobj = 0;
84216  void *argp1 = 0 ;
84217  int res1 = 0 ;
84218  PyObject * obj0 = 0 ;
84219  faiss::IDSelector::idx_t result;
84220 
84221  if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorBatch_mask_get",&obj0)) SWIG_fail;
84222  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
84223  if (!SWIG_IsOK(res1)) {
84224  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_mask_get" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
84225  }
84226  arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
84227  result = (faiss::IDSelector::idx_t) ((arg1)->mask);
84228  resultobj = SWIG_From_long(static_cast< long >(result));
84229  return resultobj;
84230 fail:
84231  return NULL;
84232 }
84233 
84234 
84235 SWIGINTERN PyObject *_wrap_new_IDSelectorBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84236  PyObject *resultobj = 0;
84237  long arg1 ;
84238  faiss::IDSelector::idx_t *arg2 = (faiss::IDSelector::idx_t *) 0 ;
84239  long val1 ;
84240  int ecode1 = 0 ;
84241  void *argp2 = 0 ;
84242  int res2 = 0 ;
84243  PyObject * obj0 = 0 ;
84244  PyObject * obj1 = 0 ;
84245  faiss::IDSelectorBatch *result = 0 ;
84246 
84247  if (!PyArg_ParseTuple(args,(char *)"OO:new_IDSelectorBatch",&obj0,&obj1)) SWIG_fail;
84248  ecode1 = SWIG_AsVal_long(obj0, &val1);
84249  if (!SWIG_IsOK(ecode1)) {
84250  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDSelectorBatch" "', argument " "1"" of type '" "long""'");
84251  }
84252  arg1 = static_cast< long >(val1);
84253  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
84254  if (!SWIG_IsOK(res2)) {
84255  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IDSelectorBatch" "', argument " "2"" of type '" "faiss::IDSelector::idx_t const *""'");
84256  }
84257  arg2 = reinterpret_cast< faiss::IDSelector::idx_t * >(argp2);
84258  result = (faiss::IDSelectorBatch *)new faiss::IDSelectorBatch(arg1,(faiss::IDSelector::idx_t const *)arg2);
84259  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IDSelectorBatch, SWIG_POINTER_NEW | 0 );
84260  return resultobj;
84261 fail:
84262  return NULL;
84263 }
84264 
84265 
84266 SWIGINTERN PyObject *_wrap_IDSelectorBatch_is_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84267  PyObject *resultobj = 0;
84269  faiss::IDSelector::idx_t arg2 ;
84270  void *argp1 = 0 ;
84271  int res1 = 0 ;
84272  long val2 ;
84273  int ecode2 = 0 ;
84274  PyObject * obj0 = 0 ;
84275  PyObject * obj1 = 0 ;
84276  bool result;
84277 
84278  if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorBatch_is_member",&obj0,&obj1)) SWIG_fail;
84279  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
84280  if (!SWIG_IsOK(res1)) {
84281  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_is_member" "', argument " "1"" of type '" "faiss::IDSelectorBatch const *""'");
84282  }
84283  arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
84284  ecode2 = SWIG_AsVal_long(obj1, &val2);
84285  if (!SWIG_IsOK(ecode2)) {
84286  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorBatch_is_member" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
84287  }
84288  arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
84289  result = (bool)((faiss::IDSelectorBatch const *)arg1)->is_member(arg2);
84290  resultobj = SWIG_From_bool(static_cast< bool >(result));
84291  return resultobj;
84292 fail:
84293  return NULL;
84294 }
84295 
84296 
84297 SWIGINTERN PyObject *_wrap_delete_IDSelectorBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84298  PyObject *resultobj = 0;
84300  void *argp1 = 0 ;
84301  int res1 = 0 ;
84302  PyObject * obj0 = 0 ;
84303 
84304  if (!PyArg_ParseTuple(args,(char *)"O:delete_IDSelectorBatch",&obj0)) SWIG_fail;
84305  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, SWIG_POINTER_DISOWN | 0 );
84306  if (!SWIG_IsOK(res1)) {
84307  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDSelectorBatch" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
84308  }
84309  arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
84310  delete arg1;
84311  resultobj = SWIG_Py_Void();
84312  return resultobj;
84313 fail:
84314  return NULL;
84315 }
84316 
84317 
84318 SWIGINTERN PyObject *IDSelectorBatch_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84319  PyObject *obj;
84320  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
84321  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IDSelectorBatch, SWIG_NewClientData(obj));
84322  return SWIG_Py_Void();
84323 }
84324 
84325 SWIGINTERN PyObject *_wrap_BufferList_buffer_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84326  PyObject *resultobj = 0;
84327  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84328  size_t arg2 ;
84329  void *argp1 = 0 ;
84330  int res1 = 0 ;
84331  size_t val2 ;
84332  int ecode2 = 0 ;
84333  PyObject * obj0 = 0 ;
84334  PyObject * obj1 = 0 ;
84335 
84336  if (!PyArg_ParseTuple(args,(char *)"OO:BufferList_buffer_size_set",&obj0,&obj1)) SWIG_fail;
84337  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84338  if (!SWIG_IsOK(res1)) {
84339  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffer_size_set" "', argument " "1"" of type '" "faiss::BufferList *""'");
84340  }
84341  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84342  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
84343  if (!SWIG_IsOK(ecode2)) {
84344  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_buffer_size_set" "', argument " "2"" of type '" "size_t""'");
84345  }
84346  arg2 = static_cast< size_t >(val2);
84347  if (arg1) (arg1)->buffer_size = arg2;
84348  resultobj = SWIG_Py_Void();
84349  return resultobj;
84350 fail:
84351  return NULL;
84352 }
84353 
84354 
84355 SWIGINTERN PyObject *_wrap_BufferList_buffer_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84356  PyObject *resultobj = 0;
84357  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84358  void *argp1 = 0 ;
84359  int res1 = 0 ;
84360  PyObject * obj0 = 0 ;
84361  size_t result;
84362 
84363  if (!PyArg_ParseTuple(args,(char *)"O:BufferList_buffer_size_get",&obj0)) SWIG_fail;
84364  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84365  if (!SWIG_IsOK(res1)) {
84366  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffer_size_get" "', argument " "1"" of type '" "faiss::BufferList *""'");
84367  }
84368  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84369  result = (size_t) ((arg1)->buffer_size);
84370  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
84371  return resultobj;
84372 fail:
84373  return NULL;
84374 }
84375 
84376 
84377 SWIGINTERN PyObject *_wrap_BufferList_buffers_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84378  PyObject *resultobj = 0;
84379  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84380  std::vector< faiss::BufferList::Buffer > *arg2 = (std::vector< faiss::BufferList::Buffer > *) 0 ;
84381  void *argp1 = 0 ;
84382  int res1 = 0 ;
84383  void *argp2 = 0 ;
84384  int res2 = 0 ;
84385  PyObject * obj0 = 0 ;
84386  PyObject * obj1 = 0 ;
84387 
84388  if (!PyArg_ParseTuple(args,(char *)"OO:BufferList_buffers_set",&obj0,&obj1)) SWIG_fail;
84389  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84390  if (!SWIG_IsOK(res1)) {
84391  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffers_set" "', argument " "1"" of type '" "faiss::BufferList *""'");
84392  }
84393  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84394  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t, 0 | 0 );
84395  if (!SWIG_IsOK(res2)) {
84396  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BufferList_buffers_set" "', argument " "2"" of type '" "std::vector< faiss::BufferList::Buffer > *""'");
84397  }
84398  arg2 = reinterpret_cast< std::vector< faiss::BufferList::Buffer > * >(argp2);
84399  if (arg1) (arg1)->buffers = *arg2;
84400  resultobj = SWIG_Py_Void();
84401  return resultobj;
84402 fail:
84403  return NULL;
84404 }
84405 
84406 
84407 SWIGINTERN PyObject *_wrap_BufferList_buffers_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84408  PyObject *resultobj = 0;
84409  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84410  void *argp1 = 0 ;
84411  int res1 = 0 ;
84412  PyObject * obj0 = 0 ;
84413  std::vector< faiss::BufferList::Buffer > *result = 0 ;
84414 
84415  if (!PyArg_ParseTuple(args,(char *)"O:BufferList_buffers_get",&obj0)) SWIG_fail;
84416  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84417  if (!SWIG_IsOK(res1)) {
84418  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffers_get" "', argument " "1"" of type '" "faiss::BufferList *""'");
84419  }
84420  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84421  result = (std::vector< faiss::BufferList::Buffer > *)& ((arg1)->buffers);
84422  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t, 0 | 0 );
84423  return resultobj;
84424 fail:
84425  return NULL;
84426 }
84427 
84428 
84429 SWIGINTERN PyObject *_wrap_BufferList_wp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84430  PyObject *resultobj = 0;
84431  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84432  size_t arg2 ;
84433  void *argp1 = 0 ;
84434  int res1 = 0 ;
84435  size_t val2 ;
84436  int ecode2 = 0 ;
84437  PyObject * obj0 = 0 ;
84438  PyObject * obj1 = 0 ;
84439 
84440  if (!PyArg_ParseTuple(args,(char *)"OO:BufferList_wp_set",&obj0,&obj1)) SWIG_fail;
84441  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84442  if (!SWIG_IsOK(res1)) {
84443  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_wp_set" "', argument " "1"" of type '" "faiss::BufferList *""'");
84444  }
84445  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84446  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
84447  if (!SWIG_IsOK(ecode2)) {
84448  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_wp_set" "', argument " "2"" of type '" "size_t""'");
84449  }
84450  arg2 = static_cast< size_t >(val2);
84451  if (arg1) (arg1)->wp = arg2;
84452  resultobj = SWIG_Py_Void();
84453  return resultobj;
84454 fail:
84455  return NULL;
84456 }
84457 
84458 
84459 SWIGINTERN PyObject *_wrap_BufferList_wp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84460  PyObject *resultobj = 0;
84461  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84462  void *argp1 = 0 ;
84463  int res1 = 0 ;
84464  PyObject * obj0 = 0 ;
84465  size_t result;
84466 
84467  if (!PyArg_ParseTuple(args,(char *)"O:BufferList_wp_get",&obj0)) SWIG_fail;
84468  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84469  if (!SWIG_IsOK(res1)) {
84470  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_wp_get" "', argument " "1"" of type '" "faiss::BufferList *""'");
84471  }
84472  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84473  result = (size_t) ((arg1)->wp);
84474  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
84475  return resultobj;
84476 fail:
84477  return NULL;
84478 }
84479 
84480 
84481 SWIGINTERN PyObject *_wrap_new_BufferList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84482  PyObject *resultobj = 0;
84483  size_t arg1 ;
84484  size_t val1 ;
84485  int ecode1 = 0 ;
84486  PyObject * obj0 = 0 ;
84487  faiss::BufferList *result = 0 ;
84488 
84489  if (!PyArg_ParseTuple(args,(char *)"O:new_BufferList",&obj0)) SWIG_fail;
84490  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
84491  if (!SWIG_IsOK(ecode1)) {
84492  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BufferList" "', argument " "1"" of type '" "size_t""'");
84493  }
84494  arg1 = static_cast< size_t >(val1);
84495  result = (faiss::BufferList *)new faiss::BufferList(arg1);
84496  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__BufferList, SWIG_POINTER_NEW | 0 );
84497  return resultobj;
84498 fail:
84499  return NULL;
84500 }
84501 
84502 
84503 SWIGINTERN PyObject *_wrap_delete_BufferList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84504  PyObject *resultobj = 0;
84505  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84506  void *argp1 = 0 ;
84507  int res1 = 0 ;
84508  PyObject * obj0 = 0 ;
84509 
84510  if (!PyArg_ParseTuple(args,(char *)"O:delete_BufferList",&obj0)) SWIG_fail;
84511  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, SWIG_POINTER_DISOWN | 0 );
84512  if (!SWIG_IsOK(res1)) {
84513  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BufferList" "', argument " "1"" of type '" "faiss::BufferList *""'");
84514  }
84515  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84516  delete arg1;
84517  resultobj = SWIG_Py_Void();
84518  return resultobj;
84519 fail:
84520  return NULL;
84521 }
84522 
84523 
84524 SWIGINTERN PyObject *_wrap_BufferList_append_buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84525  PyObject *resultobj = 0;
84526  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84527  void *argp1 = 0 ;
84528  int res1 = 0 ;
84529  PyObject * obj0 = 0 ;
84530 
84531  if (!PyArg_ParseTuple(args,(char *)"O:BufferList_append_buffer",&obj0)) SWIG_fail;
84532  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84533  if (!SWIG_IsOK(res1)) {
84534  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_append_buffer" "', argument " "1"" of type '" "faiss::BufferList *""'");
84535  }
84536  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84537  (arg1)->append_buffer();
84538  resultobj = SWIG_Py_Void();
84539  return resultobj;
84540 fail:
84541  return NULL;
84542 }
84543 
84544 
84545 SWIGINTERN PyObject *_wrap_BufferList_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84546  PyObject *resultobj = 0;
84547  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84548  faiss::BufferList::idx_t arg2 ;
84549  float arg3 ;
84550  void *argp1 = 0 ;
84551  int res1 = 0 ;
84552  long val2 ;
84553  int ecode2 = 0 ;
84554  float val3 ;
84555  int ecode3 = 0 ;
84556  PyObject * obj0 = 0 ;
84557  PyObject * obj1 = 0 ;
84558  PyObject * obj2 = 0 ;
84559 
84560  if (!PyArg_ParseTuple(args,(char *)"OOO:BufferList_add",&obj0,&obj1,&obj2)) SWIG_fail;
84561  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84562  if (!SWIG_IsOK(res1)) {
84563  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_add" "', argument " "1"" of type '" "faiss::BufferList *""'");
84564  }
84565  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84566  ecode2 = SWIG_AsVal_long(obj1, &val2);
84567  if (!SWIG_IsOK(ecode2)) {
84568  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_add" "', argument " "2"" of type '" "faiss::BufferList::idx_t""'");
84569  }
84570  arg2 = static_cast< faiss::BufferList::idx_t >(val2);
84571  ecode3 = SWIG_AsVal_float(obj2, &val3);
84572  if (!SWIG_IsOK(ecode3)) {
84573  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BufferList_add" "', argument " "3"" of type '" "float""'");
84574  }
84575  arg3 = static_cast< float >(val3);
84576  (arg1)->add(arg2,arg3);
84577  resultobj = SWIG_Py_Void();
84578  return resultobj;
84579 fail:
84580  return NULL;
84581 }
84582 
84583 
84584 SWIGINTERN PyObject *_wrap_BufferList_copy_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84585  PyObject *resultobj = 0;
84586  faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
84587  size_t arg2 ;
84588  size_t arg3 ;
84589  faiss::BufferList::idx_t *arg4 = (faiss::BufferList::idx_t *) 0 ;
84590  float *arg5 = (float *) 0 ;
84591  void *argp1 = 0 ;
84592  int res1 = 0 ;
84593  size_t val2 ;
84594  int ecode2 = 0 ;
84595  size_t val3 ;
84596  int ecode3 = 0 ;
84597  void *argp4 = 0 ;
84598  int res4 = 0 ;
84599  void *argp5 = 0 ;
84600  int res5 = 0 ;
84601  PyObject * obj0 = 0 ;
84602  PyObject * obj1 = 0 ;
84603  PyObject * obj2 = 0 ;
84604  PyObject * obj3 = 0 ;
84605  PyObject * obj4 = 0 ;
84606 
84607  if (!PyArg_ParseTuple(args,(char *)"OOOOO:BufferList_copy_range",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
84608  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
84609  if (!SWIG_IsOK(res1)) {
84610  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_copy_range" "', argument " "1"" of type '" "faiss::BufferList *""'");
84611  }
84612  arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
84613  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
84614  if (!SWIG_IsOK(ecode2)) {
84615  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_copy_range" "', argument " "2"" of type '" "size_t""'");
84616  }
84617  arg2 = static_cast< size_t >(val2);
84618  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
84619  if (!SWIG_IsOK(ecode3)) {
84620  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BufferList_copy_range" "', argument " "3"" of type '" "size_t""'");
84621  }
84622  arg3 = static_cast< size_t >(val3);
84623  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
84624  if (!SWIG_IsOK(res4)) {
84625  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BufferList_copy_range" "', argument " "4"" of type '" "faiss::BufferList::idx_t *""'");
84626  }
84627  arg4 = reinterpret_cast< faiss::BufferList::idx_t * >(argp4);
84628  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
84629  if (!SWIG_IsOK(res5)) {
84630  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "BufferList_copy_range" "', argument " "5"" of type '" "float *""'");
84631  }
84632  arg5 = reinterpret_cast< float * >(argp5);
84633  (arg1)->copy_range(arg2,arg3,arg4,arg5);
84634  resultobj = SWIG_Py_Void();
84635  return resultobj;
84636 fail:
84637  return NULL;
84638 }
84639 
84640 
84641 SWIGINTERN PyObject *BufferList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84642  PyObject *obj;
84643  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
84644  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__BufferList, SWIG_NewClientData(obj));
84645  return SWIG_Py_Void();
84646 }
84647 
84648 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_res_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84649  PyObject *resultobj = 0;
84652  void *argp1 = 0 ;
84653  int res1 = 0 ;
84654  void *argp2 = 0 ;
84655  int res2 = 0 ;
84656  PyObject * obj0 = 0 ;
84657  PyObject * obj1 = 0 ;
84658 
84659  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_res_set",&obj0,&obj1)) SWIG_fail;
84660  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84661  if (!SWIG_IsOK(res1)) {
84662  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_res_set" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84663  }
84664  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84665  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_DISOWN | 0 );
84666  if (!SWIG_IsOK(res2)) {
84667  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchPartialResult_res_set" "', argument " "2"" of type '" "faiss::RangeSearchResult *""'");
84668  }
84669  arg2 = reinterpret_cast< faiss::RangeSearchResult * >(argp2);
84670  if (arg1) (arg1)->res = arg2;
84671  resultobj = SWIG_Py_Void();
84672  return resultobj;
84673 fail:
84674  return NULL;
84675 }
84676 
84677 
84678 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_res_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84679  PyObject *resultobj = 0;
84681  void *argp1 = 0 ;
84682  int res1 = 0 ;
84683  PyObject * obj0 = 0 ;
84684  faiss::RangeSearchResult *result = 0 ;
84685 
84686  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_res_get",&obj0)) SWIG_fail;
84687  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84688  if (!SWIG_IsOK(res1)) {
84689  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_res_get" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84690  }
84691  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84692  result = (faiss::RangeSearchResult *) ((arg1)->res);
84693  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
84694  return resultobj;
84695 fail:
84696  return NULL;
84697 }
84698 
84699 
84700 SWIGINTERN PyObject *_wrap_new_RangeSearchPartialResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84701  PyObject *resultobj = 0;
84703  void *argp1 = 0 ;
84704  int res1 = 0 ;
84705  PyObject * obj0 = 0 ;
84706  faiss::RangeSearchPartialResult *result = 0 ;
84707 
84708  if (!PyArg_ParseTuple(args,(char *)"O:new_RangeSearchPartialResult",&obj0)) SWIG_fail;
84709  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
84710  if (!SWIG_IsOK(res1)) {
84711  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RangeSearchPartialResult" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
84712  }
84713  arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
84715  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchPartialResult, SWIG_POINTER_NEW | 0 );
84716  return resultobj;
84717 fail:
84718  return NULL;
84719 }
84720 
84721 
84722 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_queries_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84723  PyObject *resultobj = 0;
84725  std::vector< faiss::RangeSearchPartialResult::QueryResult > *arg2 = (std::vector< faiss::RangeSearchPartialResult::QueryResult > *) 0 ;
84726  void *argp1 = 0 ;
84727  int res1 = 0 ;
84728  void *argp2 = 0 ;
84729  int res2 = 0 ;
84730  PyObject * obj0 = 0 ;
84731  PyObject * obj1 = 0 ;
84732 
84733  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_queries_set",&obj0,&obj1)) SWIG_fail;
84734  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84735  if (!SWIG_IsOK(res1)) {
84736  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_queries_set" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84737  }
84738  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84739  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t, 0 | 0 );
84740  if (!SWIG_IsOK(res2)) {
84741  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchPartialResult_queries_set" "', argument " "2"" of type '" "std::vector< faiss::RangeSearchPartialResult::QueryResult > *""'");
84742  }
84743  arg2 = reinterpret_cast< std::vector< faiss::RangeSearchPartialResult::QueryResult > * >(argp2);
84744  if (arg1) (arg1)->queries = *arg2;
84745  resultobj = SWIG_Py_Void();
84746  return resultobj;
84747 fail:
84748  return NULL;
84749 }
84750 
84751 
84752 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_queries_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84753  PyObject *resultobj = 0;
84755  void *argp1 = 0 ;
84756  int res1 = 0 ;
84757  PyObject * obj0 = 0 ;
84758  std::vector< faiss::RangeSearchPartialResult::QueryResult > *result = 0 ;
84759 
84760  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_queries_get",&obj0)) SWIG_fail;
84761  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84762  if (!SWIG_IsOK(res1)) {
84763  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_queries_get" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84764  }
84765  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84766  result = (std::vector< faiss::RangeSearchPartialResult::QueryResult > *)& ((arg1)->queries);
84767  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t, 0 | 0 );
84768  return resultobj;
84769 fail:
84770  return NULL;
84771 }
84772 
84773 
84774 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_new_result(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84775  PyObject *resultobj = 0;
84777  faiss::BufferList::idx_t arg2 ;
84778  void *argp1 = 0 ;
84779  int res1 = 0 ;
84780  long val2 ;
84781  int ecode2 = 0 ;
84782  PyObject * obj0 = 0 ;
84783  PyObject * obj1 = 0 ;
84785 
84786  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_new_result",&obj0,&obj1)) SWIG_fail;
84787  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84788  if (!SWIG_IsOK(res1)) {
84789  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_new_result" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84790  }
84791  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84792  ecode2 = SWIG_AsVal_long(obj1, &val2);
84793  if (!SWIG_IsOK(ecode2)) {
84794  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchPartialResult_new_result" "', argument " "2"" of type '" "faiss::BufferList::idx_t""'");
84795  }
84796  arg2 = static_cast< faiss::BufferList::idx_t >(val2);
84797  result = (faiss::RangeSearchPartialResult::QueryResult *) &(arg1)->new_result(arg2);
84798  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchPartialResult__QueryResult, 0 | 0 );
84799  return resultobj;
84800 fail:
84801  return NULL;
84802 }
84803 
84804 
84805 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_finalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84806  PyObject *resultobj = 0;
84808  void *argp1 = 0 ;
84809  int res1 = 0 ;
84810  PyObject * obj0 = 0 ;
84811 
84812  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_finalize",&obj0)) SWIG_fail;
84813  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84814  if (!SWIG_IsOK(res1)) {
84815  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_finalize" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84816  }
84817  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84818  (arg1)->finalize();
84819  resultobj = SWIG_Py_Void();
84820  return resultobj;
84821 fail:
84822  return NULL;
84823 }
84824 
84825 
84826 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_lims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84827  PyObject *resultobj = 0;
84829  void *argp1 = 0 ;
84830  int res1 = 0 ;
84831  PyObject * obj0 = 0 ;
84832 
84833  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_set_lims",&obj0)) SWIG_fail;
84834  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84835  if (!SWIG_IsOK(res1)) {
84836  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_set_lims" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84837  }
84838  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84839  (arg1)->set_lims();
84840  resultobj = SWIG_Py_Void();
84841  return resultobj;
84842 fail:
84843  return NULL;
84844 }
84845 
84846 
84847 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_result__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84848  PyObject *resultobj = 0;
84850  bool arg2 ;
84851  void *argp1 = 0 ;
84852  int res1 = 0 ;
84853  bool val2 ;
84854  int ecode2 = 0 ;
84855  PyObject * obj0 = 0 ;
84856  PyObject * obj1 = 0 ;
84857 
84858  if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_set_result",&obj0,&obj1)) SWIG_fail;
84859  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84860  if (!SWIG_IsOK(res1)) {
84861  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_set_result" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84862  }
84863  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84864  ecode2 = SWIG_AsVal_bool(obj1, &val2);
84865  if (!SWIG_IsOK(ecode2)) {
84866  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchPartialResult_set_result" "', argument " "2"" of type '" "bool""'");
84867  }
84868  arg2 = static_cast< bool >(val2);
84869  (arg1)->set_result(arg2);
84870  resultobj = SWIG_Py_Void();
84871  return resultobj;
84872 fail:
84873  return NULL;
84874 }
84875 
84876 
84877 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_result__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84878  PyObject *resultobj = 0;
84880  void *argp1 = 0 ;
84881  int res1 = 0 ;
84882  PyObject * obj0 = 0 ;
84883 
84884  if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_set_result",&obj0)) SWIG_fail;
84885  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
84886  if (!SWIG_IsOK(res1)) {
84887  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_set_result" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84888  }
84889  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84890  (arg1)->set_result();
84891  resultobj = SWIG_Py_Void();
84892  return resultobj;
84893 fail:
84894  return NULL;
84895 }
84896 
84897 
84898 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_result(PyObject *self, PyObject *args) {
84899  Py_ssize_t argc;
84900  PyObject *argv[3] = {
84901  0
84902  };
84903  Py_ssize_t ii;
84904 
84905  if (!PyTuple_Check(args)) SWIG_fail;
84906  argc = args ? PyObject_Length(args) : 0;
84907  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
84908  argv[ii] = PyTuple_GET_ITEM(args,ii);
84909  }
84910  if (argc == 1) {
84911  int _v;
84912  void *vptr = 0;
84913  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RangeSearchPartialResult, 0);
84914  _v = SWIG_CheckState(res);
84915  if (_v) {
84916  return _wrap_RangeSearchPartialResult_set_result__SWIG_1(self, args);
84917  }
84918  }
84919  if (argc == 2) {
84920  int _v;
84921  void *vptr = 0;
84922  int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RangeSearchPartialResult, 0);
84923  _v = SWIG_CheckState(res);
84924  if (_v) {
84925  {
84926  int res = SWIG_AsVal_bool(argv[1], NULL);
84927  _v = SWIG_CheckState(res);
84928  }
84929  if (_v) {
84930  return _wrap_RangeSearchPartialResult_set_result__SWIG_0(self, args);
84931  }
84932  }
84933  }
84934 
84935 fail:
84936  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RangeSearchPartialResult_set_result'.\n"
84937  " Possible C/C++ prototypes are:\n"
84938  " faiss::RangeSearchPartialResult::set_result(bool)\n"
84939  " faiss::RangeSearchPartialResult::set_result()\n");
84940  return 0;
84941 }
84942 
84943 
84944 SWIGINTERN PyObject *_wrap_delete_RangeSearchPartialResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84945  PyObject *resultobj = 0;
84947  void *argp1 = 0 ;
84948  int res1 = 0 ;
84949  PyObject * obj0 = 0 ;
84950 
84951  if (!PyArg_ParseTuple(args,(char *)"O:delete_RangeSearchPartialResult",&obj0)) SWIG_fail;
84952  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, SWIG_POINTER_DISOWN | 0 );
84953  if (!SWIG_IsOK(res1)) {
84954  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RangeSearchPartialResult" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
84955  }
84956  arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
84957  delete arg1;
84958  resultobj = SWIG_Py_Void();
84959  return resultobj;
84960 fail:
84961  return NULL;
84962 }
84963 
84964 
84965 SWIGINTERN PyObject *RangeSearchPartialResult_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84966  PyObject *obj;
84967  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
84968  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RangeSearchPartialResult, SWIG_NewClientData(obj));
84969  return SWIG_Py_Void();
84970 }
84971 
84972 SWIGINTERN PyObject *_wrap_IOReader_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
84973  PyObject *resultobj = 0;
84974  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
84975  std::string *arg2 = 0 ;
84976  void *argp1 = 0 ;
84977  int res1 = 0 ;
84978  int res2 = SWIG_OLDOBJ ;
84979  PyObject * obj0 = 0 ;
84980  PyObject * obj1 = 0 ;
84981 
84982  if (!PyArg_ParseTuple(args,(char *)"OO:IOReader_name_set",&obj0,&obj1)) SWIG_fail;
84983  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
84984  if (!SWIG_IsOK(res1)) {
84985  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader_name_set" "', argument " "1"" of type '" "faiss::IOReader *""'");
84986  }
84987  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
84988  {
84989  std::string *ptr = (std::string *)0;
84990  res2 = SWIG_AsPtr_std_string(obj1, &ptr);
84991  if (!SWIG_IsOK(res2)) {
84992  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOReader_name_set" "', argument " "2"" of type '" "std::string const &""'");
84993  }
84994  if (!ptr) {
84995  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOReader_name_set" "', argument " "2"" of type '" "std::string const &""'");
84996  }
84997  arg2 = ptr;
84998  }
84999  if (arg1) (arg1)->name = *arg2;
85000  resultobj = SWIG_Py_Void();
85001  if (SWIG_IsNewObj(res2)) delete arg2;
85002  return resultobj;
85003 fail:
85004  if (SWIG_IsNewObj(res2)) delete arg2;
85005  return NULL;
85006 }
85007 
85008 
85009 SWIGINTERN PyObject *_wrap_IOReader_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85010  PyObject *resultobj = 0;
85011  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
85012  void *argp1 = 0 ;
85013  int res1 = 0 ;
85014  PyObject * obj0 = 0 ;
85015  std::string *result = 0 ;
85016 
85017  if (!PyArg_ParseTuple(args,(char *)"O:IOReader_name_get",&obj0)) SWIG_fail;
85018  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
85019  if (!SWIG_IsOK(res1)) {
85020  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader_name_get" "', argument " "1"" of type '" "faiss::IOReader *""'");
85021  }
85022  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
85023  result = (std::string *) & ((arg1)->name);
85024  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
85025  return resultobj;
85026 fail:
85027  return NULL;
85028 }
85029 
85030 
85031 SWIGINTERN PyObject *_wrap_IOReader___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85032  PyObject *resultobj = 0;
85033  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
85034  void *arg2 = (void *) 0 ;
85035  size_t arg3 ;
85036  size_t arg4 ;
85037  void *argp1 = 0 ;
85038  int res1 = 0 ;
85039  int res2 ;
85040  size_t val3 ;
85041  int ecode3 = 0 ;
85042  size_t val4 ;
85043  int ecode4 = 0 ;
85044  PyObject * obj0 = 0 ;
85045  PyObject * obj1 = 0 ;
85046  PyObject * obj2 = 0 ;
85047  PyObject * obj3 = 0 ;
85048  size_t result;
85049 
85050  if (!PyArg_ParseTuple(args,(char *)"OOOO:IOReader___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
85051  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
85052  if (!SWIG_IsOK(res1)) {
85053  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader___call__" "', argument " "1"" of type '" "faiss::IOReader *""'");
85054  }
85055  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
85056  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
85057  if (!SWIG_IsOK(res2)) {
85058  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOReader___call__" "', argument " "2"" of type '" "void *""'");
85059  }
85060  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
85061  if (!SWIG_IsOK(ecode3)) {
85062  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IOReader___call__" "', argument " "3"" of type '" "size_t""'");
85063  }
85064  arg3 = static_cast< size_t >(val3);
85065  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
85066  if (!SWIG_IsOK(ecode4)) {
85067  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IOReader___call__" "', argument " "4"" of type '" "size_t""'");
85068  }
85069  arg4 = static_cast< size_t >(val4);
85070  result = (size_t)(arg1)->operator ()(arg2,arg3,arg4);
85071  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
85072  return resultobj;
85073 fail:
85074  return NULL;
85075 }
85076 
85077 
85078 SWIGINTERN PyObject *_wrap_IOReader_fileno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85079  PyObject *resultobj = 0;
85080  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
85081  void *argp1 = 0 ;
85082  int res1 = 0 ;
85083  PyObject * obj0 = 0 ;
85084  int result;
85085 
85086  if (!PyArg_ParseTuple(args,(char *)"O:IOReader_fileno",&obj0)) SWIG_fail;
85087  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
85088  if (!SWIG_IsOK(res1)) {
85089  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader_fileno" "', argument " "1"" of type '" "faiss::IOReader *""'");
85090  }
85091  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
85092  result = (int)(arg1)->fileno();
85093  resultobj = SWIG_From_int(static_cast< int >(result));
85094  return resultobj;
85095 fail:
85096  return NULL;
85097 }
85098 
85099 
85100 SWIGINTERN PyObject *_wrap_delete_IOReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85101  PyObject *resultobj = 0;
85102  faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
85103  void *argp1 = 0 ;
85104  int res1 = 0 ;
85105  PyObject * obj0 = 0 ;
85106 
85107  if (!PyArg_ParseTuple(args,(char *)"O:delete_IOReader",&obj0)) SWIG_fail;
85108  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, SWIG_POINTER_DISOWN | 0 );
85109  if (!SWIG_IsOK(res1)) {
85110  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IOReader" "', argument " "1"" of type '" "faiss::IOReader *""'");
85111  }
85112  arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
85113  delete arg1;
85114  resultobj = SWIG_Py_Void();
85115  return resultobj;
85116 fail:
85117  return NULL;
85118 }
85119 
85120 
85121 SWIGINTERN PyObject *IOReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85122  PyObject *obj;
85123  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
85124  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IOReader, SWIG_NewClientData(obj));
85125  return SWIG_Py_Void();
85126 }
85127 
85128 SWIGINTERN PyObject *_wrap_IOWriter_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85129  PyObject *resultobj = 0;
85130  faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
85131  std::string *arg2 = 0 ;
85132  void *argp1 = 0 ;
85133  int res1 = 0 ;
85134  int res2 = SWIG_OLDOBJ ;
85135  PyObject * obj0 = 0 ;
85136  PyObject * obj1 = 0 ;
85137 
85138  if (!PyArg_ParseTuple(args,(char *)"OO:IOWriter_name_set",&obj0,&obj1)) SWIG_fail;
85139  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
85140  if (!SWIG_IsOK(res1)) {
85141  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter_name_set" "', argument " "1"" of type '" "faiss::IOWriter *""'");
85142  }
85143  arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
85144  {
85145  std::string *ptr = (std::string *)0;
85146  res2 = SWIG_AsPtr_std_string(obj1, &ptr);
85147  if (!SWIG_IsOK(res2)) {
85148  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOWriter_name_set" "', argument " "2"" of type '" "std::string const &""'");
85149  }
85150  if (!ptr) {
85151  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOWriter_name_set" "', argument " "2"" of type '" "std::string const &""'");
85152  }
85153  arg2 = ptr;
85154  }
85155  if (arg1) (arg1)->name = *arg2;
85156  resultobj = SWIG_Py_Void();
85157  if (SWIG_IsNewObj(res2)) delete arg2;
85158  return resultobj;
85159 fail:
85160  if (SWIG_IsNewObj(res2)) delete arg2;
85161  return NULL;
85162 }
85163 
85164 
85165 SWIGINTERN PyObject *_wrap_IOWriter_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85166  PyObject *resultobj = 0;
85167  faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
85168  void *argp1 = 0 ;
85169  int res1 = 0 ;
85170  PyObject * obj0 = 0 ;
85171  std::string *result = 0 ;
85172 
85173  if (!PyArg_ParseTuple(args,(char *)"O:IOWriter_name_get",&obj0)) SWIG_fail;
85174  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
85175  if (!SWIG_IsOK(res1)) {
85176  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter_name_get" "', argument " "1"" of type '" "faiss::IOWriter *""'");
85177  }
85178  arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
85179  result = (std::string *) & ((arg1)->name);
85180  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
85181  return resultobj;
85182 fail:
85183  return NULL;
85184 }
85185 
85186 
85187 SWIGINTERN PyObject *_wrap_IOWriter___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85188  PyObject *resultobj = 0;
85189  faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
85190  void *arg2 = (void *) 0 ;
85191  size_t arg3 ;
85192  size_t arg4 ;
85193  void *argp1 = 0 ;
85194  int res1 = 0 ;
85195  int res2 ;
85196  size_t val3 ;
85197  int ecode3 = 0 ;
85198  size_t val4 ;
85199  int ecode4 = 0 ;
85200  PyObject * obj0 = 0 ;
85201  PyObject * obj1 = 0 ;
85202  PyObject * obj2 = 0 ;
85203  PyObject * obj3 = 0 ;
85204  size_t result;
85205 
85206  if (!PyArg_ParseTuple(args,(char *)"OOOO:IOWriter___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
85207  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
85208  if (!SWIG_IsOK(res1)) {
85209  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter___call__" "', argument " "1"" of type '" "faiss::IOWriter *""'");
85210  }
85211  arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
85212  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
85213  if (!SWIG_IsOK(res2)) {
85214  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOWriter___call__" "', argument " "2"" of type '" "void const *""'");
85215  }
85216  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
85217  if (!SWIG_IsOK(ecode3)) {
85218  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IOWriter___call__" "', argument " "3"" of type '" "size_t""'");
85219  }
85220  arg3 = static_cast< size_t >(val3);
85221  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
85222  if (!SWIG_IsOK(ecode4)) {
85223  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IOWriter___call__" "', argument " "4"" of type '" "size_t""'");
85224  }
85225  arg4 = static_cast< size_t >(val4);
85226  result = (size_t)(arg1)->operator ()((void const *)arg2,arg3,arg4);
85227  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
85228  return resultobj;
85229 fail:
85230  return NULL;
85231 }
85232 
85233 
85234 SWIGINTERN PyObject *_wrap_IOWriter_fileno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85235  PyObject *resultobj = 0;
85236  faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
85237  void *argp1 = 0 ;
85238  int res1 = 0 ;
85239  PyObject * obj0 = 0 ;
85240  int result;
85241 
85242  if (!PyArg_ParseTuple(args,(char *)"O:IOWriter_fileno",&obj0)) SWIG_fail;
85243  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
85244  if (!SWIG_IsOK(res1)) {
85245  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter_fileno" "', argument " "1"" of type '" "faiss::IOWriter *""'");
85246  }
85247  arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
85248  result = (int)(arg1)->fileno();
85249  resultobj = SWIG_From_int(static_cast< int >(result));
85250  return resultobj;
85251 fail:
85252  return NULL;
85253 }
85254 
85255 
85256 SWIGINTERN PyObject *_wrap_delete_IOWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85257  PyObject *resultobj = 0;
85258  faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
85259  void *argp1 = 0 ;
85260  int res1 = 0 ;
85261  PyObject * obj0 = 0 ;
85262 
85263  if (!PyArg_ParseTuple(args,(char *)"O:delete_IOWriter",&obj0)) SWIG_fail;
85264  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, SWIG_POINTER_DISOWN | 0 );
85265  if (!SWIG_IsOK(res1)) {
85266  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IOWriter" "', argument " "1"" of type '" "faiss::IOWriter *""'");
85267  }
85268  arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
85269  delete arg1;
85270  resultobj = SWIG_Py_Void();
85271  return resultobj;
85272 fail:
85273  return NULL;
85274 }
85275 
85276 
85277 SWIGINTERN PyObject *IOWriter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85278  PyObject *obj;
85279  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
85280  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IOWriter, SWIG_NewClientData(obj));
85281  return SWIG_Py_Void();
85282 }
85283 
85284 SWIGINTERN PyObject *_wrap_VectorIOReader_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85285  PyObject *resultobj = 0;
85287  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
85288  void *argp1 = 0 ;
85289  int res1 = 0 ;
85290  void *argp2 = 0 ;
85291  int res2 = 0 ;
85292  PyObject * obj0 = 0 ;
85293  PyObject * obj1 = 0 ;
85294 
85295  if (!PyArg_ParseTuple(args,(char *)"OO:VectorIOReader_data_set",&obj0,&obj1)) SWIG_fail;
85296  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
85297  if (!SWIG_IsOK(res1)) {
85298  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_data_set" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
85299  }
85300  arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
85301  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
85302  if (!SWIG_IsOK(res2)) {
85303  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOReader_data_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
85304  }
85305  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
85306  if (arg1) (arg1)->data = *arg2;
85307  resultobj = SWIG_Py_Void();
85308  return resultobj;
85309 fail:
85310  return NULL;
85311 }
85312 
85313 
85314 SWIGINTERN PyObject *_wrap_VectorIOReader_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85315  PyObject *resultobj = 0;
85317  void *argp1 = 0 ;
85318  int res1 = 0 ;
85319  PyObject * obj0 = 0 ;
85320  std::vector< uint8_t > *result = 0 ;
85321 
85322  if (!PyArg_ParseTuple(args,(char *)"O:VectorIOReader_data_get",&obj0)) SWIG_fail;
85323  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
85324  if (!SWIG_IsOK(res1)) {
85325  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_data_get" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
85326  }
85327  arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
85328  result = (std::vector< uint8_t > *)& ((arg1)->data);
85329  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
85330  return resultobj;
85331 fail:
85332  return NULL;
85333 }
85334 
85335 
85336 SWIGINTERN PyObject *_wrap_VectorIOReader_rp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85337  PyObject *resultobj = 0;
85339  size_t arg2 ;
85340  void *argp1 = 0 ;
85341  int res1 = 0 ;
85342  size_t val2 ;
85343  int ecode2 = 0 ;
85344  PyObject * obj0 = 0 ;
85345  PyObject * obj1 = 0 ;
85346 
85347  if (!PyArg_ParseTuple(args,(char *)"OO:VectorIOReader_rp_set",&obj0,&obj1)) SWIG_fail;
85348  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
85349  if (!SWIG_IsOK(res1)) {
85350  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_rp_set" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
85351  }
85352  arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
85353  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
85354  if (!SWIG_IsOK(ecode2)) {
85355  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorIOReader_rp_set" "', argument " "2"" of type '" "size_t""'");
85356  }
85357  arg2 = static_cast< size_t >(val2);
85358  if (arg1) (arg1)->rp = arg2;
85359  resultobj = SWIG_Py_Void();
85360  return resultobj;
85361 fail:
85362  return NULL;
85363 }
85364 
85365 
85366 SWIGINTERN PyObject *_wrap_VectorIOReader_rp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85367  PyObject *resultobj = 0;
85369  void *argp1 = 0 ;
85370  int res1 = 0 ;
85371  PyObject * obj0 = 0 ;
85372  size_t result;
85373 
85374  if (!PyArg_ParseTuple(args,(char *)"O:VectorIOReader_rp_get",&obj0)) SWIG_fail;
85375  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
85376  if (!SWIG_IsOK(res1)) {
85377  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_rp_get" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
85378  }
85379  arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
85380  result = (size_t) ((arg1)->rp);
85381  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
85382  return resultobj;
85383 fail:
85384  return NULL;
85385 }
85386 
85387 
85388 SWIGINTERN PyObject *_wrap_VectorIOReader___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85389  PyObject *resultobj = 0;
85391  void *arg2 = (void *) 0 ;
85392  size_t arg3 ;
85393  size_t arg4 ;
85394  void *argp1 = 0 ;
85395  int res1 = 0 ;
85396  int res2 ;
85397  size_t val3 ;
85398  int ecode3 = 0 ;
85399  size_t val4 ;
85400  int ecode4 = 0 ;
85401  PyObject * obj0 = 0 ;
85402  PyObject * obj1 = 0 ;
85403  PyObject * obj2 = 0 ;
85404  PyObject * obj3 = 0 ;
85405  size_t result;
85406 
85407  if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorIOReader___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
85408  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
85409  if (!SWIG_IsOK(res1)) {
85410  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader___call__" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
85411  }
85412  arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
85413  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
85414  if (!SWIG_IsOK(res2)) {
85415  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOReader___call__" "', argument " "2"" of type '" "void *""'");
85416  }
85417  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
85418  if (!SWIG_IsOK(ecode3)) {
85419  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorIOReader___call__" "', argument " "3"" of type '" "size_t""'");
85420  }
85421  arg3 = static_cast< size_t >(val3);
85422  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
85423  if (!SWIG_IsOK(ecode4)) {
85424  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VectorIOReader___call__" "', argument " "4"" of type '" "size_t""'");
85425  }
85426  arg4 = static_cast< size_t >(val4);
85427  result = (size_t)(arg1)->operator ()(arg2,arg3,arg4);
85428  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
85429  return resultobj;
85430 fail:
85431  return NULL;
85432 }
85433 
85434 
85435 SWIGINTERN PyObject *_wrap_new_VectorIOReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85436  PyObject *resultobj = 0;
85437  faiss::VectorIOReader *result = 0 ;
85438 
85439  if (!PyArg_ParseTuple(args,(char *)":new_VectorIOReader")) SWIG_fail;
85440  result = (faiss::VectorIOReader *)new faiss::VectorIOReader();
85441  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VectorIOReader, SWIG_POINTER_NEW | 0 );
85442  return resultobj;
85443 fail:
85444  return NULL;
85445 }
85446 
85447 
85448 SWIGINTERN PyObject *_wrap_delete_VectorIOReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85449  PyObject *resultobj = 0;
85451  void *argp1 = 0 ;
85452  int res1 = 0 ;
85453  PyObject * obj0 = 0 ;
85454 
85455  if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorIOReader",&obj0)) SWIG_fail;
85456  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, SWIG_POINTER_DISOWN | 0 );
85457  if (!SWIG_IsOK(res1)) {
85458  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorIOReader" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
85459  }
85460  arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
85461  delete arg1;
85462  resultobj = SWIG_Py_Void();
85463  return resultobj;
85464 fail:
85465  return NULL;
85466 }
85467 
85468 
85469 SWIGINTERN PyObject *VectorIOReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85470  PyObject *obj;
85471  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
85472  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VectorIOReader, SWIG_NewClientData(obj));
85473  return SWIG_Py_Void();
85474 }
85475 
85476 SWIGINTERN PyObject *_wrap_VectorIOWriter_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85477  PyObject *resultobj = 0;
85479  std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
85480  void *argp1 = 0 ;
85481  int res1 = 0 ;
85482  void *argp2 = 0 ;
85483  int res2 = 0 ;
85484  PyObject * obj0 = 0 ;
85485  PyObject * obj1 = 0 ;
85486 
85487  if (!PyArg_ParseTuple(args,(char *)"OO:VectorIOWriter_data_set",&obj0,&obj1)) SWIG_fail;
85488  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, 0 | 0 );
85489  if (!SWIG_IsOK(res1)) {
85490  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOWriter_data_set" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
85491  }
85492  arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
85493  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
85494  if (!SWIG_IsOK(res2)) {
85495  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOWriter_data_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
85496  }
85497  arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
85498  if (arg1) (arg1)->data = *arg2;
85499  resultobj = SWIG_Py_Void();
85500  return resultobj;
85501 fail:
85502  return NULL;
85503 }
85504 
85505 
85506 SWIGINTERN PyObject *_wrap_VectorIOWriter_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85507  PyObject *resultobj = 0;
85509  void *argp1 = 0 ;
85510  int res1 = 0 ;
85511  PyObject * obj0 = 0 ;
85512  std::vector< uint8_t > *result = 0 ;
85513 
85514  if (!PyArg_ParseTuple(args,(char *)"O:VectorIOWriter_data_get",&obj0)) SWIG_fail;
85515  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, 0 | 0 );
85516  if (!SWIG_IsOK(res1)) {
85517  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOWriter_data_get" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
85518  }
85519  arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
85520  result = (std::vector< uint8_t > *)& ((arg1)->data);
85521  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
85522  return resultobj;
85523 fail:
85524  return NULL;
85525 }
85526 
85527 
85528 SWIGINTERN PyObject *_wrap_VectorIOWriter___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85529  PyObject *resultobj = 0;
85531  void *arg2 = (void *) 0 ;
85532  size_t arg3 ;
85533  size_t arg4 ;
85534  void *argp1 = 0 ;
85535  int res1 = 0 ;
85536  int res2 ;
85537  size_t val3 ;
85538  int ecode3 = 0 ;
85539  size_t val4 ;
85540  int ecode4 = 0 ;
85541  PyObject * obj0 = 0 ;
85542  PyObject * obj1 = 0 ;
85543  PyObject * obj2 = 0 ;
85544  PyObject * obj3 = 0 ;
85545  size_t result;
85546 
85547  if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorIOWriter___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
85548  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, 0 | 0 );
85549  if (!SWIG_IsOK(res1)) {
85550  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOWriter___call__" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
85551  }
85552  arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
85553  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
85554  if (!SWIG_IsOK(res2)) {
85555  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOWriter___call__" "', argument " "2"" of type '" "void const *""'");
85556  }
85557  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
85558  if (!SWIG_IsOK(ecode3)) {
85559  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorIOWriter___call__" "', argument " "3"" of type '" "size_t""'");
85560  }
85561  arg3 = static_cast< size_t >(val3);
85562  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
85563  if (!SWIG_IsOK(ecode4)) {
85564  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VectorIOWriter___call__" "', argument " "4"" of type '" "size_t""'");
85565  }
85566  arg4 = static_cast< size_t >(val4);
85567  result = (size_t)(arg1)->operator ()((void const *)arg2,arg3,arg4);
85568  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
85569  return resultobj;
85570 fail:
85571  return NULL;
85572 }
85573 
85574 
85575 SWIGINTERN PyObject *_wrap_new_VectorIOWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85576  PyObject *resultobj = 0;
85577  faiss::VectorIOWriter *result = 0 ;
85578 
85579  if (!PyArg_ParseTuple(args,(char *)":new_VectorIOWriter")) SWIG_fail;
85580  result = (faiss::VectorIOWriter *)new faiss::VectorIOWriter();
85581  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VectorIOWriter, SWIG_POINTER_NEW | 0 );
85582  return resultobj;
85583 fail:
85584  return NULL;
85585 }
85586 
85587 
85588 SWIGINTERN PyObject *_wrap_delete_VectorIOWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85589  PyObject *resultobj = 0;
85591  void *argp1 = 0 ;
85592  int res1 = 0 ;
85593  PyObject * obj0 = 0 ;
85594 
85595  if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorIOWriter",&obj0)) SWIG_fail;
85596  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, SWIG_POINTER_DISOWN | 0 );
85597  if (!SWIG_IsOK(res1)) {
85598  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorIOWriter" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
85599  }
85600  arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
85601  delete arg1;
85602  resultobj = SWIG_Py_Void();
85603  return resultobj;
85604 fail:
85605  return NULL;
85606 }
85607 
85608 
85609 SWIGINTERN PyObject *VectorIOWriter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85610  PyObject *obj;
85611  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
85612  SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VectorIOWriter, SWIG_NewClientData(obj));
85613  return SWIG_Py_Void();
85614 }
85615 
85616 SWIGINTERN PyObject *_wrap_ignore_SIGTTIN(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85617  PyObject *resultobj = 0;
85618 
85619  if (!PyArg_ParseTuple(args,(char *)":ignore_SIGTTIN")) SWIG_fail;
85620  ignore_SIGTTIN();
85621  resultobj = SWIG_Py_Void();
85622  return resultobj;
85623 fail:
85624  return NULL;
85625 }
85626 
85627 
85628 SWIGINTERN PyObject *_wrap_MapLong2Long_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85629  PyObject *resultobj = 0;
85630  MapLong2Long *arg1 = (MapLong2Long *) 0 ;
85631  std::unordered_map< long,long > arg2 ;
85632  void *argp1 = 0 ;
85633  int res1 = 0 ;
85634  void *argp2 ;
85635  int res2 = 0 ;
85636  PyObject * obj0 = 0 ;
85637  PyObject * obj1 = 0 ;
85638 
85639  if (!PyArg_ParseTuple(args,(char *)"OO:MapLong2Long_map_set",&obj0,&obj1)) SWIG_fail;
85640  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
85641  if (!SWIG_IsOK(res1)) {
85642  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_map_set" "', argument " "1"" of type '" "MapLong2Long *""'");
85643  }
85644  arg1 = reinterpret_cast< MapLong2Long * >(argp1);
85645  {
85646  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__unordered_mapT_long_long_t, 0 | 0);
85647  if (!SWIG_IsOK(res2)) {
85648  SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MapLong2Long_map_set" "', argument " "2"" of type '" "std::unordered_map< long,long >""'");
85649  }
85650  if (!argp2) {
85651  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MapLong2Long_map_set" "', argument " "2"" of type '" "std::unordered_map< long,long >""'");
85652  } else {
85653  std::unordered_map< long,long > * temp = reinterpret_cast< std::unordered_map< long,long > * >(argp2);
85654  arg2 = *temp;
85655  if (SWIG_IsNewObj(res2)) delete temp;
85656  }
85657  }
85658  if (arg1) (arg1)->map = arg2;
85659  resultobj = SWIG_Py_Void();
85660  return resultobj;
85661 fail:
85662  return NULL;
85663 }
85664 
85665 
85666 SWIGINTERN PyObject *_wrap_MapLong2Long_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85667  PyObject *resultobj = 0;
85668  MapLong2Long *arg1 = (MapLong2Long *) 0 ;
85669  void *argp1 = 0 ;
85670  int res1 = 0 ;
85671  PyObject * obj0 = 0 ;
85672  std::unordered_map< long,long > result;
85673 
85674  if (!PyArg_ParseTuple(args,(char *)"O:MapLong2Long_map_get",&obj0)) SWIG_fail;
85675  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
85676  if (!SWIG_IsOK(res1)) {
85677  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_map_get" "', argument " "1"" of type '" "MapLong2Long *""'");
85678  }
85679  arg1 = reinterpret_cast< MapLong2Long * >(argp1);
85680  result = ((arg1)->map);
85681  resultobj = SWIG_NewPointerObj((new std::unordered_map< long,long >(static_cast< const std::unordered_map< long,long >& >(result))), SWIGTYPE_p_std__unordered_mapT_long_long_t, SWIG_POINTER_OWN | 0 );
85682  return resultobj;
85683 fail:
85684  return NULL;
85685 }
85686 
85687 
85688 SWIGINTERN PyObject *_wrap_MapLong2Long_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85689  PyObject *resultobj = 0;
85690  MapLong2Long *arg1 = (MapLong2Long *) 0 ;
85691  size_t arg2 ;
85692  long *arg3 = (long *) 0 ;
85693  long *arg4 = (long *) 0 ;
85694  void *argp1 = 0 ;
85695  int res1 = 0 ;
85696  size_t val2 ;
85697  int ecode2 = 0 ;
85698  void *argp3 = 0 ;
85699  int res3 = 0 ;
85700  void *argp4 = 0 ;
85701  int res4 = 0 ;
85702  PyObject * obj0 = 0 ;
85703  PyObject * obj1 = 0 ;
85704  PyObject * obj2 = 0 ;
85705  PyObject * obj3 = 0 ;
85706 
85707  if (!PyArg_ParseTuple(args,(char *)"OOOO:MapLong2Long_add",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
85708  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
85709  if (!SWIG_IsOK(res1)) {
85710  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_add" "', argument " "1"" of type '" "MapLong2Long *""'");
85711  }
85712  arg1 = reinterpret_cast< MapLong2Long * >(argp1);
85713  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
85714  if (!SWIG_IsOK(ecode2)) {
85715  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MapLong2Long_add" "', argument " "2"" of type '" "size_t""'");
85716  }
85717  arg2 = static_cast< size_t >(val2);
85718  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
85719  if (!SWIG_IsOK(res3)) {
85720  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MapLong2Long_add" "', argument " "3"" of type '" "long const *""'");
85721  }
85722  arg3 = reinterpret_cast< long * >(argp3);
85723  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
85724  if (!SWIG_IsOK(res4)) {
85725  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MapLong2Long_add" "', argument " "4"" of type '" "long const *""'");
85726  }
85727  arg4 = reinterpret_cast< long * >(argp4);
85728  (arg1)->add(arg2,(long const *)arg3,(long const *)arg4);
85729  resultobj = SWIG_Py_Void();
85730  return resultobj;
85731 fail:
85732  return NULL;
85733 }
85734 
85735 
85736 SWIGINTERN PyObject *_wrap_MapLong2Long_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85737  PyObject *resultobj = 0;
85738  MapLong2Long *arg1 = (MapLong2Long *) 0 ;
85739  long arg2 ;
85740  void *argp1 = 0 ;
85741  int res1 = 0 ;
85742  long val2 ;
85743  int ecode2 = 0 ;
85744  PyObject * obj0 = 0 ;
85745  PyObject * obj1 = 0 ;
85746  long result;
85747 
85748  if (!PyArg_ParseTuple(args,(char *)"OO:MapLong2Long_search",&obj0,&obj1)) SWIG_fail;
85749  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
85750  if (!SWIG_IsOK(res1)) {
85751  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_search" "', argument " "1"" of type '" "MapLong2Long *""'");
85752  }
85753  arg1 = reinterpret_cast< MapLong2Long * >(argp1);
85754  ecode2 = SWIG_AsVal_long(obj1, &val2);
85755  if (!SWIG_IsOK(ecode2)) {
85756  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MapLong2Long_search" "', argument " "2"" of type '" "long""'");
85757  }
85758  arg2 = static_cast< long >(val2);
85759  result = (long)(arg1)->search(arg2);
85760  resultobj = SWIG_From_long(static_cast< long >(result));
85761  return resultobj;
85762 fail:
85763  return NULL;
85764 }
85765 
85766 
85767 SWIGINTERN PyObject *_wrap_MapLong2Long_search_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85768  PyObject *resultobj = 0;
85769  MapLong2Long *arg1 = (MapLong2Long *) 0 ;
85770  size_t arg2 ;
85771  long *arg3 = (long *) 0 ;
85772  long *arg4 = (long *) 0 ;
85773  void *argp1 = 0 ;
85774  int res1 = 0 ;
85775  size_t val2 ;
85776  int ecode2 = 0 ;
85777  void *argp3 = 0 ;
85778  int res3 = 0 ;
85779  void *argp4 = 0 ;
85780  int res4 = 0 ;
85781  PyObject * obj0 = 0 ;
85782  PyObject * obj1 = 0 ;
85783  PyObject * obj2 = 0 ;
85784  PyObject * obj3 = 0 ;
85785 
85786  if (!PyArg_ParseTuple(args,(char *)"OOOO:MapLong2Long_search_multiple",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
85787  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
85788  if (!SWIG_IsOK(res1)) {
85789  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_search_multiple" "', argument " "1"" of type '" "MapLong2Long *""'");
85790  }
85791  arg1 = reinterpret_cast< MapLong2Long * >(argp1);
85792  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
85793  if (!SWIG_IsOK(ecode2)) {
85794  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MapLong2Long_search_multiple" "', argument " "2"" of type '" "size_t""'");
85795  }
85796  arg2 = static_cast< size_t >(val2);
85797  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
85798  if (!SWIG_IsOK(res3)) {
85799  SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MapLong2Long_search_multiple" "', argument " "3"" of type '" "long const *""'");
85800  }
85801  arg3 = reinterpret_cast< long * >(argp3);
85802  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
85803  if (!SWIG_IsOK(res4)) {
85804  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MapLong2Long_search_multiple" "', argument " "4"" of type '" "long *""'");
85805  }
85806  arg4 = reinterpret_cast< long * >(argp4);
85807  (arg1)->search_multiple(arg2,(long const *)arg3,arg4);
85808  resultobj = SWIG_Py_Void();
85809  return resultobj;
85810 fail:
85811  return NULL;
85812 }
85813 
85814 
85815 SWIGINTERN PyObject *_wrap_new_MapLong2Long(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85816  PyObject *resultobj = 0;
85817  MapLong2Long *result = 0 ;
85818 
85819  if (!PyArg_ParseTuple(args,(char *)":new_MapLong2Long")) SWIG_fail;
85820  result = (MapLong2Long *)new MapLong2Long();
85821  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MapLong2Long, SWIG_POINTER_NEW | 0 );
85822  return resultobj;
85823 fail:
85824  return NULL;
85825 }
85826 
85827 
85828 SWIGINTERN PyObject *_wrap_delete_MapLong2Long(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85829  PyObject *resultobj = 0;
85830  MapLong2Long *arg1 = (MapLong2Long *) 0 ;
85831  void *argp1 = 0 ;
85832  int res1 = 0 ;
85833  PyObject * obj0 = 0 ;
85834 
85835  if (!PyArg_ParseTuple(args,(char *)"O:delete_MapLong2Long",&obj0)) SWIG_fail;
85836  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, SWIG_POINTER_DISOWN | 0 );
85837  if (!SWIG_IsOK(res1)) {
85838  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MapLong2Long" "', argument " "1"" of type '" "MapLong2Long *""'");
85839  }
85840  arg1 = reinterpret_cast< MapLong2Long * >(argp1);
85841  delete arg1;
85842  resultobj = SWIG_Py_Void();
85843  return resultobj;
85844 fail:
85845  return NULL;
85846 }
85847 
85848 
85849 SWIGINTERN PyObject *MapLong2Long_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
85850  PyObject *obj;
85851  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
85852  SWIG_TypeNewClientData(SWIGTYPE_p_MapLong2Long, SWIG_NewClientData(obj));
85853  return SWIG_Py_Void();
85854 }
85855 
85856 static PyMethodDef SwigMethods[] = {
85857  { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
85858  { (char *)"new_FloatVector", _wrap_new_FloatVector, METH_VARARGS, NULL},
85859  { (char *)"FloatVector_push_back", _wrap_FloatVector_push_back, METH_VARARGS, NULL},
85860  { (char *)"FloatVector_clear", _wrap_FloatVector_clear, METH_VARARGS, NULL},
85861  { (char *)"FloatVector_data", _wrap_FloatVector_data, METH_VARARGS, NULL},
85862  { (char *)"FloatVector_size", _wrap_FloatVector_size, METH_VARARGS, NULL},
85863  { (char *)"FloatVector_at", _wrap_FloatVector_at, METH_VARARGS, NULL},
85864  { (char *)"FloatVector_resize", _wrap_FloatVector_resize, METH_VARARGS, NULL},
85865  { (char *)"FloatVector_swap", _wrap_FloatVector_swap, METH_VARARGS, NULL},
85866  { (char *)"delete_FloatVector", _wrap_delete_FloatVector, METH_VARARGS, NULL},
85867  { (char *)"FloatVector_swigregister", FloatVector_swigregister, METH_VARARGS, NULL},
85868  { (char *)"new_DoubleVector", _wrap_new_DoubleVector, METH_VARARGS, NULL},
85869  { (char *)"DoubleVector_push_back", _wrap_DoubleVector_push_back, METH_VARARGS, NULL},
85870  { (char *)"DoubleVector_clear", _wrap_DoubleVector_clear, METH_VARARGS, NULL},
85871  { (char *)"DoubleVector_data", _wrap_DoubleVector_data, METH_VARARGS, NULL},
85872  { (char *)"DoubleVector_size", _wrap_DoubleVector_size, METH_VARARGS, NULL},
85873  { (char *)"DoubleVector_at", _wrap_DoubleVector_at, METH_VARARGS, NULL},
85874  { (char *)"DoubleVector_resize", _wrap_DoubleVector_resize, METH_VARARGS, NULL},
85875  { (char *)"DoubleVector_swap", _wrap_DoubleVector_swap, METH_VARARGS, NULL},
85876  { (char *)"delete_DoubleVector", _wrap_delete_DoubleVector, METH_VARARGS, NULL},
85877  { (char *)"DoubleVector_swigregister", DoubleVector_swigregister, METH_VARARGS, NULL},
85878  { (char *)"new_ByteVector", _wrap_new_ByteVector, METH_VARARGS, NULL},
85879  { (char *)"ByteVector_push_back", _wrap_ByteVector_push_back, METH_VARARGS, NULL},
85880  { (char *)"ByteVector_clear", _wrap_ByteVector_clear, METH_VARARGS, NULL},
85881  { (char *)"ByteVector_data", _wrap_ByteVector_data, METH_VARARGS, NULL},
85882  { (char *)"ByteVector_size", _wrap_ByteVector_size, METH_VARARGS, NULL},
85883  { (char *)"ByteVector_at", _wrap_ByteVector_at, METH_VARARGS, NULL},
85884  { (char *)"ByteVector_resize", _wrap_ByteVector_resize, METH_VARARGS, NULL},
85885  { (char *)"ByteVector_swap", _wrap_ByteVector_swap, METH_VARARGS, NULL},
85886  { (char *)"delete_ByteVector", _wrap_delete_ByteVector, METH_VARARGS, NULL},
85887  { (char *)"ByteVector_swigregister", ByteVector_swigregister, METH_VARARGS, NULL},
85888  { (char *)"new_CharVector", _wrap_new_CharVector, METH_VARARGS, NULL},
85889  { (char *)"CharVector_push_back", _wrap_CharVector_push_back, METH_VARARGS, NULL},
85890  { (char *)"CharVector_clear", _wrap_CharVector_clear, METH_VARARGS, NULL},
85891  { (char *)"CharVector_data", _wrap_CharVector_data, METH_VARARGS, NULL},
85892  { (char *)"CharVector_size", _wrap_CharVector_size, METH_VARARGS, NULL},
85893  { (char *)"CharVector_at", _wrap_CharVector_at, METH_VARARGS, NULL},
85894  { (char *)"CharVector_resize", _wrap_CharVector_resize, METH_VARARGS, NULL},
85895  { (char *)"CharVector_swap", _wrap_CharVector_swap, METH_VARARGS, NULL},
85896  { (char *)"delete_CharVector", _wrap_delete_CharVector, METH_VARARGS, NULL},
85897  { (char *)"CharVector_swigregister", CharVector_swigregister, METH_VARARGS, NULL},
85898  { (char *)"new_Uint64Vector", _wrap_new_Uint64Vector, METH_VARARGS, NULL},
85899  { (char *)"Uint64Vector_push_back", _wrap_Uint64Vector_push_back, METH_VARARGS, NULL},
85900  { (char *)"Uint64Vector_clear", _wrap_Uint64Vector_clear, METH_VARARGS, NULL},
85901  { (char *)"Uint64Vector_data", _wrap_Uint64Vector_data, METH_VARARGS, NULL},
85902  { (char *)"Uint64Vector_size", _wrap_Uint64Vector_size, METH_VARARGS, NULL},
85903  { (char *)"Uint64Vector_at", _wrap_Uint64Vector_at, METH_VARARGS, NULL},
85904  { (char *)"Uint64Vector_resize", _wrap_Uint64Vector_resize, METH_VARARGS, NULL},
85905  { (char *)"Uint64Vector_swap", _wrap_Uint64Vector_swap, METH_VARARGS, NULL},
85906  { (char *)"delete_Uint64Vector", _wrap_delete_Uint64Vector, METH_VARARGS, NULL},
85907  { (char *)"Uint64Vector_swigregister", Uint64Vector_swigregister, METH_VARARGS, NULL},
85908  { (char *)"new_LongVector", _wrap_new_LongVector, METH_VARARGS, NULL},
85909  { (char *)"LongVector_push_back", _wrap_LongVector_push_back, METH_VARARGS, NULL},
85910  { (char *)"LongVector_clear", _wrap_LongVector_clear, METH_VARARGS, NULL},
85911  { (char *)"LongVector_data", _wrap_LongVector_data, METH_VARARGS, NULL},
85912  { (char *)"LongVector_size", _wrap_LongVector_size, METH_VARARGS, NULL},
85913  { (char *)"LongVector_at", _wrap_LongVector_at, METH_VARARGS, NULL},
85914  { (char *)"LongVector_resize", _wrap_LongVector_resize, METH_VARARGS, NULL},
85915  { (char *)"LongVector_swap", _wrap_LongVector_swap, METH_VARARGS, NULL},
85916  { (char *)"delete_LongVector", _wrap_delete_LongVector, METH_VARARGS, NULL},
85917  { (char *)"LongVector_swigregister", LongVector_swigregister, METH_VARARGS, NULL},
85918  { (char *)"new_IntVector", _wrap_new_IntVector, METH_VARARGS, NULL},
85919  { (char *)"IntVector_push_back", _wrap_IntVector_push_back, METH_VARARGS, NULL},
85920  { (char *)"IntVector_clear", _wrap_IntVector_clear, METH_VARARGS, NULL},
85921  { (char *)"IntVector_data", _wrap_IntVector_data, METH_VARARGS, NULL},
85922  { (char *)"IntVector_size", _wrap_IntVector_size, METH_VARARGS, NULL},
85923  { (char *)"IntVector_at", _wrap_IntVector_at, METH_VARARGS, NULL},
85924  { (char *)"IntVector_resize", _wrap_IntVector_resize, METH_VARARGS, NULL},
85925  { (char *)"IntVector_swap", _wrap_IntVector_swap, METH_VARARGS, NULL},
85926  { (char *)"delete_IntVector", _wrap_delete_IntVector, METH_VARARGS, NULL},
85927  { (char *)"IntVector_swigregister", IntVector_swigregister, METH_VARARGS, NULL},
85928  { (char *)"new_VectorTransformVector", _wrap_new_VectorTransformVector, METH_VARARGS, NULL},
85929  { (char *)"VectorTransformVector_push_back", _wrap_VectorTransformVector_push_back, METH_VARARGS, NULL},
85930  { (char *)"VectorTransformVector_clear", _wrap_VectorTransformVector_clear, METH_VARARGS, NULL},
85931  { (char *)"VectorTransformVector_data", _wrap_VectorTransformVector_data, METH_VARARGS, NULL},
85932  { (char *)"VectorTransformVector_size", _wrap_VectorTransformVector_size, METH_VARARGS, NULL},
85933  { (char *)"VectorTransformVector_at", _wrap_VectorTransformVector_at, METH_VARARGS, NULL},
85934  { (char *)"VectorTransformVector_resize", _wrap_VectorTransformVector_resize, METH_VARARGS, NULL},
85935  { (char *)"VectorTransformVector_swap", _wrap_VectorTransformVector_swap, METH_VARARGS, NULL},
85936  { (char *)"delete_VectorTransformVector", _wrap_delete_VectorTransformVector, METH_VARARGS, NULL},
85937  { (char *)"VectorTransformVector_swigregister", VectorTransformVector_swigregister, METH_VARARGS, NULL},
85938  { (char *)"new_OperatingPointVector", _wrap_new_OperatingPointVector, METH_VARARGS, NULL},
85939  { (char *)"OperatingPointVector_push_back", _wrap_OperatingPointVector_push_back, METH_VARARGS, NULL},
85940  { (char *)"OperatingPointVector_clear", _wrap_OperatingPointVector_clear, METH_VARARGS, NULL},
85941  { (char *)"OperatingPointVector_data", _wrap_OperatingPointVector_data, METH_VARARGS, NULL},
85942  { (char *)"OperatingPointVector_size", _wrap_OperatingPointVector_size, METH_VARARGS, NULL},
85943  { (char *)"OperatingPointVector_at", _wrap_OperatingPointVector_at, METH_VARARGS, NULL},
85944  { (char *)"OperatingPointVector_resize", _wrap_OperatingPointVector_resize, METH_VARARGS, NULL},
85945  { (char *)"OperatingPointVector_swap", _wrap_OperatingPointVector_swap, METH_VARARGS, NULL},
85946  { (char *)"delete_OperatingPointVector", _wrap_delete_OperatingPointVector, METH_VARARGS, NULL},
85947  { (char *)"OperatingPointVector_swigregister", OperatingPointVector_swigregister, METH_VARARGS, NULL},
85948  { (char *)"new_InvertedListsPtrVector", _wrap_new_InvertedListsPtrVector, METH_VARARGS, NULL},
85949  { (char *)"InvertedListsPtrVector_push_back", _wrap_InvertedListsPtrVector_push_back, METH_VARARGS, NULL},
85950  { (char *)"InvertedListsPtrVector_clear", _wrap_InvertedListsPtrVector_clear, METH_VARARGS, NULL},
85951  { (char *)"InvertedListsPtrVector_data", _wrap_InvertedListsPtrVector_data, METH_VARARGS, NULL},
85952  { (char *)"InvertedListsPtrVector_size", _wrap_InvertedListsPtrVector_size, METH_VARARGS, NULL},
85953  { (char *)"InvertedListsPtrVector_at", _wrap_InvertedListsPtrVector_at, METH_VARARGS, NULL},
85954  { (char *)"InvertedListsPtrVector_resize", _wrap_InvertedListsPtrVector_resize, METH_VARARGS, NULL},
85955  { (char *)"InvertedListsPtrVector_swap", _wrap_InvertedListsPtrVector_swap, METH_VARARGS, NULL},
85956  { (char *)"delete_InvertedListsPtrVector", _wrap_delete_InvertedListsPtrVector, METH_VARARGS, NULL},
85957  { (char *)"InvertedListsPtrVector_swigregister", InvertedListsPtrVector_swigregister, METH_VARARGS, NULL},
85958  { (char *)"new_FloatVectorVector", _wrap_new_FloatVectorVector, METH_VARARGS, NULL},
85959  { (char *)"FloatVectorVector_push_back", _wrap_FloatVectorVector_push_back, METH_VARARGS, NULL},
85960  { (char *)"FloatVectorVector_clear", _wrap_FloatVectorVector_clear, METH_VARARGS, NULL},
85961  { (char *)"FloatVectorVector_data", _wrap_FloatVectorVector_data, METH_VARARGS, NULL},
85962  { (char *)"FloatVectorVector_size", _wrap_FloatVectorVector_size, METH_VARARGS, NULL},
85963  { (char *)"FloatVectorVector_at", _wrap_FloatVectorVector_at, METH_VARARGS, NULL},
85964  { (char *)"FloatVectorVector_resize", _wrap_FloatVectorVector_resize, METH_VARARGS, NULL},
85965  { (char *)"FloatVectorVector_swap", _wrap_FloatVectorVector_swap, METH_VARARGS, NULL},
85966  { (char *)"delete_FloatVectorVector", _wrap_delete_FloatVectorVector, METH_VARARGS, NULL},
85967  { (char *)"FloatVectorVector_swigregister", FloatVectorVector_swigregister, METH_VARARGS, NULL},
85968  { (char *)"new_ByteVectorVector", _wrap_new_ByteVectorVector, METH_VARARGS, NULL},
85969  { (char *)"ByteVectorVector_push_back", _wrap_ByteVectorVector_push_back, METH_VARARGS, NULL},
85970  { (char *)"ByteVectorVector_clear", _wrap_ByteVectorVector_clear, METH_VARARGS, NULL},
85971  { (char *)"ByteVectorVector_data", _wrap_ByteVectorVector_data, METH_VARARGS, NULL},
85972  { (char *)"ByteVectorVector_size", _wrap_ByteVectorVector_size, METH_VARARGS, NULL},
85973  { (char *)"ByteVectorVector_at", _wrap_ByteVectorVector_at, METH_VARARGS, NULL},
85974  { (char *)"ByteVectorVector_resize", _wrap_ByteVectorVector_resize, METH_VARARGS, NULL},
85975  { (char *)"ByteVectorVector_swap", _wrap_ByteVectorVector_swap, METH_VARARGS, NULL},
85976  { (char *)"delete_ByteVectorVector", _wrap_delete_ByteVectorVector, METH_VARARGS, NULL},
85977  { (char *)"ByteVectorVector_swigregister", ByteVectorVector_swigregister, METH_VARARGS, NULL},
85978  { (char *)"new_LongVectorVector", _wrap_new_LongVectorVector, METH_VARARGS, NULL},
85979  { (char *)"LongVectorVector_push_back", _wrap_LongVectorVector_push_back, METH_VARARGS, NULL},
85980  { (char *)"LongVectorVector_clear", _wrap_LongVectorVector_clear, METH_VARARGS, NULL},
85981  { (char *)"LongVectorVector_data", _wrap_LongVectorVector_data, METH_VARARGS, NULL},
85982  { (char *)"LongVectorVector_size", _wrap_LongVectorVector_size, METH_VARARGS, NULL},
85983  { (char *)"LongVectorVector_at", _wrap_LongVectorVector_at, METH_VARARGS, NULL},
85984  { (char *)"LongVectorVector_resize", _wrap_LongVectorVector_resize, METH_VARARGS, NULL},
85985  { (char *)"LongVectorVector_swap", _wrap_LongVectorVector_swap, METH_VARARGS, NULL},
85986  { (char *)"delete_LongVectorVector", _wrap_delete_LongVectorVector, METH_VARARGS, NULL},
85987  { (char *)"LongVectorVector_swigregister", LongVectorVector_swigregister, METH_VARARGS, NULL},
85988  { (char *)"new_GpuResourcesVector", _wrap_new_GpuResourcesVector, METH_VARARGS, NULL},
85989  { (char *)"GpuResourcesVector_push_back", _wrap_GpuResourcesVector_push_back, METH_VARARGS, NULL},
85990  { (char *)"GpuResourcesVector_clear", _wrap_GpuResourcesVector_clear, METH_VARARGS, NULL},
85991  { (char *)"GpuResourcesVector_data", _wrap_GpuResourcesVector_data, METH_VARARGS, NULL},
85992  { (char *)"GpuResourcesVector_size", _wrap_GpuResourcesVector_size, METH_VARARGS, NULL},
85993  { (char *)"GpuResourcesVector_at", _wrap_GpuResourcesVector_at, METH_VARARGS, NULL},
85994  { (char *)"GpuResourcesVector_resize", _wrap_GpuResourcesVector_resize, METH_VARARGS, NULL},
85995  { (char *)"GpuResourcesVector_swap", _wrap_GpuResourcesVector_swap, METH_VARARGS, NULL},
85996  { (char *)"delete_GpuResourcesVector", _wrap_delete_GpuResourcesVector, METH_VARARGS, NULL},
85997  { (char *)"GpuResourcesVector_swigregister", GpuResourcesVector_swigregister, METH_VARARGS, NULL},
85998  { (char *)"popcount64", _wrap_popcount64, METH_VARARGS, NULL},
85999  { (char *)"hammings", _wrap_hammings, METH_VARARGS, NULL},
86000  { (char *)"bitvec_print", _wrap_bitvec_print, METH_VARARGS, NULL},
86001  { (char *)"fvecs2bitvecs", _wrap_fvecs2bitvecs, METH_VARARGS, NULL},
86002  { (char *)"fvec2bitvec", _wrap_fvec2bitvec, METH_VARARGS, NULL},
86003  { (char *)"hammings_knn_hc", _wrap_hammings_knn_hc, METH_VARARGS, NULL},
86004  { (char *)"hammings_knn", _wrap_hammings_knn, METH_VARARGS, NULL},
86005  { (char *)"hammings_knn_mc", _wrap_hammings_knn_mc, METH_VARARGS, NULL},
86006  { (char *)"hamming_count_thres", _wrap_hamming_count_thres, METH_VARARGS, NULL},
86007  { (char *)"match_hamming_thres", _wrap_match_hamming_thres, METH_VARARGS, NULL},
86008  { (char *)"crosshamming_count_thres", _wrap_crosshamming_count_thres, METH_VARARGS, NULL},
86009  { (char *)"HammingComputer4_a0_set", _wrap_HammingComputer4_a0_set, METH_VARARGS, NULL},
86010  { (char *)"HammingComputer4_a0_get", _wrap_HammingComputer4_a0_get, METH_VARARGS, NULL},
86011  { (char *)"new_HammingComputer4", _wrap_new_HammingComputer4, METH_VARARGS, NULL},
86012  { (char *)"HammingComputer4_set", _wrap_HammingComputer4_set, METH_VARARGS, NULL},
86013  { (char *)"HammingComputer4_hamming", _wrap_HammingComputer4_hamming, METH_VARARGS, NULL},
86014  { (char *)"delete_HammingComputer4", _wrap_delete_HammingComputer4, METH_VARARGS, NULL},
86015  { (char *)"HammingComputer4_swigregister", HammingComputer4_swigregister, METH_VARARGS, NULL},
86016  { (char *)"HammingComputer8_a0_set", _wrap_HammingComputer8_a0_set, METH_VARARGS, NULL},
86017  { (char *)"HammingComputer8_a0_get", _wrap_HammingComputer8_a0_get, METH_VARARGS, NULL},
86018  { (char *)"new_HammingComputer8", _wrap_new_HammingComputer8, METH_VARARGS, NULL},
86019  { (char *)"HammingComputer8_set", _wrap_HammingComputer8_set, METH_VARARGS, NULL},
86020  { (char *)"HammingComputer8_hamming", _wrap_HammingComputer8_hamming, METH_VARARGS, NULL},
86021  { (char *)"delete_HammingComputer8", _wrap_delete_HammingComputer8, METH_VARARGS, NULL},
86022  { (char *)"HammingComputer8_swigregister", HammingComputer8_swigregister, METH_VARARGS, NULL},
86023  { (char *)"HammingComputer16_a0_set", _wrap_HammingComputer16_a0_set, METH_VARARGS, NULL},
86024  { (char *)"HammingComputer16_a0_get", _wrap_HammingComputer16_a0_get, METH_VARARGS, NULL},
86025  { (char *)"HammingComputer16_a1_set", _wrap_HammingComputer16_a1_set, METH_VARARGS, NULL},
86026  { (char *)"HammingComputer16_a1_get", _wrap_HammingComputer16_a1_get, METH_VARARGS, NULL},
86027  { (char *)"new_HammingComputer16", _wrap_new_HammingComputer16, METH_VARARGS, NULL},
86028  { (char *)"HammingComputer16_set", _wrap_HammingComputer16_set, METH_VARARGS, NULL},
86029  { (char *)"HammingComputer16_hamming", _wrap_HammingComputer16_hamming, METH_VARARGS, NULL},
86030  { (char *)"delete_HammingComputer16", _wrap_delete_HammingComputer16, METH_VARARGS, NULL},
86031  { (char *)"HammingComputer16_swigregister", HammingComputer16_swigregister, METH_VARARGS, NULL},
86032  { (char *)"HammingComputer20_a0_set", _wrap_HammingComputer20_a0_set, METH_VARARGS, NULL},
86033  { (char *)"HammingComputer20_a0_get", _wrap_HammingComputer20_a0_get, METH_VARARGS, NULL},
86034  { (char *)"HammingComputer20_a1_set", _wrap_HammingComputer20_a1_set, METH_VARARGS, NULL},
86035  { (char *)"HammingComputer20_a1_get", _wrap_HammingComputer20_a1_get, METH_VARARGS, NULL},
86036  { (char *)"HammingComputer20_a2_set", _wrap_HammingComputer20_a2_set, METH_VARARGS, NULL},
86037  { (char *)"HammingComputer20_a2_get", _wrap_HammingComputer20_a2_get, METH_VARARGS, NULL},
86038  { (char *)"new_HammingComputer20", _wrap_new_HammingComputer20, METH_VARARGS, NULL},
86039  { (char *)"HammingComputer20_set", _wrap_HammingComputer20_set, METH_VARARGS, NULL},
86040  { (char *)"HammingComputer20_hamming", _wrap_HammingComputer20_hamming, METH_VARARGS, NULL},
86041  { (char *)"delete_HammingComputer20", _wrap_delete_HammingComputer20, METH_VARARGS, NULL},
86042  { (char *)"HammingComputer20_swigregister", HammingComputer20_swigregister, METH_VARARGS, NULL},
86043  { (char *)"HammingComputer32_a0_set", _wrap_HammingComputer32_a0_set, METH_VARARGS, NULL},
86044  { (char *)"HammingComputer32_a0_get", _wrap_HammingComputer32_a0_get, METH_VARARGS, NULL},
86045  { (char *)"HammingComputer32_a1_set", _wrap_HammingComputer32_a1_set, METH_VARARGS, NULL},
86046  { (char *)"HammingComputer32_a1_get", _wrap_HammingComputer32_a1_get, METH_VARARGS, NULL},
86047  { (char *)"HammingComputer32_a2_set", _wrap_HammingComputer32_a2_set, METH_VARARGS, NULL},
86048  { (char *)"HammingComputer32_a2_get", _wrap_HammingComputer32_a2_get, METH_VARARGS, NULL},
86049  { (char *)"HammingComputer32_a3_set", _wrap_HammingComputer32_a3_set, METH_VARARGS, NULL},
86050  { (char *)"HammingComputer32_a3_get", _wrap_HammingComputer32_a3_get, METH_VARARGS, NULL},
86051  { (char *)"new_HammingComputer32", _wrap_new_HammingComputer32, METH_VARARGS, NULL},
86052  { (char *)"HammingComputer32_set", _wrap_HammingComputer32_set, METH_VARARGS, NULL},
86053  { (char *)"HammingComputer32_hamming", _wrap_HammingComputer32_hamming, METH_VARARGS, NULL},
86054  { (char *)"delete_HammingComputer32", _wrap_delete_HammingComputer32, METH_VARARGS, NULL},
86055  { (char *)"HammingComputer32_swigregister", HammingComputer32_swigregister, METH_VARARGS, NULL},
86056  { (char *)"HammingComputer64_a0_set", _wrap_HammingComputer64_a0_set, METH_VARARGS, NULL},
86057  { (char *)"HammingComputer64_a0_get", _wrap_HammingComputer64_a0_get, METH_VARARGS, NULL},
86058  { (char *)"HammingComputer64_a1_set", _wrap_HammingComputer64_a1_set, METH_VARARGS, NULL},
86059  { (char *)"HammingComputer64_a1_get", _wrap_HammingComputer64_a1_get, METH_VARARGS, NULL},
86060  { (char *)"HammingComputer64_a2_set", _wrap_HammingComputer64_a2_set, METH_VARARGS, NULL},
86061  { (char *)"HammingComputer64_a2_get", _wrap_HammingComputer64_a2_get, METH_VARARGS, NULL},
86062  { (char *)"HammingComputer64_a3_set", _wrap_HammingComputer64_a3_set, METH_VARARGS, NULL},
86063  { (char *)"HammingComputer64_a3_get", _wrap_HammingComputer64_a3_get, METH_VARARGS, NULL},
86064  { (char *)"HammingComputer64_a4_set", _wrap_HammingComputer64_a4_set, METH_VARARGS, NULL},
86065  { (char *)"HammingComputer64_a4_get", _wrap_HammingComputer64_a4_get, METH_VARARGS, NULL},
86066  { (char *)"HammingComputer64_a5_set", _wrap_HammingComputer64_a5_set, METH_VARARGS, NULL},
86067  { (char *)"HammingComputer64_a5_get", _wrap_HammingComputer64_a5_get, METH_VARARGS, NULL},
86068  { (char *)"HammingComputer64_a6_set", _wrap_HammingComputer64_a6_set, METH_VARARGS, NULL},
86069  { (char *)"HammingComputer64_a6_get", _wrap_HammingComputer64_a6_get, METH_VARARGS, NULL},
86070  { (char *)"HammingComputer64_a7_set", _wrap_HammingComputer64_a7_set, METH_VARARGS, NULL},
86071  { (char *)"HammingComputer64_a7_get", _wrap_HammingComputer64_a7_get, METH_VARARGS, NULL},
86072  { (char *)"new_HammingComputer64", _wrap_new_HammingComputer64, METH_VARARGS, NULL},
86073  { (char *)"HammingComputer64_set", _wrap_HammingComputer64_set, METH_VARARGS, NULL},
86074  { (char *)"HammingComputer64_hamming", _wrap_HammingComputer64_hamming, METH_VARARGS, NULL},
86075  { (char *)"delete_HammingComputer64", _wrap_delete_HammingComputer64, METH_VARARGS, NULL},
86076  { (char *)"HammingComputer64_swigregister", HammingComputer64_swigregister, METH_VARARGS, NULL},
86077  { (char *)"HammingComputerDefault_a_set", _wrap_HammingComputerDefault_a_set, METH_VARARGS, NULL},
86078  { (char *)"HammingComputerDefault_a_get", _wrap_HammingComputerDefault_a_get, METH_VARARGS, NULL},
86079  { (char *)"HammingComputerDefault_n_set", _wrap_HammingComputerDefault_n_set, METH_VARARGS, NULL},
86080  { (char *)"HammingComputerDefault_n_get", _wrap_HammingComputerDefault_n_get, METH_VARARGS, NULL},
86081  { (char *)"new_HammingComputerDefault", _wrap_new_HammingComputerDefault, METH_VARARGS, NULL},
86082  { (char *)"HammingComputerDefault_set", _wrap_HammingComputerDefault_set, METH_VARARGS, NULL},
86083  { (char *)"HammingComputerDefault_hamming", _wrap_HammingComputerDefault_hamming, METH_VARARGS, NULL},
86084  { (char *)"delete_HammingComputerDefault", _wrap_delete_HammingComputerDefault, METH_VARARGS, NULL},
86085  { (char *)"HammingComputerDefault_swigregister", HammingComputerDefault_swigregister, METH_VARARGS, NULL},
86086  { (char *)"HammingComputerM8_a_set", _wrap_HammingComputerM8_a_set, METH_VARARGS, NULL},
86087  { (char *)"HammingComputerM8_a_get", _wrap_HammingComputerM8_a_get, METH_VARARGS, NULL},
86088  { (char *)"HammingComputerM8_n_set", _wrap_HammingComputerM8_n_set, METH_VARARGS, NULL},
86089  { (char *)"HammingComputerM8_n_get", _wrap_HammingComputerM8_n_get, METH_VARARGS, NULL},
86090  { (char *)"new_HammingComputerM8", _wrap_new_HammingComputerM8, METH_VARARGS, NULL},
86091  { (char *)"HammingComputerM8_set", _wrap_HammingComputerM8_set, METH_VARARGS, NULL},
86092  { (char *)"HammingComputerM8_hamming", _wrap_HammingComputerM8_hamming, METH_VARARGS, NULL},
86093  { (char *)"delete_HammingComputerM8", _wrap_delete_HammingComputerM8, METH_VARARGS, NULL},
86094  { (char *)"HammingComputerM8_swigregister", HammingComputerM8_swigregister, METH_VARARGS, NULL},
86095  { (char *)"HammingComputerM4_a_set", _wrap_HammingComputerM4_a_set, METH_VARARGS, NULL},
86096  { (char *)"HammingComputerM4_a_get", _wrap_HammingComputerM4_a_get, METH_VARARGS, NULL},
86097  { (char *)"HammingComputerM4_n_set", _wrap_HammingComputerM4_n_set, METH_VARARGS, NULL},
86098  { (char *)"HammingComputerM4_n_get", _wrap_HammingComputerM4_n_get, METH_VARARGS, NULL},
86099  { (char *)"new_HammingComputerM4", _wrap_new_HammingComputerM4, METH_VARARGS, NULL},
86100  { (char *)"HammingComputerM4_set", _wrap_HammingComputerM4_set, METH_VARARGS, NULL},
86101  { (char *)"HammingComputerM4_hamming", _wrap_HammingComputerM4_hamming, METH_VARARGS, NULL},
86102  { (char *)"delete_HammingComputerM4", _wrap_delete_HammingComputerM4, METH_VARARGS, NULL},
86103  { (char *)"HammingComputerM4_swigregister", HammingComputerM4_swigregister, METH_VARARGS, NULL},
86104  { (char *)"generalized_hamming_64", _wrap_generalized_hamming_64, METH_VARARGS, NULL},
86105  { (char *)"GenHammingComputer8_a0_set", _wrap_GenHammingComputer8_a0_set, METH_VARARGS, NULL},
86106  { (char *)"GenHammingComputer8_a0_get", _wrap_GenHammingComputer8_a0_get, METH_VARARGS, NULL},
86107  { (char *)"new_GenHammingComputer8", _wrap_new_GenHammingComputer8, METH_VARARGS, NULL},
86108  { (char *)"GenHammingComputer8_hamming", _wrap_GenHammingComputer8_hamming, METH_VARARGS, NULL},
86109  { (char *)"delete_GenHammingComputer8", _wrap_delete_GenHammingComputer8, METH_VARARGS, NULL},
86110  { (char *)"GenHammingComputer8_swigregister", GenHammingComputer8_swigregister, METH_VARARGS, NULL},
86111  { (char *)"GenHammingComputer16_a0_set", _wrap_GenHammingComputer16_a0_set, METH_VARARGS, NULL},
86112  { (char *)"GenHammingComputer16_a0_get", _wrap_GenHammingComputer16_a0_get, METH_VARARGS, NULL},
86113  { (char *)"GenHammingComputer16_a1_set", _wrap_GenHammingComputer16_a1_set, METH_VARARGS, NULL},
86114  { (char *)"GenHammingComputer16_a1_get", _wrap_GenHammingComputer16_a1_get, METH_VARARGS, NULL},
86115  { (char *)"new_GenHammingComputer16", _wrap_new_GenHammingComputer16, METH_VARARGS, NULL},
86116  { (char *)"GenHammingComputer16_hamming", _wrap_GenHammingComputer16_hamming, METH_VARARGS, NULL},
86117  { (char *)"delete_GenHammingComputer16", _wrap_delete_GenHammingComputer16, METH_VARARGS, NULL},
86118  { (char *)"GenHammingComputer16_swigregister", GenHammingComputer16_swigregister, METH_VARARGS, NULL},
86119  { (char *)"GenHammingComputer32_a0_set", _wrap_GenHammingComputer32_a0_set, METH_VARARGS, NULL},
86120  { (char *)"GenHammingComputer32_a0_get", _wrap_GenHammingComputer32_a0_get, METH_VARARGS, NULL},
86121  { (char *)"GenHammingComputer32_a1_set", _wrap_GenHammingComputer32_a1_set, METH_VARARGS, NULL},
86122  { (char *)"GenHammingComputer32_a1_get", _wrap_GenHammingComputer32_a1_get, METH_VARARGS, NULL},
86123  { (char *)"GenHammingComputer32_a2_set", _wrap_GenHammingComputer32_a2_set, METH_VARARGS, NULL},
86124  { (char *)"GenHammingComputer32_a2_get", _wrap_GenHammingComputer32_a2_get, METH_VARARGS, NULL},
86125  { (char *)"GenHammingComputer32_a3_set", _wrap_GenHammingComputer32_a3_set, METH_VARARGS, NULL},
86126  { (char *)"GenHammingComputer32_a3_get", _wrap_GenHammingComputer32_a3_get, METH_VARARGS, NULL},
86127  { (char *)"new_GenHammingComputer32", _wrap_new_GenHammingComputer32, METH_VARARGS, NULL},
86128  { (char *)"GenHammingComputer32_hamming", _wrap_GenHammingComputer32_hamming, METH_VARARGS, NULL},
86129  { (char *)"delete_GenHammingComputer32", _wrap_delete_GenHammingComputer32, METH_VARARGS, NULL},
86130  { (char *)"GenHammingComputer32_swigregister", GenHammingComputer32_swigregister, METH_VARARGS, NULL},
86131  { (char *)"GenHammingComputerM8_a_set", _wrap_GenHammingComputerM8_a_set, METH_VARARGS, NULL},
86132  { (char *)"GenHammingComputerM8_a_get", _wrap_GenHammingComputerM8_a_get, METH_VARARGS, NULL},
86133  { (char *)"GenHammingComputerM8_n_set", _wrap_GenHammingComputerM8_n_set, METH_VARARGS, NULL},
86134  { (char *)"GenHammingComputerM8_n_get", _wrap_GenHammingComputerM8_n_get, METH_VARARGS, NULL},
86135  { (char *)"new_GenHammingComputerM8", _wrap_new_GenHammingComputerM8, METH_VARARGS, NULL},
86136  { (char *)"GenHammingComputerM8_hamming", _wrap_GenHammingComputerM8_hamming, METH_VARARGS, NULL},
86137  { (char *)"delete_GenHammingComputerM8", _wrap_delete_GenHammingComputerM8, METH_VARARGS, NULL},
86138  { (char *)"GenHammingComputerM8_swigregister", GenHammingComputerM8_swigregister, METH_VARARGS, NULL},
86139  { (char *)"generalized_hammings_knn_hc", _wrap_generalized_hammings_knn_hc, METH_VARARGS, NULL},
86140  { (char *)"get_num_gpus", _wrap_get_num_gpus, METH_VARARGS, NULL},
86141  { (char *)"delete_GpuResources", _wrap_delete_GpuResources, METH_VARARGS, NULL},
86142  { (char *)"GpuResources_initializeForDevice", _wrap_GpuResources_initializeForDevice, METH_VARARGS, NULL},
86143  { (char *)"GpuResources_getBlasHandle", _wrap_GpuResources_getBlasHandle, METH_VARARGS, NULL},
86144  { (char *)"GpuResources_getDefaultStream", _wrap_GpuResources_getDefaultStream, METH_VARARGS, NULL},
86145  { (char *)"GpuResources_getAlternateStreams", _wrap_GpuResources_getAlternateStreams, METH_VARARGS, NULL},
86146  { (char *)"GpuResources_getPinnedMemory", _wrap_GpuResources_getPinnedMemory, METH_VARARGS, NULL},
86147  { (char *)"GpuResources_getAsyncCopyStream", _wrap_GpuResources_getAsyncCopyStream, METH_VARARGS, NULL},
86148  { (char *)"GpuResources_getBlasHandleCurrentDevice", _wrap_GpuResources_getBlasHandleCurrentDevice, METH_VARARGS, NULL},
86149  { (char *)"GpuResources_getDefaultStreamCurrentDevice", _wrap_GpuResources_getDefaultStreamCurrentDevice, METH_VARARGS, NULL},
86150  { (char *)"GpuResources_syncDefaultStream", _wrap_GpuResources_syncDefaultStream, METH_VARARGS, NULL},
86151  { (char *)"GpuResources_syncDefaultStreamCurrentDevice", _wrap_GpuResources_syncDefaultStreamCurrentDevice, METH_VARARGS, NULL},
86152  { (char *)"GpuResources_getAlternateStreamsCurrentDevice", _wrap_GpuResources_getAlternateStreamsCurrentDevice, METH_VARARGS, NULL},
86153  { (char *)"GpuResources_getAsyncCopyStreamCurrentDevice", _wrap_GpuResources_getAsyncCopyStreamCurrentDevice, METH_VARARGS, NULL},
86154  { (char *)"GpuResources_swigregister", GpuResources_swigregister, METH_VARARGS, NULL},
86155  { (char *)"new_StandardGpuResources", _wrap_new_StandardGpuResources, METH_VARARGS, NULL},
86156  { (char *)"delete_StandardGpuResources", _wrap_delete_StandardGpuResources, METH_VARARGS, NULL},
86157  { (char *)"StandardGpuResources_noTempMemory", _wrap_StandardGpuResources_noTempMemory, METH_VARARGS, NULL},
86158  { (char *)"StandardGpuResources_setTempMemory", _wrap_StandardGpuResources_setTempMemory, METH_VARARGS, NULL},
86159  { (char *)"StandardGpuResources_setTempMemoryFraction", _wrap_StandardGpuResources_setTempMemoryFraction, METH_VARARGS, NULL},
86160  { (char *)"StandardGpuResources_setPinnedMemory", _wrap_StandardGpuResources_setPinnedMemory, METH_VARARGS, NULL},
86161  { (char *)"StandardGpuResources_setDefaultStream", _wrap_StandardGpuResources_setDefaultStream, METH_VARARGS, NULL},
86162  { (char *)"StandardGpuResources_setDefaultNullStreamAllDevices", _wrap_StandardGpuResources_setDefaultNullStreamAllDevices, METH_VARARGS, NULL},
86163  { (char *)"StandardGpuResources_setCudaMallocWarning", _wrap_StandardGpuResources_setCudaMallocWarning, METH_VARARGS, NULL},
86164  { (char *)"StandardGpuResources_initializeForDevice", _wrap_StandardGpuResources_initializeForDevice, METH_VARARGS, NULL},
86165  { (char *)"StandardGpuResources_getBlasHandle", _wrap_StandardGpuResources_getBlasHandle, METH_VARARGS, NULL},
86166  { (char *)"StandardGpuResources_getDefaultStream", _wrap_StandardGpuResources_getDefaultStream, METH_VARARGS, NULL},
86167  { (char *)"StandardGpuResources_getAlternateStreams", _wrap_StandardGpuResources_getAlternateStreams, METH_VARARGS, NULL},
86168  { (char *)"StandardGpuResources_getPinnedMemory", _wrap_StandardGpuResources_getPinnedMemory, METH_VARARGS, NULL},
86169  { (char *)"StandardGpuResources_getAsyncCopyStream", _wrap_StandardGpuResources_getAsyncCopyStream, METH_VARARGS, NULL},
86170  { (char *)"StandardGpuResources_swigregister", StandardGpuResources_swigregister, METH_VARARGS, NULL},
86171  { (char *)"getmillisecs", _wrap_getmillisecs, METH_VARARGS, NULL},
86172  { (char *)"get_mem_usage_kb", _wrap_get_mem_usage_kb, METH_VARARGS, NULL},
86173  { (char *)"RandomGenerator_mt_set", _wrap_RandomGenerator_mt_set, METH_VARARGS, NULL},
86174  { (char *)"RandomGenerator_mt_get", _wrap_RandomGenerator_mt_get, METH_VARARGS, NULL},
86175  { (char *)"RandomGenerator_rand_long", _wrap_RandomGenerator_rand_long, METH_VARARGS, NULL},
86176  { (char *)"RandomGenerator_rand_int", _wrap_RandomGenerator_rand_int, METH_VARARGS, NULL},
86177  { (char *)"RandomGenerator_rand_float", _wrap_RandomGenerator_rand_float, METH_VARARGS, NULL},
86178  { (char *)"RandomGenerator_rand_double", _wrap_RandomGenerator_rand_double, METH_VARARGS, NULL},
86179  { (char *)"new_RandomGenerator", _wrap_new_RandomGenerator, METH_VARARGS, NULL},
86180  { (char *)"delete_RandomGenerator", _wrap_delete_RandomGenerator, METH_VARARGS, NULL},
86181  { (char *)"RandomGenerator_swigregister", RandomGenerator_swigregister, METH_VARARGS, NULL},
86182  { (char *)"float_rand", _wrap_float_rand, METH_VARARGS, NULL},
86183  { (char *)"float_randn", _wrap_float_randn, METH_VARARGS, NULL},
86184  { (char *)"long_rand", _wrap_long_rand, METH_VARARGS, NULL},
86185  { (char *)"byte_rand", _wrap_byte_rand, METH_VARARGS, NULL},
86186  { (char *)"rand_perm", _wrap_rand_perm, METH_VARARGS, NULL},
86187  { (char *)"fvec_L2sqr", _wrap_fvec_L2sqr, METH_VARARGS, NULL},
86188  { (char *)"fvec_inner_product", _wrap_fvec_inner_product, METH_VARARGS, NULL},
86189  { (char *)"imbalance_factor", _wrap_imbalance_factor, METH_VARARGS, NULL},
86190  { (char *)"pairwise_L2sqr", _wrap_pairwise_L2sqr, METH_VARARGS, NULL},
86191  { (char *)"fvec_inner_products_ny", _wrap_fvec_inner_products_ny, METH_VARARGS, NULL},
86192  { (char *)"fvec_L2sqr_ny", _wrap_fvec_L2sqr_ny, METH_VARARGS, NULL},
86193  { (char *)"fvec_norm_L2sqr", _wrap_fvec_norm_L2sqr, METH_VARARGS, NULL},
86194  { (char *)"fvec_norms_L2", _wrap_fvec_norms_L2, METH_VARARGS, NULL},
86195  { (char *)"fvec_norms_L2sqr", _wrap_fvec_norms_L2sqr, METH_VARARGS, NULL},
86196  { (char *)"fvec_renorm_L2", _wrap_fvec_renorm_L2, METH_VARARGS, NULL},
86197  { (char *)"inner_product_to_L2sqr", _wrap_inner_product_to_L2sqr, METH_VARARGS, NULL},
86198  { (char *)"fvec_inner_products_by_idx", _wrap_fvec_inner_products_by_idx, METH_VARARGS, NULL},
86199  { (char *)"fvec_L2sqr_by_idx", _wrap_fvec_L2sqr_by_idx, METH_VARARGS, NULL},
86200  { (char *)"knn_inner_product", _wrap_knn_inner_product, METH_VARARGS, NULL},
86201  { (char *)"knn_L2sqr", _wrap_knn_L2sqr, METH_VARARGS, NULL},
86202  { (char *)"knn_L2sqr_base_shift", _wrap_knn_L2sqr_base_shift, METH_VARARGS, NULL},
86203  { (char *)"knn_inner_products_by_idx", _wrap_knn_inner_products_by_idx, METH_VARARGS, NULL},
86204  { (char *)"knn_L2sqr_by_idx", _wrap_knn_L2sqr_by_idx, METH_VARARGS, NULL},
86205  { (char *)"range_search_L2sqr", _wrap_range_search_L2sqr, METH_VARARGS, NULL},
86206  { (char *)"range_search_inner_product", _wrap_range_search_inner_product, METH_VARARGS, NULL},
86207  { (char *)"fvec_madd", _wrap_fvec_madd, METH_VARARGS, NULL},
86208  { (char *)"fvec_madd_and_argmin", _wrap_fvec_madd_and_argmin, METH_VARARGS, NULL},
86209  { (char *)"reflection", _wrap_reflection, METH_VARARGS, NULL},
86210  { (char *)"km_update_centroids", _wrap_km_update_centroids, METH_VARARGS, NULL},
86211  { (char *)"matrix_qr", _wrap_matrix_qr, METH_VARARGS, NULL},
86212  { (char *)"ranklist_handle_ties", _wrap_ranklist_handle_ties, METH_VARARGS, NULL},
86213  { (char *)"ranklist_intersection_size", _wrap_ranklist_intersection_size, METH_VARARGS, NULL},
86214  { (char *)"merge_result_table_with", _wrap_merge_result_table_with, METH_VARARGS, NULL},
86215  { (char *)"fvec_argsort", _wrap_fvec_argsort, METH_VARARGS, NULL},
86216  { (char *)"fvec_argsort_parallel", _wrap_fvec_argsort_parallel, METH_VARARGS, NULL},
86217  { (char *)"ivec_hist", _wrap_ivec_hist, METH_VARARGS, NULL},
86218  { (char *)"bincode_hist", _wrap_bincode_hist, METH_VARARGS, NULL},
86219  { (char *)"ivec_checksum", _wrap_ivec_checksum, METH_VARARGS, NULL},
86220  { (char *)"fvecs_maybe_subsample", _wrap_fvecs_maybe_subsample, METH_VARARGS, NULL},
86221  { (char *)"binary_to_real", _wrap_binary_to_real, METH_VARARGS, NULL},
86222  { (char *)"real_to_binary", _wrap_real_to_binary, METH_VARARGS, NULL},
86223  { (char *)"Index_d_set", _wrap_Index_d_set, METH_VARARGS, NULL},
86224  { (char *)"Index_d_get", _wrap_Index_d_get, METH_VARARGS, NULL},
86225  { (char *)"Index_ntotal_set", _wrap_Index_ntotal_set, METH_VARARGS, NULL},
86226  { (char *)"Index_ntotal_get", _wrap_Index_ntotal_get, METH_VARARGS, NULL},
86227  { (char *)"Index_verbose_set", _wrap_Index_verbose_set, METH_VARARGS, NULL},
86228  { (char *)"Index_verbose_get", _wrap_Index_verbose_get, METH_VARARGS, NULL},
86229  { (char *)"Index_is_trained_set", _wrap_Index_is_trained_set, METH_VARARGS, NULL},
86230  { (char *)"Index_is_trained_get", _wrap_Index_is_trained_get, METH_VARARGS, NULL},
86231  { (char *)"Index_metric_type_set", _wrap_Index_metric_type_set, METH_VARARGS, NULL},
86232  { (char *)"Index_metric_type_get", _wrap_Index_metric_type_get, METH_VARARGS, NULL},
86233  { (char *)"delete_Index", _wrap_delete_Index, METH_VARARGS, NULL},
86234  { (char *)"Index_train", _wrap_Index_train, METH_VARARGS, NULL},
86235  { (char *)"Index_add", _wrap_Index_add, METH_VARARGS, NULL},
86236  { (char *)"Index_add_with_ids", _wrap_Index_add_with_ids, METH_VARARGS, NULL},
86237  { (char *)"Index_search", _wrap_Index_search, METH_VARARGS, NULL},
86238  { (char *)"Index_range_search", _wrap_Index_range_search, METH_VARARGS, NULL},
86239  { (char *)"Index_assign", _wrap_Index_assign, METH_VARARGS, NULL},
86240  { (char *)"Index_reset", _wrap_Index_reset, METH_VARARGS, NULL},
86241  { (char *)"Index_remove_ids", _wrap_Index_remove_ids, METH_VARARGS, NULL},
86242  { (char *)"Index_reconstruct", _wrap_Index_reconstruct, METH_VARARGS, NULL},
86243  { (char *)"Index_reconstruct_n", _wrap_Index_reconstruct_n, METH_VARARGS, NULL},
86244  { (char *)"Index_search_and_reconstruct", _wrap_Index_search_and_reconstruct, METH_VARARGS, NULL},
86245  { (char *)"Index_compute_residual", _wrap_Index_compute_residual, METH_VARARGS, NULL},
86246  { (char *)"Index_display", _wrap_Index_display, METH_VARARGS, NULL},
86247  { (char *)"Index_swigregister", Index_swigregister, METH_VARARGS, NULL},
86248  { (char *)"ClusteringParameters_niter_set", _wrap_ClusteringParameters_niter_set, METH_VARARGS, NULL},
86249  { (char *)"ClusteringParameters_niter_get", _wrap_ClusteringParameters_niter_get, METH_VARARGS, NULL},
86250  { (char *)"ClusteringParameters_nredo_set", _wrap_ClusteringParameters_nredo_set, METH_VARARGS, NULL},
86251  { (char *)"ClusteringParameters_nredo_get", _wrap_ClusteringParameters_nredo_get, METH_VARARGS, NULL},
86252  { (char *)"ClusteringParameters_verbose_set", _wrap_ClusteringParameters_verbose_set, METH_VARARGS, NULL},
86253  { (char *)"ClusteringParameters_verbose_get", _wrap_ClusteringParameters_verbose_get, METH_VARARGS, NULL},
86254  { (char *)"ClusteringParameters_spherical_set", _wrap_ClusteringParameters_spherical_set, METH_VARARGS, NULL},
86255  { (char *)"ClusteringParameters_spherical_get", _wrap_ClusteringParameters_spherical_get, METH_VARARGS, NULL},
86256  { (char *)"ClusteringParameters_update_index_set", _wrap_ClusteringParameters_update_index_set, METH_VARARGS, NULL},
86257  { (char *)"ClusteringParameters_update_index_get", _wrap_ClusteringParameters_update_index_get, METH_VARARGS, NULL},
86258  { (char *)"ClusteringParameters_frozen_centroids_set", _wrap_ClusteringParameters_frozen_centroids_set, METH_VARARGS, NULL},
86259  { (char *)"ClusteringParameters_frozen_centroids_get", _wrap_ClusteringParameters_frozen_centroids_get, METH_VARARGS, NULL},
86260  { (char *)"ClusteringParameters_min_points_per_centroid_set", _wrap_ClusteringParameters_min_points_per_centroid_set, METH_VARARGS, NULL},
86261  { (char *)"ClusteringParameters_min_points_per_centroid_get", _wrap_ClusteringParameters_min_points_per_centroid_get, METH_VARARGS, NULL},
86262  { (char *)"ClusteringParameters_max_points_per_centroid_set", _wrap_ClusteringParameters_max_points_per_centroid_set, METH_VARARGS, NULL},
86263  { (char *)"ClusteringParameters_max_points_per_centroid_get", _wrap_ClusteringParameters_max_points_per_centroid_get, METH_VARARGS, NULL},
86264  { (char *)"ClusteringParameters_seed_set", _wrap_ClusteringParameters_seed_set, METH_VARARGS, NULL},
86265  { (char *)"ClusteringParameters_seed_get", _wrap_ClusteringParameters_seed_get, METH_VARARGS, NULL},
86266  { (char *)"new_ClusteringParameters", _wrap_new_ClusteringParameters, METH_VARARGS, NULL},
86267  { (char *)"delete_ClusteringParameters", _wrap_delete_ClusteringParameters, METH_VARARGS, NULL},
86268  { (char *)"ClusteringParameters_swigregister", ClusteringParameters_swigregister, METH_VARARGS, NULL},
86269  { (char *)"Clustering_d_set", _wrap_Clustering_d_set, METH_VARARGS, NULL},
86270  { (char *)"Clustering_d_get", _wrap_Clustering_d_get, METH_VARARGS, NULL},
86271  { (char *)"Clustering_k_set", _wrap_Clustering_k_set, METH_VARARGS, NULL},
86272  { (char *)"Clustering_k_get", _wrap_Clustering_k_get, METH_VARARGS, NULL},
86273  { (char *)"Clustering_centroids_set", _wrap_Clustering_centroids_set, METH_VARARGS, NULL},
86274  { (char *)"Clustering_centroids_get", _wrap_Clustering_centroids_get, METH_VARARGS, NULL},
86275  { (char *)"Clustering_obj_set", _wrap_Clustering_obj_set, METH_VARARGS, NULL},
86276  { (char *)"Clustering_obj_get", _wrap_Clustering_obj_get, METH_VARARGS, NULL},
86277  { (char *)"new_Clustering", _wrap_new_Clustering, METH_VARARGS, NULL},
86278  { (char *)"Clustering_train", _wrap_Clustering_train, METH_VARARGS, NULL},
86279  { (char *)"delete_Clustering", _wrap_delete_Clustering, METH_VARARGS, NULL},
86280  { (char *)"Clustering_swigregister", Clustering_swigregister, METH_VARARGS, NULL},
86281  { (char *)"kmeans_clustering", _wrap_kmeans_clustering, METH_VARARGS, NULL},
86282  { (char *)"ProductQuantizer_d_set", _wrap_ProductQuantizer_d_set, METH_VARARGS, NULL},
86283  { (char *)"ProductQuantizer_d_get", _wrap_ProductQuantizer_d_get, METH_VARARGS, NULL},
86284  { (char *)"ProductQuantizer_M_set", _wrap_ProductQuantizer_M_set, METH_VARARGS, NULL},
86285  { (char *)"ProductQuantizer_M_get", _wrap_ProductQuantizer_M_get, METH_VARARGS, NULL},
86286  { (char *)"ProductQuantizer_nbits_set", _wrap_ProductQuantizer_nbits_set, METH_VARARGS, NULL},
86287  { (char *)"ProductQuantizer_nbits_get", _wrap_ProductQuantizer_nbits_get, METH_VARARGS, NULL},
86288  { (char *)"ProductQuantizer_dsub_set", _wrap_ProductQuantizer_dsub_set, METH_VARARGS, NULL},
86289  { (char *)"ProductQuantizer_dsub_get", _wrap_ProductQuantizer_dsub_get, METH_VARARGS, NULL},
86290  { (char *)"ProductQuantizer_byte_per_idx_set", _wrap_ProductQuantizer_byte_per_idx_set, METH_VARARGS, NULL},
86291  { (char *)"ProductQuantizer_byte_per_idx_get", _wrap_ProductQuantizer_byte_per_idx_get, METH_VARARGS, NULL},
86292  { (char *)"ProductQuantizer_code_size_set", _wrap_ProductQuantizer_code_size_set, METH_VARARGS, NULL},
86293  { (char *)"ProductQuantizer_code_size_get", _wrap_ProductQuantizer_code_size_get, METH_VARARGS, NULL},
86294  { (char *)"ProductQuantizer_ksub_set", _wrap_ProductQuantizer_ksub_set, METH_VARARGS, NULL},
86295  { (char *)"ProductQuantizer_ksub_get", _wrap_ProductQuantizer_ksub_get, METH_VARARGS, NULL},
86296  { (char *)"ProductQuantizer_verbose_set", _wrap_ProductQuantizer_verbose_set, METH_VARARGS, NULL},
86297  { (char *)"ProductQuantizer_verbose_get", _wrap_ProductQuantizer_verbose_get, METH_VARARGS, NULL},
86298  { (char *)"ProductQuantizer_train_type_set", _wrap_ProductQuantizer_train_type_set, METH_VARARGS, NULL},
86299  { (char *)"ProductQuantizer_train_type_get", _wrap_ProductQuantizer_train_type_get, METH_VARARGS, NULL},
86300  { (char *)"ProductQuantizer_cp_set", _wrap_ProductQuantizer_cp_set, METH_VARARGS, NULL},
86301  { (char *)"ProductQuantizer_cp_get", _wrap_ProductQuantizer_cp_get, METH_VARARGS, NULL},
86302  { (char *)"ProductQuantizer_assign_index_set", _wrap_ProductQuantizer_assign_index_set, METH_VARARGS, NULL},
86303  { (char *)"ProductQuantizer_assign_index_get", _wrap_ProductQuantizer_assign_index_get, METH_VARARGS, NULL},
86304  { (char *)"ProductQuantizer_centroids_set", _wrap_ProductQuantizer_centroids_set, METH_VARARGS, NULL},
86305  { (char *)"ProductQuantizer_centroids_get", _wrap_ProductQuantizer_centroids_get, METH_VARARGS, NULL},
86306  { (char *)"ProductQuantizer_get_centroids", _wrap_ProductQuantizer_get_centroids, METH_VARARGS, NULL},
86307  { (char *)"ProductQuantizer_train", _wrap_ProductQuantizer_train, METH_VARARGS, NULL},
86308  { (char *)"new_ProductQuantizer", _wrap_new_ProductQuantizer, METH_VARARGS, NULL},
86309  { (char *)"ProductQuantizer_set_derived_values", _wrap_ProductQuantizer_set_derived_values, METH_VARARGS, NULL},
86310  { (char *)"ProductQuantizer_set_params", _wrap_ProductQuantizer_set_params, METH_VARARGS, NULL},
86311  { (char *)"ProductQuantizer_compute_code", _wrap_ProductQuantizer_compute_code, METH_VARARGS, NULL},
86312  { (char *)"ProductQuantizer_compute_codes", _wrap_ProductQuantizer_compute_codes, METH_VARARGS, NULL},
86313  { (char *)"ProductQuantizer_decode", _wrap_ProductQuantizer_decode, METH_VARARGS, NULL},
86314  { (char *)"ProductQuantizer_compute_code_from_distance_table", _wrap_ProductQuantizer_compute_code_from_distance_table, METH_VARARGS, NULL},
86315  { (char *)"ProductQuantizer_compute_distance_table", _wrap_ProductQuantizer_compute_distance_table, METH_VARARGS, NULL},
86316  { (char *)"ProductQuantizer_compute_inner_prod_table", _wrap_ProductQuantizer_compute_inner_prod_table, METH_VARARGS, NULL},
86317  { (char *)"ProductQuantizer_compute_distance_tables", _wrap_ProductQuantizer_compute_distance_tables, METH_VARARGS, NULL},
86318  { (char *)"ProductQuantizer_compute_inner_prod_tables", _wrap_ProductQuantizer_compute_inner_prod_tables, METH_VARARGS, NULL},
86319  { (char *)"ProductQuantizer_search", _wrap_ProductQuantizer_search, METH_VARARGS, NULL},
86320  { (char *)"ProductQuantizer_search_ip", _wrap_ProductQuantizer_search_ip, METH_VARARGS, NULL},
86321  { (char *)"ProductQuantizer_sdc_table_set", _wrap_ProductQuantizer_sdc_table_set, METH_VARARGS, NULL},
86322  { (char *)"ProductQuantizer_sdc_table_get", _wrap_ProductQuantizer_sdc_table_get, METH_VARARGS, NULL},
86323  { (char *)"ProductQuantizer_compute_sdc_table", _wrap_ProductQuantizer_compute_sdc_table, METH_VARARGS, NULL},
86324  { (char *)"ProductQuantizer_search_sdc", _wrap_ProductQuantizer_search_sdc, METH_VARARGS, NULL},
86325  { (char *)"delete_ProductQuantizer", _wrap_delete_ProductQuantizer, METH_VARARGS, NULL},
86326  { (char *)"ProductQuantizer_swigregister", ProductQuantizer_swigregister, METH_VARARGS, NULL},
86327  { (char *)"VectorTransform_d_in_set", _wrap_VectorTransform_d_in_set, METH_VARARGS, NULL},
86328  { (char *)"VectorTransform_d_in_get", _wrap_VectorTransform_d_in_get, METH_VARARGS, NULL},
86329  { (char *)"VectorTransform_d_out_set", _wrap_VectorTransform_d_out_set, METH_VARARGS, NULL},
86330  { (char *)"VectorTransform_d_out_get", _wrap_VectorTransform_d_out_get, METH_VARARGS, NULL},
86331  { (char *)"VectorTransform_is_trained_set", _wrap_VectorTransform_is_trained_set, METH_VARARGS, NULL},
86332  { (char *)"VectorTransform_is_trained_get", _wrap_VectorTransform_is_trained_get, METH_VARARGS, NULL},
86333  { (char *)"VectorTransform_train", _wrap_VectorTransform_train, METH_VARARGS, NULL},
86334  { (char *)"VectorTransform_apply", _wrap_VectorTransform_apply, METH_VARARGS, NULL},
86335  { (char *)"VectorTransform_apply_noalloc", _wrap_VectorTransform_apply_noalloc, METH_VARARGS, NULL},
86336  { (char *)"VectorTransform_reverse_transform", _wrap_VectorTransform_reverse_transform, METH_VARARGS, NULL},
86337  { (char *)"delete_VectorTransform", _wrap_delete_VectorTransform, METH_VARARGS, NULL},
86338  { (char *)"VectorTransform_swigregister", VectorTransform_swigregister, METH_VARARGS, NULL},
86339  { (char *)"LinearTransform_have_bias_set", _wrap_LinearTransform_have_bias_set, METH_VARARGS, NULL},
86340  { (char *)"LinearTransform_have_bias_get", _wrap_LinearTransform_have_bias_get, METH_VARARGS, NULL},
86341  { (char *)"LinearTransform_is_orthonormal_set", _wrap_LinearTransform_is_orthonormal_set, METH_VARARGS, NULL},
86342  { (char *)"LinearTransform_is_orthonormal_get", _wrap_LinearTransform_is_orthonormal_get, METH_VARARGS, NULL},
86343  { (char *)"LinearTransform_A_set", _wrap_LinearTransform_A_set, METH_VARARGS, NULL},
86344  { (char *)"LinearTransform_A_get", _wrap_LinearTransform_A_get, METH_VARARGS, NULL},
86345  { (char *)"LinearTransform_b_set", _wrap_LinearTransform_b_set, METH_VARARGS, NULL},
86346  { (char *)"LinearTransform_b_get", _wrap_LinearTransform_b_get, METH_VARARGS, NULL},
86347  { (char *)"new_LinearTransform", _wrap_new_LinearTransform, METH_VARARGS, NULL},
86348  { (char *)"LinearTransform_apply_noalloc", _wrap_LinearTransform_apply_noalloc, METH_VARARGS, NULL},
86349  { (char *)"LinearTransform_transform_transpose", _wrap_LinearTransform_transform_transpose, METH_VARARGS, NULL},
86350  { (char *)"LinearTransform_reverse_transform", _wrap_LinearTransform_reverse_transform, METH_VARARGS, NULL},
86351  { (char *)"LinearTransform_set_is_orthonormal", _wrap_LinearTransform_set_is_orthonormal, METH_VARARGS, NULL},
86352  { (char *)"LinearTransform_verbose_set", _wrap_LinearTransform_verbose_set, METH_VARARGS, NULL},
86353  { (char *)"LinearTransform_verbose_get", _wrap_LinearTransform_verbose_get, METH_VARARGS, NULL},
86354  { (char *)"delete_LinearTransform", _wrap_delete_LinearTransform, METH_VARARGS, NULL},
86355  { (char *)"LinearTransform_swigregister", LinearTransform_swigregister, METH_VARARGS, NULL},
86356  { (char *)"RandomRotationMatrix_init", _wrap_RandomRotationMatrix_init, METH_VARARGS, NULL},
86357  { (char *)"RandomRotationMatrix_train", _wrap_RandomRotationMatrix_train, METH_VARARGS, NULL},
86358  { (char *)"new_RandomRotationMatrix", _wrap_new_RandomRotationMatrix, METH_VARARGS, NULL},
86359  { (char *)"delete_RandomRotationMatrix", _wrap_delete_RandomRotationMatrix, METH_VARARGS, NULL},
86360  { (char *)"RandomRotationMatrix_swigregister", RandomRotationMatrix_swigregister, METH_VARARGS, NULL},
86361  { (char *)"PCAMatrix_eigen_power_set", _wrap_PCAMatrix_eigen_power_set, METH_VARARGS, NULL},
86362  { (char *)"PCAMatrix_eigen_power_get", _wrap_PCAMatrix_eigen_power_get, METH_VARARGS, NULL},
86363  { (char *)"PCAMatrix_random_rotation_set", _wrap_PCAMatrix_random_rotation_set, METH_VARARGS, NULL},
86364  { (char *)"PCAMatrix_random_rotation_get", _wrap_PCAMatrix_random_rotation_get, METH_VARARGS, NULL},
86365  { (char *)"PCAMatrix_max_points_per_d_set", _wrap_PCAMatrix_max_points_per_d_set, METH_VARARGS, NULL},
86366  { (char *)"PCAMatrix_max_points_per_d_get", _wrap_PCAMatrix_max_points_per_d_get, METH_VARARGS, NULL},
86367  { (char *)"PCAMatrix_balanced_bins_set", _wrap_PCAMatrix_balanced_bins_set, METH_VARARGS, NULL},
86368  { (char *)"PCAMatrix_balanced_bins_get", _wrap_PCAMatrix_balanced_bins_get, METH_VARARGS, NULL},
86369  { (char *)"PCAMatrix_mean_set", _wrap_PCAMatrix_mean_set, METH_VARARGS, NULL},
86370  { (char *)"PCAMatrix_mean_get", _wrap_PCAMatrix_mean_get, METH_VARARGS, NULL},
86371  { (char *)"PCAMatrix_eigenvalues_set", _wrap_PCAMatrix_eigenvalues_set, METH_VARARGS, NULL},
86372  { (char *)"PCAMatrix_eigenvalues_get", _wrap_PCAMatrix_eigenvalues_get, METH_VARARGS, NULL},
86373  { (char *)"PCAMatrix_PCAMat_set", _wrap_PCAMatrix_PCAMat_set, METH_VARARGS, NULL},
86374  { (char *)"PCAMatrix_PCAMat_get", _wrap_PCAMatrix_PCAMat_get, METH_VARARGS, NULL},
86375  { (char *)"new_PCAMatrix", _wrap_new_PCAMatrix, METH_VARARGS, NULL},
86376  { (char *)"PCAMatrix_train", _wrap_PCAMatrix_train, METH_VARARGS, NULL},
86377  { (char *)"PCAMatrix_copy_from", _wrap_PCAMatrix_copy_from, METH_VARARGS, NULL},
86378  { (char *)"PCAMatrix_prepare_Ab", _wrap_PCAMatrix_prepare_Ab, METH_VARARGS, NULL},
86379  { (char *)"delete_PCAMatrix", _wrap_delete_PCAMatrix, METH_VARARGS, NULL},
86380  { (char *)"PCAMatrix_swigregister", PCAMatrix_swigregister, METH_VARARGS, NULL},
86381  { (char *)"OPQMatrix_M_set", _wrap_OPQMatrix_M_set, METH_VARARGS, NULL},
86382  { (char *)"OPQMatrix_M_get", _wrap_OPQMatrix_M_get, METH_VARARGS, NULL},
86383  { (char *)"OPQMatrix_niter_set", _wrap_OPQMatrix_niter_set, METH_VARARGS, NULL},
86384  { (char *)"OPQMatrix_niter_get", _wrap_OPQMatrix_niter_get, METH_VARARGS, NULL},
86385  { (char *)"OPQMatrix_niter_pq_set", _wrap_OPQMatrix_niter_pq_set, METH_VARARGS, NULL},
86386  { (char *)"OPQMatrix_niter_pq_get", _wrap_OPQMatrix_niter_pq_get, METH_VARARGS, NULL},
86387  { (char *)"OPQMatrix_niter_pq_0_set", _wrap_OPQMatrix_niter_pq_0_set, METH_VARARGS, NULL},
86388  { (char *)"OPQMatrix_niter_pq_0_get", _wrap_OPQMatrix_niter_pq_0_get, METH_VARARGS, NULL},
86389  { (char *)"OPQMatrix_max_train_points_set", _wrap_OPQMatrix_max_train_points_set, METH_VARARGS, NULL},
86390  { (char *)"OPQMatrix_max_train_points_get", _wrap_OPQMatrix_max_train_points_get, METH_VARARGS, NULL},
86391  { (char *)"OPQMatrix_verbose_set", _wrap_OPQMatrix_verbose_set, METH_VARARGS, NULL},
86392  { (char *)"OPQMatrix_verbose_get", _wrap_OPQMatrix_verbose_get, METH_VARARGS, NULL},
86393  { (char *)"OPQMatrix_pq_set", _wrap_OPQMatrix_pq_set, METH_VARARGS, NULL},
86394  { (char *)"OPQMatrix_pq_get", _wrap_OPQMatrix_pq_get, METH_VARARGS, NULL},
86395  { (char *)"new_OPQMatrix", _wrap_new_OPQMatrix, METH_VARARGS, NULL},
86396  { (char *)"OPQMatrix_train", _wrap_OPQMatrix_train, METH_VARARGS, NULL},
86397  { (char *)"delete_OPQMatrix", _wrap_delete_OPQMatrix, METH_VARARGS, NULL},
86398  { (char *)"OPQMatrix_swigregister", OPQMatrix_swigregister, METH_VARARGS, NULL},
86399  { (char *)"RemapDimensionsTransform_map_set", _wrap_RemapDimensionsTransform_map_set, METH_VARARGS, NULL},
86400  { (char *)"RemapDimensionsTransform_map_get", _wrap_RemapDimensionsTransform_map_get, METH_VARARGS, NULL},
86401  { (char *)"RemapDimensionsTransform_apply_noalloc", _wrap_RemapDimensionsTransform_apply_noalloc, METH_VARARGS, NULL},
86402  { (char *)"RemapDimensionsTransform_reverse_transform", _wrap_RemapDimensionsTransform_reverse_transform, METH_VARARGS, NULL},
86403  { (char *)"new_RemapDimensionsTransform", _wrap_new_RemapDimensionsTransform, METH_VARARGS, NULL},
86404  { (char *)"delete_RemapDimensionsTransform", _wrap_delete_RemapDimensionsTransform, METH_VARARGS, NULL},
86405  { (char *)"RemapDimensionsTransform_swigregister", RemapDimensionsTransform_swigregister, METH_VARARGS, NULL},
86406  { (char *)"NormalizationTransform_norm_set", _wrap_NormalizationTransform_norm_set, METH_VARARGS, NULL},
86407  { (char *)"NormalizationTransform_norm_get", _wrap_NormalizationTransform_norm_get, METH_VARARGS, NULL},
86408  { (char *)"new_NormalizationTransform", _wrap_new_NormalizationTransform, METH_VARARGS, NULL},
86409  { (char *)"NormalizationTransform_apply_noalloc", _wrap_NormalizationTransform_apply_noalloc, METH_VARARGS, NULL},
86410  { (char *)"NormalizationTransform_reverse_transform", _wrap_NormalizationTransform_reverse_transform, METH_VARARGS, NULL},
86411  { (char *)"delete_NormalizationTransform", _wrap_delete_NormalizationTransform, METH_VARARGS, NULL},
86412  { (char *)"NormalizationTransform_swigregister", NormalizationTransform_swigregister, METH_VARARGS, NULL},
86413  { (char *)"IndexPreTransform_chain_set", _wrap_IndexPreTransform_chain_set, METH_VARARGS, NULL},
86414  { (char *)"IndexPreTransform_chain_get", _wrap_IndexPreTransform_chain_get, METH_VARARGS, NULL},
86415  { (char *)"IndexPreTransform_index_set", _wrap_IndexPreTransform_index_set, METH_VARARGS, NULL},
86416  { (char *)"IndexPreTransform_index_get", _wrap_IndexPreTransform_index_get, METH_VARARGS, NULL},
86417  { (char *)"IndexPreTransform_own_fields_set", _wrap_IndexPreTransform_own_fields_set, METH_VARARGS, NULL},
86418  { (char *)"IndexPreTransform_own_fields_get", _wrap_IndexPreTransform_own_fields_get, METH_VARARGS, NULL},
86419  { (char *)"new_IndexPreTransform", _wrap_new_IndexPreTransform, METH_VARARGS, NULL},
86420  { (char *)"IndexPreTransform_prepend_transform", _wrap_IndexPreTransform_prepend_transform, METH_VARARGS, NULL},
86421  { (char *)"IndexPreTransform_train", _wrap_IndexPreTransform_train, METH_VARARGS, NULL},
86422  { (char *)"IndexPreTransform_add", _wrap_IndexPreTransform_add, METH_VARARGS, NULL},
86423  { (char *)"IndexPreTransform_add_with_ids", _wrap_IndexPreTransform_add_with_ids, METH_VARARGS, NULL},
86424  { (char *)"IndexPreTransform_reset", _wrap_IndexPreTransform_reset, METH_VARARGS, NULL},
86425  { (char *)"IndexPreTransform_remove_ids", _wrap_IndexPreTransform_remove_ids, METH_VARARGS, NULL},
86426  { (char *)"IndexPreTransform_search", _wrap_IndexPreTransform_search, METH_VARARGS, NULL},
86427  { (char *)"IndexPreTransform_reconstruct", _wrap_IndexPreTransform_reconstruct, METH_VARARGS, NULL},
86428  { (char *)"IndexPreTransform_reconstruct_n", _wrap_IndexPreTransform_reconstruct_n, METH_VARARGS, NULL},
86429  { (char *)"IndexPreTransform_search_and_reconstruct", _wrap_IndexPreTransform_search_and_reconstruct, METH_VARARGS, NULL},
86430  { (char *)"IndexPreTransform_apply_chain", _wrap_IndexPreTransform_apply_chain, METH_VARARGS, NULL},
86431  { (char *)"IndexPreTransform_reverse_chain", _wrap_IndexPreTransform_reverse_chain, METH_VARARGS, NULL},
86432  { (char *)"delete_IndexPreTransform", _wrap_delete_IndexPreTransform, METH_VARARGS, NULL},
86433  { (char *)"IndexPreTransform_swigregister", IndexPreTransform_swigregister, METH_VARARGS, NULL},
86434  { (char *)"IndexFlat_xb_set", _wrap_IndexFlat_xb_set, METH_VARARGS, NULL},
86435  { (char *)"IndexFlat_xb_get", _wrap_IndexFlat_xb_get, METH_VARARGS, NULL},
86436  { (char *)"IndexFlat_add", _wrap_IndexFlat_add, METH_VARARGS, NULL},
86437  { (char *)"IndexFlat_reset", _wrap_IndexFlat_reset, METH_VARARGS, NULL},
86438  { (char *)"IndexFlat_search", _wrap_IndexFlat_search, METH_VARARGS, NULL},
86439  { (char *)"IndexFlat_range_search", _wrap_IndexFlat_range_search, METH_VARARGS, NULL},
86440  { (char *)"IndexFlat_reconstruct", _wrap_IndexFlat_reconstruct, METH_VARARGS, NULL},
86441  { (char *)"IndexFlat_compute_distance_subset", _wrap_IndexFlat_compute_distance_subset, METH_VARARGS, NULL},
86442  { (char *)"IndexFlat_remove_ids", _wrap_IndexFlat_remove_ids, METH_VARARGS, NULL},
86443  { (char *)"new_IndexFlat", _wrap_new_IndexFlat, METH_VARARGS, NULL},
86444  { (char *)"delete_IndexFlat", _wrap_delete_IndexFlat, METH_VARARGS, NULL},
86445  { (char *)"IndexFlat_swigregister", IndexFlat_swigregister, METH_VARARGS, NULL},
86446  { (char *)"new_IndexFlatIP", _wrap_new_IndexFlatIP, METH_VARARGS, NULL},
86447  { (char *)"delete_IndexFlatIP", _wrap_delete_IndexFlatIP, METH_VARARGS, NULL},
86448  { (char *)"IndexFlatIP_swigregister", IndexFlatIP_swigregister, METH_VARARGS, NULL},
86449  { (char *)"new_IndexFlatL2", _wrap_new_IndexFlatL2, METH_VARARGS, NULL},
86450  { (char *)"delete_IndexFlatL2", _wrap_delete_IndexFlatL2, METH_VARARGS, NULL},
86451  { (char *)"IndexFlatL2_swigregister", IndexFlatL2_swigregister, METH_VARARGS, NULL},
86452  { (char *)"IndexFlatL2BaseShift_shift_set", _wrap_IndexFlatL2BaseShift_shift_set, METH_VARARGS, NULL},
86453  { (char *)"IndexFlatL2BaseShift_shift_get", _wrap_IndexFlatL2BaseShift_shift_get, METH_VARARGS, NULL},
86454  { (char *)"new_IndexFlatL2BaseShift", _wrap_new_IndexFlatL2BaseShift, METH_VARARGS, NULL},
86455  { (char *)"IndexFlatL2BaseShift_search", _wrap_IndexFlatL2BaseShift_search, METH_VARARGS, NULL},
86456  { (char *)"delete_IndexFlatL2BaseShift", _wrap_delete_IndexFlatL2BaseShift, METH_VARARGS, NULL},
86457  { (char *)"IndexFlatL2BaseShift_swigregister", IndexFlatL2BaseShift_swigregister, METH_VARARGS, NULL},
86458  { (char *)"IndexRefineFlat_refine_index_set", _wrap_IndexRefineFlat_refine_index_set, METH_VARARGS, NULL},
86459  { (char *)"IndexRefineFlat_refine_index_get", _wrap_IndexRefineFlat_refine_index_get, METH_VARARGS, NULL},
86460  { (char *)"IndexRefineFlat_base_index_set", _wrap_IndexRefineFlat_base_index_set, METH_VARARGS, NULL},
86461  { (char *)"IndexRefineFlat_base_index_get", _wrap_IndexRefineFlat_base_index_get, METH_VARARGS, NULL},
86462  { (char *)"IndexRefineFlat_own_fields_set", _wrap_IndexRefineFlat_own_fields_set, METH_VARARGS, NULL},
86463  { (char *)"IndexRefineFlat_own_fields_get", _wrap_IndexRefineFlat_own_fields_get, METH_VARARGS, NULL},
86464  { (char *)"IndexRefineFlat_k_factor_set", _wrap_IndexRefineFlat_k_factor_set, METH_VARARGS, NULL},
86465  { (char *)"IndexRefineFlat_k_factor_get", _wrap_IndexRefineFlat_k_factor_get, METH_VARARGS, NULL},
86466  { (char *)"new_IndexRefineFlat", _wrap_new_IndexRefineFlat, METH_VARARGS, NULL},
86467  { (char *)"IndexRefineFlat_train", _wrap_IndexRefineFlat_train, METH_VARARGS, NULL},
86468  { (char *)"IndexRefineFlat_add", _wrap_IndexRefineFlat_add, METH_VARARGS, NULL},
86469  { (char *)"IndexRefineFlat_reset", _wrap_IndexRefineFlat_reset, METH_VARARGS, NULL},
86470  { (char *)"IndexRefineFlat_search", _wrap_IndexRefineFlat_search, METH_VARARGS, NULL},
86471  { (char *)"delete_IndexRefineFlat", _wrap_delete_IndexRefineFlat, METH_VARARGS, NULL},
86472  { (char *)"IndexRefineFlat_swigregister", IndexRefineFlat_swigregister, METH_VARARGS, NULL},
86473  { (char *)"IndexFlat1D_continuous_update_set", _wrap_IndexFlat1D_continuous_update_set, METH_VARARGS, NULL},
86474  { (char *)"IndexFlat1D_continuous_update_get", _wrap_IndexFlat1D_continuous_update_get, METH_VARARGS, NULL},
86475  { (char *)"IndexFlat1D_perm_set", _wrap_IndexFlat1D_perm_set, METH_VARARGS, NULL},
86476  { (char *)"IndexFlat1D_perm_get", _wrap_IndexFlat1D_perm_get, METH_VARARGS, NULL},
86477  { (char *)"new_IndexFlat1D", _wrap_new_IndexFlat1D, METH_VARARGS, NULL},
86478  { (char *)"IndexFlat1D_update_permutation", _wrap_IndexFlat1D_update_permutation, METH_VARARGS, NULL},
86479  { (char *)"IndexFlat1D_add", _wrap_IndexFlat1D_add, METH_VARARGS, NULL},
86480  { (char *)"IndexFlat1D_reset", _wrap_IndexFlat1D_reset, METH_VARARGS, NULL},
86481  { (char *)"IndexFlat1D_search", _wrap_IndexFlat1D_search, METH_VARARGS, NULL},
86482  { (char *)"delete_IndexFlat1D", _wrap_delete_IndexFlat1D, METH_VARARGS, NULL},
86483  { (char *)"IndexFlat1D_swigregister", IndexFlat1D_swigregister, METH_VARARGS, NULL},
86484  { (char *)"IndexLSH_nbits_set", _wrap_IndexLSH_nbits_set, METH_VARARGS, NULL},
86485  { (char *)"IndexLSH_nbits_get", _wrap_IndexLSH_nbits_get, METH_VARARGS, NULL},
86486  { (char *)"IndexLSH_bytes_per_vec_set", _wrap_IndexLSH_bytes_per_vec_set, METH_VARARGS, NULL},
86487  { (char *)"IndexLSH_bytes_per_vec_get", _wrap_IndexLSH_bytes_per_vec_get, METH_VARARGS, NULL},
86488  { (char *)"IndexLSH_rotate_data_set", _wrap_IndexLSH_rotate_data_set, METH_VARARGS, NULL},
86489  { (char *)"IndexLSH_rotate_data_get", _wrap_IndexLSH_rotate_data_get, METH_VARARGS, NULL},
86490  { (char *)"IndexLSH_train_thresholds_set", _wrap_IndexLSH_train_thresholds_set, METH_VARARGS, NULL},
86491  { (char *)"IndexLSH_train_thresholds_get", _wrap_IndexLSH_train_thresholds_get, METH_VARARGS, NULL},
86492  { (char *)"IndexLSH_rrot_set", _wrap_IndexLSH_rrot_set, METH_VARARGS, NULL},
86493  { (char *)"IndexLSH_rrot_get", _wrap_IndexLSH_rrot_get, METH_VARARGS, NULL},
86494  { (char *)"IndexLSH_thresholds_set", _wrap_IndexLSH_thresholds_set, METH_VARARGS, NULL},
86495  { (char *)"IndexLSH_thresholds_get", _wrap_IndexLSH_thresholds_get, METH_VARARGS, NULL},
86496  { (char *)"IndexLSH_codes_set", _wrap_IndexLSH_codes_set, METH_VARARGS, NULL},
86497  { (char *)"IndexLSH_codes_get", _wrap_IndexLSH_codes_get, METH_VARARGS, NULL},
86498  { (char *)"IndexLSH_apply_preprocess", _wrap_IndexLSH_apply_preprocess, METH_VARARGS, NULL},
86499  { (char *)"IndexLSH_train", _wrap_IndexLSH_train, METH_VARARGS, NULL},
86500  { (char *)"IndexLSH_add", _wrap_IndexLSH_add, METH_VARARGS, NULL},
86501  { (char *)"IndexLSH_search", _wrap_IndexLSH_search, METH_VARARGS, NULL},
86502  { (char *)"IndexLSH_reset", _wrap_IndexLSH_reset, METH_VARARGS, NULL},
86503  { (char *)"IndexLSH_transfer_thresholds", _wrap_IndexLSH_transfer_thresholds, METH_VARARGS, NULL},
86504  { (char *)"delete_IndexLSH", _wrap_delete_IndexLSH, METH_VARARGS, NULL},
86505  { (char *)"new_IndexLSH", _wrap_new_IndexLSH, METH_VARARGS, NULL},
86506  { (char *)"IndexLSH_swigregister", IndexLSH_swigregister, METH_VARARGS, NULL},
86507  { (char *)"SimulatedAnnealingParameters_init_temperature_set", _wrap_SimulatedAnnealingParameters_init_temperature_set, METH_VARARGS, NULL},
86508  { (char *)"SimulatedAnnealingParameters_init_temperature_get", _wrap_SimulatedAnnealingParameters_init_temperature_get, METH_VARARGS, NULL},
86509  { (char *)"SimulatedAnnealingParameters_temperature_decay_set", _wrap_SimulatedAnnealingParameters_temperature_decay_set, METH_VARARGS, NULL},
86510  { (char *)"SimulatedAnnealingParameters_temperature_decay_get", _wrap_SimulatedAnnealingParameters_temperature_decay_get, METH_VARARGS, NULL},
86511  { (char *)"SimulatedAnnealingParameters_n_iter_set", _wrap_SimulatedAnnealingParameters_n_iter_set, METH_VARARGS, NULL},
86512  { (char *)"SimulatedAnnealingParameters_n_iter_get", _wrap_SimulatedAnnealingParameters_n_iter_get, METH_VARARGS, NULL},
86513  { (char *)"SimulatedAnnealingParameters_n_redo_set", _wrap_SimulatedAnnealingParameters_n_redo_set, METH_VARARGS, NULL},
86514  { (char *)"SimulatedAnnealingParameters_n_redo_get", _wrap_SimulatedAnnealingParameters_n_redo_get, METH_VARARGS, NULL},
86515  { (char *)"SimulatedAnnealingParameters_seed_set", _wrap_SimulatedAnnealingParameters_seed_set, METH_VARARGS, NULL},
86516  { (char *)"SimulatedAnnealingParameters_seed_get", _wrap_SimulatedAnnealingParameters_seed_get, METH_VARARGS, NULL},
86517  { (char *)"SimulatedAnnealingParameters_verbose_set", _wrap_SimulatedAnnealingParameters_verbose_set, METH_VARARGS, NULL},
86518  { (char *)"SimulatedAnnealingParameters_verbose_get", _wrap_SimulatedAnnealingParameters_verbose_get, METH_VARARGS, NULL},
86519  { (char *)"SimulatedAnnealingParameters_only_bit_flips_set", _wrap_SimulatedAnnealingParameters_only_bit_flips_set, METH_VARARGS, NULL},
86520  { (char *)"SimulatedAnnealingParameters_only_bit_flips_get", _wrap_SimulatedAnnealingParameters_only_bit_flips_get, METH_VARARGS, NULL},
86521  { (char *)"SimulatedAnnealingParameters_init_random_set", _wrap_SimulatedAnnealingParameters_init_random_set, METH_VARARGS, NULL},
86522  { (char *)"SimulatedAnnealingParameters_init_random_get", _wrap_SimulatedAnnealingParameters_init_random_get, METH_VARARGS, NULL},
86523  { (char *)"new_SimulatedAnnealingParameters", _wrap_new_SimulatedAnnealingParameters, METH_VARARGS, NULL},
86524  { (char *)"delete_SimulatedAnnealingParameters", _wrap_delete_SimulatedAnnealingParameters, METH_VARARGS, NULL},
86525  { (char *)"SimulatedAnnealingParameters_swigregister", SimulatedAnnealingParameters_swigregister, METH_VARARGS, NULL},
86526  { (char *)"PermutationObjective_n_set", _wrap_PermutationObjective_n_set, METH_VARARGS, NULL},
86527  { (char *)"PermutationObjective_n_get", _wrap_PermutationObjective_n_get, METH_VARARGS, NULL},
86528  { (char *)"PermutationObjective_compute_cost", _wrap_PermutationObjective_compute_cost, METH_VARARGS, NULL},
86529  { (char *)"PermutationObjective_cost_update", _wrap_PermutationObjective_cost_update, METH_VARARGS, NULL},
86530  { (char *)"delete_PermutationObjective", _wrap_delete_PermutationObjective, METH_VARARGS, NULL},
86531  { (char *)"PermutationObjective_swigregister", PermutationObjective_swigregister, METH_VARARGS, NULL},
86532  { (char *)"ReproduceDistancesObjective_dis_weight_factor_set", _wrap_ReproduceDistancesObjective_dis_weight_factor_set, METH_VARARGS, NULL},
86533  { (char *)"ReproduceDistancesObjective_dis_weight_factor_get", _wrap_ReproduceDistancesObjective_dis_weight_factor_get, METH_VARARGS, NULL},
86534  { (char *)"ReproduceDistancesObjective_sqr", _wrap_ReproduceDistancesObjective_sqr, METH_VARARGS, NULL},
86535  { (char *)"ReproduceDistancesObjective_dis_weight", _wrap_ReproduceDistancesObjective_dis_weight, METH_VARARGS, NULL},
86536  { (char *)"ReproduceDistancesObjective_source_dis_set", _wrap_ReproduceDistancesObjective_source_dis_set, METH_VARARGS, NULL},
86537  { (char *)"ReproduceDistancesObjective_source_dis_get", _wrap_ReproduceDistancesObjective_source_dis_get, METH_VARARGS, NULL},
86538  { (char *)"ReproduceDistancesObjective_target_dis_set", _wrap_ReproduceDistancesObjective_target_dis_set, METH_VARARGS, NULL},
86539  { (char *)"ReproduceDistancesObjective_target_dis_get", _wrap_ReproduceDistancesObjective_target_dis_get, METH_VARARGS, NULL},
86540  { (char *)"ReproduceDistancesObjective_weights_set", _wrap_ReproduceDistancesObjective_weights_set, METH_VARARGS, NULL},
86541  { (char *)"ReproduceDistancesObjective_weights_get", _wrap_ReproduceDistancesObjective_weights_get, METH_VARARGS, NULL},
86542  { (char *)"ReproduceDistancesObjective_get_source_dis", _wrap_ReproduceDistancesObjective_get_source_dis, METH_VARARGS, NULL},
86543  { (char *)"ReproduceDistancesObjective_compute_cost", _wrap_ReproduceDistancesObjective_compute_cost, METH_VARARGS, NULL},
86544  { (char *)"ReproduceDistancesObjective_cost_update", _wrap_ReproduceDistancesObjective_cost_update, METH_VARARGS, NULL},
86545  { (char *)"new_ReproduceDistancesObjective", _wrap_new_ReproduceDistancesObjective, METH_VARARGS, NULL},
86546  { (char *)"ReproduceDistancesObjective_compute_mean_stdev", _wrap_ReproduceDistancesObjective_compute_mean_stdev, METH_VARARGS, NULL},
86547  { (char *)"ReproduceDistancesObjective_set_affine_target_dis", _wrap_ReproduceDistancesObjective_set_affine_target_dis, METH_VARARGS, NULL},
86548  { (char *)"delete_ReproduceDistancesObjective", _wrap_delete_ReproduceDistancesObjective, METH_VARARGS, NULL},
86549  { (char *)"ReproduceDistancesObjective_swigregister", ReproduceDistancesObjective_swigregister, METH_VARARGS, NULL},
86550  { (char *)"SimulatedAnnealingOptimizer_obj_set", _wrap_SimulatedAnnealingOptimizer_obj_set, METH_VARARGS, NULL},
86551  { (char *)"SimulatedAnnealingOptimizer_obj_get", _wrap_SimulatedAnnealingOptimizer_obj_get, METH_VARARGS, NULL},
86552  { (char *)"SimulatedAnnealingOptimizer_n_set", _wrap_SimulatedAnnealingOptimizer_n_set, METH_VARARGS, NULL},
86553  { (char *)"SimulatedAnnealingOptimizer_n_get", _wrap_SimulatedAnnealingOptimizer_n_get, METH_VARARGS, NULL},
86554  { (char *)"SimulatedAnnealingOptimizer_logfile_set", _wrap_SimulatedAnnealingOptimizer_logfile_set, METH_VARARGS, NULL},
86555  { (char *)"SimulatedAnnealingOptimizer_logfile_get", _wrap_SimulatedAnnealingOptimizer_logfile_get, METH_VARARGS, NULL},
86556  { (char *)"new_SimulatedAnnealingOptimizer", _wrap_new_SimulatedAnnealingOptimizer, METH_VARARGS, NULL},
86557  { (char *)"SimulatedAnnealingOptimizer_rnd_set", _wrap_SimulatedAnnealingOptimizer_rnd_set, METH_VARARGS, NULL},
86558  { (char *)"SimulatedAnnealingOptimizer_rnd_get", _wrap_SimulatedAnnealingOptimizer_rnd_get, METH_VARARGS, NULL},
86559  { (char *)"SimulatedAnnealingOptimizer_init_cost_set", _wrap_SimulatedAnnealingOptimizer_init_cost_set, METH_VARARGS, NULL},
86560  { (char *)"SimulatedAnnealingOptimizer_init_cost_get", _wrap_SimulatedAnnealingOptimizer_init_cost_get, METH_VARARGS, NULL},
86561  { (char *)"SimulatedAnnealingOptimizer_optimize", _wrap_SimulatedAnnealingOptimizer_optimize, METH_VARARGS, NULL},
86562  { (char *)"SimulatedAnnealingOptimizer_run_optimization", _wrap_SimulatedAnnealingOptimizer_run_optimization, METH_VARARGS, NULL},
86563  { (char *)"delete_SimulatedAnnealingOptimizer", _wrap_delete_SimulatedAnnealingOptimizer, METH_VARARGS, NULL},
86564  { (char *)"SimulatedAnnealingOptimizer_swigregister", SimulatedAnnealingOptimizer_swigregister, METH_VARARGS, NULL},
86565  { (char *)"PolysemousTraining_optimization_type_set", _wrap_PolysemousTraining_optimization_type_set, METH_VARARGS, NULL},
86566  { (char *)"PolysemousTraining_optimization_type_get", _wrap_PolysemousTraining_optimization_type_get, METH_VARARGS, NULL},
86567  { (char *)"PolysemousTraining_ntrain_permutation_set", _wrap_PolysemousTraining_ntrain_permutation_set, METH_VARARGS, NULL},
86568  { (char *)"PolysemousTraining_ntrain_permutation_get", _wrap_PolysemousTraining_ntrain_permutation_get, METH_VARARGS, NULL},
86569  { (char *)"PolysemousTraining_dis_weight_factor_set", _wrap_PolysemousTraining_dis_weight_factor_set, METH_VARARGS, NULL},
86570  { (char *)"PolysemousTraining_dis_weight_factor_get", _wrap_PolysemousTraining_dis_weight_factor_get, METH_VARARGS, NULL},
86571  { (char *)"PolysemousTraining_log_pattern_set", _wrap_PolysemousTraining_log_pattern_set, METH_VARARGS, NULL},
86572  { (char *)"PolysemousTraining_log_pattern_get", _wrap_PolysemousTraining_log_pattern_get, METH_VARARGS, NULL},
86573  { (char *)"new_PolysemousTraining", _wrap_new_PolysemousTraining, METH_VARARGS, NULL},
86574  { (char *)"PolysemousTraining_optimize_pq_for_hamming", _wrap_PolysemousTraining_optimize_pq_for_hamming, METH_VARARGS, NULL},
86575  { (char *)"PolysemousTraining_optimize_ranking", _wrap_PolysemousTraining_optimize_ranking, METH_VARARGS, NULL},
86576  { (char *)"PolysemousTraining_optimize_reproduce_distances", _wrap_PolysemousTraining_optimize_reproduce_distances, METH_VARARGS, NULL},
86577  { (char *)"delete_PolysemousTraining", _wrap_delete_PolysemousTraining, METH_VARARGS, NULL},
86578  { (char *)"PolysemousTraining_swigregister", PolysemousTraining_swigregister, METH_VARARGS, NULL},
86579  { (char *)"IndexPQ_pq_set", _wrap_IndexPQ_pq_set, METH_VARARGS, NULL},
86580  { (char *)"IndexPQ_pq_get", _wrap_IndexPQ_pq_get, METH_VARARGS, NULL},
86581  { (char *)"IndexPQ_codes_set", _wrap_IndexPQ_codes_set, METH_VARARGS, NULL},
86582  { (char *)"IndexPQ_codes_get", _wrap_IndexPQ_codes_get, METH_VARARGS, NULL},
86583  { (char *)"new_IndexPQ", _wrap_new_IndexPQ, METH_VARARGS, NULL},
86584  { (char *)"IndexPQ_train", _wrap_IndexPQ_train, METH_VARARGS, NULL},
86585  { (char *)"IndexPQ_add", _wrap_IndexPQ_add, METH_VARARGS, NULL},
86586  { (char *)"IndexPQ_search", _wrap_IndexPQ_search, METH_VARARGS, NULL},
86587  { (char *)"IndexPQ_reset", _wrap_IndexPQ_reset, METH_VARARGS, NULL},
86588  { (char *)"IndexPQ_reconstruct_n", _wrap_IndexPQ_reconstruct_n, METH_VARARGS, NULL},
86589  { (char *)"IndexPQ_reconstruct", _wrap_IndexPQ_reconstruct, METH_VARARGS, NULL},
86590  { (char *)"IndexPQ_remove_ids", _wrap_IndexPQ_remove_ids, METH_VARARGS, NULL},
86591  { (char *)"IndexPQ_do_polysemous_training_set", _wrap_IndexPQ_do_polysemous_training_set, METH_VARARGS, NULL},
86592  { (char *)"IndexPQ_do_polysemous_training_get", _wrap_IndexPQ_do_polysemous_training_get, METH_VARARGS, NULL},
86593  { (char *)"IndexPQ_polysemous_training_set", _wrap_IndexPQ_polysemous_training_set, METH_VARARGS, NULL},
86594  { (char *)"IndexPQ_polysemous_training_get", _wrap_IndexPQ_polysemous_training_get, METH_VARARGS, NULL},
86595  { (char *)"IndexPQ_search_type_set", _wrap_IndexPQ_search_type_set, METH_VARARGS, NULL},
86596  { (char *)"IndexPQ_search_type_get", _wrap_IndexPQ_search_type_get, METH_VARARGS, NULL},
86597  { (char *)"IndexPQ_encode_signs_set", _wrap_IndexPQ_encode_signs_set, METH_VARARGS, NULL},
86598  { (char *)"IndexPQ_encode_signs_get", _wrap_IndexPQ_encode_signs_get, METH_VARARGS, NULL},
86599  { (char *)"IndexPQ_polysemous_ht_set", _wrap_IndexPQ_polysemous_ht_set, METH_VARARGS, NULL},
86600  { (char *)"IndexPQ_polysemous_ht_get", _wrap_IndexPQ_polysemous_ht_get, METH_VARARGS, NULL},
86601  { (char *)"IndexPQ_search_core_polysemous", _wrap_IndexPQ_search_core_polysemous, METH_VARARGS, NULL},
86602  { (char *)"IndexPQ_hamming_distance_histogram", _wrap_IndexPQ_hamming_distance_histogram, METH_VARARGS, NULL},
86603  { (char *)"IndexPQ_hamming_distance_table", _wrap_IndexPQ_hamming_distance_table, METH_VARARGS, NULL},
86604  { (char *)"delete_IndexPQ", _wrap_delete_IndexPQ, METH_VARARGS, NULL},
86605  { (char *)"IndexPQ_swigregister", IndexPQ_swigregister, METH_VARARGS, NULL},
86606  { (char *)"IndexPQStats_nq_set", _wrap_IndexPQStats_nq_set, METH_VARARGS, NULL},
86607  { (char *)"IndexPQStats_nq_get", _wrap_IndexPQStats_nq_get, METH_VARARGS, NULL},
86608  { (char *)"IndexPQStats_ncode_set", _wrap_IndexPQStats_ncode_set, METH_VARARGS, NULL},
86609  { (char *)"IndexPQStats_ncode_get", _wrap_IndexPQStats_ncode_get, METH_VARARGS, NULL},
86610  { (char *)"IndexPQStats_n_hamming_pass_set", _wrap_IndexPQStats_n_hamming_pass_set, METH_VARARGS, NULL},
86611  { (char *)"IndexPQStats_n_hamming_pass_get", _wrap_IndexPQStats_n_hamming_pass_get, METH_VARARGS, NULL},
86612  { (char *)"new_IndexPQStats", _wrap_new_IndexPQStats, METH_VARARGS, NULL},
86613  { (char *)"IndexPQStats_reset", _wrap_IndexPQStats_reset, METH_VARARGS, NULL},
86614  { (char *)"delete_IndexPQStats", _wrap_delete_IndexPQStats, METH_VARARGS, NULL},
86615  { (char *)"IndexPQStats_swigregister", IndexPQStats_swigregister, METH_VARARGS, NULL},
86616  { (char *)"MultiIndexQuantizer_pq_set", _wrap_MultiIndexQuantizer_pq_set, METH_VARARGS, NULL},
86617  { (char *)"MultiIndexQuantizer_pq_get", _wrap_MultiIndexQuantizer_pq_get, METH_VARARGS, NULL},
86618  { (char *)"MultiIndexQuantizer_train", _wrap_MultiIndexQuantizer_train, METH_VARARGS, NULL},
86619  { (char *)"MultiIndexQuantizer_search", _wrap_MultiIndexQuantizer_search, METH_VARARGS, NULL},
86620  { (char *)"MultiIndexQuantizer_add", _wrap_MultiIndexQuantizer_add, METH_VARARGS, NULL},
86621  { (char *)"MultiIndexQuantizer_reset", _wrap_MultiIndexQuantizer_reset, METH_VARARGS, NULL},
86622  { (char *)"new_MultiIndexQuantizer", _wrap_new_MultiIndexQuantizer, METH_VARARGS, NULL},
86623  { (char *)"MultiIndexQuantizer_reconstruct", _wrap_MultiIndexQuantizer_reconstruct, METH_VARARGS, NULL},
86624  { (char *)"delete_MultiIndexQuantizer", _wrap_delete_MultiIndexQuantizer, METH_VARARGS, NULL},
86625  { (char *)"MultiIndexQuantizer_swigregister", MultiIndexQuantizer_swigregister, METH_VARARGS, NULL},
86626  { (char *)"MultiIndexQuantizer2_assign_indexes_set", _wrap_MultiIndexQuantizer2_assign_indexes_set, METH_VARARGS, NULL},
86627  { (char *)"MultiIndexQuantizer2_assign_indexes_get", _wrap_MultiIndexQuantizer2_assign_indexes_get, METH_VARARGS, NULL},
86628  { (char *)"MultiIndexQuantizer2_own_fields_set", _wrap_MultiIndexQuantizer2_own_fields_set, METH_VARARGS, NULL},
86629  { (char *)"MultiIndexQuantizer2_own_fields_get", _wrap_MultiIndexQuantizer2_own_fields_get, METH_VARARGS, NULL},
86630  { (char *)"new_MultiIndexQuantizer2", _wrap_new_MultiIndexQuantizer2, METH_VARARGS, NULL},
86631  { (char *)"MultiIndexQuantizer2_train", _wrap_MultiIndexQuantizer2_train, METH_VARARGS, NULL},
86632  { (char *)"MultiIndexQuantizer2_search", _wrap_MultiIndexQuantizer2_search, METH_VARARGS, NULL},
86633  { (char *)"delete_MultiIndexQuantizer2", _wrap_delete_MultiIndexQuantizer2, METH_VARARGS, NULL},
86634  { (char *)"MultiIndexQuantizer2_swigregister", MultiIndexQuantizer2_swigregister, METH_VARARGS, NULL},
86635  { (char *)"InvertedLists_nlist_set", _wrap_InvertedLists_nlist_set, METH_VARARGS, NULL},
86636  { (char *)"InvertedLists_nlist_get", _wrap_InvertedLists_nlist_get, METH_VARARGS, NULL},
86637  { (char *)"InvertedLists_code_size_set", _wrap_InvertedLists_code_size_set, METH_VARARGS, NULL},
86638  { (char *)"InvertedLists_code_size_get", _wrap_InvertedLists_code_size_get, METH_VARARGS, NULL},
86639  { (char *)"InvertedLists_list_size", _wrap_InvertedLists_list_size, METH_VARARGS, NULL},
86640  { (char *)"InvertedLists_get_codes", _wrap_InvertedLists_get_codes, METH_VARARGS, NULL},
86641  { (char *)"InvertedLists_get_ids", _wrap_InvertedLists_get_ids, METH_VARARGS, NULL},
86642  { (char *)"InvertedLists_release_codes", _wrap_InvertedLists_release_codes, METH_VARARGS, NULL},
86643  { (char *)"InvertedLists_release_ids", _wrap_InvertedLists_release_ids, METH_VARARGS, NULL},
86644  { (char *)"InvertedLists_get_single_id", _wrap_InvertedLists_get_single_id, METH_VARARGS, NULL},
86645  { (char *)"InvertedLists_get_single_code", _wrap_InvertedLists_get_single_code, METH_VARARGS, NULL},
86646  { (char *)"InvertedLists_prefetch_lists", _wrap_InvertedLists_prefetch_lists, METH_VARARGS, NULL},
86647  { (char *)"InvertedLists_add_entry", _wrap_InvertedLists_add_entry, METH_VARARGS, NULL},
86648  { (char *)"InvertedLists_add_entries", _wrap_InvertedLists_add_entries, METH_VARARGS, NULL},
86649  { (char *)"InvertedLists_update_entry", _wrap_InvertedLists_update_entry, METH_VARARGS, NULL},
86650  { (char *)"InvertedLists_update_entries", _wrap_InvertedLists_update_entries, METH_VARARGS, NULL},
86651  { (char *)"InvertedLists_resize", _wrap_InvertedLists_resize, METH_VARARGS, NULL},
86652  { (char *)"InvertedLists_reset", _wrap_InvertedLists_reset, METH_VARARGS, NULL},
86653  { (char *)"InvertedLists_merge_from", _wrap_InvertedLists_merge_from, METH_VARARGS, NULL},
86654  { (char *)"delete_InvertedLists", _wrap_delete_InvertedLists, METH_VARARGS, NULL},
86655  { (char *)"InvertedLists_swigregister", InvertedLists_swigregister, METH_VARARGS, NULL},
86656  { (char *)"ArrayInvertedLists_codes_set", _wrap_ArrayInvertedLists_codes_set, METH_VARARGS, NULL},
86657  { (char *)"ArrayInvertedLists_codes_get", _wrap_ArrayInvertedLists_codes_get, METH_VARARGS, NULL},
86658  { (char *)"ArrayInvertedLists_ids_set", _wrap_ArrayInvertedLists_ids_set, METH_VARARGS, NULL},
86659  { (char *)"ArrayInvertedLists_ids_get", _wrap_ArrayInvertedLists_ids_get, METH_VARARGS, NULL},
86660  { (char *)"new_ArrayInvertedLists", _wrap_new_ArrayInvertedLists, METH_VARARGS, NULL},
86661  { (char *)"ArrayInvertedLists_list_size", _wrap_ArrayInvertedLists_list_size, METH_VARARGS, NULL},
86662  { (char *)"ArrayInvertedLists_get_codes", _wrap_ArrayInvertedLists_get_codes, METH_VARARGS, NULL},
86663  { (char *)"ArrayInvertedLists_get_ids", _wrap_ArrayInvertedLists_get_ids, METH_VARARGS, NULL},
86664  { (char *)"ArrayInvertedLists_add_entries", _wrap_ArrayInvertedLists_add_entries, METH_VARARGS, NULL},
86665  { (char *)"ArrayInvertedLists_update_entries", _wrap_ArrayInvertedLists_update_entries, METH_VARARGS, NULL},
86666  { (char *)"ArrayInvertedLists_resize", _wrap_ArrayInvertedLists_resize, METH_VARARGS, NULL},
86667  { (char *)"delete_ArrayInvertedLists", _wrap_delete_ArrayInvertedLists, METH_VARARGS, NULL},
86668  { (char *)"ArrayInvertedLists_swigregister", ArrayInvertedLists_swigregister, METH_VARARGS, NULL},
86669  { (char *)"ConcatenatedInvertedLists_ils_set", _wrap_ConcatenatedInvertedLists_ils_set, METH_VARARGS, NULL},
86670  { (char *)"ConcatenatedInvertedLists_ils_get", _wrap_ConcatenatedInvertedLists_ils_get, METH_VARARGS, NULL},
86671  { (char *)"new_ConcatenatedInvertedLists", _wrap_new_ConcatenatedInvertedLists, METH_VARARGS, NULL},
86672  { (char *)"ConcatenatedInvertedLists_list_size", _wrap_ConcatenatedInvertedLists_list_size, METH_VARARGS, NULL},
86673  { (char *)"ConcatenatedInvertedLists_get_codes", _wrap_ConcatenatedInvertedLists_get_codes, METH_VARARGS, NULL},
86674  { (char *)"ConcatenatedInvertedLists_get_ids", _wrap_ConcatenatedInvertedLists_get_ids, METH_VARARGS, NULL},
86675  { (char *)"ConcatenatedInvertedLists_release_codes", _wrap_ConcatenatedInvertedLists_release_codes, METH_VARARGS, NULL},
86676  { (char *)"ConcatenatedInvertedLists_release_ids", _wrap_ConcatenatedInvertedLists_release_ids, METH_VARARGS, NULL},
86677  { (char *)"ConcatenatedInvertedLists_get_single_id", _wrap_ConcatenatedInvertedLists_get_single_id, METH_VARARGS, NULL},
86678  { (char *)"ConcatenatedInvertedLists_get_single_code", _wrap_ConcatenatedInvertedLists_get_single_code, METH_VARARGS, NULL},
86679  { (char *)"ConcatenatedInvertedLists_add_entries", _wrap_ConcatenatedInvertedLists_add_entries, METH_VARARGS, NULL},
86680  { (char *)"ConcatenatedInvertedLists_update_entries", _wrap_ConcatenatedInvertedLists_update_entries, METH_VARARGS, NULL},
86681  { (char *)"ConcatenatedInvertedLists_resize", _wrap_ConcatenatedInvertedLists_resize, METH_VARARGS, NULL},
86682  { (char *)"delete_ConcatenatedInvertedLists", _wrap_delete_ConcatenatedInvertedLists, METH_VARARGS, NULL},
86683  { (char *)"ConcatenatedInvertedLists_swigregister", ConcatenatedInvertedLists_swigregister, METH_VARARGS, NULL},
86684  { (char *)"Level1Quantizer_quantizer_set", _wrap_Level1Quantizer_quantizer_set, METH_VARARGS, NULL},
86685  { (char *)"Level1Quantizer_quantizer_get", _wrap_Level1Quantizer_quantizer_get, METH_VARARGS, NULL},
86686  { (char *)"Level1Quantizer_nlist_set", _wrap_Level1Quantizer_nlist_set, METH_VARARGS, NULL},
86687  { (char *)"Level1Quantizer_nlist_get", _wrap_Level1Quantizer_nlist_get, METH_VARARGS, NULL},
86688  { (char *)"Level1Quantizer_quantizer_trains_alone_set", _wrap_Level1Quantizer_quantizer_trains_alone_set, METH_VARARGS, NULL},
86689  { (char *)"Level1Quantizer_quantizer_trains_alone_get", _wrap_Level1Quantizer_quantizer_trains_alone_get, METH_VARARGS, NULL},
86690  { (char *)"Level1Quantizer_own_fields_set", _wrap_Level1Quantizer_own_fields_set, METH_VARARGS, NULL},
86691  { (char *)"Level1Quantizer_own_fields_get", _wrap_Level1Quantizer_own_fields_get, METH_VARARGS, NULL},
86692  { (char *)"Level1Quantizer_cp_set", _wrap_Level1Quantizer_cp_set, METH_VARARGS, NULL},
86693  { (char *)"Level1Quantizer_cp_get", _wrap_Level1Quantizer_cp_get, METH_VARARGS, NULL},
86694  { (char *)"Level1Quantizer_clustering_index_set", _wrap_Level1Quantizer_clustering_index_set, METH_VARARGS, NULL},
86695  { (char *)"Level1Quantizer_clustering_index_get", _wrap_Level1Quantizer_clustering_index_get, METH_VARARGS, NULL},
86696  { (char *)"Level1Quantizer_train_q1", _wrap_Level1Quantizer_train_q1, METH_VARARGS, NULL},
86697  { (char *)"new_Level1Quantizer", _wrap_new_Level1Quantizer, METH_VARARGS, NULL},
86698  { (char *)"delete_Level1Quantizer", _wrap_delete_Level1Quantizer, METH_VARARGS, NULL},
86699  { (char *)"Level1Quantizer_swigregister", Level1Quantizer_swigregister, METH_VARARGS, NULL},
86700  { (char *)"IVFSearchParameters_nprobe_set", _wrap_IVFSearchParameters_nprobe_set, METH_VARARGS, NULL},
86701  { (char *)"IVFSearchParameters_nprobe_get", _wrap_IVFSearchParameters_nprobe_get, METH_VARARGS, NULL},
86702  { (char *)"IVFSearchParameters_max_codes_set", _wrap_IVFSearchParameters_max_codes_set, METH_VARARGS, NULL},
86703  { (char *)"IVFSearchParameters_max_codes_get", _wrap_IVFSearchParameters_max_codes_get, METH_VARARGS, NULL},
86704  { (char *)"delete_IVFSearchParameters", _wrap_delete_IVFSearchParameters, METH_VARARGS, NULL},
86705  { (char *)"new_IVFSearchParameters", _wrap_new_IVFSearchParameters, METH_VARARGS, NULL},
86706  { (char *)"IVFSearchParameters_swigregister", IVFSearchParameters_swigregister, METH_VARARGS, NULL},
86707  { (char *)"IndexIVF_invlists_set", _wrap_IndexIVF_invlists_set, METH_VARARGS, NULL},
86708  { (char *)"IndexIVF_invlists_get", _wrap_IndexIVF_invlists_get, METH_VARARGS, NULL},
86709  { (char *)"IndexIVF_own_invlists_set", _wrap_IndexIVF_own_invlists_set, METH_VARARGS, NULL},
86710  { (char *)"IndexIVF_own_invlists_get", _wrap_IndexIVF_own_invlists_get, METH_VARARGS, NULL},
86711  { (char *)"IndexIVF_code_size_set", _wrap_IndexIVF_code_size_set, METH_VARARGS, NULL},
86712  { (char *)"IndexIVF_code_size_get", _wrap_IndexIVF_code_size_get, METH_VARARGS, NULL},
86713  { (char *)"IndexIVF_nprobe_set", _wrap_IndexIVF_nprobe_set, METH_VARARGS, NULL},
86714  { (char *)"IndexIVF_nprobe_get", _wrap_IndexIVF_nprobe_get, METH_VARARGS, NULL},
86715  { (char *)"IndexIVF_max_codes_set", _wrap_IndexIVF_max_codes_set, METH_VARARGS, NULL},
86716  { (char *)"IndexIVF_max_codes_get", _wrap_IndexIVF_max_codes_get, METH_VARARGS, NULL},
86717  { (char *)"IndexIVF_maintain_direct_map_set", _wrap_IndexIVF_maintain_direct_map_set, METH_VARARGS, NULL},
86718  { (char *)"IndexIVF_maintain_direct_map_get", _wrap_IndexIVF_maintain_direct_map_get, METH_VARARGS, NULL},
86719  { (char *)"IndexIVF_direct_map_set", _wrap_IndexIVF_direct_map_set, METH_VARARGS, NULL},
86720  { (char *)"IndexIVF_direct_map_get", _wrap_IndexIVF_direct_map_get, METH_VARARGS, NULL},
86721  { (char *)"IndexIVF_reset", _wrap_IndexIVF_reset, METH_VARARGS, NULL},
86722  { (char *)"IndexIVF_train", _wrap_IndexIVF_train, METH_VARARGS, NULL},
86723  { (char *)"IndexIVF_add", _wrap_IndexIVF_add, METH_VARARGS, NULL},
86724  { (char *)"IndexIVF_encode_vectors", _wrap_IndexIVF_encode_vectors, METH_VARARGS, NULL},
86725  { (char *)"IndexIVF_train_residual", _wrap_IndexIVF_train_residual, METH_VARARGS, NULL},
86726  { (char *)"IndexIVF_search_preassigned", _wrap_IndexIVF_search_preassigned, METH_VARARGS, NULL},
86727  { (char *)"IndexIVF_search", _wrap_IndexIVF_search, METH_VARARGS, NULL},
86728  { (char *)"IndexIVF_get_InvertedListScanner", _wrap_IndexIVF_get_InvertedListScanner, METH_VARARGS, NULL},
86729  { (char *)"IndexIVF_reconstruct", _wrap_IndexIVF_reconstruct, METH_VARARGS, NULL},
86730  { (char *)"IndexIVF_reconstruct_n", _wrap_IndexIVF_reconstruct_n, METH_VARARGS, NULL},
86731  { (char *)"IndexIVF_search_and_reconstruct", _wrap_IndexIVF_search_and_reconstruct, METH_VARARGS, NULL},
86732  { (char *)"IndexIVF_reconstruct_from_offset", _wrap_IndexIVF_reconstruct_from_offset, METH_VARARGS, NULL},
86733  { (char *)"IndexIVF_remove_ids", _wrap_IndexIVF_remove_ids, METH_VARARGS, NULL},
86734  { (char *)"IndexIVF_check_compatible_for_merge", _wrap_IndexIVF_check_compatible_for_merge, METH_VARARGS, NULL},
86735  { (char *)"IndexIVF_merge_from", _wrap_IndexIVF_merge_from, METH_VARARGS, NULL},
86736  { (char *)"IndexIVF_copy_subset_to", _wrap_IndexIVF_copy_subset_to, METH_VARARGS, NULL},
86737  { (char *)"delete_IndexIVF", _wrap_delete_IndexIVF, METH_VARARGS, NULL},
86738  { (char *)"IndexIVF_get_list_size", _wrap_IndexIVF_get_list_size, METH_VARARGS, NULL},
86739  { (char *)"IndexIVF_make_direct_map", _wrap_IndexIVF_make_direct_map, METH_VARARGS, NULL},
86740  { (char *)"IndexIVF_imbalance_factor", _wrap_IndexIVF_imbalance_factor, METH_VARARGS, NULL},
86741  { (char *)"IndexIVF_print_stats", _wrap_IndexIVF_print_stats, METH_VARARGS, NULL},
86742  { (char *)"IndexIVF_replace_invlists", _wrap_IndexIVF_replace_invlists, METH_VARARGS, NULL},
86743  { (char *)"IndexIVF_swigregister", IndexIVF_swigregister, METH_VARARGS, NULL},
86744  { (char *)"IndexIVFStats_nq_set", _wrap_IndexIVFStats_nq_set, METH_VARARGS, NULL},
86745  { (char *)"IndexIVFStats_nq_get", _wrap_IndexIVFStats_nq_get, METH_VARARGS, NULL},
86746  { (char *)"IndexIVFStats_nlist_set", _wrap_IndexIVFStats_nlist_set, METH_VARARGS, NULL},
86747  { (char *)"IndexIVFStats_nlist_get", _wrap_IndexIVFStats_nlist_get, METH_VARARGS, NULL},
86748  { (char *)"IndexIVFStats_ndis_set", _wrap_IndexIVFStats_ndis_set, METH_VARARGS, NULL},
86749  { (char *)"IndexIVFStats_ndis_get", _wrap_IndexIVFStats_ndis_get, METH_VARARGS, NULL},
86750  { (char *)"IndexIVFStats_nheap_updates_set", _wrap_IndexIVFStats_nheap_updates_set, METH_VARARGS, NULL},
86751  { (char *)"IndexIVFStats_nheap_updates_get", _wrap_IndexIVFStats_nheap_updates_get, METH_VARARGS, NULL},
86752  { (char *)"new_IndexIVFStats", _wrap_new_IndexIVFStats, METH_VARARGS, NULL},
86753  { (char *)"IndexIVFStats_reset", _wrap_IndexIVFStats_reset, METH_VARARGS, NULL},
86754  { (char *)"delete_IndexIVFStats", _wrap_delete_IndexIVFStats, METH_VARARGS, NULL},
86755  { (char *)"IndexIVFStats_swigregister", IndexIVFStats_swigregister, METH_VARARGS, NULL},
86756  { (char *)"check_compatible_for_merge", _wrap_check_compatible_for_merge, METH_VARARGS, NULL},
86757  { (char *)"extract_index_ivf", _wrap_extract_index_ivf, METH_VARARGS, NULL},
86758  { (char *)"merge_into", _wrap_merge_into, METH_VARARGS, NULL},
86759  { (char *)"search_centroid", _wrap_search_centroid, METH_VARARGS, NULL},
86760  { (char *)"search_and_return_centroids", _wrap_search_and_return_centroids, METH_VARARGS, NULL},
86761  { (char *)"SlidingIndexWindow_index_set", _wrap_SlidingIndexWindow_index_set, METH_VARARGS, NULL},
86762  { (char *)"SlidingIndexWindow_index_get", _wrap_SlidingIndexWindow_index_get, METH_VARARGS, NULL},
86763  { (char *)"SlidingIndexWindow_ils_set", _wrap_SlidingIndexWindow_ils_set, METH_VARARGS, NULL},
86764  { (char *)"SlidingIndexWindow_ils_get", _wrap_SlidingIndexWindow_ils_get, METH_VARARGS, NULL},
86765  { (char *)"SlidingIndexWindow_n_slice_set", _wrap_SlidingIndexWindow_n_slice_set, METH_VARARGS, NULL},
86766  { (char *)"SlidingIndexWindow_n_slice_get", _wrap_SlidingIndexWindow_n_slice_get, METH_VARARGS, NULL},
86767  { (char *)"SlidingIndexWindow_nlist_set", _wrap_SlidingIndexWindow_nlist_set, METH_VARARGS, NULL},
86768  { (char *)"SlidingIndexWindow_nlist_get", _wrap_SlidingIndexWindow_nlist_get, METH_VARARGS, NULL},
86769  { (char *)"SlidingIndexWindow_sizes_set", _wrap_SlidingIndexWindow_sizes_set, METH_VARARGS, NULL},
86770  { (char *)"SlidingIndexWindow_sizes_get", _wrap_SlidingIndexWindow_sizes_get, METH_VARARGS, NULL},
86771  { (char *)"new_SlidingIndexWindow", _wrap_new_SlidingIndexWindow, METH_VARARGS, NULL},
86772  { (char *)"SlidingIndexWindow_step", _wrap_SlidingIndexWindow_step, METH_VARARGS, NULL},
86773  { (char *)"delete_SlidingIndexWindow", _wrap_delete_SlidingIndexWindow, METH_VARARGS, NULL},
86774  { (char *)"SlidingIndexWindow_swigregister", SlidingIndexWindow_swigregister, METH_VARARGS, NULL},
86775  { (char *)"get_invlist_range", _wrap_get_invlist_range, METH_VARARGS, NULL},
86776  { (char *)"set_invlist_range", _wrap_set_invlist_range, METH_VARARGS, NULL},
86777  { (char *)"search_with_parameters", _wrap_search_with_parameters, METH_VARARGS, NULL},
86778  { (char *)"ScalarQuantizer_qtype_set", _wrap_ScalarQuantizer_qtype_set, METH_VARARGS, NULL},
86779  { (char *)"ScalarQuantizer_qtype_get", _wrap_ScalarQuantizer_qtype_get, METH_VARARGS, NULL},
86780  { (char *)"ScalarQuantizer_rangestat_set", _wrap_ScalarQuantizer_rangestat_set, METH_VARARGS, NULL},
86781  { (char *)"ScalarQuantizer_rangestat_get", _wrap_ScalarQuantizer_rangestat_get, METH_VARARGS, NULL},
86782  { (char *)"ScalarQuantizer_rangestat_arg_set", _wrap_ScalarQuantizer_rangestat_arg_set, METH_VARARGS, NULL},
86783  { (char *)"ScalarQuantizer_rangestat_arg_get", _wrap_ScalarQuantizer_rangestat_arg_get, METH_VARARGS, NULL},
86784  { (char *)"ScalarQuantizer_d_set", _wrap_ScalarQuantizer_d_set, METH_VARARGS, NULL},
86785  { (char *)"ScalarQuantizer_d_get", _wrap_ScalarQuantizer_d_get, METH_VARARGS, NULL},
86786  { (char *)"ScalarQuantizer_code_size_set", _wrap_ScalarQuantizer_code_size_set, METH_VARARGS, NULL},
86787  { (char *)"ScalarQuantizer_code_size_get", _wrap_ScalarQuantizer_code_size_get, METH_VARARGS, NULL},
86788  { (char *)"ScalarQuantizer_trained_set", _wrap_ScalarQuantizer_trained_set, METH_VARARGS, NULL},
86789  { (char *)"ScalarQuantizer_trained_get", _wrap_ScalarQuantizer_trained_get, METH_VARARGS, NULL},
86790  { (char *)"new_ScalarQuantizer", _wrap_new_ScalarQuantizer, METH_VARARGS, NULL},
86791  { (char *)"ScalarQuantizer_train", _wrap_ScalarQuantizer_train, METH_VARARGS, NULL},
86792  { (char *)"ScalarQuantizer_compute_codes", _wrap_ScalarQuantizer_compute_codes, METH_VARARGS, NULL},
86793  { (char *)"ScalarQuantizer_decode", _wrap_ScalarQuantizer_decode, METH_VARARGS, NULL},
86794  { (char *)"ScalarQuantizer_get_distance_computer", _wrap_ScalarQuantizer_get_distance_computer, METH_VARARGS, NULL},
86795  { (char *)"delete_ScalarQuantizer", _wrap_delete_ScalarQuantizer, METH_VARARGS, NULL},
86796  { (char *)"ScalarQuantizer_swigregister", ScalarQuantizer_swigregister, METH_VARARGS, NULL},
86797  { (char *)"IndexScalarQuantizer_sq_set", _wrap_IndexScalarQuantizer_sq_set, METH_VARARGS, NULL},
86798  { (char *)"IndexScalarQuantizer_sq_get", _wrap_IndexScalarQuantizer_sq_get, METH_VARARGS, NULL},
86799  { (char *)"IndexScalarQuantizer_codes_set", _wrap_IndexScalarQuantizer_codes_set, METH_VARARGS, NULL},
86800  { (char *)"IndexScalarQuantizer_codes_get", _wrap_IndexScalarQuantizer_codes_get, METH_VARARGS, NULL},
86801  { (char *)"IndexScalarQuantizer_code_size_set", _wrap_IndexScalarQuantizer_code_size_set, METH_VARARGS, NULL},
86802  { (char *)"IndexScalarQuantizer_code_size_get", _wrap_IndexScalarQuantizer_code_size_get, METH_VARARGS, NULL},
86803  { (char *)"new_IndexScalarQuantizer", _wrap_new_IndexScalarQuantizer, METH_VARARGS, NULL},
86804  { (char *)"IndexScalarQuantizer_train", _wrap_IndexScalarQuantizer_train, METH_VARARGS, NULL},
86805  { (char *)"IndexScalarQuantizer_add", _wrap_IndexScalarQuantizer_add, METH_VARARGS, NULL},
86806  { (char *)"IndexScalarQuantizer_search", _wrap_IndexScalarQuantizer_search, METH_VARARGS, NULL},
86807  { (char *)"IndexScalarQuantizer_reset", _wrap_IndexScalarQuantizer_reset, METH_VARARGS, NULL},
86808  { (char *)"IndexScalarQuantizer_reconstruct_n", _wrap_IndexScalarQuantizer_reconstruct_n, METH_VARARGS, NULL},
86809  { (char *)"IndexScalarQuantizer_reconstruct", _wrap_IndexScalarQuantizer_reconstruct, METH_VARARGS, NULL},
86810  { (char *)"delete_IndexScalarQuantizer", _wrap_delete_IndexScalarQuantizer, METH_VARARGS, NULL},
86811  { (char *)"IndexScalarQuantizer_swigregister", IndexScalarQuantizer_swigregister, METH_VARARGS, NULL},
86812  { (char *)"IndexIVFScalarQuantizer_sq_set", _wrap_IndexIVFScalarQuantizer_sq_set, METH_VARARGS, NULL},
86813  { (char *)"IndexIVFScalarQuantizer_sq_get", _wrap_IndexIVFScalarQuantizer_sq_get, METH_VARARGS, NULL},
86814  { (char *)"new_IndexIVFScalarQuantizer", _wrap_new_IndexIVFScalarQuantizer, METH_VARARGS, NULL},
86815  { (char *)"IndexIVFScalarQuantizer_train_residual", _wrap_IndexIVFScalarQuantizer_train_residual, METH_VARARGS, NULL},
86816  { (char *)"IndexIVFScalarQuantizer_encode_vectors", _wrap_IndexIVFScalarQuantizer_encode_vectors, METH_VARARGS, NULL},
86817  { (char *)"IndexIVFScalarQuantizer_add_with_ids", _wrap_IndexIVFScalarQuantizer_add_with_ids, METH_VARARGS, NULL},
86818  { (char *)"IndexIVFScalarQuantizer_get_InvertedListScanner", _wrap_IndexIVFScalarQuantizer_get_InvertedListScanner, METH_VARARGS, NULL},
86819  { (char *)"IndexIVFScalarQuantizer_reconstruct_from_offset", _wrap_IndexIVFScalarQuantizer_reconstruct_from_offset, METH_VARARGS, NULL},
86820  { (char *)"delete_IndexIVFScalarQuantizer", _wrap_delete_IndexIVFScalarQuantizer, METH_VARARGS, NULL},
86821  { (char *)"IndexIVFScalarQuantizer_swigregister", IndexIVFScalarQuantizer_swigregister, METH_VARARGS, NULL},
86822  { (char *)"HNSW_assign_probas_set", _wrap_HNSW_assign_probas_set, METH_VARARGS, NULL},
86823  { (char *)"HNSW_assign_probas_get", _wrap_HNSW_assign_probas_get, METH_VARARGS, NULL},
86824  { (char *)"HNSW_cum_nneighbor_per_level_set", _wrap_HNSW_cum_nneighbor_per_level_set, METH_VARARGS, NULL},
86825  { (char *)"HNSW_cum_nneighbor_per_level_get", _wrap_HNSW_cum_nneighbor_per_level_get, METH_VARARGS, NULL},
86826  { (char *)"HNSW_levels_set", _wrap_HNSW_levels_set, METH_VARARGS, NULL},
86827  { (char *)"HNSW_levels_get", _wrap_HNSW_levels_get, METH_VARARGS, NULL},
86828  { (char *)"HNSW_offsets_set", _wrap_HNSW_offsets_set, METH_VARARGS, NULL},
86829  { (char *)"HNSW_offsets_get", _wrap_HNSW_offsets_get, METH_VARARGS, NULL},
86830  { (char *)"HNSW_neighbors_set", _wrap_HNSW_neighbors_set, METH_VARARGS, NULL},
86831  { (char *)"HNSW_neighbors_get", _wrap_HNSW_neighbors_get, METH_VARARGS, NULL},
86832  { (char *)"HNSW_entry_point_set", _wrap_HNSW_entry_point_set, METH_VARARGS, NULL},
86833  { (char *)"HNSW_entry_point_get", _wrap_HNSW_entry_point_get, METH_VARARGS, NULL},
86834  { (char *)"HNSW_rng_set", _wrap_HNSW_rng_set, METH_VARARGS, NULL},
86835  { (char *)"HNSW_rng_get", _wrap_HNSW_rng_get, METH_VARARGS, NULL},
86836  { (char *)"HNSW_max_level_set", _wrap_HNSW_max_level_set, METH_VARARGS, NULL},
86837  { (char *)"HNSW_max_level_get", _wrap_HNSW_max_level_get, METH_VARARGS, NULL},
86838  { (char *)"HNSW_efConstruction_set", _wrap_HNSW_efConstruction_set, METH_VARARGS, NULL},
86839  { (char *)"HNSW_efConstruction_get", _wrap_HNSW_efConstruction_get, METH_VARARGS, NULL},
86840  { (char *)"HNSW_efSearch_set", _wrap_HNSW_efSearch_set, METH_VARARGS, NULL},
86841  { (char *)"HNSW_efSearch_get", _wrap_HNSW_efSearch_get, METH_VARARGS, NULL},
86842  { (char *)"HNSW_upper_beam_set", _wrap_HNSW_upper_beam_set, METH_VARARGS, NULL},
86843  { (char *)"HNSW_upper_beam_get", _wrap_HNSW_upper_beam_get, METH_VARARGS, NULL},
86844  { (char *)"HNSW_set_default_probas", _wrap_HNSW_set_default_probas, METH_VARARGS, NULL},
86845  { (char *)"HNSW_set_nb_neighbors", _wrap_HNSW_set_nb_neighbors, METH_VARARGS, NULL},
86846  { (char *)"HNSW_nb_neighbors", _wrap_HNSW_nb_neighbors, METH_VARARGS, NULL},
86847  { (char *)"HNSW_cum_nb_neighbors", _wrap_HNSW_cum_nb_neighbors, METH_VARARGS, NULL},
86848  { (char *)"HNSW_neighbor_range", _wrap_HNSW_neighbor_range, METH_VARARGS, NULL},
86849  { (char *)"new_HNSW", _wrap_new_HNSW, METH_VARARGS, NULL},
86850  { (char *)"HNSW_random_level", _wrap_HNSW_random_level, METH_VARARGS, NULL},
86851  { (char *)"HNSW_fill_with_random_links", _wrap_HNSW_fill_with_random_links, METH_VARARGS, NULL},
86852  { (char *)"HNSW_add_links_starting_from", _wrap_HNSW_add_links_starting_from, METH_VARARGS, NULL},
86853  { (char *)"HNSW_add_with_locks", _wrap_HNSW_add_with_locks, METH_VARARGS, NULL},
86854  { (char *)"HNSW_search_from_candidates", _wrap_HNSW_search_from_candidates, METH_VARARGS, NULL},
86855  { (char *)"HNSW_search_from", _wrap_HNSW_search_from, METH_VARARGS, NULL},
86856  { (char *)"HNSW_search", _wrap_HNSW_search, METH_VARARGS, NULL},
86857  { (char *)"HNSW_reset", _wrap_HNSW_reset, METH_VARARGS, NULL},
86858  { (char *)"HNSW_clear_neighbor_tables", _wrap_HNSW_clear_neighbor_tables, METH_VARARGS, NULL},
86859  { (char *)"HNSW_print_neighbor_stats", _wrap_HNSW_print_neighbor_stats, METH_VARARGS, NULL},
86860  { (char *)"HNSW_prepare_level_tab", _wrap_HNSW_prepare_level_tab, METH_VARARGS, NULL},
86861  { (char *)"HNSW_shrink_neighbor_list", _wrap_HNSW_shrink_neighbor_list, METH_VARARGS, NULL},
86862  { (char *)"delete_HNSW", _wrap_delete_HNSW, METH_VARARGS, NULL},
86863  { (char *)"HNSW_swigregister", HNSW_swigregister, METH_VARARGS, NULL},
86864  { (char *)"VisitedTable_visited_set", _wrap_VisitedTable_visited_set, METH_VARARGS, NULL},
86865  { (char *)"VisitedTable_visited_get", _wrap_VisitedTable_visited_get, METH_VARARGS, NULL},
86866  { (char *)"VisitedTable_visno_set", _wrap_VisitedTable_visno_set, METH_VARARGS, NULL},
86867  { (char *)"VisitedTable_visno_get", _wrap_VisitedTable_visno_get, METH_VARARGS, NULL},
86868  { (char *)"new_VisitedTable", _wrap_new_VisitedTable, METH_VARARGS, NULL},
86869  { (char *)"VisitedTable_set", _wrap_VisitedTable_set, METH_VARARGS, NULL},
86870  { (char *)"VisitedTable_get", _wrap_VisitedTable_get, METH_VARARGS, NULL},
86871  { (char *)"VisitedTable_advance", _wrap_VisitedTable_advance, METH_VARARGS, NULL},
86872  { (char *)"delete_VisitedTable", _wrap_delete_VisitedTable, METH_VARARGS, NULL},
86873  { (char *)"VisitedTable_swigregister", VisitedTable_swigregister, METH_VARARGS, NULL},
86874  { (char *)"HNSWStats_n1_set", _wrap_HNSWStats_n1_set, METH_VARARGS, NULL},
86875  { (char *)"HNSWStats_n1_get", _wrap_HNSWStats_n1_get, METH_VARARGS, NULL},
86876  { (char *)"HNSWStats_n2_set", _wrap_HNSWStats_n2_set, METH_VARARGS, NULL},
86877  { (char *)"HNSWStats_n2_get", _wrap_HNSWStats_n2_get, METH_VARARGS, NULL},
86878  { (char *)"HNSWStats_n3_set", _wrap_HNSWStats_n3_set, METH_VARARGS, NULL},
86879  { (char *)"HNSWStats_n3_get", _wrap_HNSWStats_n3_get, METH_VARARGS, NULL},
86880  { (char *)"HNSWStats_ndis_set", _wrap_HNSWStats_ndis_set, METH_VARARGS, NULL},
86881  { (char *)"HNSWStats_ndis_get", _wrap_HNSWStats_ndis_get, METH_VARARGS, NULL},
86882  { (char *)"HNSWStats_nreorder_set", _wrap_HNSWStats_nreorder_set, METH_VARARGS, NULL},
86883  { (char *)"HNSWStats_nreorder_get", _wrap_HNSWStats_nreorder_get, METH_VARARGS, NULL},
86884  { (char *)"HNSWStats_view_set", _wrap_HNSWStats_view_set, METH_VARARGS, NULL},
86885  { (char *)"HNSWStats_view_get", _wrap_HNSWStats_view_get, METH_VARARGS, NULL},
86886  { (char *)"new_HNSWStats", _wrap_new_HNSWStats, METH_VARARGS, NULL},
86887  { (char *)"HNSWStats_reset", _wrap_HNSWStats_reset, METH_VARARGS, NULL},
86888  { (char *)"delete_HNSWStats", _wrap_delete_HNSWStats, METH_VARARGS, NULL},
86889  { (char *)"HNSWStats_swigregister", HNSWStats_swigregister, METH_VARARGS, NULL},
86890  { (char *)"ReconstructFromNeighbors_index_get", _wrap_ReconstructFromNeighbors_index_get, METH_VARARGS, NULL},
86891  { (char *)"ReconstructFromNeighbors_M_set", _wrap_ReconstructFromNeighbors_M_set, METH_VARARGS, NULL},
86892  { (char *)"ReconstructFromNeighbors_M_get", _wrap_ReconstructFromNeighbors_M_get, METH_VARARGS, NULL},
86893  { (char *)"ReconstructFromNeighbors_k_set", _wrap_ReconstructFromNeighbors_k_set, METH_VARARGS, NULL},
86894  { (char *)"ReconstructFromNeighbors_k_get", _wrap_ReconstructFromNeighbors_k_get, METH_VARARGS, NULL},
86895  { (char *)"ReconstructFromNeighbors_nsq_set", _wrap_ReconstructFromNeighbors_nsq_set, METH_VARARGS, NULL},
86896  { (char *)"ReconstructFromNeighbors_nsq_get", _wrap_ReconstructFromNeighbors_nsq_get, METH_VARARGS, NULL},
86897  { (char *)"ReconstructFromNeighbors_code_size_set", _wrap_ReconstructFromNeighbors_code_size_set, METH_VARARGS, NULL},
86898  { (char *)"ReconstructFromNeighbors_code_size_get", _wrap_ReconstructFromNeighbors_code_size_get, METH_VARARGS, NULL},
86899  { (char *)"ReconstructFromNeighbors_k_reorder_set", _wrap_ReconstructFromNeighbors_k_reorder_set, METH_VARARGS, NULL},
86900  { (char *)"ReconstructFromNeighbors_k_reorder_get", _wrap_ReconstructFromNeighbors_k_reorder_get, METH_VARARGS, NULL},
86901  { (char *)"ReconstructFromNeighbors_codebook_set", _wrap_ReconstructFromNeighbors_codebook_set, METH_VARARGS, NULL},
86902  { (char *)"ReconstructFromNeighbors_codebook_get", _wrap_ReconstructFromNeighbors_codebook_get, METH_VARARGS, NULL},
86903  { (char *)"ReconstructFromNeighbors_codes_set", _wrap_ReconstructFromNeighbors_codes_set, METH_VARARGS, NULL},
86904  { (char *)"ReconstructFromNeighbors_codes_get", _wrap_ReconstructFromNeighbors_codes_get, METH_VARARGS, NULL},
86905  { (char *)"ReconstructFromNeighbors_ntotal_set", _wrap_ReconstructFromNeighbors_ntotal_set, METH_VARARGS, NULL},
86906  { (char *)"ReconstructFromNeighbors_ntotal_get", _wrap_ReconstructFromNeighbors_ntotal_get, METH_VARARGS, NULL},
86907  { (char *)"ReconstructFromNeighbors_d_set", _wrap_ReconstructFromNeighbors_d_set, METH_VARARGS, NULL},
86908  { (char *)"ReconstructFromNeighbors_d_get", _wrap_ReconstructFromNeighbors_d_get, METH_VARARGS, NULL},
86909  { (char *)"ReconstructFromNeighbors_dsub_set", _wrap_ReconstructFromNeighbors_dsub_set, METH_VARARGS, NULL},
86910  { (char *)"ReconstructFromNeighbors_dsub_get", _wrap_ReconstructFromNeighbors_dsub_get, METH_VARARGS, NULL},
86911  { (char *)"new_ReconstructFromNeighbors", _wrap_new_ReconstructFromNeighbors, METH_VARARGS, NULL},
86912  { (char *)"ReconstructFromNeighbors_add_codes", _wrap_ReconstructFromNeighbors_add_codes, METH_VARARGS, NULL},
86913  { (char *)"ReconstructFromNeighbors_compute_distances", _wrap_ReconstructFromNeighbors_compute_distances, METH_VARARGS, NULL},
86914  { (char *)"ReconstructFromNeighbors_estimate_code", _wrap_ReconstructFromNeighbors_estimate_code, METH_VARARGS, NULL},
86915  { (char *)"ReconstructFromNeighbors_reconstruct", _wrap_ReconstructFromNeighbors_reconstruct, METH_VARARGS, NULL},
86916  { (char *)"ReconstructFromNeighbors_reconstruct_n", _wrap_ReconstructFromNeighbors_reconstruct_n, METH_VARARGS, NULL},
86917  { (char *)"ReconstructFromNeighbors_get_neighbor_table", _wrap_ReconstructFromNeighbors_get_neighbor_table, METH_VARARGS, NULL},
86918  { (char *)"delete_ReconstructFromNeighbors", _wrap_delete_ReconstructFromNeighbors, METH_VARARGS, NULL},
86919  { (char *)"ReconstructFromNeighbors_swigregister", ReconstructFromNeighbors_swigregister, METH_VARARGS, NULL},
86920  { (char *)"IndexHNSW_hnsw_set", _wrap_IndexHNSW_hnsw_set, METH_VARARGS, NULL},
86921  { (char *)"IndexHNSW_hnsw_get", _wrap_IndexHNSW_hnsw_get, METH_VARARGS, NULL},
86922  { (char *)"IndexHNSW_own_fields_set", _wrap_IndexHNSW_own_fields_set, METH_VARARGS, NULL},
86923  { (char *)"IndexHNSW_own_fields_get", _wrap_IndexHNSW_own_fields_get, METH_VARARGS, NULL},
86924  { (char *)"IndexHNSW_storage_set", _wrap_IndexHNSW_storage_set, METH_VARARGS, NULL},
86925  { (char *)"IndexHNSW_storage_get", _wrap_IndexHNSW_storage_get, METH_VARARGS, NULL},
86926  { (char *)"IndexHNSW_reconstruct_from_neighbors_set", _wrap_IndexHNSW_reconstruct_from_neighbors_set, METH_VARARGS, NULL},
86927  { (char *)"IndexHNSW_reconstruct_from_neighbors_get", _wrap_IndexHNSW_reconstruct_from_neighbors_get, METH_VARARGS, NULL},
86928  { (char *)"delete_IndexHNSW", _wrap_delete_IndexHNSW, METH_VARARGS, NULL},
86929  { (char *)"IndexHNSW_get_distance_computer", _wrap_IndexHNSW_get_distance_computer, METH_VARARGS, NULL},
86930  { (char *)"IndexHNSW_add", _wrap_IndexHNSW_add, METH_VARARGS, NULL},
86931  { (char *)"IndexHNSW_train", _wrap_IndexHNSW_train, METH_VARARGS, NULL},
86932  { (char *)"IndexHNSW_search", _wrap_IndexHNSW_search, METH_VARARGS, NULL},
86933  { (char *)"IndexHNSW_reconstruct", _wrap_IndexHNSW_reconstruct, METH_VARARGS, NULL},
86934  { (char *)"IndexHNSW_reset", _wrap_IndexHNSW_reset, METH_VARARGS, NULL},
86935  { (char *)"IndexHNSW_shrink_level_0_neighbors", _wrap_IndexHNSW_shrink_level_0_neighbors, METH_VARARGS, NULL},
86936  { (char *)"IndexHNSW_search_level_0", _wrap_IndexHNSW_search_level_0, METH_VARARGS, NULL},
86937  { (char *)"IndexHNSW_init_level_0_from_knngraph", _wrap_IndexHNSW_init_level_0_from_knngraph, METH_VARARGS, NULL},
86938  { (char *)"IndexHNSW_init_level_0_from_entry_points", _wrap_IndexHNSW_init_level_0_from_entry_points, METH_VARARGS, NULL},
86939  { (char *)"IndexHNSW_reorder_links", _wrap_IndexHNSW_reorder_links, METH_VARARGS, NULL},
86940  { (char *)"IndexHNSW_link_singletons", _wrap_IndexHNSW_link_singletons, METH_VARARGS, NULL},
86941  { (char *)"IndexHNSW_swigregister", IndexHNSW_swigregister, METH_VARARGS, NULL},
86942  { (char *)"new_IndexHNSWFlat", _wrap_new_IndexHNSWFlat, METH_VARARGS, NULL},
86943  { (char *)"IndexHNSWFlat_get_distance_computer", _wrap_IndexHNSWFlat_get_distance_computer, METH_VARARGS, NULL},
86944  { (char *)"delete_IndexHNSWFlat", _wrap_delete_IndexHNSWFlat, METH_VARARGS, NULL},
86945  { (char *)"IndexHNSWFlat_swigregister", IndexHNSWFlat_swigregister, METH_VARARGS, NULL},
86946  { (char *)"new_IndexHNSWPQ", _wrap_new_IndexHNSWPQ, METH_VARARGS, NULL},
86947  { (char *)"IndexHNSWPQ_train", _wrap_IndexHNSWPQ_train, METH_VARARGS, NULL},
86948  { (char *)"IndexHNSWPQ_get_distance_computer", _wrap_IndexHNSWPQ_get_distance_computer, METH_VARARGS, NULL},
86949  { (char *)"delete_IndexHNSWPQ", _wrap_delete_IndexHNSWPQ, METH_VARARGS, NULL},
86950  { (char *)"IndexHNSWPQ_swigregister", IndexHNSWPQ_swigregister, METH_VARARGS, NULL},
86951  { (char *)"new_IndexHNSWSQ", _wrap_new_IndexHNSWSQ, METH_VARARGS, NULL},
86952  { (char *)"IndexHNSWSQ_get_distance_computer", _wrap_IndexHNSWSQ_get_distance_computer, METH_VARARGS, NULL},
86953  { (char *)"delete_IndexHNSWSQ", _wrap_delete_IndexHNSWSQ, METH_VARARGS, NULL},
86954  { (char *)"IndexHNSWSQ_swigregister", IndexHNSWSQ_swigregister, METH_VARARGS, NULL},
86955  { (char *)"new_IndexHNSW2Level", _wrap_new_IndexHNSW2Level, METH_VARARGS, NULL},
86956  { (char *)"IndexHNSW2Level_get_distance_computer", _wrap_IndexHNSW2Level_get_distance_computer, METH_VARARGS, NULL},
86957  { (char *)"IndexHNSW2Level_flip_to_ivf", _wrap_IndexHNSW2Level_flip_to_ivf, METH_VARARGS, NULL},
86958  { (char *)"IndexHNSW2Level_search", _wrap_IndexHNSW2Level_search, METH_VARARGS, NULL},
86959  { (char *)"delete_IndexHNSW2Level", _wrap_delete_IndexHNSW2Level, METH_VARARGS, NULL},
86960  { (char *)"IndexHNSW2Level_swigregister", IndexHNSW2Level_swigregister, METH_VARARGS, NULL},
86961  { (char *)"IndexIVFFlat_add_core", _wrap_IndexIVFFlat_add_core, METH_VARARGS, NULL},
86962  { (char *)"IndexIVFFlat_add_with_ids", _wrap_IndexIVFFlat_add_with_ids, METH_VARARGS, NULL},
86963  { (char *)"IndexIVFFlat_encode_vectors", _wrap_IndexIVFFlat_encode_vectors, METH_VARARGS, NULL},
86964  { (char *)"IndexIVFFlat_get_InvertedListScanner", _wrap_IndexIVFFlat_get_InvertedListScanner, METH_VARARGS, NULL},
86965  { (char *)"IndexIVFFlat_range_search", _wrap_IndexIVFFlat_range_search, METH_VARARGS, NULL},
86966  { (char *)"IndexIVFFlat_update_vectors", _wrap_IndexIVFFlat_update_vectors, METH_VARARGS, NULL},
86967  { (char *)"IndexIVFFlat_reconstruct_from_offset", _wrap_IndexIVFFlat_reconstruct_from_offset, METH_VARARGS, NULL},
86968  { (char *)"new_IndexIVFFlat", _wrap_new_IndexIVFFlat, METH_VARARGS, NULL},
86969  { (char *)"delete_IndexIVFFlat", _wrap_delete_IndexIVFFlat, METH_VARARGS, NULL},
86970  { (char *)"IndexIVFFlat_swigregister", IndexIVFFlat_swigregister, METH_VARARGS, NULL},
86971  { (char *)"IndexIVFFlatDedup_instances_set", _wrap_IndexIVFFlatDedup_instances_set, METH_VARARGS, NULL},
86972  { (char *)"IndexIVFFlatDedup_instances_get", _wrap_IndexIVFFlatDedup_instances_get, METH_VARARGS, NULL},
86973  { (char *)"IndexIVFFlatDedup_train", _wrap_IndexIVFFlatDedup_train, METH_VARARGS, NULL},
86974  { (char *)"IndexIVFFlatDedup_add_with_ids", _wrap_IndexIVFFlatDedup_add_with_ids, METH_VARARGS, NULL},
86975  { (char *)"IndexIVFFlatDedup_search_preassigned", _wrap_IndexIVFFlatDedup_search_preassigned, METH_VARARGS, NULL},
86976  { (char *)"IndexIVFFlatDedup_remove_ids", _wrap_IndexIVFFlatDedup_remove_ids, METH_VARARGS, NULL},
86977  { (char *)"IndexIVFFlatDedup_range_search", _wrap_IndexIVFFlatDedup_range_search, METH_VARARGS, NULL},
86978  { (char *)"IndexIVFFlatDedup_update_vectors", _wrap_IndexIVFFlatDedup_update_vectors, METH_VARARGS, NULL},
86979  { (char *)"IndexIVFFlatDedup_reconstruct_from_offset", _wrap_IndexIVFFlatDedup_reconstruct_from_offset, METH_VARARGS, NULL},
86980  { (char *)"new_IndexIVFFlatDedup", _wrap_new_IndexIVFFlatDedup, METH_VARARGS, NULL},
86981  { (char *)"delete_IndexIVFFlatDedup", _wrap_delete_IndexIVFFlatDedup, METH_VARARGS, NULL},
86982  { (char *)"IndexIVFFlatDedup_swigregister", IndexIVFFlatDedup_swigregister, METH_VARARGS, NULL},
86983  { (char *)"OnDiskInvertedLists_lists_set", _wrap_OnDiskInvertedLists_lists_set, METH_VARARGS, NULL},
86984  { (char *)"OnDiskInvertedLists_lists_get", _wrap_OnDiskInvertedLists_lists_get, METH_VARARGS, NULL},
86985  { (char *)"OnDiskInvertedLists_slots_set", _wrap_OnDiskInvertedLists_slots_set, METH_VARARGS, NULL},
86986  { (char *)"OnDiskInvertedLists_slots_get", _wrap_OnDiskInvertedLists_slots_get, METH_VARARGS, NULL},
86987  { (char *)"OnDiskInvertedLists_filename_set", _wrap_OnDiskInvertedLists_filename_set, METH_VARARGS, NULL},
86988  { (char *)"OnDiskInvertedLists_filename_get", _wrap_OnDiskInvertedLists_filename_get, METH_VARARGS, NULL},
86989  { (char *)"OnDiskInvertedLists_totsize_set", _wrap_OnDiskInvertedLists_totsize_set, METH_VARARGS, NULL},
86990  { (char *)"OnDiskInvertedLists_totsize_get", _wrap_OnDiskInvertedLists_totsize_get, METH_VARARGS, NULL},
86991  { (char *)"OnDiskInvertedLists_ptr_set", _wrap_OnDiskInvertedLists_ptr_set, METH_VARARGS, NULL},
86992  { (char *)"OnDiskInvertedLists_ptr_get", _wrap_OnDiskInvertedLists_ptr_get, METH_VARARGS, NULL},
86993  { (char *)"OnDiskInvertedLists_read_only_set", _wrap_OnDiskInvertedLists_read_only_set, METH_VARARGS, NULL},
86994  { (char *)"OnDiskInvertedLists_read_only_get", _wrap_OnDiskInvertedLists_read_only_get, METH_VARARGS, NULL},
86995  { (char *)"OnDiskInvertedLists_list_size", _wrap_OnDiskInvertedLists_list_size, METH_VARARGS, NULL},
86996  { (char *)"OnDiskInvertedLists_get_codes", _wrap_OnDiskInvertedLists_get_codes, METH_VARARGS, NULL},
86997  { (char *)"OnDiskInvertedLists_get_ids", _wrap_OnDiskInvertedLists_get_ids, METH_VARARGS, NULL},
86998  { (char *)"OnDiskInvertedLists_add_entries", _wrap_OnDiskInvertedLists_add_entries, METH_VARARGS, NULL},
86999  { (char *)"OnDiskInvertedLists_update_entries", _wrap_OnDiskInvertedLists_update_entries, METH_VARARGS, NULL},
87000  { (char *)"OnDiskInvertedLists_resize", _wrap_OnDiskInvertedLists_resize, METH_VARARGS, NULL},
87001  { (char *)"OnDiskInvertedLists_merge_from", _wrap_OnDiskInvertedLists_merge_from, METH_VARARGS, NULL},
87002  { (char *)"OnDiskInvertedLists_prefetch_lists", _wrap_OnDiskInvertedLists_prefetch_lists, METH_VARARGS, NULL},
87003  { (char *)"delete_OnDiskInvertedLists", _wrap_delete_OnDiskInvertedLists, METH_VARARGS, NULL},
87004  { (char *)"OnDiskInvertedLists_locks_set", _wrap_OnDiskInvertedLists_locks_set, METH_VARARGS, NULL},
87005  { (char *)"OnDiskInvertedLists_locks_get", _wrap_OnDiskInvertedLists_locks_get, METH_VARARGS, NULL},
87006  { (char *)"OnDiskInvertedLists_pf_set", _wrap_OnDiskInvertedLists_pf_set, METH_VARARGS, NULL},
87007  { (char *)"OnDiskInvertedLists_pf_get", _wrap_OnDiskInvertedLists_pf_get, METH_VARARGS, NULL},
87008  { (char *)"OnDiskInvertedLists_do_mmap", _wrap_OnDiskInvertedLists_do_mmap, METH_VARARGS, NULL},
87009  { (char *)"OnDiskInvertedLists_update_totsize", _wrap_OnDiskInvertedLists_update_totsize, METH_VARARGS, NULL},
87010  { (char *)"OnDiskInvertedLists_resize_locked", _wrap_OnDiskInvertedLists_resize_locked, METH_VARARGS, NULL},
87011  { (char *)"OnDiskInvertedLists_allocate_slot", _wrap_OnDiskInvertedLists_allocate_slot, METH_VARARGS, NULL},
87012  { (char *)"OnDiskInvertedLists_free_slot", _wrap_OnDiskInvertedLists_free_slot, METH_VARARGS, NULL},
87013  { (char *)"new_OnDiskInvertedLists", _wrap_new_OnDiskInvertedLists, METH_VARARGS, NULL},
87014  { (char *)"OnDiskInvertedLists_swigregister", OnDiskInvertedLists_swigregister, METH_VARARGS, NULL},
87015  { (char *)"IVFPQSearchParameters_scan_table_threshold_set", _wrap_IVFPQSearchParameters_scan_table_threshold_set, METH_VARARGS, NULL},
87016  { (char *)"IVFPQSearchParameters_scan_table_threshold_get", _wrap_IVFPQSearchParameters_scan_table_threshold_get, METH_VARARGS, NULL},
87017  { (char *)"IVFPQSearchParameters_polysemous_ht_set", _wrap_IVFPQSearchParameters_polysemous_ht_set, METH_VARARGS, NULL},
87018  { (char *)"IVFPQSearchParameters_polysemous_ht_get", _wrap_IVFPQSearchParameters_polysemous_ht_get, METH_VARARGS, NULL},
87019  { (char *)"delete_IVFPQSearchParameters", _wrap_delete_IVFPQSearchParameters, METH_VARARGS, NULL},
87020  { (char *)"new_IVFPQSearchParameters", _wrap_new_IVFPQSearchParameters, METH_VARARGS, NULL},
87021  { (char *)"IVFPQSearchParameters_swigregister", IVFPQSearchParameters_swigregister, METH_VARARGS, NULL},
87022  { (char *)"IndexIVFPQ_by_residual_set", _wrap_IndexIVFPQ_by_residual_set, METH_VARARGS, NULL},
87023  { (char *)"IndexIVFPQ_by_residual_get", _wrap_IndexIVFPQ_by_residual_get, METH_VARARGS, NULL},
87024  { (char *)"IndexIVFPQ_pq_set", _wrap_IndexIVFPQ_pq_set, METH_VARARGS, NULL},
87025  { (char *)"IndexIVFPQ_pq_get", _wrap_IndexIVFPQ_pq_get, METH_VARARGS, NULL},
87026  { (char *)"IndexIVFPQ_do_polysemous_training_set", _wrap_IndexIVFPQ_do_polysemous_training_set, METH_VARARGS, NULL},
87027  { (char *)"IndexIVFPQ_do_polysemous_training_get", _wrap_IndexIVFPQ_do_polysemous_training_get, METH_VARARGS, NULL},
87028  { (char *)"IndexIVFPQ_polysemous_training_set", _wrap_IndexIVFPQ_polysemous_training_set, METH_VARARGS, NULL},
87029  { (char *)"IndexIVFPQ_polysemous_training_get", _wrap_IndexIVFPQ_polysemous_training_get, METH_VARARGS, NULL},
87030  { (char *)"IndexIVFPQ_scan_table_threshold_set", _wrap_IndexIVFPQ_scan_table_threshold_set, METH_VARARGS, NULL},
87031  { (char *)"IndexIVFPQ_scan_table_threshold_get", _wrap_IndexIVFPQ_scan_table_threshold_get, METH_VARARGS, NULL},
87032  { (char *)"IndexIVFPQ_polysemous_ht_set", _wrap_IndexIVFPQ_polysemous_ht_set, METH_VARARGS, NULL},
87033  { (char *)"IndexIVFPQ_polysemous_ht_get", _wrap_IndexIVFPQ_polysemous_ht_get, METH_VARARGS, NULL},
87034  { (char *)"IndexIVFPQ_use_precomputed_table_set", _wrap_IndexIVFPQ_use_precomputed_table_set, METH_VARARGS, NULL},
87035  { (char *)"IndexIVFPQ_use_precomputed_table_get", _wrap_IndexIVFPQ_use_precomputed_table_get, METH_VARARGS, NULL},
87036  { (char *)"IndexIVFPQ_precomputed_table_max_bytes_get", _wrap_IndexIVFPQ_precomputed_table_max_bytes_get, METH_VARARGS, NULL},
87037  { (char *)"IndexIVFPQ_precomputed_table_max_bytes_set", _wrap_IndexIVFPQ_precomputed_table_max_bytes_set, METH_VARARGS, NULL},
87038  { (char *)"IndexIVFPQ_precomputed_table_set", _wrap_IndexIVFPQ_precomputed_table_set, METH_VARARGS, NULL},
87039  { (char *)"IndexIVFPQ_precomputed_table_get", _wrap_IndexIVFPQ_precomputed_table_get, METH_VARARGS, NULL},
87040  { (char *)"IndexIVFPQ_add_with_ids", _wrap_IndexIVFPQ_add_with_ids, METH_VARARGS, NULL},
87041  { (char *)"IndexIVFPQ_encode_vectors", _wrap_IndexIVFPQ_encode_vectors, METH_VARARGS, NULL},
87042  { (char *)"IndexIVFPQ_add_core_o", _wrap_IndexIVFPQ_add_core_o, METH_VARARGS, NULL},
87043  { (char *)"IndexIVFPQ_train_residual", _wrap_IndexIVFPQ_train_residual, METH_VARARGS, NULL},
87044  { (char *)"IndexIVFPQ_train_residual_o", _wrap_IndexIVFPQ_train_residual_o, METH_VARARGS, NULL},
87045  { (char *)"IndexIVFPQ_reconstruct_from_offset", _wrap_IndexIVFPQ_reconstruct_from_offset, METH_VARARGS, NULL},
87046  { (char *)"IndexIVFPQ_find_duplicates", _wrap_IndexIVFPQ_find_duplicates, METH_VARARGS, NULL},
87047  { (char *)"IndexIVFPQ_encode", _wrap_IndexIVFPQ_encode, METH_VARARGS, NULL},
87048  { (char *)"IndexIVFPQ_encode_multiple", _wrap_IndexIVFPQ_encode_multiple, METH_VARARGS, NULL},
87049  { (char *)"IndexIVFPQ_decode_multiple", _wrap_IndexIVFPQ_decode_multiple, METH_VARARGS, NULL},
87050  { (char *)"IndexIVFPQ_get_InvertedListScanner", _wrap_IndexIVFPQ_get_InvertedListScanner, METH_VARARGS, NULL},
87051  { (char *)"IndexIVFPQ_precompute_table", _wrap_IndexIVFPQ_precompute_table, METH_VARARGS, NULL},
87052  { (char *)"new_IndexIVFPQ", _wrap_new_IndexIVFPQ, METH_VARARGS, NULL},
87053  { (char *)"delete_IndexIVFPQ", _wrap_delete_IndexIVFPQ, METH_VARARGS, NULL},
87054  { (char *)"IndexIVFPQ_swigregister", IndexIVFPQ_swigregister, METH_VARARGS, NULL},
87055  { (char *)"IndexIVFPQStats_nrefine_set", _wrap_IndexIVFPQStats_nrefine_set, METH_VARARGS, NULL},
87056  { (char *)"IndexIVFPQStats_nrefine_get", _wrap_IndexIVFPQStats_nrefine_get, METH_VARARGS, NULL},
87057  { (char *)"IndexIVFPQStats_n_hamming_pass_set", _wrap_IndexIVFPQStats_n_hamming_pass_set, METH_VARARGS, NULL},
87058  { (char *)"IndexIVFPQStats_n_hamming_pass_get", _wrap_IndexIVFPQStats_n_hamming_pass_get, METH_VARARGS, NULL},
87059  { (char *)"IndexIVFPQStats_search_cycles_set", _wrap_IndexIVFPQStats_search_cycles_set, METH_VARARGS, NULL},
87060  { (char *)"IndexIVFPQStats_search_cycles_get", _wrap_IndexIVFPQStats_search_cycles_get, METH_VARARGS, NULL},
87061  { (char *)"IndexIVFPQStats_refine_cycles_set", _wrap_IndexIVFPQStats_refine_cycles_set, METH_VARARGS, NULL},
87062  { (char *)"IndexIVFPQStats_refine_cycles_get", _wrap_IndexIVFPQStats_refine_cycles_get, METH_VARARGS, NULL},
87063  { (char *)"new_IndexIVFPQStats", _wrap_new_IndexIVFPQStats, METH_VARARGS, NULL},
87064  { (char *)"IndexIVFPQStats_reset", _wrap_IndexIVFPQStats_reset, METH_VARARGS, NULL},
87065  { (char *)"delete_IndexIVFPQStats", _wrap_delete_IndexIVFPQStats, METH_VARARGS, NULL},
87066  { (char *)"IndexIVFPQStats_swigregister", IndexIVFPQStats_swigregister, METH_VARARGS, NULL},
87067  { (char *)"IndexIVFPQR_refine_pq_set", _wrap_IndexIVFPQR_refine_pq_set, METH_VARARGS, NULL},
87068  { (char *)"IndexIVFPQR_refine_pq_get", _wrap_IndexIVFPQR_refine_pq_get, METH_VARARGS, NULL},
87069  { (char *)"IndexIVFPQR_refine_codes_set", _wrap_IndexIVFPQR_refine_codes_set, METH_VARARGS, NULL},
87070  { (char *)"IndexIVFPQR_refine_codes_get", _wrap_IndexIVFPQR_refine_codes_get, METH_VARARGS, NULL},
87071  { (char *)"IndexIVFPQR_k_factor_set", _wrap_IndexIVFPQR_k_factor_set, METH_VARARGS, NULL},
87072  { (char *)"IndexIVFPQR_k_factor_get", _wrap_IndexIVFPQR_k_factor_get, METH_VARARGS, NULL},
87073  { (char *)"IndexIVFPQR_reset", _wrap_IndexIVFPQR_reset, METH_VARARGS, NULL},
87074  { (char *)"IndexIVFPQR_remove_ids", _wrap_IndexIVFPQR_remove_ids, METH_VARARGS, NULL},
87075  { (char *)"IndexIVFPQR_train_residual", _wrap_IndexIVFPQR_train_residual, METH_VARARGS, NULL},
87076  { (char *)"IndexIVFPQR_add_with_ids", _wrap_IndexIVFPQR_add_with_ids, METH_VARARGS, NULL},
87077  { (char *)"IndexIVFPQR_add_core", _wrap_IndexIVFPQR_add_core, METH_VARARGS, NULL},
87078  { (char *)"IndexIVFPQR_reconstruct_from_offset", _wrap_IndexIVFPQR_reconstruct_from_offset, METH_VARARGS, NULL},
87079  { (char *)"IndexIVFPQR_merge_from", _wrap_IndexIVFPQR_merge_from, METH_VARARGS, NULL},
87080  { (char *)"IndexIVFPQR_search_preassigned", _wrap_IndexIVFPQR_search_preassigned, METH_VARARGS, NULL},
87081  { (char *)"new_IndexIVFPQR", _wrap_new_IndexIVFPQR, METH_VARARGS, NULL},
87082  { (char *)"delete_IndexIVFPQR", _wrap_delete_IndexIVFPQR, METH_VARARGS, NULL},
87083  { (char *)"IndexIVFPQR_swigregister", IndexIVFPQR_swigregister, METH_VARARGS, NULL},
87084  { (char *)"Index2Layer_q1_set", _wrap_Index2Layer_q1_set, METH_VARARGS, NULL},
87085  { (char *)"Index2Layer_q1_get", _wrap_Index2Layer_q1_get, METH_VARARGS, NULL},
87086  { (char *)"Index2Layer_pq_set", _wrap_Index2Layer_pq_set, METH_VARARGS, NULL},
87087  { (char *)"Index2Layer_pq_get", _wrap_Index2Layer_pq_get, METH_VARARGS, NULL},
87088  { (char *)"Index2Layer_codes_set", _wrap_Index2Layer_codes_set, METH_VARARGS, NULL},
87089  { (char *)"Index2Layer_codes_get", _wrap_Index2Layer_codes_get, METH_VARARGS, NULL},
87090  { (char *)"Index2Layer_code_size_1_set", _wrap_Index2Layer_code_size_1_set, METH_VARARGS, NULL},
87091  { (char *)"Index2Layer_code_size_1_get", _wrap_Index2Layer_code_size_1_get, METH_VARARGS, NULL},
87092  { (char *)"Index2Layer_code_size_2_set", _wrap_Index2Layer_code_size_2_set, METH_VARARGS, NULL},
87093  { (char *)"Index2Layer_code_size_2_get", _wrap_Index2Layer_code_size_2_get, METH_VARARGS, NULL},
87094  { (char *)"Index2Layer_code_size_set", _wrap_Index2Layer_code_size_set, METH_VARARGS, NULL},
87095  { (char *)"Index2Layer_code_size_get", _wrap_Index2Layer_code_size_get, METH_VARARGS, NULL},
87096  { (char *)"new_Index2Layer", _wrap_new_Index2Layer, METH_VARARGS, NULL},
87097  { (char *)"delete_Index2Layer", _wrap_delete_Index2Layer, METH_VARARGS, NULL},
87098  { (char *)"Index2Layer_train", _wrap_Index2Layer_train, METH_VARARGS, NULL},
87099  { (char *)"Index2Layer_add", _wrap_Index2Layer_add, METH_VARARGS, NULL},
87100  { (char *)"Index2Layer_search", _wrap_Index2Layer_search, METH_VARARGS, NULL},
87101  { (char *)"Index2Layer_reconstruct_n", _wrap_Index2Layer_reconstruct_n, METH_VARARGS, NULL},
87102  { (char *)"Index2Layer_reconstruct", _wrap_Index2Layer_reconstruct, METH_VARARGS, NULL},
87103  { (char *)"Index2Layer_reset", _wrap_Index2Layer_reset, METH_VARARGS, NULL},
87104  { (char *)"Index2Layer_transfer_to_IVFPQ", _wrap_Index2Layer_transfer_to_IVFPQ, METH_VARARGS, NULL},
87105  { (char *)"Index2Layer_swigregister", Index2Layer_swigregister, METH_VARARGS, NULL},
87106  { (char *)"IndexBinary_d_set", _wrap_IndexBinary_d_set, METH_VARARGS, NULL},
87107  { (char *)"IndexBinary_d_get", _wrap_IndexBinary_d_get, METH_VARARGS, NULL},
87108  { (char *)"IndexBinary_code_size_set", _wrap_IndexBinary_code_size_set, METH_VARARGS, NULL},
87109  { (char *)"IndexBinary_code_size_get", _wrap_IndexBinary_code_size_get, METH_VARARGS, NULL},
87110  { (char *)"IndexBinary_ntotal_set", _wrap_IndexBinary_ntotal_set, METH_VARARGS, NULL},
87111  { (char *)"IndexBinary_ntotal_get", _wrap_IndexBinary_ntotal_get, METH_VARARGS, NULL},
87112  { (char *)"IndexBinary_verbose_set", _wrap_IndexBinary_verbose_set, METH_VARARGS, NULL},
87113  { (char *)"IndexBinary_verbose_get", _wrap_IndexBinary_verbose_get, METH_VARARGS, NULL},
87114  { (char *)"IndexBinary_is_trained_set", _wrap_IndexBinary_is_trained_set, METH_VARARGS, NULL},
87115  { (char *)"IndexBinary_is_trained_get", _wrap_IndexBinary_is_trained_get, METH_VARARGS, NULL},
87116  { (char *)"IndexBinary_metric_type_set", _wrap_IndexBinary_metric_type_set, METH_VARARGS, NULL},
87117  { (char *)"IndexBinary_metric_type_get", _wrap_IndexBinary_metric_type_get, METH_VARARGS, NULL},
87118  { (char *)"delete_IndexBinary", _wrap_delete_IndexBinary, METH_VARARGS, NULL},
87119  { (char *)"IndexBinary_train", _wrap_IndexBinary_train, METH_VARARGS, NULL},
87120  { (char *)"IndexBinary_add", _wrap_IndexBinary_add, METH_VARARGS, NULL},
87121  { (char *)"IndexBinary_add_with_ids", _wrap_IndexBinary_add_with_ids, METH_VARARGS, NULL},
87122  { (char *)"IndexBinary_search", _wrap_IndexBinary_search, METH_VARARGS, NULL},
87123  { (char *)"IndexBinary_range_search", _wrap_IndexBinary_range_search, METH_VARARGS, NULL},
87124  { (char *)"IndexBinary_assign", _wrap_IndexBinary_assign, METH_VARARGS, NULL},
87125  { (char *)"IndexBinary_reset", _wrap_IndexBinary_reset, METH_VARARGS, NULL},
87126  { (char *)"IndexBinary_remove_ids", _wrap_IndexBinary_remove_ids, METH_VARARGS, NULL},
87127  { (char *)"IndexBinary_reconstruct", _wrap_IndexBinary_reconstruct, METH_VARARGS, NULL},
87128  { (char *)"IndexBinary_reconstruct_n", _wrap_IndexBinary_reconstruct_n, METH_VARARGS, NULL},
87129  { (char *)"IndexBinary_search_and_reconstruct", _wrap_IndexBinary_search_and_reconstruct, METH_VARARGS, NULL},
87130  { (char *)"IndexBinary_display", _wrap_IndexBinary_display, METH_VARARGS, NULL},
87131  { (char *)"IndexBinary_swigregister", IndexBinary_swigregister, METH_VARARGS, NULL},
87132  { (char *)"IndexBinaryFlat_xb_set", _wrap_IndexBinaryFlat_xb_set, METH_VARARGS, NULL},
87133  { (char *)"IndexBinaryFlat_xb_get", _wrap_IndexBinaryFlat_xb_get, METH_VARARGS, NULL},
87134  { (char *)"IndexBinaryFlat_use_heap_set", _wrap_IndexBinaryFlat_use_heap_set, METH_VARARGS, NULL},
87135  { (char *)"IndexBinaryFlat_use_heap_get", _wrap_IndexBinaryFlat_use_heap_get, METH_VARARGS, NULL},
87136  { (char *)"IndexBinaryFlat_query_batch_size_set", _wrap_IndexBinaryFlat_query_batch_size_set, METH_VARARGS, NULL},
87137  { (char *)"IndexBinaryFlat_query_batch_size_get", _wrap_IndexBinaryFlat_query_batch_size_get, METH_VARARGS, NULL},
87138  { (char *)"IndexBinaryFlat_add", _wrap_IndexBinaryFlat_add, METH_VARARGS, NULL},
87139  { (char *)"IndexBinaryFlat_reset", _wrap_IndexBinaryFlat_reset, METH_VARARGS, NULL},
87140  { (char *)"IndexBinaryFlat_search", _wrap_IndexBinaryFlat_search, METH_VARARGS, NULL},
87141  { (char *)"IndexBinaryFlat_reconstruct", _wrap_IndexBinaryFlat_reconstruct, METH_VARARGS, NULL},
87142  { (char *)"IndexBinaryFlat_remove_ids", _wrap_IndexBinaryFlat_remove_ids, METH_VARARGS, NULL},
87143  { (char *)"new_IndexBinaryFlat", _wrap_new_IndexBinaryFlat, METH_VARARGS, NULL},
87144  { (char *)"delete_IndexBinaryFlat", _wrap_delete_IndexBinaryFlat, METH_VARARGS, NULL},
87145  { (char *)"IndexBinaryFlat_swigregister", IndexBinaryFlat_swigregister, METH_VARARGS, NULL},
87146  { (char *)"IndexBinaryIVF_invlists_set", _wrap_IndexBinaryIVF_invlists_set, METH_VARARGS, NULL},
87147  { (char *)"IndexBinaryIVF_invlists_get", _wrap_IndexBinaryIVF_invlists_get, METH_VARARGS, NULL},
87148  { (char *)"IndexBinaryIVF_own_invlists_set", _wrap_IndexBinaryIVF_own_invlists_set, METH_VARARGS, NULL},
87149  { (char *)"IndexBinaryIVF_own_invlists_get", _wrap_IndexBinaryIVF_own_invlists_get, METH_VARARGS, NULL},
87150  { (char *)"IndexBinaryIVF_nprobe_set", _wrap_IndexBinaryIVF_nprobe_set, METH_VARARGS, NULL},
87151  { (char *)"IndexBinaryIVF_nprobe_get", _wrap_IndexBinaryIVF_nprobe_get, METH_VARARGS, NULL},
87152  { (char *)"IndexBinaryIVF_max_codes_set", _wrap_IndexBinaryIVF_max_codes_set, METH_VARARGS, NULL},
87153  { (char *)"IndexBinaryIVF_max_codes_get", _wrap_IndexBinaryIVF_max_codes_get, METH_VARARGS, NULL},
87154  { (char *)"IndexBinaryIVF_use_heap_set", _wrap_IndexBinaryIVF_use_heap_set, METH_VARARGS, NULL},
87155  { (char *)"IndexBinaryIVF_use_heap_get", _wrap_IndexBinaryIVF_use_heap_get, METH_VARARGS, NULL},
87156  { (char *)"IndexBinaryIVF_maintain_direct_map_set", _wrap_IndexBinaryIVF_maintain_direct_map_set, METH_VARARGS, NULL},
87157  { (char *)"IndexBinaryIVF_maintain_direct_map_get", _wrap_IndexBinaryIVF_maintain_direct_map_get, METH_VARARGS, NULL},
87158  { (char *)"IndexBinaryIVF_direct_map_set", _wrap_IndexBinaryIVF_direct_map_set, METH_VARARGS, NULL},
87159  { (char *)"IndexBinaryIVF_direct_map_get", _wrap_IndexBinaryIVF_direct_map_get, METH_VARARGS, NULL},
87160  { (char *)"IndexBinaryIVF_quantizer_set", _wrap_IndexBinaryIVF_quantizer_set, METH_VARARGS, NULL},
87161  { (char *)"IndexBinaryIVF_quantizer_get", _wrap_IndexBinaryIVF_quantizer_get, METH_VARARGS, NULL},
87162  { (char *)"IndexBinaryIVF_nlist_set", _wrap_IndexBinaryIVF_nlist_set, METH_VARARGS, NULL},
87163  { (char *)"IndexBinaryIVF_nlist_get", _wrap_IndexBinaryIVF_nlist_get, METH_VARARGS, NULL},
87164  { (char *)"IndexBinaryIVF_own_fields_set", _wrap_IndexBinaryIVF_own_fields_set, METH_VARARGS, NULL},
87165  { (char *)"IndexBinaryIVF_own_fields_get", _wrap_IndexBinaryIVF_own_fields_get, METH_VARARGS, NULL},
87166  { (char *)"IndexBinaryIVF_cp_set", _wrap_IndexBinaryIVF_cp_set, METH_VARARGS, NULL},
87167  { (char *)"IndexBinaryIVF_cp_get", _wrap_IndexBinaryIVF_cp_get, METH_VARARGS, NULL},
87168  { (char *)"IndexBinaryIVF_clustering_index_set", _wrap_IndexBinaryIVF_clustering_index_set, METH_VARARGS, NULL},
87169  { (char *)"IndexBinaryIVF_clustering_index_get", _wrap_IndexBinaryIVF_clustering_index_get, METH_VARARGS, NULL},
87170  { (char *)"IndexBinaryIVF_train_q1", _wrap_IndexBinaryIVF_train_q1, METH_VARARGS, NULL},
87171  { (char *)"new_IndexBinaryIVF", _wrap_new_IndexBinaryIVF, METH_VARARGS, NULL},
87172  { (char *)"delete_IndexBinaryIVF", _wrap_delete_IndexBinaryIVF, METH_VARARGS, NULL},
87173  { (char *)"IndexBinaryIVF_reset", _wrap_IndexBinaryIVF_reset, METH_VARARGS, NULL},
87174  { (char *)"IndexBinaryIVF_train", _wrap_IndexBinaryIVF_train, METH_VARARGS, NULL},
87175  { (char *)"IndexBinaryIVF_add", _wrap_IndexBinaryIVF_add, METH_VARARGS, NULL},
87176  { (char *)"IndexBinaryIVF_add_with_ids", _wrap_IndexBinaryIVF_add_with_ids, METH_VARARGS, NULL},
87177  { (char *)"IndexBinaryIVF_add_core", _wrap_IndexBinaryIVF_add_core, METH_VARARGS, NULL},
87178  { (char *)"IndexBinaryIVF_search_preassigned", _wrap_IndexBinaryIVF_search_preassigned, METH_VARARGS, NULL},
87179  { (char *)"IndexBinaryIVF_get_InvertedListScanner", _wrap_IndexBinaryIVF_get_InvertedListScanner, METH_VARARGS, NULL},
87180  { (char *)"IndexBinaryIVF_search", _wrap_IndexBinaryIVF_search, METH_VARARGS, NULL},
87181  { (char *)"IndexBinaryIVF_reconstruct", _wrap_IndexBinaryIVF_reconstruct, METH_VARARGS, NULL},
87182  { (char *)"IndexBinaryIVF_reconstruct_n", _wrap_IndexBinaryIVF_reconstruct_n, METH_VARARGS, NULL},
87183  { (char *)"IndexBinaryIVF_search_and_reconstruct", _wrap_IndexBinaryIVF_search_and_reconstruct, METH_VARARGS, NULL},
87184  { (char *)"IndexBinaryIVF_reconstruct_from_offset", _wrap_IndexBinaryIVF_reconstruct_from_offset, METH_VARARGS, NULL},
87185  { (char *)"IndexBinaryIVF_remove_ids", _wrap_IndexBinaryIVF_remove_ids, METH_VARARGS, NULL},
87186  { (char *)"IndexBinaryIVF_merge_from", _wrap_IndexBinaryIVF_merge_from, METH_VARARGS, NULL},
87187  { (char *)"IndexBinaryIVF_get_list_size", _wrap_IndexBinaryIVF_get_list_size, METH_VARARGS, NULL},
87188  { (char *)"IndexBinaryIVF_make_direct_map", _wrap_IndexBinaryIVF_make_direct_map, METH_VARARGS, NULL},
87189  { (char *)"IndexBinaryIVF_imbalance_factor", _wrap_IndexBinaryIVF_imbalance_factor, METH_VARARGS, NULL},
87190  { (char *)"IndexBinaryIVF_print_stats", _wrap_IndexBinaryIVF_print_stats, METH_VARARGS, NULL},
87191  { (char *)"IndexBinaryIVF_replace_invlists", _wrap_IndexBinaryIVF_replace_invlists, METH_VARARGS, NULL},
87192  { (char *)"IndexBinaryIVF_swigregister", IndexBinaryIVF_swigregister, METH_VARARGS, NULL},
87193  { (char *)"IndexBinaryFromFloat_index_set", _wrap_IndexBinaryFromFloat_index_set, METH_VARARGS, NULL},
87194  { (char *)"IndexBinaryFromFloat_index_get", _wrap_IndexBinaryFromFloat_index_get, METH_VARARGS, NULL},
87195  { (char *)"IndexBinaryFromFloat_own_fields_set", _wrap_IndexBinaryFromFloat_own_fields_set, METH_VARARGS, NULL},
87196  { (char *)"IndexBinaryFromFloat_own_fields_get", _wrap_IndexBinaryFromFloat_own_fields_get, METH_VARARGS, NULL},
87197  { (char *)"new_IndexBinaryFromFloat", _wrap_new_IndexBinaryFromFloat, METH_VARARGS, NULL},
87198  { (char *)"delete_IndexBinaryFromFloat", _wrap_delete_IndexBinaryFromFloat, METH_VARARGS, NULL},
87199  { (char *)"IndexBinaryFromFloat_add", _wrap_IndexBinaryFromFloat_add, METH_VARARGS, NULL},
87200  { (char *)"IndexBinaryFromFloat_reset", _wrap_IndexBinaryFromFloat_reset, METH_VARARGS, NULL},
87201  { (char *)"IndexBinaryFromFloat_search", _wrap_IndexBinaryFromFloat_search, METH_VARARGS, NULL},
87202  { (char *)"IndexBinaryFromFloat_train", _wrap_IndexBinaryFromFloat_train, METH_VARARGS, NULL},
87203  { (char *)"IndexBinaryFromFloat_swigregister", IndexBinaryFromFloat_swigregister, METH_VARARGS, NULL},
87204  { (char *)"IndexBinaryHNSW_hnsw_set", _wrap_IndexBinaryHNSW_hnsw_set, METH_VARARGS, NULL},
87205  { (char *)"IndexBinaryHNSW_hnsw_get", _wrap_IndexBinaryHNSW_hnsw_get, METH_VARARGS, NULL},
87206  { (char *)"IndexBinaryHNSW_own_fields_set", _wrap_IndexBinaryHNSW_own_fields_set, METH_VARARGS, NULL},
87207  { (char *)"IndexBinaryHNSW_own_fields_get", _wrap_IndexBinaryHNSW_own_fields_get, METH_VARARGS, NULL},
87208  { (char *)"IndexBinaryHNSW_storage_set", _wrap_IndexBinaryHNSW_storage_set, METH_VARARGS, NULL},
87209  { (char *)"IndexBinaryHNSW_storage_get", _wrap_IndexBinaryHNSW_storage_get, METH_VARARGS, NULL},
87210  { (char *)"new_IndexBinaryHNSW", _wrap_new_IndexBinaryHNSW, METH_VARARGS, NULL},
87211  { (char *)"delete_IndexBinaryHNSW", _wrap_delete_IndexBinaryHNSW, METH_VARARGS, NULL},
87212  { (char *)"IndexBinaryHNSW_get_distance_computer", _wrap_IndexBinaryHNSW_get_distance_computer, METH_VARARGS, NULL},
87213  { (char *)"IndexBinaryHNSW_add", _wrap_IndexBinaryHNSW_add, METH_VARARGS, NULL},
87214  { (char *)"IndexBinaryHNSW_train", _wrap_IndexBinaryHNSW_train, METH_VARARGS, NULL},
87215  { (char *)"IndexBinaryHNSW_search", _wrap_IndexBinaryHNSW_search, METH_VARARGS, NULL},
87216  { (char *)"IndexBinaryHNSW_reconstruct", _wrap_IndexBinaryHNSW_reconstruct, METH_VARARGS, NULL},
87217  { (char *)"IndexBinaryHNSW_reset", _wrap_IndexBinaryHNSW_reset, METH_VARARGS, NULL},
87218  { (char *)"IndexBinaryHNSW_swigregister", IndexBinaryHNSW_swigregister, METH_VARARGS, NULL},
87219  { (char *)"IndexIDMap_index_set", _wrap_IndexIDMap_index_set, METH_VARARGS, NULL},
87220  { (char *)"IndexIDMap_index_get", _wrap_IndexIDMap_index_get, METH_VARARGS, NULL},
87221  { (char *)"IndexIDMap_own_fields_set", _wrap_IndexIDMap_own_fields_set, METH_VARARGS, NULL},
87222  { (char *)"IndexIDMap_own_fields_get", _wrap_IndexIDMap_own_fields_get, METH_VARARGS, NULL},
87223  { (char *)"IndexIDMap_id_map_set", _wrap_IndexIDMap_id_map_set, METH_VARARGS, NULL},
87224  { (char *)"IndexIDMap_id_map_get", _wrap_IndexIDMap_id_map_get, METH_VARARGS, NULL},
87225  { (char *)"IndexIDMap_add_with_ids", _wrap_IndexIDMap_add_with_ids, METH_VARARGS, NULL},
87226  { (char *)"IndexIDMap_add", _wrap_IndexIDMap_add, METH_VARARGS, NULL},
87227  { (char *)"IndexIDMap_search", _wrap_IndexIDMap_search, METH_VARARGS, NULL},
87228  { (char *)"IndexIDMap_train", _wrap_IndexIDMap_train, METH_VARARGS, NULL},
87229  { (char *)"IndexIDMap_reset", _wrap_IndexIDMap_reset, METH_VARARGS, NULL},
87230  { (char *)"IndexIDMap_remove_ids", _wrap_IndexIDMap_remove_ids, METH_VARARGS, NULL},
87231  { (char *)"IndexIDMap_range_search", _wrap_IndexIDMap_range_search, METH_VARARGS, NULL},
87232  { (char *)"delete_IndexIDMap", _wrap_delete_IndexIDMap, METH_VARARGS, NULL},
87233  { (char *)"new_IndexIDMap", _wrap_new_IndexIDMap, METH_VARARGS, NULL},
87234  { (char *)"IndexIDMap_swigregister", IndexIDMap_swigregister, METH_VARARGS, NULL},
87235  { (char *)"IndexIDMap2_rev_map_set", _wrap_IndexIDMap2_rev_map_set, METH_VARARGS, NULL},
87236  { (char *)"IndexIDMap2_rev_map_get", _wrap_IndexIDMap2_rev_map_get, METH_VARARGS, NULL},
87237  { (char *)"IndexIDMap2_construct_rev_map", _wrap_IndexIDMap2_construct_rev_map, METH_VARARGS, NULL},
87238  { (char *)"IndexIDMap2_add_with_ids", _wrap_IndexIDMap2_add_with_ids, METH_VARARGS, NULL},
87239  { (char *)"IndexIDMap2_remove_ids", _wrap_IndexIDMap2_remove_ids, METH_VARARGS, NULL},
87240  { (char *)"IndexIDMap2_reconstruct", _wrap_IndexIDMap2_reconstruct, METH_VARARGS, NULL},
87241  { (char *)"delete_IndexIDMap2", _wrap_delete_IndexIDMap2, METH_VARARGS, NULL},
87242  { (char *)"new_IndexIDMap2", _wrap_new_IndexIDMap2, METH_VARARGS, NULL},
87243  { (char *)"IndexIDMap2_swigregister", IndexIDMap2_swigregister, METH_VARARGS, NULL},
87244  { (char *)"IndexShards_shard_indexes_set", _wrap_IndexShards_shard_indexes_set, METH_VARARGS, NULL},
87245  { (char *)"IndexShards_shard_indexes_get", _wrap_IndexShards_shard_indexes_get, METH_VARARGS, NULL},
87246  { (char *)"IndexShards_own_fields_set", _wrap_IndexShards_own_fields_set, METH_VARARGS, NULL},
87247  { (char *)"IndexShards_own_fields_get", _wrap_IndexShards_own_fields_get, METH_VARARGS, NULL},
87248  { (char *)"IndexShards_threaded_set", _wrap_IndexShards_threaded_set, METH_VARARGS, NULL},
87249  { (char *)"IndexShards_threaded_get", _wrap_IndexShards_threaded_get, METH_VARARGS, NULL},
87250  { (char *)"IndexShards_successive_ids_set", _wrap_IndexShards_successive_ids_set, METH_VARARGS, NULL},
87251  { (char *)"IndexShards_successive_ids_get", _wrap_IndexShards_successive_ids_get, METH_VARARGS, NULL},
87252  { (char *)"new_IndexShards", _wrap_new_IndexShards, METH_VARARGS, NULL},
87253  { (char *)"IndexShards_add_shard", _wrap_IndexShards_add_shard, METH_VARARGS, NULL},
87254  { (char *)"IndexShards_sync_with_shard_indexes", _wrap_IndexShards_sync_with_shard_indexes, METH_VARARGS, NULL},
87255  { (char *)"IndexShards_at", _wrap_IndexShards_at, METH_VARARGS, NULL},
87256  { (char *)"IndexShards_add", _wrap_IndexShards_add, METH_VARARGS, NULL},
87257  { (char *)"IndexShards_add_with_ids", _wrap_IndexShards_add_with_ids, METH_VARARGS, NULL},
87258  { (char *)"IndexShards_search", _wrap_IndexShards_search, METH_VARARGS, NULL},
87259  { (char *)"IndexShards_train", _wrap_IndexShards_train, METH_VARARGS, NULL},
87260  { (char *)"IndexShards_reset", _wrap_IndexShards_reset, METH_VARARGS, NULL},
87261  { (char *)"delete_IndexShards", _wrap_delete_IndexShards, METH_VARARGS, NULL},
87262  { (char *)"IndexShards_swigregister", IndexShards_swigregister, METH_VARARGS, NULL},
87263  { (char *)"IndexSplitVectors_own_fields_set", _wrap_IndexSplitVectors_own_fields_set, METH_VARARGS, NULL},
87264  { (char *)"IndexSplitVectors_own_fields_get", _wrap_IndexSplitVectors_own_fields_get, METH_VARARGS, NULL},
87265  { (char *)"IndexSplitVectors_threaded_set", _wrap_IndexSplitVectors_threaded_set, METH_VARARGS, NULL},
87266  { (char *)"IndexSplitVectors_threaded_get", _wrap_IndexSplitVectors_threaded_get, METH_VARARGS, NULL},
87267  { (char *)"IndexSplitVectors_sub_indexes_set", _wrap_IndexSplitVectors_sub_indexes_set, METH_VARARGS, NULL},
87268  { (char *)"IndexSplitVectors_sub_indexes_get", _wrap_IndexSplitVectors_sub_indexes_get, METH_VARARGS, NULL},
87269  { (char *)"IndexSplitVectors_sum_d_set", _wrap_IndexSplitVectors_sum_d_set, METH_VARARGS, NULL},
87270  { (char *)"IndexSplitVectors_sum_d_get", _wrap_IndexSplitVectors_sum_d_get, METH_VARARGS, NULL},
87271  { (char *)"new_IndexSplitVectors", _wrap_new_IndexSplitVectors, METH_VARARGS, NULL},
87272  { (char *)"IndexSplitVectors_add_sub_index", _wrap_IndexSplitVectors_add_sub_index, METH_VARARGS, NULL},
87273  { (char *)"IndexSplitVectors_sync_with_sub_indexes", _wrap_IndexSplitVectors_sync_with_sub_indexes, METH_VARARGS, NULL},
87274  { (char *)"IndexSplitVectors_add", _wrap_IndexSplitVectors_add, METH_VARARGS, NULL},
87275  { (char *)"IndexSplitVectors_search", _wrap_IndexSplitVectors_search, METH_VARARGS, NULL},
87276  { (char *)"IndexSplitVectors_train", _wrap_IndexSplitVectors_train, METH_VARARGS, NULL},
87277  { (char *)"IndexSplitVectors_reset", _wrap_IndexSplitVectors_reset, METH_VARARGS, NULL},
87278  { (char *)"delete_IndexSplitVectors", _wrap_delete_IndexSplitVectors, METH_VARARGS, NULL},
87279  { (char *)"IndexSplitVectors_swigregister", IndexSplitVectors_swigregister, METH_VARARGS, NULL},
87280  { (char *)"new_GpuClonerOptions", _wrap_new_GpuClonerOptions, METH_VARARGS, NULL},
87281  { (char *)"GpuClonerOptions_indicesOptions_set", _wrap_GpuClonerOptions_indicesOptions_set, METH_VARARGS, NULL},
87282  { (char *)"GpuClonerOptions_indicesOptions_get", _wrap_GpuClonerOptions_indicesOptions_get, METH_VARARGS, NULL},
87283  { (char *)"GpuClonerOptions_useFloat16CoarseQuantizer_set", _wrap_GpuClonerOptions_useFloat16CoarseQuantizer_set, METH_VARARGS, NULL},
87284  { (char *)"GpuClonerOptions_useFloat16CoarseQuantizer_get", _wrap_GpuClonerOptions_useFloat16CoarseQuantizer_get, METH_VARARGS, NULL},
87285  { (char *)"GpuClonerOptions_useFloat16_set", _wrap_GpuClonerOptions_useFloat16_set, METH_VARARGS, NULL},
87286  { (char *)"GpuClonerOptions_useFloat16_get", _wrap_GpuClonerOptions_useFloat16_get, METH_VARARGS, NULL},
87287  { (char *)"GpuClonerOptions_usePrecomputed_set", _wrap_GpuClonerOptions_usePrecomputed_set, METH_VARARGS, NULL},
87288  { (char *)"GpuClonerOptions_usePrecomputed_get", _wrap_GpuClonerOptions_usePrecomputed_get, METH_VARARGS, NULL},
87289  { (char *)"GpuClonerOptions_reserveVecs_set", _wrap_GpuClonerOptions_reserveVecs_set, METH_VARARGS, NULL},
87290  { (char *)"GpuClonerOptions_reserveVecs_get", _wrap_GpuClonerOptions_reserveVecs_get, METH_VARARGS, NULL},
87291  { (char *)"GpuClonerOptions_storeTransposed_set", _wrap_GpuClonerOptions_storeTransposed_set, METH_VARARGS, NULL},
87292  { (char *)"GpuClonerOptions_storeTransposed_get", _wrap_GpuClonerOptions_storeTransposed_get, METH_VARARGS, NULL},
87293  { (char *)"GpuClonerOptions_verbose_set", _wrap_GpuClonerOptions_verbose_set, METH_VARARGS, NULL},
87294  { (char *)"GpuClonerOptions_verbose_get", _wrap_GpuClonerOptions_verbose_get, METH_VARARGS, NULL},
87295  { (char *)"delete_GpuClonerOptions", _wrap_delete_GpuClonerOptions, METH_VARARGS, NULL},
87296  { (char *)"GpuClonerOptions_swigregister", GpuClonerOptions_swigregister, METH_VARARGS, NULL},
87297  { (char *)"new_GpuMultipleClonerOptions", _wrap_new_GpuMultipleClonerOptions, METH_VARARGS, NULL},
87298  { (char *)"GpuMultipleClonerOptions_shard_set", _wrap_GpuMultipleClonerOptions_shard_set, METH_VARARGS, NULL},
87299  { (char *)"GpuMultipleClonerOptions_shard_get", _wrap_GpuMultipleClonerOptions_shard_get, METH_VARARGS, NULL},
87300  { (char *)"GpuMultipleClonerOptions_shard_type_set", _wrap_GpuMultipleClonerOptions_shard_type_set, METH_VARARGS, NULL},
87301  { (char *)"GpuMultipleClonerOptions_shard_type_get", _wrap_GpuMultipleClonerOptions_shard_type_get, METH_VARARGS, NULL},
87302  { (char *)"delete_GpuMultipleClonerOptions", _wrap_delete_GpuMultipleClonerOptions, METH_VARARGS, NULL},
87303  { (char *)"GpuMultipleClonerOptions_swigregister", GpuMultipleClonerOptions_swigregister, METH_VARARGS, NULL},
87304  { (char *)"allocMemorySpace", _wrap_allocMemorySpace, METH_VARARGS, NULL},
87305  { (char *)"new_GpuIndexConfig", _wrap_new_GpuIndexConfig, METH_VARARGS, NULL},
87306  { (char *)"GpuIndexConfig_device_set", _wrap_GpuIndexConfig_device_set, METH_VARARGS, NULL},
87307  { (char *)"GpuIndexConfig_device_get", _wrap_GpuIndexConfig_device_get, METH_VARARGS, NULL},
87308  { (char *)"GpuIndexConfig_memorySpace_set", _wrap_GpuIndexConfig_memorySpace_set, METH_VARARGS, NULL},
87309  { (char *)"GpuIndexConfig_memorySpace_get", _wrap_GpuIndexConfig_memorySpace_get, METH_VARARGS, NULL},
87310  { (char *)"delete_GpuIndexConfig", _wrap_delete_GpuIndexConfig, METH_VARARGS, NULL},
87311  { (char *)"GpuIndexConfig_swigregister", GpuIndexConfig_swigregister, METH_VARARGS, NULL},
87312  { (char *)"GpuIndex_getDevice", _wrap_GpuIndex_getDevice, METH_VARARGS, NULL},
87313  { (char *)"GpuIndex_getResources", _wrap_GpuIndex_getResources, METH_VARARGS, NULL},
87314  { (char *)"GpuIndex_add", _wrap_GpuIndex_add, METH_VARARGS, NULL},
87315  { (char *)"GpuIndex_add_with_ids", _wrap_GpuIndex_add_with_ids, METH_VARARGS, NULL},
87316  { (char *)"GpuIndex_search", _wrap_GpuIndex_search, METH_VARARGS, NULL},
87317  { (char *)"delete_GpuIndex", _wrap_delete_GpuIndex, METH_VARARGS, NULL},
87318  { (char *)"GpuIndex_swigregister", GpuIndex_swigregister, METH_VARARGS, NULL},
87319  { (char *)"new_GpuIndexFlatConfig", _wrap_new_GpuIndexFlatConfig, METH_VARARGS, NULL},
87320  { (char *)"GpuIndexFlatConfig_useFloat16_set", _wrap_GpuIndexFlatConfig_useFloat16_set, METH_VARARGS, NULL},
87321  { (char *)"GpuIndexFlatConfig_useFloat16_get", _wrap_GpuIndexFlatConfig_useFloat16_get, METH_VARARGS, NULL},
87322  { (char *)"GpuIndexFlatConfig_useFloat16Accumulator_set", _wrap_GpuIndexFlatConfig_useFloat16Accumulator_set, METH_VARARGS, NULL},
87323  { (char *)"GpuIndexFlatConfig_useFloat16Accumulator_get", _wrap_GpuIndexFlatConfig_useFloat16Accumulator_get, METH_VARARGS, NULL},
87324  { (char *)"GpuIndexFlatConfig_storeTransposed_set", _wrap_GpuIndexFlatConfig_storeTransposed_set, METH_VARARGS, NULL},
87325  { (char *)"GpuIndexFlatConfig_storeTransposed_get", _wrap_GpuIndexFlatConfig_storeTransposed_get, METH_VARARGS, NULL},
87326  { (char *)"delete_GpuIndexFlatConfig", _wrap_delete_GpuIndexFlatConfig, METH_VARARGS, NULL},
87327  { (char *)"GpuIndexFlatConfig_swigregister", GpuIndexFlatConfig_swigregister, METH_VARARGS, NULL},
87328  { (char *)"new_GpuIndexFlat", _wrap_new_GpuIndexFlat, METH_VARARGS, NULL},
87329  { (char *)"delete_GpuIndexFlat", _wrap_delete_GpuIndexFlat, METH_VARARGS, NULL},
87330  { (char *)"GpuIndexFlat_setMinPagingSize", _wrap_GpuIndexFlat_setMinPagingSize, METH_VARARGS, NULL},
87331  { (char *)"GpuIndexFlat_getMinPagingSize", _wrap_GpuIndexFlat_getMinPagingSize, METH_VARARGS, NULL},
87332  { (char *)"GpuIndexFlat_copyFrom", _wrap_GpuIndexFlat_copyFrom, METH_VARARGS, NULL},
87333  { (char *)"GpuIndexFlat_copyTo", _wrap_GpuIndexFlat_copyTo, METH_VARARGS, NULL},
87334  { (char *)"GpuIndexFlat_getNumVecs", _wrap_GpuIndexFlat_getNumVecs, METH_VARARGS, NULL},
87335  { (char *)"GpuIndexFlat_reset", _wrap_GpuIndexFlat_reset, METH_VARARGS, NULL},
87336  { (char *)"GpuIndexFlat_train", _wrap_GpuIndexFlat_train, METH_VARARGS, NULL},
87337  { (char *)"GpuIndexFlat_add", _wrap_GpuIndexFlat_add, METH_VARARGS, NULL},
87338  { (char *)"GpuIndexFlat_search", _wrap_GpuIndexFlat_search, METH_VARARGS, NULL},
87339  { (char *)"GpuIndexFlat_reconstruct", _wrap_GpuIndexFlat_reconstruct, METH_VARARGS, NULL},
87340  { (char *)"GpuIndexFlat_reconstruct_n", _wrap_GpuIndexFlat_reconstruct_n, METH_VARARGS, NULL},
87341  { (char *)"GpuIndexFlat_getGpuData", _wrap_GpuIndexFlat_getGpuData, METH_VARARGS, NULL},
87342  { (char *)"GpuIndexFlat_swigregister", GpuIndexFlat_swigregister, METH_VARARGS, NULL},
87343  { (char *)"new_GpuIndexFlatL2", _wrap_new_GpuIndexFlatL2, METH_VARARGS, NULL},
87344  { (char *)"GpuIndexFlatL2_copyFrom", _wrap_GpuIndexFlatL2_copyFrom, METH_VARARGS, NULL},
87345  { (char *)"GpuIndexFlatL2_copyTo", _wrap_GpuIndexFlatL2_copyTo, METH_VARARGS, NULL},
87346  { (char *)"delete_GpuIndexFlatL2", _wrap_delete_GpuIndexFlatL2, METH_VARARGS, NULL},
87347  { (char *)"GpuIndexFlatL2_swigregister", GpuIndexFlatL2_swigregister, METH_VARARGS, NULL},
87348  { (char *)"new_GpuIndexFlatIP", _wrap_new_GpuIndexFlatIP, METH_VARARGS, NULL},
87349  { (char *)"GpuIndexFlatIP_copyFrom", _wrap_GpuIndexFlatIP_copyFrom, METH_VARARGS, NULL},
87350  { (char *)"GpuIndexFlatIP_copyTo", _wrap_GpuIndexFlatIP_copyTo, METH_VARARGS, NULL},
87351  { (char *)"delete_GpuIndexFlatIP", _wrap_delete_GpuIndexFlatIP, METH_VARARGS, NULL},
87352  { (char *)"GpuIndexFlatIP_swigregister", GpuIndexFlatIP_swigregister, METH_VARARGS, NULL},
87353  { (char *)"new_GpuIndexIVFConfig", _wrap_new_GpuIndexIVFConfig, METH_VARARGS, NULL},
87354  { (char *)"GpuIndexIVFConfig_indicesOptions_set", _wrap_GpuIndexIVFConfig_indicesOptions_set, METH_VARARGS, NULL},
87355  { (char *)"GpuIndexIVFConfig_indicesOptions_get", _wrap_GpuIndexIVFConfig_indicesOptions_get, METH_VARARGS, NULL},
87356  { (char *)"GpuIndexIVFConfig_flatConfig_set", _wrap_GpuIndexIVFConfig_flatConfig_set, METH_VARARGS, NULL},
87357  { (char *)"GpuIndexIVFConfig_flatConfig_get", _wrap_GpuIndexIVFConfig_flatConfig_get, METH_VARARGS, NULL},
87358  { (char *)"delete_GpuIndexIVFConfig", _wrap_delete_GpuIndexIVFConfig, METH_VARARGS, NULL},
87359  { (char *)"GpuIndexIVFConfig_swigregister", GpuIndexIVFConfig_swigregister, METH_VARARGS, NULL},
87360  { (char *)"delete_GpuIndexIVF", _wrap_delete_GpuIndexIVF, METH_VARARGS, NULL},
87361  { (char *)"GpuIndexIVF_copyFrom", _wrap_GpuIndexIVF_copyFrom, METH_VARARGS, NULL},
87362  { (char *)"GpuIndexIVF_copyTo", _wrap_GpuIndexIVF_copyTo, METH_VARARGS, NULL},
87363  { (char *)"GpuIndexIVF_getNumLists", _wrap_GpuIndexIVF_getNumLists, METH_VARARGS, NULL},
87364  { (char *)"GpuIndexIVF_getQuantizer", _wrap_GpuIndexIVF_getQuantizer, METH_VARARGS, NULL},
87365  { (char *)"GpuIndexIVF_setNumProbes", _wrap_GpuIndexIVF_setNumProbes, METH_VARARGS, NULL},
87366  { (char *)"GpuIndexIVF_getNumProbes", _wrap_GpuIndexIVF_getNumProbes, METH_VARARGS, NULL},
87367  { (char *)"GpuIndexIVF_add", _wrap_GpuIndexIVF_add, METH_VARARGS, NULL},
87368  { (char *)"GpuIndexIVF_cp_set", _wrap_GpuIndexIVF_cp_set, METH_VARARGS, NULL},
87369  { (char *)"GpuIndexIVF_cp_get", _wrap_GpuIndexIVF_cp_get, METH_VARARGS, NULL},
87370  { (char *)"GpuIndexIVF_swigregister", GpuIndexIVF_swigregister, METH_VARARGS, NULL},
87371  { (char *)"new_GpuIndexIVFPQConfig", _wrap_new_GpuIndexIVFPQConfig, METH_VARARGS, NULL},
87372  { (char *)"GpuIndexIVFPQConfig_useFloat16LookupTables_set", _wrap_GpuIndexIVFPQConfig_useFloat16LookupTables_set, METH_VARARGS, NULL},
87373  { (char *)"GpuIndexIVFPQConfig_useFloat16LookupTables_get", _wrap_GpuIndexIVFPQConfig_useFloat16LookupTables_get, METH_VARARGS, NULL},
87374  { (char *)"GpuIndexIVFPQConfig_usePrecomputedTables_set", _wrap_GpuIndexIVFPQConfig_usePrecomputedTables_set, METH_VARARGS, NULL},
87375  { (char *)"GpuIndexIVFPQConfig_usePrecomputedTables_get", _wrap_GpuIndexIVFPQConfig_usePrecomputedTables_get, METH_VARARGS, NULL},
87376  { (char *)"delete_GpuIndexIVFPQConfig", _wrap_delete_GpuIndexIVFPQConfig, METH_VARARGS, NULL},
87377  { (char *)"GpuIndexIVFPQConfig_swigregister", GpuIndexIVFPQConfig_swigregister, METH_VARARGS, NULL},
87378  { (char *)"new_GpuIndexIVFPQ", _wrap_new_GpuIndexIVFPQ, METH_VARARGS, NULL},
87379  { (char *)"delete_GpuIndexIVFPQ", _wrap_delete_GpuIndexIVFPQ, METH_VARARGS, NULL},
87380  { (char *)"GpuIndexIVFPQ_copyFrom", _wrap_GpuIndexIVFPQ_copyFrom, METH_VARARGS, NULL},
87381  { (char *)"GpuIndexIVFPQ_copyTo", _wrap_GpuIndexIVFPQ_copyTo, METH_VARARGS, NULL},
87382  { (char *)"GpuIndexIVFPQ_reserveMemory", _wrap_GpuIndexIVFPQ_reserveMemory, METH_VARARGS, NULL},
87383  { (char *)"GpuIndexIVFPQ_setPrecomputedCodes", _wrap_GpuIndexIVFPQ_setPrecomputedCodes, METH_VARARGS, NULL},
87384  { (char *)"GpuIndexIVFPQ_getPrecomputedCodes", _wrap_GpuIndexIVFPQ_getPrecomputedCodes, METH_VARARGS, NULL},
87385  { (char *)"GpuIndexIVFPQ_getNumSubQuantizers", _wrap_GpuIndexIVFPQ_getNumSubQuantizers, METH_VARARGS, NULL},
87386  { (char *)"GpuIndexIVFPQ_getBitsPerCode", _wrap_GpuIndexIVFPQ_getBitsPerCode, METH_VARARGS, NULL},
87387  { (char *)"GpuIndexIVFPQ_getCentroidsPerSubQuantizer", _wrap_GpuIndexIVFPQ_getCentroidsPerSubQuantizer, METH_VARARGS, NULL},
87388  { (char *)"GpuIndexIVFPQ_reclaimMemory", _wrap_GpuIndexIVFPQ_reclaimMemory, METH_VARARGS, NULL},
87389  { (char *)"GpuIndexIVFPQ_reset", _wrap_GpuIndexIVFPQ_reset, METH_VARARGS, NULL},
87390  { (char *)"GpuIndexIVFPQ_train", _wrap_GpuIndexIVFPQ_train, METH_VARARGS, NULL},
87391  { (char *)"GpuIndexIVFPQ_getListLength", _wrap_GpuIndexIVFPQ_getListLength, METH_VARARGS, NULL},
87392  { (char *)"GpuIndexIVFPQ_getListCodes", _wrap_GpuIndexIVFPQ_getListCodes, METH_VARARGS, NULL},
87393  { (char *)"GpuIndexIVFPQ_getListIndices", _wrap_GpuIndexIVFPQ_getListIndices, METH_VARARGS, NULL},
87394  { (char *)"GpuIndexIVFPQ_swigregister", GpuIndexIVFPQ_swigregister, METH_VARARGS, NULL},
87395  { (char *)"new_GpuIndexIVFFlatConfig", _wrap_new_GpuIndexIVFFlatConfig, METH_VARARGS, NULL},
87396  { (char *)"GpuIndexIVFFlatConfig_useFloat16IVFStorage_set", _wrap_GpuIndexIVFFlatConfig_useFloat16IVFStorage_set, METH_VARARGS, NULL},
87397  { (char *)"GpuIndexIVFFlatConfig_useFloat16IVFStorage_get", _wrap_GpuIndexIVFFlatConfig_useFloat16IVFStorage_get, METH_VARARGS, NULL},
87398  { (char *)"delete_GpuIndexIVFFlatConfig", _wrap_delete_GpuIndexIVFFlatConfig, METH_VARARGS, NULL},
87399  { (char *)"GpuIndexIVFFlatConfig_swigregister", GpuIndexIVFFlatConfig_swigregister, METH_VARARGS, NULL},
87400  { (char *)"new_GpuIndexIVFFlat", _wrap_new_GpuIndexIVFFlat, METH_VARARGS, NULL},
87401  { (char *)"delete_GpuIndexIVFFlat", _wrap_delete_GpuIndexIVFFlat, METH_VARARGS, NULL},
87402  { (char *)"GpuIndexIVFFlat_reserveMemory", _wrap_GpuIndexIVFFlat_reserveMemory, METH_VARARGS, NULL},
87403  { (char *)"GpuIndexIVFFlat_copyFrom", _wrap_GpuIndexIVFFlat_copyFrom, METH_VARARGS, NULL},
87404  { (char *)"GpuIndexIVFFlat_copyTo", _wrap_GpuIndexIVFFlat_copyTo, METH_VARARGS, NULL},
87405  { (char *)"GpuIndexIVFFlat_reclaimMemory", _wrap_GpuIndexIVFFlat_reclaimMemory, METH_VARARGS, NULL},
87406  { (char *)"GpuIndexIVFFlat_reset", _wrap_GpuIndexIVFFlat_reset, METH_VARARGS, NULL},
87407  { (char *)"GpuIndexIVFFlat_train", _wrap_GpuIndexIVFFlat_train, METH_VARARGS, NULL},
87408  { (char *)"GpuIndexIVFFlat_swigregister", GpuIndexIVFFlat_swigregister, METH_VARARGS, NULL},
87409  { (char *)"new_GpuIndexBinaryFlatConfig", _wrap_new_GpuIndexBinaryFlatConfig, METH_VARARGS, NULL},
87410  { (char *)"delete_GpuIndexBinaryFlatConfig", _wrap_delete_GpuIndexBinaryFlatConfig, METH_VARARGS, NULL},
87411  { (char *)"GpuIndexBinaryFlatConfig_swigregister", GpuIndexBinaryFlatConfig_swigregister, METH_VARARGS, NULL},
87412  { (char *)"new_GpuIndexBinaryFlat", _wrap_new_GpuIndexBinaryFlat, METH_VARARGS, NULL},
87413  { (char *)"delete_GpuIndexBinaryFlat", _wrap_delete_GpuIndexBinaryFlat, METH_VARARGS, NULL},
87414  { (char *)"GpuIndexBinaryFlat_copyFrom", _wrap_GpuIndexBinaryFlat_copyFrom, METH_VARARGS, NULL},
87415  { (char *)"GpuIndexBinaryFlat_copyTo", _wrap_GpuIndexBinaryFlat_copyTo, METH_VARARGS, NULL},
87416  { (char *)"GpuIndexBinaryFlat_add", _wrap_GpuIndexBinaryFlat_add, METH_VARARGS, NULL},
87417  { (char *)"GpuIndexBinaryFlat_reset", _wrap_GpuIndexBinaryFlat_reset, METH_VARARGS, NULL},
87418  { (char *)"GpuIndexBinaryFlat_search", _wrap_GpuIndexBinaryFlat_search, METH_VARARGS, NULL},
87419  { (char *)"GpuIndexBinaryFlat_reconstruct", _wrap_GpuIndexBinaryFlat_reconstruct, METH_VARARGS, NULL},
87420  { (char *)"GpuIndexBinaryFlat_swigregister", GpuIndexBinaryFlat_swigregister, METH_VARARGS, NULL},
87421  { (char *)"new_IndexProxy", _wrap_new_IndexProxy, METH_VARARGS, NULL},
87422  { (char *)"delete_IndexProxy", _wrap_delete_IndexProxy, METH_VARARGS, NULL},
87423  { (char *)"IndexProxy_addIndex", _wrap_IndexProxy_addIndex, METH_VARARGS, NULL},
87424  { (char *)"IndexProxy_removeIndex", _wrap_IndexProxy_removeIndex, METH_VARARGS, NULL},
87425  { (char *)"IndexProxy_runOnIndex", _wrap_IndexProxy_runOnIndex, METH_VARARGS, NULL},
87426  { (char *)"IndexProxy_reset", _wrap_IndexProxy_reset, METH_VARARGS, NULL},
87427  { (char *)"IndexProxy_train", _wrap_IndexProxy_train, METH_VARARGS, NULL},
87428  { (char *)"IndexProxy_add", _wrap_IndexProxy_add, METH_VARARGS, NULL},
87429  { (char *)"IndexProxy_search", _wrap_IndexProxy_search, METH_VARARGS, NULL},
87430  { (char *)"IndexProxy_reconstruct", _wrap_IndexProxy_reconstruct, METH_VARARGS, NULL},
87431  { (char *)"IndexProxy_own_fields_set", _wrap_IndexProxy_own_fields_set, METH_VARARGS, NULL},
87432  { (char *)"IndexProxy_own_fields_get", _wrap_IndexProxy_own_fields_get, METH_VARARGS, NULL},
87433  { (char *)"IndexProxy_count", _wrap_IndexProxy_count, METH_VARARGS, NULL},
87434  { (char *)"IndexProxy_at", _wrap_IndexProxy_at, METH_VARARGS, NULL},
87435  { (char *)"IndexProxy_swigregister", IndexProxy_swigregister, METH_VARARGS, NULL},
87436  { (char *)"kmeans_clustering_gpu", _wrap_kmeans_clustering_gpu, METH_VARARGS, NULL},
87437  { (char *)"bruteForceKnn", _wrap_bruteForceKnn, METH_VARARGS, NULL},
87438  { (char *)"downcast_index", _wrap_downcast_index, METH_VARARGS, NULL},
87439  { (char *)"downcast_VectorTransform", _wrap_downcast_VectorTransform, METH_VARARGS, NULL},
87440  { (char *)"downcast_IndexBinary", _wrap_downcast_IndexBinary, METH_VARARGS, NULL},
87441  { (char *)"write_index", _wrap_write_index, METH_VARARGS, NULL},
87442  { (char *)"write_index_binary", _wrap_write_index_binary, METH_VARARGS, NULL},
87443  { (char *)"read_index", _wrap_read_index, METH_VARARGS, NULL},
87444  { (char *)"read_index_binary", _wrap_read_index_binary, METH_VARARGS, NULL},
87445  { (char *)"write_VectorTransform", _wrap_write_VectorTransform, METH_VARARGS, NULL},
87446  { (char *)"read_VectorTransform", _wrap_read_VectorTransform, METH_VARARGS, NULL},
87447  { (char *)"read_ProductQuantizer", _wrap_read_ProductQuantizer, METH_VARARGS, NULL},
87448  { (char *)"write_ProductQuantizer", _wrap_write_ProductQuantizer, METH_VARARGS, NULL},
87449  { (char *)"write_InvertedLists", _wrap_write_InvertedLists, METH_VARARGS, NULL},
87450  { (char *)"read_InvertedLists", _wrap_read_InvertedLists, METH_VARARGS, NULL},
87451  { (char *)"clone_index", _wrap_clone_index, METH_VARARGS, NULL},
87452  { (char *)"Cloner_clone_VectorTransform", _wrap_Cloner_clone_VectorTransform, METH_VARARGS, NULL},
87453  { (char *)"Cloner_clone_Index", _wrap_Cloner_clone_Index, METH_VARARGS, NULL},
87454  { (char *)"Cloner_clone_IndexIVF", _wrap_Cloner_clone_IndexIVF, METH_VARARGS, NULL},
87455  { (char *)"delete_Cloner", _wrap_delete_Cloner, METH_VARARGS, NULL},
87456  { (char *)"new_Cloner", _wrap_new_Cloner, METH_VARARGS, NULL},
87457  { (char *)"Cloner_swigregister", Cloner_swigregister, METH_VARARGS, NULL},
87458  { (char *)"AutoTuneCriterion_nq_set", _wrap_AutoTuneCriterion_nq_set, METH_VARARGS, NULL},
87459  { (char *)"AutoTuneCriterion_nq_get", _wrap_AutoTuneCriterion_nq_get, METH_VARARGS, NULL},
87460  { (char *)"AutoTuneCriterion_nnn_set", _wrap_AutoTuneCriterion_nnn_set, METH_VARARGS, NULL},
87461  { (char *)"AutoTuneCriterion_nnn_get", _wrap_AutoTuneCriterion_nnn_get, METH_VARARGS, NULL},
87462  { (char *)"AutoTuneCriterion_gt_nnn_set", _wrap_AutoTuneCriterion_gt_nnn_set, METH_VARARGS, NULL},
87463  { (char *)"AutoTuneCriterion_gt_nnn_get", _wrap_AutoTuneCriterion_gt_nnn_get, METH_VARARGS, NULL},
87464  { (char *)"AutoTuneCriterion_gt_D_set", _wrap_AutoTuneCriterion_gt_D_set, METH_VARARGS, NULL},
87465  { (char *)"AutoTuneCriterion_gt_D_get", _wrap_AutoTuneCriterion_gt_D_get, METH_VARARGS, NULL},
87466  { (char *)"AutoTuneCriterion_gt_I_set", _wrap_AutoTuneCriterion_gt_I_set, METH_VARARGS, NULL},
87467  { (char *)"AutoTuneCriterion_gt_I_get", _wrap_AutoTuneCriterion_gt_I_get, METH_VARARGS, NULL},
87468  { (char *)"AutoTuneCriterion_set_groundtruth", _wrap_AutoTuneCriterion_set_groundtruth, METH_VARARGS, NULL},
87469  { (char *)"AutoTuneCriterion_evaluate", _wrap_AutoTuneCriterion_evaluate, METH_VARARGS, NULL},
87470  { (char *)"delete_AutoTuneCriterion", _wrap_delete_AutoTuneCriterion, METH_VARARGS, NULL},
87471  { (char *)"AutoTuneCriterion_swigregister", AutoTuneCriterion_swigregister, METH_VARARGS, NULL},
87472  { (char *)"OneRecallAtRCriterion_R_set", _wrap_OneRecallAtRCriterion_R_set, METH_VARARGS, NULL},
87473  { (char *)"OneRecallAtRCriterion_R_get", _wrap_OneRecallAtRCriterion_R_get, METH_VARARGS, NULL},
87474  { (char *)"new_OneRecallAtRCriterion", _wrap_new_OneRecallAtRCriterion, METH_VARARGS, NULL},
87475  { (char *)"OneRecallAtRCriterion_evaluate", _wrap_OneRecallAtRCriterion_evaluate, METH_VARARGS, NULL},
87476  { (char *)"delete_OneRecallAtRCriterion", _wrap_delete_OneRecallAtRCriterion, METH_VARARGS, NULL},
87477  { (char *)"OneRecallAtRCriterion_swigregister", OneRecallAtRCriterion_swigregister, METH_VARARGS, NULL},
87478  { (char *)"IntersectionCriterion_R_set", _wrap_IntersectionCriterion_R_set, METH_VARARGS, NULL},
87479  { (char *)"IntersectionCriterion_R_get", _wrap_IntersectionCriterion_R_get, METH_VARARGS, NULL},
87480  { (char *)"new_IntersectionCriterion", _wrap_new_IntersectionCriterion, METH_VARARGS, NULL},
87481  { (char *)"IntersectionCriterion_evaluate", _wrap_IntersectionCriterion_evaluate, METH_VARARGS, NULL},
87482  { (char *)"delete_IntersectionCriterion", _wrap_delete_IntersectionCriterion, METH_VARARGS, NULL},
87483  { (char *)"IntersectionCriterion_swigregister", IntersectionCriterion_swigregister, METH_VARARGS, NULL},
87484  { (char *)"OperatingPoint_perf_set", _wrap_OperatingPoint_perf_set, METH_VARARGS, NULL},
87485  { (char *)"OperatingPoint_perf_get", _wrap_OperatingPoint_perf_get, METH_VARARGS, NULL},
87486  { (char *)"OperatingPoint_t_set", _wrap_OperatingPoint_t_set, METH_VARARGS, NULL},
87487  { (char *)"OperatingPoint_t_get", _wrap_OperatingPoint_t_get, METH_VARARGS, NULL},
87488  { (char *)"OperatingPoint_key_set", _wrap_OperatingPoint_key_set, METH_VARARGS, NULL},
87489  { (char *)"OperatingPoint_key_get", _wrap_OperatingPoint_key_get, METH_VARARGS, NULL},
87490  { (char *)"OperatingPoint_cno_set", _wrap_OperatingPoint_cno_set, METH_VARARGS, NULL},
87491  { (char *)"OperatingPoint_cno_get", _wrap_OperatingPoint_cno_get, METH_VARARGS, NULL},
87492  { (char *)"new_OperatingPoint", _wrap_new_OperatingPoint, METH_VARARGS, NULL},
87493  { (char *)"delete_OperatingPoint", _wrap_delete_OperatingPoint, METH_VARARGS, NULL},
87494  { (char *)"OperatingPoint_swigregister", OperatingPoint_swigregister, METH_VARARGS, NULL},
87495  { (char *)"OperatingPoints_all_pts_set", _wrap_OperatingPoints_all_pts_set, METH_VARARGS, NULL},
87496  { (char *)"OperatingPoints_all_pts_get", _wrap_OperatingPoints_all_pts_get, METH_VARARGS, NULL},
87497  { (char *)"OperatingPoints_optimal_pts_set", _wrap_OperatingPoints_optimal_pts_set, METH_VARARGS, NULL},
87498  { (char *)"OperatingPoints_optimal_pts_get", _wrap_OperatingPoints_optimal_pts_get, METH_VARARGS, NULL},
87499  { (char *)"new_OperatingPoints", _wrap_new_OperatingPoints, METH_VARARGS, NULL},
87500  { (char *)"OperatingPoints_merge_with", _wrap_OperatingPoints_merge_with, METH_VARARGS, NULL},
87501  { (char *)"OperatingPoints_clear", _wrap_OperatingPoints_clear, METH_VARARGS, NULL},
87502  { (char *)"OperatingPoints_add", _wrap_OperatingPoints_add, METH_VARARGS, NULL},
87503  { (char *)"OperatingPoints_t_for_perf", _wrap_OperatingPoints_t_for_perf, METH_VARARGS, NULL},
87504  { (char *)"OperatingPoints_display", _wrap_OperatingPoints_display, METH_VARARGS, NULL},
87505  { (char *)"OperatingPoints_all_to_gnuplot", _wrap_OperatingPoints_all_to_gnuplot, METH_VARARGS, NULL},
87506  { (char *)"OperatingPoints_optimal_to_gnuplot", _wrap_OperatingPoints_optimal_to_gnuplot, METH_VARARGS, NULL},
87507  { (char *)"delete_OperatingPoints", _wrap_delete_OperatingPoints, METH_VARARGS, NULL},
87508  { (char *)"OperatingPoints_swigregister", OperatingPoints_swigregister, METH_VARARGS, NULL},
87509  { (char *)"ParameterRange_name_set", _wrap_ParameterRange_name_set, METH_VARARGS, NULL},
87510  { (char *)"ParameterRange_name_get", _wrap_ParameterRange_name_get, METH_VARARGS, NULL},
87511  { (char *)"ParameterRange_values_set", _wrap_ParameterRange_values_set, METH_VARARGS, NULL},
87512  { (char *)"ParameterRange_values_get", _wrap_ParameterRange_values_get, METH_VARARGS, NULL},
87513  { (char *)"new_ParameterRange", _wrap_new_ParameterRange, METH_VARARGS, NULL},
87514  { (char *)"delete_ParameterRange", _wrap_delete_ParameterRange, METH_VARARGS, NULL},
87515  { (char *)"ParameterRange_swigregister", ParameterRange_swigregister, METH_VARARGS, NULL},
87516  { (char *)"ParameterSpace_parameter_ranges_set", _wrap_ParameterSpace_parameter_ranges_set, METH_VARARGS, NULL},
87517  { (char *)"ParameterSpace_parameter_ranges_get", _wrap_ParameterSpace_parameter_ranges_get, METH_VARARGS, NULL},
87518  { (char *)"ParameterSpace_verbose_set", _wrap_ParameterSpace_verbose_set, METH_VARARGS, NULL},
87519  { (char *)"ParameterSpace_verbose_get", _wrap_ParameterSpace_verbose_get, METH_VARARGS, NULL},
87520  { (char *)"ParameterSpace_n_experiments_set", _wrap_ParameterSpace_n_experiments_set, METH_VARARGS, NULL},
87521  { (char *)"ParameterSpace_n_experiments_get", _wrap_ParameterSpace_n_experiments_get, METH_VARARGS, NULL},
87522  { (char *)"ParameterSpace_batchsize_set", _wrap_ParameterSpace_batchsize_set, METH_VARARGS, NULL},
87523  { (char *)"ParameterSpace_batchsize_get", _wrap_ParameterSpace_batchsize_get, METH_VARARGS, NULL},
87524  { (char *)"ParameterSpace_thread_over_batches_set", _wrap_ParameterSpace_thread_over_batches_set, METH_VARARGS, NULL},
87525  { (char *)"ParameterSpace_thread_over_batches_get", _wrap_ParameterSpace_thread_over_batches_get, METH_VARARGS, NULL},
87526  { (char *)"ParameterSpace_min_test_duration_set", _wrap_ParameterSpace_min_test_duration_set, METH_VARARGS, NULL},
87527  { (char *)"ParameterSpace_min_test_duration_get", _wrap_ParameterSpace_min_test_duration_get, METH_VARARGS, NULL},
87528  { (char *)"new_ParameterSpace", _wrap_new_ParameterSpace, METH_VARARGS, NULL},
87529  { (char *)"ParameterSpace_n_combinations", _wrap_ParameterSpace_n_combinations, METH_VARARGS, NULL},
87530  { (char *)"ParameterSpace_combination_ge", _wrap_ParameterSpace_combination_ge, METH_VARARGS, NULL},
87531  { (char *)"ParameterSpace_combination_name", _wrap_ParameterSpace_combination_name, METH_VARARGS, NULL},
87532  { (char *)"ParameterSpace_display", _wrap_ParameterSpace_display, METH_VARARGS, NULL},
87533  { (char *)"ParameterSpace_add_range", _wrap_ParameterSpace_add_range, METH_VARARGS, NULL},
87534  { (char *)"ParameterSpace_initialize", _wrap_ParameterSpace_initialize, METH_VARARGS, NULL},
87535  { (char *)"ParameterSpace_set_index_parameters", _wrap_ParameterSpace_set_index_parameters, METH_VARARGS, NULL},
87536  { (char *)"ParameterSpace_set_index_parameter", _wrap_ParameterSpace_set_index_parameter, METH_VARARGS, NULL},
87537  { (char *)"ParameterSpace_update_bounds", _wrap_ParameterSpace_update_bounds, METH_VARARGS, NULL},
87538  { (char *)"ParameterSpace_explore", _wrap_ParameterSpace_explore, METH_VARARGS, NULL},
87539  { (char *)"delete_ParameterSpace", _wrap_delete_ParameterSpace, METH_VARARGS, NULL},
87540  { (char *)"ParameterSpace_swigregister", ParameterSpace_swigregister, METH_VARARGS, NULL},
87541  { (char *)"index_factory", _wrap_index_factory, METH_VARARGS, NULL},
87542  { (char *)"index_binary_factory", _wrap_index_binary_factory, METH_VARARGS, NULL},
87543  { (char *)"index_gpu_to_cpu", _wrap_index_gpu_to_cpu, METH_VARARGS, NULL},
87544  { (char *)"index_cpu_to_gpu", _wrap_index_cpu_to_gpu, METH_VARARGS, NULL},
87545  { (char *)"index_cpu_to_gpu_multiple", _wrap_index_cpu_to_gpu_multiple, METH_VARARGS, NULL},
87546  { (char *)"GpuParameterSpace_initialize", _wrap_GpuParameterSpace_initialize, METH_VARARGS, NULL},
87547  { (char *)"GpuParameterSpace_set_index_parameter", _wrap_GpuParameterSpace_set_index_parameter, METH_VARARGS, NULL},
87548  { (char *)"new_GpuParameterSpace", _wrap_new_GpuParameterSpace, METH_VARARGS, NULL},
87549  { (char *)"delete_GpuParameterSpace", _wrap_delete_GpuParameterSpace, METH_VARARGS, NULL},
87550  { (char *)"GpuParameterSpace_swigregister", GpuParameterSpace_swigregister, METH_VARARGS, NULL},
87551  { (char *)"swig_ptr", _wrap_swig_ptr, METH_VARARGS, NULL},
87552  { (char *)"rev_swig_ptr", _wrap_rev_swig_ptr, METH_VARARGS, NULL},
87553  { (char *)"float_minheap_array_t_nh_set", _wrap_float_minheap_array_t_nh_set, METH_VARARGS, NULL},
87554  { (char *)"float_minheap_array_t_nh_get", _wrap_float_minheap_array_t_nh_get, METH_VARARGS, NULL},
87555  { (char *)"float_minheap_array_t_k_set", _wrap_float_minheap_array_t_k_set, METH_VARARGS, NULL},
87556  { (char *)"float_minheap_array_t_k_get", _wrap_float_minheap_array_t_k_get, METH_VARARGS, NULL},
87557  { (char *)"float_minheap_array_t_ids_set", _wrap_float_minheap_array_t_ids_set, METH_VARARGS, NULL},
87558  { (char *)"float_minheap_array_t_ids_get", _wrap_float_minheap_array_t_ids_get, METH_VARARGS, NULL},
87559  { (char *)"float_minheap_array_t_val_set", _wrap_float_minheap_array_t_val_set, METH_VARARGS, NULL},
87560  { (char *)"float_minheap_array_t_val_get", _wrap_float_minheap_array_t_val_get, METH_VARARGS, NULL},
87561  { (char *)"float_minheap_array_t_get_val", _wrap_float_minheap_array_t_get_val, METH_VARARGS, NULL},
87562  { (char *)"float_minheap_array_t_get_ids", _wrap_float_minheap_array_t_get_ids, METH_VARARGS, NULL},
87563  { (char *)"float_minheap_array_t_heapify", _wrap_float_minheap_array_t_heapify, METH_VARARGS, NULL},
87564  { (char *)"float_minheap_array_t_addn", _wrap_float_minheap_array_t_addn, METH_VARARGS, NULL},
87565  { (char *)"float_minheap_array_t_addn_with_ids", _wrap_float_minheap_array_t_addn_with_ids, METH_VARARGS, NULL},
87566  { (char *)"float_minheap_array_t_reorder", _wrap_float_minheap_array_t_reorder, METH_VARARGS, NULL},
87567  { (char *)"float_minheap_array_t_per_line_extrema", _wrap_float_minheap_array_t_per_line_extrema, METH_VARARGS, NULL},
87568  { (char *)"new_float_minheap_array_t", _wrap_new_float_minheap_array_t, METH_VARARGS, NULL},
87569  { (char *)"delete_float_minheap_array_t", _wrap_delete_float_minheap_array_t, METH_VARARGS, NULL},
87570  { (char *)"float_minheap_array_t_swigregister", float_minheap_array_t_swigregister, METH_VARARGS, NULL},
87571  { (char *)"int_minheap_array_t_nh_set", _wrap_int_minheap_array_t_nh_set, METH_VARARGS, NULL},
87572  { (char *)"int_minheap_array_t_nh_get", _wrap_int_minheap_array_t_nh_get, METH_VARARGS, NULL},
87573  { (char *)"int_minheap_array_t_k_set", _wrap_int_minheap_array_t_k_set, METH_VARARGS, NULL},
87574  { (char *)"int_minheap_array_t_k_get", _wrap_int_minheap_array_t_k_get, METH_VARARGS, NULL},
87575  { (char *)"int_minheap_array_t_ids_set", _wrap_int_minheap_array_t_ids_set, METH_VARARGS, NULL},
87576  { (char *)"int_minheap_array_t_ids_get", _wrap_int_minheap_array_t_ids_get, METH_VARARGS, NULL},
87577  { (char *)"int_minheap_array_t_val_set", _wrap_int_minheap_array_t_val_set, METH_VARARGS, NULL},
87578  { (char *)"int_minheap_array_t_val_get", _wrap_int_minheap_array_t_val_get, METH_VARARGS, NULL},
87579  { (char *)"int_minheap_array_t_get_val", _wrap_int_minheap_array_t_get_val, METH_VARARGS, NULL},
87580  { (char *)"int_minheap_array_t_get_ids", _wrap_int_minheap_array_t_get_ids, METH_VARARGS, NULL},
87581  { (char *)"int_minheap_array_t_heapify", _wrap_int_minheap_array_t_heapify, METH_VARARGS, NULL},
87582  { (char *)"int_minheap_array_t_addn", _wrap_int_minheap_array_t_addn, METH_VARARGS, NULL},
87583  { (char *)"int_minheap_array_t_addn_with_ids", _wrap_int_minheap_array_t_addn_with_ids, METH_VARARGS, NULL},
87584  { (char *)"int_minheap_array_t_reorder", _wrap_int_minheap_array_t_reorder, METH_VARARGS, NULL},
87585  { (char *)"int_minheap_array_t_per_line_extrema", _wrap_int_minheap_array_t_per_line_extrema, METH_VARARGS, NULL},
87586  { (char *)"new_int_minheap_array_t", _wrap_new_int_minheap_array_t, METH_VARARGS, NULL},
87587  { (char *)"delete_int_minheap_array_t", _wrap_delete_int_minheap_array_t, METH_VARARGS, NULL},
87588  { (char *)"int_minheap_array_t_swigregister", int_minheap_array_t_swigregister, METH_VARARGS, NULL},
87589  { (char *)"float_maxheap_array_t_nh_set", _wrap_float_maxheap_array_t_nh_set, METH_VARARGS, NULL},
87590  { (char *)"float_maxheap_array_t_nh_get", _wrap_float_maxheap_array_t_nh_get, METH_VARARGS, NULL},
87591  { (char *)"float_maxheap_array_t_k_set", _wrap_float_maxheap_array_t_k_set, METH_VARARGS, NULL},
87592  { (char *)"float_maxheap_array_t_k_get", _wrap_float_maxheap_array_t_k_get, METH_VARARGS, NULL},
87593  { (char *)"float_maxheap_array_t_ids_set", _wrap_float_maxheap_array_t_ids_set, METH_VARARGS, NULL},
87594  { (char *)"float_maxheap_array_t_ids_get", _wrap_float_maxheap_array_t_ids_get, METH_VARARGS, NULL},
87595  { (char *)"float_maxheap_array_t_val_set", _wrap_float_maxheap_array_t_val_set, METH_VARARGS, NULL},
87596  { (char *)"float_maxheap_array_t_val_get", _wrap_float_maxheap_array_t_val_get, METH_VARARGS, NULL},
87597  { (char *)"float_maxheap_array_t_get_val", _wrap_float_maxheap_array_t_get_val, METH_VARARGS, NULL},
87598  { (char *)"float_maxheap_array_t_get_ids", _wrap_float_maxheap_array_t_get_ids, METH_VARARGS, NULL},
87599  { (char *)"float_maxheap_array_t_heapify", _wrap_float_maxheap_array_t_heapify, METH_VARARGS, NULL},
87600  { (char *)"float_maxheap_array_t_addn", _wrap_float_maxheap_array_t_addn, METH_VARARGS, NULL},
87601  { (char *)"float_maxheap_array_t_addn_with_ids", _wrap_float_maxheap_array_t_addn_with_ids, METH_VARARGS, NULL},
87602  { (char *)"float_maxheap_array_t_reorder", _wrap_float_maxheap_array_t_reorder, METH_VARARGS, NULL},
87603  { (char *)"float_maxheap_array_t_per_line_extrema", _wrap_float_maxheap_array_t_per_line_extrema, METH_VARARGS, NULL},
87604  { (char *)"new_float_maxheap_array_t", _wrap_new_float_maxheap_array_t, METH_VARARGS, NULL},
87605  { (char *)"delete_float_maxheap_array_t", _wrap_delete_float_maxheap_array_t, METH_VARARGS, NULL},
87606  { (char *)"float_maxheap_array_t_swigregister", float_maxheap_array_t_swigregister, METH_VARARGS, NULL},
87607  { (char *)"int_maxheap_array_t_nh_set", _wrap_int_maxheap_array_t_nh_set, METH_VARARGS, NULL},
87608  { (char *)"int_maxheap_array_t_nh_get", _wrap_int_maxheap_array_t_nh_get, METH_VARARGS, NULL},
87609  { (char *)"int_maxheap_array_t_k_set", _wrap_int_maxheap_array_t_k_set, METH_VARARGS, NULL},
87610  { (char *)"int_maxheap_array_t_k_get", _wrap_int_maxheap_array_t_k_get, METH_VARARGS, NULL},
87611  { (char *)"int_maxheap_array_t_ids_set", _wrap_int_maxheap_array_t_ids_set, METH_VARARGS, NULL},
87612  { (char *)"int_maxheap_array_t_ids_get", _wrap_int_maxheap_array_t_ids_get, METH_VARARGS, NULL},
87613  { (char *)"int_maxheap_array_t_val_set", _wrap_int_maxheap_array_t_val_set, METH_VARARGS, NULL},
87614  { (char *)"int_maxheap_array_t_val_get", _wrap_int_maxheap_array_t_val_get, METH_VARARGS, NULL},
87615  { (char *)"int_maxheap_array_t_get_val", _wrap_int_maxheap_array_t_get_val, METH_VARARGS, NULL},
87616  { (char *)"int_maxheap_array_t_get_ids", _wrap_int_maxheap_array_t_get_ids, METH_VARARGS, NULL},
87617  { (char *)"int_maxheap_array_t_heapify", _wrap_int_maxheap_array_t_heapify, METH_VARARGS, NULL},
87618  { (char *)"int_maxheap_array_t_addn", _wrap_int_maxheap_array_t_addn, METH_VARARGS, NULL},
87619  { (char *)"int_maxheap_array_t_addn_with_ids", _wrap_int_maxheap_array_t_addn_with_ids, METH_VARARGS, NULL},
87620  { (char *)"int_maxheap_array_t_reorder", _wrap_int_maxheap_array_t_reorder, METH_VARARGS, NULL},
87621  { (char *)"int_maxheap_array_t_per_line_extrema", _wrap_int_maxheap_array_t_per_line_extrema, METH_VARARGS, NULL},
87622  { (char *)"new_int_maxheap_array_t", _wrap_new_int_maxheap_array_t, METH_VARARGS, NULL},
87623  { (char *)"delete_int_maxheap_array_t", _wrap_delete_int_maxheap_array_t, METH_VARARGS, NULL},
87624  { (char *)"int_maxheap_array_t_swigregister", int_maxheap_array_t_swigregister, METH_VARARGS, NULL},
87625  { (char *)"omp_set_num_threads", _wrap_omp_set_num_threads, METH_VARARGS, NULL},
87626  { (char *)"omp_get_max_threads", _wrap_omp_get_max_threads, METH_VARARGS, NULL},
87627  { (char *)"memcpy", _wrap_memcpy, METH_VARARGS, NULL},
87628  { (char *)"cast_integer_to_float_ptr", _wrap_cast_integer_to_float_ptr, METH_VARARGS, NULL},
87629  { (char *)"cast_integer_to_long_ptr", _wrap_cast_integer_to_long_ptr, METH_VARARGS, NULL},
87630  { (char *)"cast_integer_to_int_ptr", _wrap_cast_integer_to_int_ptr, METH_VARARGS, NULL},
87631  { (char *)"RangeSearchResult_nq_set", _wrap_RangeSearchResult_nq_set, METH_VARARGS, NULL},
87632  { (char *)"RangeSearchResult_nq_get", _wrap_RangeSearchResult_nq_get, METH_VARARGS, NULL},
87633  { (char *)"RangeSearchResult_lims_set", _wrap_RangeSearchResult_lims_set, METH_VARARGS, NULL},
87634  { (char *)"RangeSearchResult_lims_get", _wrap_RangeSearchResult_lims_get, METH_VARARGS, NULL},
87635  { (char *)"RangeSearchResult_labels_set", _wrap_RangeSearchResult_labels_set, METH_VARARGS, NULL},
87636  { (char *)"RangeSearchResult_labels_get", _wrap_RangeSearchResult_labels_get, METH_VARARGS, NULL},
87637  { (char *)"RangeSearchResult_distances_set", _wrap_RangeSearchResult_distances_set, METH_VARARGS, NULL},
87638  { (char *)"RangeSearchResult_distances_get", _wrap_RangeSearchResult_distances_get, METH_VARARGS, NULL},
87639  { (char *)"RangeSearchResult_buffer_size_set", _wrap_RangeSearchResult_buffer_size_set, METH_VARARGS, NULL},
87640  { (char *)"RangeSearchResult_buffer_size_get", _wrap_RangeSearchResult_buffer_size_get, METH_VARARGS, NULL},
87641  { (char *)"new_RangeSearchResult", _wrap_new_RangeSearchResult, METH_VARARGS, NULL},
87642  { (char *)"RangeSearchResult_do_allocation", _wrap_RangeSearchResult_do_allocation, METH_VARARGS, NULL},
87643  { (char *)"delete_RangeSearchResult", _wrap_delete_RangeSearchResult, METH_VARARGS, NULL},
87644  { (char *)"RangeSearchResult_swigregister", RangeSearchResult_swigregister, METH_VARARGS, NULL},
87645  { (char *)"IDSelector_is_member", _wrap_IDSelector_is_member, METH_VARARGS, NULL},
87646  { (char *)"delete_IDSelector", _wrap_delete_IDSelector, METH_VARARGS, NULL},
87647  { (char *)"IDSelector_swigregister", IDSelector_swigregister, METH_VARARGS, NULL},
87648  { (char *)"IDSelectorRange_imin_set", _wrap_IDSelectorRange_imin_set, METH_VARARGS, NULL},
87649  { (char *)"IDSelectorRange_imin_get", _wrap_IDSelectorRange_imin_get, METH_VARARGS, NULL},
87650  { (char *)"IDSelectorRange_imax_set", _wrap_IDSelectorRange_imax_set, METH_VARARGS, NULL},
87651  { (char *)"IDSelectorRange_imax_get", _wrap_IDSelectorRange_imax_get, METH_VARARGS, NULL},
87652  { (char *)"new_IDSelectorRange", _wrap_new_IDSelectorRange, METH_VARARGS, NULL},
87653  { (char *)"IDSelectorRange_is_member", _wrap_IDSelectorRange_is_member, METH_VARARGS, NULL},
87654  { (char *)"delete_IDSelectorRange", _wrap_delete_IDSelectorRange, METH_VARARGS, NULL},
87655  { (char *)"IDSelectorRange_swigregister", IDSelectorRange_swigregister, METH_VARARGS, NULL},
87656  { (char *)"IDSelectorBatch_nbits_set", _wrap_IDSelectorBatch_nbits_set, METH_VARARGS, NULL},
87657  { (char *)"IDSelectorBatch_nbits_get", _wrap_IDSelectorBatch_nbits_get, METH_VARARGS, NULL},
87658  { (char *)"IDSelectorBatch_mask_set", _wrap_IDSelectorBatch_mask_set, METH_VARARGS, NULL},
87659  { (char *)"IDSelectorBatch_mask_get", _wrap_IDSelectorBatch_mask_get, METH_VARARGS, NULL},
87660  { (char *)"new_IDSelectorBatch", _wrap_new_IDSelectorBatch, METH_VARARGS, NULL},
87661  { (char *)"IDSelectorBatch_is_member", _wrap_IDSelectorBatch_is_member, METH_VARARGS, NULL},
87662  { (char *)"delete_IDSelectorBatch", _wrap_delete_IDSelectorBatch, METH_VARARGS, NULL},
87663  { (char *)"IDSelectorBatch_swigregister", IDSelectorBatch_swigregister, METH_VARARGS, NULL},
87664  { (char *)"BufferList_buffer_size_set", _wrap_BufferList_buffer_size_set, METH_VARARGS, NULL},
87665  { (char *)"BufferList_buffer_size_get", _wrap_BufferList_buffer_size_get, METH_VARARGS, NULL},
87666  { (char *)"BufferList_buffers_set", _wrap_BufferList_buffers_set, METH_VARARGS, NULL},
87667  { (char *)"BufferList_buffers_get", _wrap_BufferList_buffers_get, METH_VARARGS, NULL},
87668  { (char *)"BufferList_wp_set", _wrap_BufferList_wp_set, METH_VARARGS, NULL},
87669  { (char *)"BufferList_wp_get", _wrap_BufferList_wp_get, METH_VARARGS, NULL},
87670  { (char *)"new_BufferList", _wrap_new_BufferList, METH_VARARGS, NULL},
87671  { (char *)"delete_BufferList", _wrap_delete_BufferList, METH_VARARGS, NULL},
87672  { (char *)"BufferList_append_buffer", _wrap_BufferList_append_buffer, METH_VARARGS, NULL},
87673  { (char *)"BufferList_add", _wrap_BufferList_add, METH_VARARGS, NULL},
87674  { (char *)"BufferList_copy_range", _wrap_BufferList_copy_range, METH_VARARGS, NULL},
87675  { (char *)"BufferList_swigregister", BufferList_swigregister, METH_VARARGS, NULL},
87676  { (char *)"RangeSearchPartialResult_res_set", _wrap_RangeSearchPartialResult_res_set, METH_VARARGS, NULL},
87677  { (char *)"RangeSearchPartialResult_res_get", _wrap_RangeSearchPartialResult_res_get, METH_VARARGS, NULL},
87678  { (char *)"new_RangeSearchPartialResult", _wrap_new_RangeSearchPartialResult, METH_VARARGS, NULL},
87679  { (char *)"RangeSearchPartialResult_queries_set", _wrap_RangeSearchPartialResult_queries_set, METH_VARARGS, NULL},
87680  { (char *)"RangeSearchPartialResult_queries_get", _wrap_RangeSearchPartialResult_queries_get, METH_VARARGS, NULL},
87681  { (char *)"RangeSearchPartialResult_new_result", _wrap_RangeSearchPartialResult_new_result, METH_VARARGS, NULL},
87682  { (char *)"RangeSearchPartialResult_finalize", _wrap_RangeSearchPartialResult_finalize, METH_VARARGS, NULL},
87683  { (char *)"RangeSearchPartialResult_set_lims", _wrap_RangeSearchPartialResult_set_lims, METH_VARARGS, NULL},
87684  { (char *)"RangeSearchPartialResult_set_result", _wrap_RangeSearchPartialResult_set_result, METH_VARARGS, NULL},
87685  { (char *)"delete_RangeSearchPartialResult", _wrap_delete_RangeSearchPartialResult, METH_VARARGS, NULL},
87686  { (char *)"RangeSearchPartialResult_swigregister", RangeSearchPartialResult_swigregister, METH_VARARGS, NULL},
87687  { (char *)"IOReader_name_set", _wrap_IOReader_name_set, METH_VARARGS, NULL},
87688  { (char *)"IOReader_name_get", _wrap_IOReader_name_get, METH_VARARGS, NULL},
87689  { (char *)"IOReader___call__", _wrap_IOReader___call__, METH_VARARGS, NULL},
87690  { (char *)"IOReader_fileno", _wrap_IOReader_fileno, METH_VARARGS, NULL},
87691  { (char *)"delete_IOReader", _wrap_delete_IOReader, METH_VARARGS, NULL},
87692  { (char *)"IOReader_swigregister", IOReader_swigregister, METH_VARARGS, NULL},
87693  { (char *)"IOWriter_name_set", _wrap_IOWriter_name_set, METH_VARARGS, NULL},
87694  { (char *)"IOWriter_name_get", _wrap_IOWriter_name_get, METH_VARARGS, NULL},
87695  { (char *)"IOWriter___call__", _wrap_IOWriter___call__, METH_VARARGS, NULL},
87696  { (char *)"IOWriter_fileno", _wrap_IOWriter_fileno, METH_VARARGS, NULL},
87697  { (char *)"delete_IOWriter", _wrap_delete_IOWriter, METH_VARARGS, NULL},
87698  { (char *)"IOWriter_swigregister", IOWriter_swigregister, METH_VARARGS, NULL},
87699  { (char *)"VectorIOReader_data_set", _wrap_VectorIOReader_data_set, METH_VARARGS, NULL},
87700  { (char *)"VectorIOReader_data_get", _wrap_VectorIOReader_data_get, METH_VARARGS, NULL},
87701  { (char *)"VectorIOReader_rp_set", _wrap_VectorIOReader_rp_set, METH_VARARGS, NULL},
87702  { (char *)"VectorIOReader_rp_get", _wrap_VectorIOReader_rp_get, METH_VARARGS, NULL},
87703  { (char *)"VectorIOReader___call__", _wrap_VectorIOReader___call__, METH_VARARGS, NULL},
87704  { (char *)"new_VectorIOReader", _wrap_new_VectorIOReader, METH_VARARGS, NULL},
87705  { (char *)"delete_VectorIOReader", _wrap_delete_VectorIOReader, METH_VARARGS, NULL},
87706  { (char *)"VectorIOReader_swigregister", VectorIOReader_swigregister, METH_VARARGS, NULL},
87707  { (char *)"VectorIOWriter_data_set", _wrap_VectorIOWriter_data_set, METH_VARARGS, NULL},
87708  { (char *)"VectorIOWriter_data_get", _wrap_VectorIOWriter_data_get, METH_VARARGS, NULL},
87709  { (char *)"VectorIOWriter___call__", _wrap_VectorIOWriter___call__, METH_VARARGS, NULL},
87710  { (char *)"new_VectorIOWriter", _wrap_new_VectorIOWriter, METH_VARARGS, NULL},
87711  { (char *)"delete_VectorIOWriter", _wrap_delete_VectorIOWriter, METH_VARARGS, NULL},
87712  { (char *)"VectorIOWriter_swigregister", VectorIOWriter_swigregister, METH_VARARGS, NULL},
87713  { (char *)"ignore_SIGTTIN", _wrap_ignore_SIGTTIN, METH_VARARGS, NULL},
87714  { (char *)"MapLong2Long_map_set", _wrap_MapLong2Long_map_set, METH_VARARGS, NULL},
87715  { (char *)"MapLong2Long_map_get", _wrap_MapLong2Long_map_get, METH_VARARGS, NULL},
87716  { (char *)"MapLong2Long_add", _wrap_MapLong2Long_add, METH_VARARGS, NULL},
87717  { (char *)"MapLong2Long_search", _wrap_MapLong2Long_search, METH_VARARGS, NULL},
87718  { (char *)"MapLong2Long_search_multiple", _wrap_MapLong2Long_search_multiple, METH_VARARGS, NULL},
87719  { (char *)"new_MapLong2Long", _wrap_new_MapLong2Long, METH_VARARGS, NULL},
87720  { (char *)"delete_MapLong2Long", _wrap_delete_MapLong2Long, METH_VARARGS, NULL},
87721  { (char *)"MapLong2Long_swigregister", MapLong2Long_swigregister, METH_VARARGS, NULL},
87722  { NULL, NULL, 0, NULL }
87723 };
87724 
87725 
87726 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
87727 
87728 static void *_p_faiss__IndexHNSWFlatTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87729  return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSWFlat *) x));
87730 }
87731 static void *_p_faiss__IndexHNSWSQTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87732  return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSWSQ *) x));
87733 }
87734 static void *_p_faiss__IndexHNSWPQTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87735  return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSWPQ *) x));
87736 }
87737 static void *_p_faiss__IndexHNSW2LevelTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87738  return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSW2Level *) x));
87739 }
87740 static void *_p_faiss__IndexIDMap2To_p_faiss__IndexIDMap(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87741  return (void *)((faiss::IndexIDMap *) ((faiss::IndexIDMap2 *) x));
87742 }
87743 static void *_p_faiss__IndexIVFPQRTo_p_faiss__IndexIVFPQ(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87744  return (void *)((faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
87745 }
87746 static void *_p_faiss__RandomRotationMatrixTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87748 }
87749 static void *_p_faiss__PCAMatrixTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87750  return (void *)((faiss::VectorTransform *) (faiss::LinearTransform *) ((faiss::PCAMatrix *) x));
87751 }
87752 static void *_p_faiss__OPQMatrixTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87753  return (void *)((faiss::VectorTransform *) (faiss::LinearTransform *) ((faiss::OPQMatrix *) x));
87754 }
87755 static void *_p_faiss__LinearTransformTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87756  return (void *)((faiss::VectorTransform *) ((faiss::LinearTransform *) x));
87757 }
87758 static void *_p_faiss__RemapDimensionsTransformTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87759  return (void *)((faiss::VectorTransform *) ((faiss::RemapDimensionsTransform *) x));
87760 }
87761 static void *_p_faiss__NormalizationTransformTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87762  return (void *)((faiss::VectorTransform *) ((faiss::NormalizationTransform *) x));
87763 }
87764 static void *_p_faiss__RandomRotationMatrixTo_p_faiss__LinearTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87765  return (void *)((faiss::LinearTransform *) ((faiss::RandomRotationMatrix *) x));
87766 }
87767 static void *_p_faiss__PCAMatrixTo_p_faiss__LinearTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87768  return (void *)((faiss::LinearTransform *) ((faiss::PCAMatrix *) x));
87769 }
87770 static void *_p_faiss__OPQMatrixTo_p_faiss__LinearTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87771  return (void *)((faiss::LinearTransform *) ((faiss::OPQMatrix *) x));
87772 }
87773 static void *_p_p_faiss__RandomRotationMatrixTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87775 }
87776 static void *_p_p_faiss__PCAMatrixTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87777  return (void *)((faiss::VectorTransform **) (faiss::LinearTransform *) ((faiss::PCAMatrix **) x));
87778 }
87779 static void *_p_p_faiss__OPQMatrixTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87780  return (void *)((faiss::VectorTransform **) (faiss::LinearTransform *) ((faiss::OPQMatrix **) x));
87781 }
87782 static void *_p_p_faiss__LinearTransformTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87783  return (void *)((faiss::VectorTransform **) ((faiss::LinearTransform **) x));
87784 }
87785 static void *_p_p_faiss__RemapDimensionsTransformTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87786  return (void *)((faiss::VectorTransform **) ((faiss::RemapDimensionsTransform **) x));
87787 }
87788 static void *_p_p_faiss__NormalizationTransformTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87789  return (void *)((faiss::VectorTransform **) ((faiss::NormalizationTransform **) x));
87790 }
87791 static void *_p_faiss__gpu__GpuMultipleClonerOptionsTo_p_faiss__gpu__GpuClonerOptions(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87793 }
87794 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVFFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87795  return (void *)((faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup *) x));
87796 }
87797 static void *_p_faiss__IDSelectorBatchTo_p_faiss__IDSelector(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87798  return (void *)((faiss::IDSelector *) ((faiss::IDSelectorBatch *) x));
87799 }
87800 static void *_p_faiss__IDSelectorRangeTo_p_faiss__IDSelector(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87801  return (void *)((faiss::IDSelector *) ((faiss::IDSelectorRange *) x));
87802 }
87803 static void *_p_faiss__RangeSearchPartialResultTo_p_faiss__BufferList(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87804  return (void *)((faiss::BufferList *) ((faiss::RangeSearchPartialResult *) x));
87805 }
87806 static void *_p_faiss__ReproduceDistancesObjectiveTo_p_faiss__PermutationObjective(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87808 }
87809 static void *_p_faiss__gpu__GpuIndexFlatL2To_p_faiss__gpu__GpuIndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87810  return (void *)((faiss::gpu::GpuIndexFlat *) ((faiss::gpu::GpuIndexFlatL2 *) x));
87811 }
87812 static void *_p_faiss__gpu__GpuIndexFlatIPTo_p_faiss__gpu__GpuIndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87813  return (void *)((faiss::gpu::GpuIndexFlat *) ((faiss::gpu::GpuIndexFlatIP *) x));
87814 }
87815 static void *_p_faiss__IndexFlatL2To_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87816  return (void *)((faiss::IndexFlat *) ((faiss::IndexFlatL2 *) x));
87817 }
87818 static void *_p_faiss__IndexFlat1DTo_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87819  return (void *)((faiss::IndexFlat *) (faiss::IndexFlatL2 *) ((faiss::IndexFlat1D *) x));
87820 }
87821 static void *_p_faiss__IndexFlatIPTo_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87822  return (void *)((faiss::IndexFlat *) ((faiss::IndexFlatIP *) x));
87823 }
87824 static void *_p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87825  return (void *)((faiss::IndexFlat *) (faiss::IndexFlatL2 *) ((faiss::IndexFlatL2BaseShift *) x));
87826 }
87827 static void *_p_faiss__ArrayInvertedListsTo_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87828  return (void *)((faiss::InvertedLists *) ((faiss::ArrayInvertedLists *) x));
87829 }
87830 static void *_p_faiss__ConcatenatedInvertedListsTo_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87831  return (void *)((faiss::InvertedLists *) ((faiss::ConcatenatedInvertedLists *) x));
87832 }
87833 static void *_p_faiss__OnDiskInvertedListsTo_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87834  return (void *)((faiss::InvertedLists *) ((faiss::OnDiskInvertedLists *) x));
87835 }
87836 static void *_p_p_faiss__ArrayInvertedListsTo_p_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87837  return (void *)((faiss::InvertedLists **) ((faiss::ArrayInvertedLists **) x));
87838 }
87839 static void *_p_p_faiss__ConcatenatedInvertedListsTo_p_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87840  return (void *)((faiss::InvertedLists **) ((faiss::ConcatenatedInvertedLists **) x));
87841 }
87842 static void *_p_p_faiss__OnDiskInvertedListsTo_p_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87843  return (void *)((faiss::InvertedLists **) ((faiss::OnDiskInvertedLists **) x));
87844 }
87845 static void *_p_faiss__VectorIOReaderTo_p_faiss__IOReader(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87846  return (void *)((faiss::IOReader *) ((faiss::VectorIOReader *) x));
87847 }
87848 static void *_p_faiss__IndexFlat1DTo_p_faiss__IndexFlatL2(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87849  return (void *)((faiss::IndexFlatL2 *) ((faiss::IndexFlat1D *) x));
87850 }
87851 static void *_p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlatL2(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87852  return (void *)((faiss::IndexFlatL2 *) ((faiss::IndexFlatL2BaseShift *) x));
87853 }
87854 static void *_p_faiss__IndexIVFScalarQuantizerTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87855  return (void *)((faiss::IndexIVF *) ((faiss::IndexIVFScalarQuantizer *) x));
87856 }
87857 static void *_p_faiss__IndexIVFPQTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87858  return (void *)((faiss::IndexIVF *) ((faiss::IndexIVFPQ *) x));
87859 }
87860 static void *_p_faiss__IndexIVFFlatTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87861  return (void *)((faiss::IndexIVF *) ((faiss::IndexIVFFlat *) x));
87862 }
87863 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87864  return (void *)((faiss::IndexIVF *) (faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup *) x));
87865 }
87866 static void *_p_faiss__IndexIVFPQRTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87867  return (void *)((faiss::IndexIVF *) (faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
87868 }
87869 static void *_p_faiss__gpu__GpuIndexIVFPQTo_p_faiss__gpu__GpuIndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87870  return (void *)((faiss::gpu::GpuIndexIVF *) ((faiss::gpu::GpuIndexIVFPQ *) x));
87871 }
87872 static void *_p_faiss__gpu__GpuIndexIVFFlatTo_p_faiss__gpu__GpuIndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87873  return (void *)((faiss::gpu::GpuIndexIVF *) ((faiss::gpu::GpuIndexIVFFlat *) x));
87874 }
87875 static void *_p_faiss__gpu__GpuIndexIVFPQConfigTo_p_faiss__gpu__GpuIndexIVFConfig(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87877 }
87878 static void *_p_faiss__gpu__GpuIndexIVFFlatConfigTo_p_faiss__gpu__GpuIndexIVFConfig(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87880 }
87881 static void *_p_faiss__gpu__GpuIndexIVFPQConfigTo_p_faiss__gpu__GpuIndexConfig(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87883 }
87884 static void *_p_faiss__gpu__GpuIndexFlatConfigTo_p_faiss__gpu__GpuIndexConfig(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87885  return (void *)((faiss::gpu::GpuIndexConfig *) ((faiss::gpu::GpuIndexFlatConfig *) x));
87886 }
87887 static void *_p_faiss__gpu__GpuIndexIVFConfigTo_p_faiss__gpu__GpuIndexConfig(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87888  return (void *)((faiss::gpu::GpuIndexConfig *) ((faiss::gpu::GpuIndexIVFConfig *) x));
87889 }
87890 static void *_p_faiss__gpu__GpuIndexIVFFlatConfigTo_p_faiss__gpu__GpuIndexConfig(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87892 }
87893 static void *_p_faiss__gpu__GpuIndexBinaryFlatConfigTo_p_faiss__gpu__GpuIndexConfig(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87895 }
87896 static void *_p_faiss__gpu__GpuIndexFlatTo_p_faiss__gpu__GpuIndex(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87897  return (void *)((faiss::gpu::GpuIndex *) ((faiss::gpu::GpuIndexFlat *) x));
87898 }
87899 static void *_p_faiss__gpu__GpuIndexFlatL2To_p_faiss__gpu__GpuIndex(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87901 }
87902 static void *_p_faiss__gpu__GpuIndexIVFTo_p_faiss__gpu__GpuIndex(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87903  return (void *)((faiss::gpu::GpuIndex *) ((faiss::gpu::GpuIndexIVF *) x));
87904 }
87905 static void *_p_faiss__gpu__GpuIndexIVFPQTo_p_faiss__gpu__GpuIndex(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87907 }
87908 static void *_p_faiss__gpu__GpuIndexIVFFlatTo_p_faiss__gpu__GpuIndex(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87910 }
87911 static void *_p_faiss__gpu__GpuIndexFlatIPTo_p_faiss__gpu__GpuIndex(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87913 }
87914 static void *_p_faiss__PolysemousTrainingTo_p_faiss__SimulatedAnnealingParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87916 }
87917 static void *_p_faiss__SimulatedAnnealingOptimizerTo_p_faiss__SimulatedAnnealingParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87919 }
87920 static void *_p_faiss__ClusteringTo_p_faiss__ClusteringParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87921  return (void *)((faiss::ClusteringParameters *) ((faiss::Clustering *) x));
87922 }
87923 static void *_p_faiss__IVFPQSearchParametersTo_p_faiss__IVFSearchParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87924  return (void *)((faiss::IVFSearchParameters *) ((faiss::IVFPQSearchParameters *) x));
87925 }
87926 static void *_p_p_faiss__IndexPQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87927  return (void *)((faiss::Index **) ((faiss::IndexPQ **) x));
87928 }
87929 static void *_p_p_faiss__IndexIVFFlatDedupTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87930  return (void *)((faiss::Index **) (faiss::IndexIVF *)(faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup **) x));
87931 }
87932 static void *_p_p_faiss__IndexPreTransformTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87933  return (void *)((faiss::Index **) ((faiss::IndexPreTransform **) x));
87934 }
87935 static void *_p_p_faiss__IndexSplitVectorsTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87936  return (void *)((faiss::Index **) ((faiss::IndexSplitVectors **) x));
87937 }
87938 static void *_p_p_faiss__IndexIDMap2To_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87939  return (void *)((faiss::Index **) (faiss::IndexIDMap *) ((faiss::IndexIDMap2 **) x));
87940 }
87941 static void *_p_p_faiss__IndexIVFFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87942  return (void *)((faiss::Index **) (faiss::IndexIVF *) ((faiss::IndexIVFFlat **) x));
87943 }
87944 static void *_p_p_faiss__gpu__GpuIndexIVFFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87946 }
87947 static void *_p_p_faiss__MultiIndexQuantizerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87948  return (void *)((faiss::Index **) ((faiss::MultiIndexQuantizer **) x));
87949 }
87950 static void *_p_p_faiss__IndexScalarQuantizerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87951  return (void *)((faiss::Index **) ((faiss::IndexScalarQuantizer **) x));
87952 }
87953 static void *_p_p_faiss__IndexIVFScalarQuantizerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87954  return (void *)((faiss::Index **) (faiss::IndexIVF *) ((faiss::IndexIVFScalarQuantizer **) x));
87955 }
87956 static void *_p_p_faiss__IndexRefineFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87957  return (void *)((faiss::Index **) ((faiss::IndexRefineFlat **) x));
87958 }
87959 static void *_p_p_faiss__gpu__GpuIndexIVFPQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87961 }
87962 static void *_p_p_faiss__IndexIVFPQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87963  return (void *)((faiss::Index **) (faiss::IndexIVF *) ((faiss::IndexIVFPQ **) x));
87964 }
87965 static void *_p_p_faiss__IndexLSHTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87966  return (void *)((faiss::Index **) ((faiss::IndexLSH **) x));
87967 }
87968 static void *_p_p_faiss__IndexHNSWSQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87969  return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSWSQ **) x));
87970 }
87971 static void *_p_p_faiss__gpu__IndexProxyTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87972  return (void *)((faiss::Index **) ((faiss::gpu::IndexProxy **) x));
87973 }
87974 static void *_p_p_faiss__gpu__GpuIndexTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87975  return (void *)((faiss::Index **) ((faiss::gpu::GpuIndex **) x));
87976 }
87977 static void *_p_p_faiss__IndexIDMapTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87978  return (void *)((faiss::Index **) ((faiss::IndexIDMap **) x));
87979 }
87980 static void *_p_p_faiss__IndexHNSW2LevelTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87981  return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSW2Level **) x));
87982 }
87983 static void *_p_p_faiss__Index2LayerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87984  return (void *)((faiss::Index **) ((faiss::Index2Layer **) x));
87985 }
87986 static void *_p_p_faiss__gpu__GpuIndexFlatL2To_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87988 }
87989 static void *_p_p_faiss__IndexFlatL2To_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87990  return (void *)((faiss::Index **) (faiss::IndexFlat *) ((faiss::IndexFlatL2 **) x));
87991 }
87992 static void *_p_p_faiss__IndexHNSWFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87993  return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSWFlat **) x));
87994 }
87995 static void *_p_p_faiss__IndexIVFPQRTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87996  return (void *)((faiss::Index **) (faiss::IndexIVF *)(faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR **) x));
87997 }
87998 static void *_p_p_faiss__IndexFlat1DTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
87999  return (void *)((faiss::Index **) (faiss::IndexFlat *)(faiss::IndexFlatL2 *) ((faiss::IndexFlat1D **) x));
88000 }
88001 static void *_p_p_faiss__gpu__GpuIndexFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88002  return (void *)((faiss::Index **) (faiss::gpu::GpuIndex *) ((faiss::gpu::GpuIndexFlat **) x));
88003 }
88004 static void *_p_p_faiss__IndexFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88005  return (void *)((faiss::Index **) ((faiss::IndexFlat **) x));
88006 }
88007 static void *_p_p_faiss__gpu__GpuIndexFlatIPTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88009 }
88010 static void *_p_p_faiss__IndexFlatIPTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88011  return (void *)((faiss::Index **) (faiss::IndexFlat *) ((faiss::IndexFlatIP **) x));
88012 }
88013 static void *_p_p_faiss__IndexHNSWTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88014  return (void *)((faiss::Index **) ((faiss::IndexHNSW **) x));
88015 }
88016 static void *_p_p_faiss__IndexHNSWPQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88017  return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSWPQ **) x));
88018 }
88019 static void *_p_p_faiss__IndexFlatL2BaseShiftTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88020  return (void *)((faiss::Index **) (faiss::IndexFlat *)(faiss::IndexFlatL2 *) ((faiss::IndexFlatL2BaseShift **) x));
88021 }
88022 static void *_p_p_faiss__gpu__GpuIndexIVFTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88023  return (void *)((faiss::Index **) (faiss::gpu::GpuIndex *) ((faiss::gpu::GpuIndexIVF **) x));
88024 }
88025 static void *_p_p_faiss__IndexIVFTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88026  return (void *)((faiss::Index **) ((faiss::IndexIVF **) x));
88027 }
88028 static void *_p_p_faiss__MultiIndexQuantizer2To_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88029  return (void *)((faiss::Index **) (faiss::MultiIndexQuantizer *) ((faiss::MultiIndexQuantizer2 **) x));
88030 }
88031 static void *_p_p_faiss__IndexShardsTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88032  return (void *)((faiss::Index **) ((faiss::IndexShards **) x));
88033 }
88034 static void *_p_faiss__IndexPQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88035  return (void *)((faiss::Index *) ((faiss::IndexPQ *) x));
88036 }
88037 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88038  return (void *)((faiss::Index *) (faiss::IndexIVF *)(faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup *) x));
88039 }
88040 static void *_p_faiss__IndexPreTransformTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88041  return (void *)((faiss::Index *) ((faiss::IndexPreTransform *) x));
88042 }
88043 static void *_p_faiss__IndexSplitVectorsTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88044  return (void *)((faiss::Index *) ((faiss::IndexSplitVectors *) x));
88045 }
88046 static void *_p_faiss__IndexIDMap2To_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88047  return (void *)((faiss::Index *) (faiss::IndexIDMap *) ((faiss::IndexIDMap2 *) x));
88048 }
88049 static void *_p_faiss__IndexIVFFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88050  return (void *)((faiss::Index *) (faiss::IndexIVF *) ((faiss::IndexIVFFlat *) x));
88051 }
88052 static void *_p_faiss__gpu__GpuIndexIVFFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88054 }
88055 static void *_p_faiss__MultiIndexQuantizerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88056  return (void *)((faiss::Index *) ((faiss::MultiIndexQuantizer *) x));
88057 }
88058 static void *_p_faiss__IndexScalarQuantizerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88059  return (void *)((faiss::Index *) ((faiss::IndexScalarQuantizer *) x));
88060 }
88061 static void *_p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88062  return (void *)((faiss::Index *) (faiss::IndexIVF *) ((faiss::IndexIVFScalarQuantizer *) x));
88063 }
88064 static void *_p_faiss__IndexRefineFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88065  return (void *)((faiss::Index *) ((faiss::IndexRefineFlat *) x));
88066 }
88067 static void *_p_faiss__gpu__GpuIndexIVFPQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88069 }
88070 static void *_p_faiss__IndexIVFPQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88071  return (void *)((faiss::Index *) (faiss::IndexIVF *) ((faiss::IndexIVFPQ *) x));
88072 }
88073 static void *_p_faiss__IndexLSHTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88074  return (void *)((faiss::Index *) ((faiss::IndexLSH *) x));
88075 }
88076 static void *_p_faiss__IndexHNSWSQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88077  return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSWSQ *) x));
88078 }
88079 static void *_p_faiss__gpu__IndexProxyTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88080  return (void *)((faiss::Index *) ((faiss::gpu::IndexProxy *) x));
88081 }
88082 static void *_p_faiss__gpu__GpuIndexTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88083  return (void *)((faiss::Index *) ((faiss::gpu::GpuIndex *) x));
88084 }
88085 static void *_p_faiss__IndexIDMapTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88086  return (void *)((faiss::Index *) ((faiss::IndexIDMap *) x));
88087 }
88088 static void *_p_faiss__IndexHNSW2LevelTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88089  return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSW2Level *) x));
88090 }
88091 static void *_p_faiss__Index2LayerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88092  return (void *)((faiss::Index *) ((faiss::Index2Layer *) x));
88093 }
88094 static void *_p_faiss__gpu__GpuIndexFlatL2To_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88096 }
88097 static void *_p_faiss__IndexFlatL2To_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88098  return (void *)((faiss::Index *) (faiss::IndexFlat *) ((faiss::IndexFlatL2 *) x));
88099 }
88100 static void *_p_faiss__IndexHNSWFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88101  return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSWFlat *) x));
88102 }
88103 static void *_p_faiss__IndexIVFPQRTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88104  return (void *)((faiss::Index *) (faiss::IndexIVF *)(faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
88105 }
88106 static void *_p_faiss__IndexFlat1DTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88107  return (void *)((faiss::Index *) (faiss::IndexFlat *)(faiss::IndexFlatL2 *) ((faiss::IndexFlat1D *) x));
88108 }
88109 static void *_p_faiss__gpu__GpuIndexFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88110  return (void *)((faiss::Index *) (faiss::gpu::GpuIndex *) ((faiss::gpu::GpuIndexFlat *) x));
88111 }
88112 static void *_p_faiss__IndexFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88113  return (void *)((faiss::Index *) ((faiss::IndexFlat *) x));
88114 }
88115 static void *_p_faiss__gpu__GpuIndexFlatIPTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88117 }
88118 static void *_p_faiss__IndexFlatIPTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88119  return (void *)((faiss::Index *) (faiss::IndexFlat *) ((faiss::IndexFlatIP *) x));
88120 }
88121 static void *_p_faiss__IndexHNSWTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88122  return (void *)((faiss::Index *) ((faiss::IndexHNSW *) x));
88123 }
88124 static void *_p_faiss__IndexHNSWPQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88125  return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSWPQ *) x));
88126 }
88127 static void *_p_faiss__IndexFlatL2BaseShiftTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88129 }
88130 static void *_p_faiss__gpu__GpuIndexIVFTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88131  return (void *)((faiss::Index *) (faiss::gpu::GpuIndex *) ((faiss::gpu::GpuIndexIVF *) x));
88132 }
88133 static void *_p_faiss__IndexIVFTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88134  return (void *)((faiss::Index *) ((faiss::IndexIVF *) x));
88135 }
88136 static void *_p_faiss__MultiIndexQuantizer2To_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88137  return (void *)((faiss::Index *) (faiss::MultiIndexQuantizer *) ((faiss::MultiIndexQuantizer2 *) x));
88138 }
88139 static void *_p_faiss__IndexShardsTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88140  return (void *)((faiss::Index *) ((faiss::IndexShards *) x));
88141 }
88142 static void *_p_faiss__gpu__GpuParameterSpaceTo_p_faiss__ParameterSpace(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88143  return (void *)((faiss::ParameterSpace *) ((faiss::gpu::GpuParameterSpace *) x));
88144 }
88145 static void *_p_faiss__IndexBinaryFlatTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88146  return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryFlat *) x));
88147 }
88148 static void *_p_faiss__gpu__GpuIndexBinaryFlatTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88149  return (void *)((faiss::IndexBinary *) ((faiss::gpu::GpuIndexBinaryFlat *) x));
88150 }
88151 static void *_p_faiss__IndexBinaryHNSWTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88152  return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryHNSW *) x));
88153 }
88154 static void *_p_faiss__IndexBinaryIVFTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88155  return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryIVF *) x));
88156 }
88157 static void *_p_faiss__IndexBinaryFromFloatTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88158  return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryFromFloat *) x));
88159 }
88160 static void *_p_faiss__MultiIndexQuantizer2To_p_faiss__MultiIndexQuantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88161  return (void *)((faiss::MultiIndexQuantizer *) ((faiss::MultiIndexQuantizer2 *) x));
88162 }
88163 static void *_p_faiss__IndexIVFTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88164  return (void *)((faiss::Level1Quantizer *) ((faiss::IndexIVF *) x));
88165 }
88166 static void *_p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88168 }
88169 static void *_p_faiss__IndexIVFPQTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88170  return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *) ((faiss::IndexIVFPQ *) x));
88171 }
88172 static void *_p_faiss__IndexIVFFlatTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88173  return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *) ((faiss::IndexIVFFlat *) x));
88174 }
88175 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88177 }
88178 static void *_p_faiss__IndexIVFPQRTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88179  return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *)(faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
88180 }
88181 static void *_p_faiss__OneRecallAtRCriterionTo_p_faiss__AutoTuneCriterion(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88182  return (void *)((faiss::AutoTuneCriterion *) ((faiss::OneRecallAtRCriterion *) x));
88183 }
88184 static void *_p_faiss__IntersectionCriterionTo_p_faiss__AutoTuneCriterion(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88185  return (void *)((faiss::AutoTuneCriterion *) ((faiss::IntersectionCriterion *) x));
88186 }
88187 static void *_p_faiss__gpu__StandardGpuResourcesTo_p_faiss__gpu__GpuResources(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88188  return (void *)((faiss::gpu::GpuResources *) ((faiss::gpu::StandardGpuResources *) x));
88189 }
88190 static void *_p_p_faiss__gpu__StandardGpuResourcesTo_p_p_faiss__gpu__GpuResources(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88191  return (void *)((faiss::gpu::GpuResources **) ((faiss::gpu::StandardGpuResources **) x));
88192 }
88193 static void *_p_faiss__VectorIOWriterTo_p_faiss__IOWriter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
88194  return (void *)((faiss::IOWriter *) ((faiss::VectorIOWriter *) x));
88195 }
88196 static swig_type_info _swigt__p_Crev = {"_p_Crev", "Crev *", 0, 0, (void*)0, 0};
88197 static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
88198 static swig_type_info _swigt__p_MapLong2Long = {"_p_MapLong2Long", "MapLong2Long *", 0, 0, (void*)0, 0};
88199 static swig_type_info _swigt__p_Node = {"_p_Node", "Node *", 0, 0, (void*)0, 0};
88200 static swig_type_info _swigt__p_T = {"_p_T", "T *", 0, 0, (void*)0, 0};
88201 static swig_type_info _swigt__p_TI = {"_p_TI", "TI *", 0, 0, (void*)0, 0};
88202 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
88203 static swig_type_info _swigt__p_cublasHandle_t = {"_p_cublasHandle_t", "cublasHandle_t *", 0, 0, (void*)0, 0};
88204 static swig_type_info _swigt__p_cudaStream_t = {"_p_cudaStream_t", "cudaStream_t *", 0, 0, (void*)0, 0};
88205 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
88206 static swig_type_info _swigt__p_faiss__ArrayInvertedLists = {"_p_faiss__ArrayInvertedLists", "faiss::ArrayInvertedLists *", 0, 0, (void*)0, 0};
88207 static swig_type_info _swigt__p_faiss__AutoTuneCriterion = {"_p_faiss__AutoTuneCriterion", "faiss::AutoTuneCriterion *", 0, 0, (void*)0, 0};
88208 static swig_type_info _swigt__p_faiss__BinaryInvertedListScanner = {"_p_faiss__BinaryInvertedListScanner", "faiss::BinaryInvertedListScanner *", 0, 0, (void*)0, 0};
88209 static swig_type_info _swigt__p_faiss__BufferList = {"_p_faiss__BufferList", "faiss::BufferList *", 0, 0, (void*)0, 0};
88210 static swig_type_info _swigt__p_faiss__Cloner = {"_p_faiss__Cloner", "faiss::Cloner *", 0, 0, (void*)0, 0};
88211 static swig_type_info _swigt__p_faiss__Clustering = {"_p_faiss__Clustering", "faiss::Clustering *", 0, 0, (void*)0, 0};
88212 static swig_type_info _swigt__p_faiss__ClusteringParameters = {"_p_faiss__ClusteringParameters", "faiss::ClusteringParameters *", 0, 0, (void*)0, 0};
88213 static swig_type_info _swigt__p_faiss__ConcatenatedInvertedLists = {"_p_faiss__ConcatenatedInvertedLists", "faiss::ConcatenatedInvertedLists *", 0, 0, (void*)0, 0};
88214 static swig_type_info _swigt__p_faiss__GenHammingComputer16 = {"_p_faiss__GenHammingComputer16", "faiss::GenHammingComputer16 *", 0, 0, (void*)0, 0};
88215 static swig_type_info _swigt__p_faiss__GenHammingComputer32 = {"_p_faiss__GenHammingComputer32", "faiss::GenHammingComputer32 *", 0, 0, (void*)0, 0};
88216 static swig_type_info _swigt__p_faiss__GenHammingComputer8 = {"_p_faiss__GenHammingComputer8", "faiss::GenHammingComputer8 *", 0, 0, (void*)0, 0};
88217 static swig_type_info _swigt__p_faiss__GenHammingComputerM8 = {"_p_faiss__GenHammingComputerM8", "faiss::GenHammingComputerM8 *", 0, 0, (void*)0, 0};
88218 static swig_type_info _swigt__p_faiss__HNSW = {"_p_faiss__HNSW", "faiss::HNSW *", 0, 0, (void*)0, 0};
88219 static swig_type_info _swigt__p_faiss__HNSWStats = {"_p_faiss__HNSWStats", "faiss::HNSWStats *", 0, 0, (void*)0, 0};
88220 static swig_type_info _swigt__p_faiss__HNSW__DistanceComputer = {"_p_faiss__HNSW__DistanceComputer", "faiss::HNSW::DistanceComputer *", 0, 0, (void*)0, 0};
88221 static swig_type_info _swigt__p_faiss__HNSW__MinimaxHeap = {"_p_faiss__HNSW__MinimaxHeap", "faiss::HNSW::MinimaxHeap *", 0, 0, (void*)0, 0};
88222 static swig_type_info _swigt__p_faiss__HammingComputer16 = {"_p_faiss__HammingComputer16", "faiss::HammingComputer16 *", 0, 0, (void*)0, 0};
88223 static swig_type_info _swigt__p_faiss__HammingComputer20 = {"_p_faiss__HammingComputer20", "faiss::HammingComputer20 *", 0, 0, (void*)0, 0};
88224 static swig_type_info _swigt__p_faiss__HammingComputer32 = {"_p_faiss__HammingComputer32", "faiss::HammingComputer32 *", 0, 0, (void*)0, 0};
88225 static swig_type_info _swigt__p_faiss__HammingComputer4 = {"_p_faiss__HammingComputer4", "faiss::HammingComputer4 *", 0, 0, (void*)0, 0};
88226 static swig_type_info _swigt__p_faiss__HammingComputer64 = {"_p_faiss__HammingComputer64", "faiss::HammingComputer64 *", 0, 0, (void*)0, 0};
88227 static swig_type_info _swigt__p_faiss__HammingComputer8 = {"_p_faiss__HammingComputer8", "faiss::HammingComputer8 *", 0, 0, (void*)0, 0};
88228 static swig_type_info _swigt__p_faiss__HammingComputerDefault = {"_p_faiss__HammingComputerDefault", "faiss::HammingComputerDefault *", 0, 0, (void*)0, 0};
88229 static swig_type_info _swigt__p_faiss__HammingComputerM4 = {"_p_faiss__HammingComputerM4", "faiss::HammingComputerM4 *", 0, 0, (void*)0, 0};
88230 static swig_type_info _swigt__p_faiss__HammingComputerM8 = {"_p_faiss__HammingComputerM8", "faiss::HammingComputerM8 *", 0, 0, (void*)0, 0};
88231 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t", "faiss::HeapArray< faiss::CMax< float,long > > *|faiss::float_maxheap_array_t *", 0, 0, (void*)0, 0};
88232 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t", "faiss::HeapArray< faiss::CMax< int,long > > *|faiss::int_maxheap_array_t *", 0, 0, (void*)0, 0};
88233 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t", "faiss::HeapArray< faiss::CMin< float,long > > *|faiss::float_minheap_array_t *", 0, 0, (void*)0, 0};
88234 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t", "faiss::HeapArray< faiss::CMin< int,long > > *|faiss::int_minheap_array_t *", 0, 0, (void*)0, 0};
88235 static swig_type_info _swigt__p_faiss__IDSelector = {"_p_faiss__IDSelector", "faiss::IDSelector *", 0, 0, (void*)0, 0};
88236 static swig_type_info _swigt__p_faiss__IDSelectorBatch = {"_p_faiss__IDSelectorBatch", "faiss::IDSelectorBatch *", 0, 0, (void*)0, 0};
88237 static swig_type_info _swigt__p_faiss__IDSelectorRange = {"_p_faiss__IDSelectorRange", "faiss::IDSelectorRange *", 0, 0, (void*)0, 0};
88238 static swig_type_info _swigt__p_faiss__IOReader = {"_p_faiss__IOReader", "faiss::IOReader *", 0, 0, (void*)0, 0};
88239 static swig_type_info _swigt__p_faiss__IOWriter = {"_p_faiss__IOWriter", "faiss::IOWriter *", 0, 0, (void*)0, 0};
88240 static swig_type_info _swigt__p_faiss__IVFPQSearchParameters = {"_p_faiss__IVFPQSearchParameters", "faiss::IVFPQSearchParameters *", 0, 0, (void*)0, 0};
88241 static swig_type_info _swigt__p_faiss__IVFSearchParameters = {"_p_faiss__IVFSearchParameters", "faiss::IVFSearchParameters *", 0, 0, (void*)0, 0};
88242 static swig_type_info _swigt__p_faiss__Index = {"_p_faiss__Index", "faiss::Index *", 0, 0, (void*)0, 0};
88243 static swig_type_info _swigt__p_faiss__Index2Layer = {"_p_faiss__Index2Layer", "faiss::Index2Layer *", 0, 0, (void*)0, 0};
88244 static swig_type_info _swigt__p_faiss__IndexBinary = {"_p_faiss__IndexBinary", "faiss::IndexBinary *", 0, 0, (void*)0, 0};
88245 static swig_type_info _swigt__p_faiss__IndexBinaryFlat = {"_p_faiss__IndexBinaryFlat", "faiss::IndexBinaryFlat *", 0, 0, (void*)0, 0};
88246 static swig_type_info _swigt__p_faiss__IndexBinaryFromFloat = {"_p_faiss__IndexBinaryFromFloat", "faiss::IndexBinaryFromFloat *", 0, 0, (void*)0, 0};
88247 static swig_type_info _swigt__p_faiss__IndexBinaryHNSW = {"_p_faiss__IndexBinaryHNSW", "faiss::IndexBinaryHNSW *", 0, 0, (void*)0, 0};
88248 static swig_type_info _swigt__p_faiss__IndexBinaryIVF = {"_p_faiss__IndexBinaryIVF", "faiss::IndexBinaryIVF *", 0, 0, (void*)0, 0};
88249 static swig_type_info _swigt__p_faiss__IndexFlat = {"_p_faiss__IndexFlat", "faiss::IndexFlat *", 0, 0, (void*)0, 0};
88250 static swig_type_info _swigt__p_faiss__IndexFlat1D = {"_p_faiss__IndexFlat1D", "faiss::IndexFlat1D *", 0, 0, (void*)0, 0};
88251 static swig_type_info _swigt__p_faiss__IndexFlatIP = {"_p_faiss__IndexFlatIP", "faiss::IndexFlatIP *", 0, 0, (void*)0, 0};
88252 static swig_type_info _swigt__p_faiss__IndexFlatL2 = {"_p_faiss__IndexFlatL2", "faiss::IndexFlatL2 *", 0, 0, (void*)0, 0};
88253 static swig_type_info _swigt__p_faiss__IndexFlatL2BaseShift = {"_p_faiss__IndexFlatL2BaseShift", "faiss::IndexFlatL2BaseShift *", 0, 0, (void*)0, 0};
88254 static swig_type_info _swigt__p_faiss__IndexHNSW = {"_p_faiss__IndexHNSW", "faiss::IndexHNSW *", 0, 0, (void*)0, 0};
88255 static swig_type_info _swigt__p_faiss__IndexHNSW2Level = {"_p_faiss__IndexHNSW2Level", "faiss::IndexHNSW2Level *", 0, 0, (void*)0, 0};
88256 static swig_type_info _swigt__p_faiss__IndexHNSWFlat = {"_p_faiss__IndexHNSWFlat", "faiss::IndexHNSWFlat *", 0, 0, (void*)0, 0};
88257 static swig_type_info _swigt__p_faiss__IndexHNSWPQ = {"_p_faiss__IndexHNSWPQ", "faiss::IndexHNSWPQ *", 0, 0, (void*)0, 0};
88258 static swig_type_info _swigt__p_faiss__IndexHNSWSQ = {"_p_faiss__IndexHNSWSQ", "faiss::IndexHNSWSQ *", 0, 0, (void*)0, 0};
88259 static swig_type_info _swigt__p_faiss__IndexIDMap = {"_p_faiss__IndexIDMap", "faiss::IndexIDMap *", 0, 0, (void*)0, 0};
88260 static swig_type_info _swigt__p_faiss__IndexIDMap2 = {"_p_faiss__IndexIDMap2", "faiss::IndexIDMap2 *", 0, 0, (void*)0, 0};
88261 static swig_type_info _swigt__p_faiss__IndexIVF = {"_p_faiss__IndexIVF", "faiss::IndexIVF *", 0, 0, (void*)0, 0};
88262 static swig_type_info _swigt__p_faiss__IndexIVFFlat = {"_p_faiss__IndexIVFFlat", "faiss::IndexIVFFlat *", 0, 0, (void*)0, 0};
88263 static swig_type_info _swigt__p_faiss__IndexIVFFlatDedup = {"_p_faiss__IndexIVFFlatDedup", "faiss::IndexIVFFlatDedup *", 0, 0, (void*)0, 0};
88264 static swig_type_info _swigt__p_faiss__IndexIVFPQ = {"_p_faiss__IndexIVFPQ", "faiss::IndexIVFPQ *", 0, 0, (void*)0, 0};
88265 static swig_type_info _swigt__p_faiss__IndexIVFPQR = {"_p_faiss__IndexIVFPQR", "faiss::IndexIVFPQR *", 0, 0, (void*)0, 0};
88266 static swig_type_info _swigt__p_faiss__IndexIVFPQStats = {"_p_faiss__IndexIVFPQStats", "faiss::IndexIVFPQStats *", 0, 0, (void*)0, 0};
88267 static swig_type_info _swigt__p_faiss__IndexIVFScalarQuantizer = {"_p_faiss__IndexIVFScalarQuantizer", "faiss::IndexIVFScalarQuantizer *", 0, 0, (void*)0, 0};
88268 static swig_type_info _swigt__p_faiss__IndexIVFStats = {"_p_faiss__IndexIVFStats", "faiss::IndexIVFStats *", 0, 0, (void*)0, 0};
88269 static swig_type_info _swigt__p_faiss__IndexLSH = {"_p_faiss__IndexLSH", "faiss::IndexLSH *", 0, 0, (void*)0, 0};
88270 static swig_type_info _swigt__p_faiss__IndexPQ = {"_p_faiss__IndexPQ", "faiss::IndexPQ *", 0, 0, (void*)0, 0};
88271 static swig_type_info _swigt__p_faiss__IndexPQStats = {"_p_faiss__IndexPQStats", "faiss::IndexPQStats *", 0, 0, (void*)0, 0};
88272 static swig_type_info _swigt__p_faiss__IndexPreTransform = {"_p_faiss__IndexPreTransform", "faiss::IndexPreTransform *", 0, 0, (void*)0, 0};
88273 static swig_type_info _swigt__p_faiss__IndexRefineFlat = {"_p_faiss__IndexRefineFlat", "faiss::IndexRefineFlat *", 0, 0, (void*)0, 0};
88274 static swig_type_info _swigt__p_faiss__IndexScalarQuantizer = {"_p_faiss__IndexScalarQuantizer", "faiss::IndexScalarQuantizer *", 0, 0, (void*)0, 0};
88275 static swig_type_info _swigt__p_faiss__IndexShards = {"_p_faiss__IndexShards", "faiss::IndexShards *", 0, 0, (void*)0, 0};
88276 static swig_type_info _swigt__p_faiss__IndexSplitVectors = {"_p_faiss__IndexSplitVectors", "faiss::IndexSplitVectors *", 0, 0, (void*)0, 0};
88277 static swig_type_info _swigt__p_faiss__IntersectionCriterion = {"_p_faiss__IntersectionCriterion", "faiss::IntersectionCriterion *", 0, 0, (void*)0, 0};
88278 static swig_type_info _swigt__p_faiss__InvertedListScanner = {"_p_faiss__InvertedListScanner", "faiss::InvertedListScanner *", 0, 0, (void*)0, 0};
88279 static swig_type_info _swigt__p_faiss__InvertedLists = {"_p_faiss__InvertedLists", "faiss::InvertedLists *", 0, 0, (void*)0, 0};
88280 static swig_type_info _swigt__p_faiss__Level1Quantizer = {"_p_faiss__Level1Quantizer", "faiss::Level1Quantizer *", 0, 0, (void*)0, 0};
88281 static swig_type_info _swigt__p_faiss__LinearTransform = {"_p_faiss__LinearTransform", "faiss::LinearTransform *", 0, 0, (void*)0, 0};
88282 static swig_type_info _swigt__p_faiss__LockLevels = {"_p_faiss__LockLevels", "faiss::LockLevels *", 0, 0, (void*)0, 0};
88283 static swig_type_info _swigt__p_faiss__MultiIndexQuantizer = {"_p_faiss__MultiIndexQuantizer", "faiss::MultiIndexQuantizer *", 0, 0, (void*)0, 0};
88284 static swig_type_info _swigt__p_faiss__MultiIndexQuantizer2 = {"_p_faiss__MultiIndexQuantizer2", "faiss::MultiIndexQuantizer2 *", 0, 0, (void*)0, 0};
88285 static swig_type_info _swigt__p_faiss__NormalizationTransform = {"_p_faiss__NormalizationTransform", "faiss::NormalizationTransform *", 0, 0, (void*)0, 0};
88286 static swig_type_info _swigt__p_faiss__OPQMatrix = {"_p_faiss__OPQMatrix", "faiss::OPQMatrix *", 0, 0, (void*)0, 0};
88287 static swig_type_info _swigt__p_faiss__OnDiskInvertedLists = {"_p_faiss__OnDiskInvertedLists", "faiss::OnDiskInvertedLists *", 0, 0, (void*)0, 0};
88288 static swig_type_info _swigt__p_faiss__OnDiskInvertedLists__OngoingPrefetch = {"_p_faiss__OnDiskInvertedLists__OngoingPrefetch", "faiss::OnDiskInvertedLists::OngoingPrefetch *", 0, 0, (void*)0, 0};
88289 static swig_type_info _swigt__p_faiss__OneRecallAtRCriterion = {"_p_faiss__OneRecallAtRCriterion", "faiss::OneRecallAtRCriterion *", 0, 0, (void*)0, 0};
88290 static swig_type_info _swigt__p_faiss__OperatingPoint = {"_p_faiss__OperatingPoint", "faiss::OperatingPoint *", 0, 0, (void*)0, 0};
88291 static swig_type_info _swigt__p_faiss__OperatingPoints = {"_p_faiss__OperatingPoints", "faiss::OperatingPoints *", 0, 0, (void*)0, 0};
88292 static swig_type_info _swigt__p_faiss__PCAMatrix = {"_p_faiss__PCAMatrix", "faiss::PCAMatrix *", 0, 0, (void*)0, 0};
88293 static swig_type_info _swigt__p_faiss__ParameterRange = {"_p_faiss__ParameterRange", "faiss::ParameterRange *", 0, 0, (void*)0, 0};
88294 static swig_type_info _swigt__p_faiss__ParameterSpace = {"_p_faiss__ParameterSpace", "faiss::ParameterSpace *", 0, 0, (void*)0, 0};
88295 static swig_type_info _swigt__p_faiss__PermutationObjective = {"_p_faiss__PermutationObjective", "faiss::PermutationObjective *", 0, 0, (void*)0, 0};
88296 static swig_type_info _swigt__p_faiss__PolysemousTraining = {"_p_faiss__PolysemousTraining", "faiss::PolysemousTraining *", 0, 0, (void*)0, 0};
88297 static swig_type_info _swigt__p_faiss__ProductQuantizer = {"_p_faiss__ProductQuantizer", "faiss::ProductQuantizer *", 0, 0, (void*)0, 0};
88298 static swig_type_info _swigt__p_faiss__RandomGenerator = {"_p_faiss__RandomGenerator", "faiss::RandomGenerator *", 0, 0, (void*)0, 0};
88299 static swig_type_info _swigt__p_faiss__RandomRotationMatrix = {"_p_faiss__RandomRotationMatrix", "faiss::RandomRotationMatrix *", 0, 0, (void*)0, 0};
88300 static swig_type_info _swigt__p_faiss__RangeSearchPartialResult = {"_p_faiss__RangeSearchPartialResult", "faiss::RangeSearchPartialResult *", 0, 0, (void*)0, 0};
88301 static swig_type_info _swigt__p_faiss__RangeSearchPartialResult__QueryResult = {"_p_faiss__RangeSearchPartialResult__QueryResult", "faiss::RangeSearchPartialResult::QueryResult *", 0, 0, (void*)0, 0};
88302 static swig_type_info _swigt__p_faiss__RangeSearchResult = {"_p_faiss__RangeSearchResult", "faiss::RangeSearchResult *", 0, 0, (void*)0, 0};
88303 static swig_type_info _swigt__p_faiss__ReconstructFromNeighbors = {"_p_faiss__ReconstructFromNeighbors", "faiss::ReconstructFromNeighbors *", 0, 0, (void*)0, 0};
88304 static swig_type_info _swigt__p_faiss__RemapDimensionsTransform = {"_p_faiss__RemapDimensionsTransform", "faiss::RemapDimensionsTransform *", 0, 0, (void*)0, 0};
88305 static swig_type_info _swigt__p_faiss__ReproduceDistancesObjective = {"_p_faiss__ReproduceDistancesObjective", "faiss::ReproduceDistancesObjective *", 0, 0, (void*)0, 0};
88306 static swig_type_info _swigt__p_faiss__ScalarQuantizer = {"_p_faiss__ScalarQuantizer", "faiss::ScalarQuantizer *", 0, 0, (void*)0, 0};
88307 static swig_type_info _swigt__p_faiss__ScalarQuantizer__DistanceComputer = {"_p_faiss__ScalarQuantizer__DistanceComputer", "faiss::ScalarQuantizer::DistanceComputer *", 0, 0, (void*)0, 0};
88308 static swig_type_info _swigt__p_faiss__SimulatedAnnealingOptimizer = {"_p_faiss__SimulatedAnnealingOptimizer", "faiss::SimulatedAnnealingOptimizer *", 0, 0, (void*)0, 0};
88309 static swig_type_info _swigt__p_faiss__SimulatedAnnealingParameters = {"_p_faiss__SimulatedAnnealingParameters", "faiss::SimulatedAnnealingParameters *", 0, 0, (void*)0, 0};
88310 static swig_type_info _swigt__p_faiss__VectorIOReader = {"_p_faiss__VectorIOReader", "faiss::VectorIOReader *", 0, 0, (void*)0, 0};
88311 static swig_type_info _swigt__p_faiss__VectorIOWriter = {"_p_faiss__VectorIOWriter", "faiss::VectorIOWriter *", 0, 0, (void*)0, 0};
88312 static swig_type_info _swigt__p_faiss__VectorTransform = {"_p_faiss__VectorTransform", "faiss::VectorTransform *", 0, 0, (void*)0, 0};
88313 static swig_type_info _swigt__p_faiss__VisitedTable = {"_p_faiss__VisitedTable", "faiss::VisitedTable *", 0, 0, (void*)0, 0};
88314 static swig_type_info _swigt__p_faiss__gpu__FlatIndex = {"_p_faiss__gpu__FlatIndex", "faiss::gpu::FlatIndex *", 0, 0, (void*)0, 0};
88315 static swig_type_info _swigt__p_faiss__gpu__GpuClonerOptions = {"_p_faiss__gpu__GpuClonerOptions", "faiss::gpu::GpuClonerOptions *", 0, 0, (void*)0, 0};
88316 static swig_type_info _swigt__p_faiss__gpu__GpuIndex = {"_p_faiss__gpu__GpuIndex", "faiss::gpu::GpuIndex *", 0, 0, (void*)0, 0};
88317 static swig_type_info _swigt__p_faiss__gpu__GpuIndexBinaryFlat = {"_p_faiss__gpu__GpuIndexBinaryFlat", "faiss::gpu::GpuIndexBinaryFlat *", 0, 0, (void*)0, 0};
88318 static swig_type_info _swigt__p_faiss__gpu__GpuIndexBinaryFlatConfig = {"_p_faiss__gpu__GpuIndexBinaryFlatConfig", "faiss::gpu::GpuIndexBinaryFlatConfig *", 0, 0, (void*)0, 0};
88319 static swig_type_info _swigt__p_faiss__gpu__GpuIndexConfig = {"_p_faiss__gpu__GpuIndexConfig", "faiss::gpu::GpuIndexConfig *", 0, 0, (void*)0, 0};
88320 static swig_type_info _swigt__p_faiss__gpu__GpuIndexFlat = {"_p_faiss__gpu__GpuIndexFlat", "faiss::gpu::GpuIndexFlat *", 0, 0, (void*)0, 0};
88321 static swig_type_info _swigt__p_faiss__gpu__GpuIndexFlatConfig = {"_p_faiss__gpu__GpuIndexFlatConfig", "faiss::gpu::GpuIndexFlatConfig *", 0, 0, (void*)0, 0};
88322 static swig_type_info _swigt__p_faiss__gpu__GpuIndexFlatIP = {"_p_faiss__gpu__GpuIndexFlatIP", "faiss::gpu::GpuIndexFlatIP *", 0, 0, (void*)0, 0};
88323 static swig_type_info _swigt__p_faiss__gpu__GpuIndexFlatL2 = {"_p_faiss__gpu__GpuIndexFlatL2", "faiss::gpu::GpuIndexFlatL2 *", 0, 0, (void*)0, 0};
88324 static swig_type_info _swigt__p_faiss__gpu__GpuIndexIVF = {"_p_faiss__gpu__GpuIndexIVF", "faiss::gpu::GpuIndexIVF *", 0, 0, (void*)0, 0};
88325 static swig_type_info _swigt__p_faiss__gpu__GpuIndexIVFConfig = {"_p_faiss__gpu__GpuIndexIVFConfig", "faiss::gpu::GpuIndexIVFConfig *", 0, 0, (void*)0, 0};
88326 static swig_type_info _swigt__p_faiss__gpu__GpuIndexIVFFlat = {"_p_faiss__gpu__GpuIndexIVFFlat", "faiss::gpu::GpuIndexIVFFlat *", 0, 0, (void*)0, 0};
88327 static swig_type_info _swigt__p_faiss__gpu__GpuIndexIVFFlatConfig = {"_p_faiss__gpu__GpuIndexIVFFlatConfig", "faiss::gpu::GpuIndexIVFFlatConfig *", 0, 0, (void*)0, 0};
88328 static swig_type_info _swigt__p_faiss__gpu__GpuIndexIVFPQ = {"_p_faiss__gpu__GpuIndexIVFPQ", "faiss::gpu::GpuIndexIVFPQ *", 0, 0, (void*)0, 0};
88329 static swig_type_info _swigt__p_faiss__gpu__GpuIndexIVFPQConfig = {"_p_faiss__gpu__GpuIndexIVFPQConfig", "faiss::gpu::GpuIndexIVFPQConfig *", 0, 0, (void*)0, 0};
88330 static swig_type_info _swigt__p_faiss__gpu__GpuMultipleClonerOptions = {"_p_faiss__gpu__GpuMultipleClonerOptions", "faiss::gpu::GpuMultipleClonerOptions *", 0, 0, (void*)0, 0};
88331 static swig_type_info _swigt__p_faiss__gpu__GpuParameterSpace = {"_p_faiss__gpu__GpuParameterSpace", "faiss::gpu::GpuParameterSpace *", 0, 0, (void*)0, 0};
88332 static swig_type_info _swigt__p_faiss__gpu__GpuResources = {"_p_faiss__gpu__GpuResources", "faiss::gpu::GpuResources *", 0, 0, (void*)0, 0};
88333 static swig_type_info _swigt__p_faiss__gpu__IndexProxy = {"_p_faiss__gpu__IndexProxy", "faiss::gpu::IndexProxy *", 0, 0, (void*)0, 0};
88334 static swig_type_info _swigt__p_faiss__gpu__StandardGpuResources = {"_p_faiss__gpu__StandardGpuResources", "faiss::gpu::StandardGpuResources *", 0, 0, (void*)0, 0};
88335 static swig_type_info _swigt__p_faiss__ivflib__SlidingIndexWindow = {"_p_faiss__ivflib__SlidingIndexWindow", "faiss::ivflib::SlidingIndexWindow *", 0, 0, (void*)0, 0};
88336 static swig_type_info _swigt__p_float = {"_p_float", "float *|faiss::HeapArray< faiss::CMin< float,long > >::T *|faiss::HeapArray< faiss::CMax< float,long > >::T *", 0, 0, (void*)0, 0};
88337 static swig_type_info _swigt__p_idx_t = {"_p_idx_t", "idx_t *", 0, 0, (void*)0, 0};
88338 static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *|hamdis_t *|faiss::HeapArray< faiss::CMin< int,long > >::T *|faiss::HeapArray< faiss::CMax< int,long > >::T *|faiss::IndexHNSW::storage_idx_t *", 0, 0, (void*)0, 0};
88339 static swig_type_info _swigt__p_long = {"_p_long", "faiss::HeapArray< faiss::CMax< float,long > >::TI *|faiss::HeapArray< faiss::CMin< float,long > >::TI *|faiss::BufferList::idx_t *|faiss::IDSelector::idx_t *|faiss::RangeSearchResult::idx_t *|faiss::Index::idx_t *|faiss::InvertedLists::idx_t *|faiss::ivflib::idx_t *|faiss::HNSW::idx_t *|faiss::ReconstructFromNeighbors::idx_t *|faiss::IndexBinary::idx_t *|faiss::AutoTuneCriterion::idx_t *|faiss::HeapArray< faiss::CMin< int,long > >::TI *|faiss::HeapArray< faiss::CMax< int,long > >::TI *|long *", 0, 0, (void*)0, 0};
88340 static swig_type_info _swigt__p_omp_lock_t = {"_p_omp_lock_t", "omp_lock_t *", 0, 0, (void*)0, 0};
88341 static swig_type_info _swigt__p_p_faiss__Index = {"_p_p_faiss__Index", "faiss::Index **", 0, 0, (void*)0, 0};
88342 static swig_type_info _swigt__p_p_faiss__IndexPQ = {"_p_p_faiss__IndexPQ", 0, 0, 0, 0, 0};
88343 static swig_type_info _swigt__p_p_faiss__IndexIVFFlatDedup = {"_p_p_faiss__IndexIVFFlatDedup", 0, 0, 0, 0, 0};
88344 static swig_type_info _swigt__p_p_faiss__IndexPreTransform = {"_p_p_faiss__IndexPreTransform", 0, 0, 0, 0, 0};
88345 static swig_type_info _swigt__p_p_faiss__IndexSplitVectors = {"_p_p_faiss__IndexSplitVectors", 0, 0, 0, 0, 0};
88346 static swig_type_info _swigt__p_p_faiss__IndexIDMap2 = {"_p_p_faiss__IndexIDMap2", 0, 0, 0, 0, 0};
88347 static swig_type_info _swigt__p_p_faiss__IndexIVFFlat = {"_p_p_faiss__IndexIVFFlat", 0, 0, 0, 0, 0};
88348 static swig_type_info _swigt__p_p_faiss__gpu__GpuIndexIVFFlat = {"_p_p_faiss__gpu__GpuIndexIVFFlat", 0, 0, 0, 0, 0};
88349 static swig_type_info _swigt__p_p_faiss__MultiIndexQuantizer = {"_p_p_faiss__MultiIndexQuantizer", 0, 0, 0, 0, 0};
88350 static swig_type_info _swigt__p_p_faiss__IndexScalarQuantizer = {"_p_p_faiss__IndexScalarQuantizer", 0, 0, 0, 0, 0};
88351 static swig_type_info _swigt__p_p_faiss__IndexIVFScalarQuantizer = {"_p_p_faiss__IndexIVFScalarQuantizer", 0, 0, 0, 0, 0};
88352 static swig_type_info _swigt__p_p_faiss__IndexRefineFlat = {"_p_p_faiss__IndexRefineFlat", 0, 0, 0, 0, 0};
88353 static swig_type_info _swigt__p_p_faiss__gpu__GpuIndexIVFPQ = {"_p_p_faiss__gpu__GpuIndexIVFPQ", 0, 0, 0, 0, 0};
88354 static swig_type_info _swigt__p_p_faiss__IndexIVFPQ = {"_p_p_faiss__IndexIVFPQ", 0, 0, 0, 0, 0};
88355 static swig_type_info _swigt__p_p_faiss__IndexLSH = {"_p_p_faiss__IndexLSH", 0, 0, 0, 0, 0};
88356 static swig_type_info _swigt__p_p_faiss__IndexHNSWSQ = {"_p_p_faiss__IndexHNSWSQ", 0, 0, 0, 0, 0};
88357 static swig_type_info _swigt__p_p_faiss__gpu__IndexProxy = {"_p_p_faiss__gpu__IndexProxy", 0, 0, 0, 0, 0};
88358 static swig_type_info _swigt__p_p_faiss__gpu__GpuIndex = {"_p_p_faiss__gpu__GpuIndex", 0, 0, 0, 0, 0};
88359 static swig_type_info _swigt__p_p_faiss__IndexIDMap = {"_p_p_faiss__IndexIDMap", 0, 0, 0, 0, 0};
88360 static swig_type_info _swigt__p_p_faiss__IndexHNSW2Level = {"_p_p_faiss__IndexHNSW2Level", 0, 0, 0, 0, 0};
88361 static swig_type_info _swigt__p_p_faiss__Index2Layer = {"_p_p_faiss__Index2Layer", 0, 0, 0, 0, 0};
88362 static swig_type_info _swigt__p_p_faiss__gpu__GpuIndexFlatL2 = {"_p_p_faiss__gpu__GpuIndexFlatL2", 0, 0, 0, 0, 0};
88363 static swig_type_info _swigt__p_p_faiss__IndexFlatL2 = {"_p_p_faiss__IndexFlatL2", 0, 0, 0, 0, 0};
88364 static swig_type_info _swigt__p_p_faiss__IndexHNSWFlat = {"_p_p_faiss__IndexHNSWFlat", 0, 0, 0, 0, 0};
88365 static swig_type_info _swigt__p_p_faiss__IndexIVFPQR = {"_p_p_faiss__IndexIVFPQR", 0, 0, 0, 0, 0};
88366 static swig_type_info _swigt__p_p_faiss__IndexFlat1D = {"_p_p_faiss__IndexFlat1D", 0, 0, 0, 0, 0};
88367 static swig_type_info _swigt__p_p_faiss__gpu__GpuIndexFlat = {"_p_p_faiss__gpu__GpuIndexFlat", 0, 0, 0, 0, 0};
88368 static swig_type_info _swigt__p_p_faiss__IndexFlat = {"_p_p_faiss__IndexFlat", 0, 0, 0, 0, 0};
88369 static swig_type_info _swigt__p_p_faiss__gpu__GpuIndexFlatIP = {"_p_p_faiss__gpu__GpuIndexFlatIP", 0, 0, 0, 0, 0};
88370 static swig_type_info _swigt__p_p_faiss__IndexFlatIP = {"_p_p_faiss__IndexFlatIP", 0, 0, 0, 0, 0};
88371 static swig_type_info _swigt__p_p_faiss__IndexHNSW = {"_p_p_faiss__IndexHNSW", 0, 0, 0, 0, 0};
88372 static swig_type_info _swigt__p_p_faiss__IndexHNSWPQ = {"_p_p_faiss__IndexHNSWPQ", 0, 0, 0, 0, 0};
88373 static swig_type_info _swigt__p_p_faiss__IndexFlatL2BaseShift = {"_p_p_faiss__IndexFlatL2BaseShift", 0, 0, 0, 0, 0};
88374 static swig_type_info _swigt__p_p_faiss__gpu__GpuIndexIVF = {"_p_p_faiss__gpu__GpuIndexIVF", 0, 0, 0, 0, 0};
88375 static swig_type_info _swigt__p_p_faiss__IndexIVF = {"_p_p_faiss__IndexIVF", 0, 0, 0, 0, 0};
88376 static swig_type_info _swigt__p_p_faiss__MultiIndexQuantizer2 = {"_p_p_faiss__MultiIndexQuantizer2", 0, 0, 0, 0, 0};
88377 static swig_type_info _swigt__p_p_faiss__IndexShards = {"_p_p_faiss__IndexShards", 0, 0, 0, 0, 0};
88378 static swig_type_info _swigt__p_p_faiss__InvertedLists = {"_p_p_faiss__InvertedLists", "faiss::InvertedLists **", 0, 0, (void*)0, 0};
88379 static swig_type_info _swigt__p_p_faiss__ArrayInvertedLists = {"_p_p_faiss__ArrayInvertedLists", 0, 0, 0, 0, 0};
88380 static swig_type_info _swigt__p_p_faiss__ConcatenatedInvertedLists = {"_p_p_faiss__ConcatenatedInvertedLists", 0, 0, 0, 0, 0};
88381 static swig_type_info _swigt__p_p_faiss__OnDiskInvertedLists = {"_p_p_faiss__OnDiskInvertedLists", 0, 0, 0, 0, 0};
88382 static swig_type_info _swigt__p_p_faiss__VectorTransform = {"_p_p_faiss__VectorTransform", "faiss::VectorTransform **", 0, 0, (void*)0, 0};
88383 static swig_type_info _swigt__p_p_faiss__RandomRotationMatrix = {"_p_p_faiss__RandomRotationMatrix", 0, 0, 0, 0, 0};
88384 static swig_type_info _swigt__p_p_faiss__PCAMatrix = {"_p_p_faiss__PCAMatrix", 0, 0, 0, 0, 0};
88385 static swig_type_info _swigt__p_p_faiss__OPQMatrix = {"_p_p_faiss__OPQMatrix", 0, 0, 0, 0, 0};
88386 static swig_type_info _swigt__p_p_faiss__LinearTransform = {"_p_p_faiss__LinearTransform", 0, 0, 0, 0, 0};
88387 static swig_type_info _swigt__p_p_faiss__RemapDimensionsTransform = {"_p_p_faiss__RemapDimensionsTransform", 0, 0, 0, 0, 0};
88388 static swig_type_info _swigt__p_p_faiss__NormalizationTransform = {"_p_p_faiss__NormalizationTransform", 0, 0, 0, 0, 0};
88389 static swig_type_info _swigt__p_p_faiss__gpu__GpuResources = {"_p_p_faiss__gpu__GpuResources", "faiss::gpu::GpuResources **", 0, 0, (void*)0, 0};
88390 static swig_type_info _swigt__p_p_faiss__gpu__StandardGpuResources = {"_p_p_faiss__gpu__StandardGpuResources", 0, 0, 0, 0, 0};
88391 static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
88392 static swig_type_info _swigt__p_std__functionT_void_ffaiss__Index_pF_t = {"_p_std__functionT_void_ffaiss__Index_pF_t", "std::function< void (faiss::Index *) > *", 0, 0, (void*)0, 0};
88393 static swig_type_info _swigt__p_std__listT_faiss__OnDiskInvertedLists__Slot_t = {"_p_std__listT_faiss__OnDiskInvertedLists__Slot_t", "std::list< faiss::OnDiskInvertedLists::Slot > *", 0, 0, (void*)0, 0};
88394 static swig_type_info _swigt__p_std__mt19937 = {"_p_std__mt19937", "std::mt19937 *", 0, 0, (void*)0, 0};
88395 static swig_type_info _swigt__p_std__pairT_float_int_t = {"_p_std__pairT_float_int_t", "std::pair< float,int > *|faiss::HNSW::Node *", 0, 0, (void*)0, 0};
88396 static swig_type_info _swigt__p_std__pairT_void_p_unsigned_long_t = {"_p_std__pairT_void_p_unsigned_long_t", "std::pair< void *,unsigned long > *|std::pair< void *,size_t > *", 0, 0, (void*)0, 0};
88397 static swig_type_info _swigt__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t = {"_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t", "std::priority_queue< faiss::HNSW::NodeDistFarther > *", 0, 0, (void*)0, 0};
88398 static swig_type_info _swigt__p_std__priority_queueT_std__pairT_float_int_t_t = {"_p_std__priority_queueT_std__pairT_float_int_t_t", "std::priority_queue< std::pair< float,int > > *|std::priority_queue< faiss::HNSW::Node > *", 0, 0, (void*)0, 0};
88399 static swig_type_info _swigt__p_std__unordered_mapT_long_long_t = {"_p_std__unordered_mapT_long_long_t", "std::unordered_map< long,long > *|std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > *", 0, 0, (void*)0, 0};
88400 static swig_type_info _swigt__p_std__unordered_multimapT_long_long_t = {"_p_std__unordered_multimapT_long_long_t", "std::unordered_multimap< long,long > *|std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > *", 0, 0, (void*)0, 0};
88401 static swig_type_info _swigt__p_std__vectorT_char_t = {"_p_std__vectorT_char_t", "std::vector< char > *", 0, 0, (void*)0, 0};
88402 static swig_type_info _swigt__p_std__vectorT_cudaStream_t_t = {"_p_std__vectorT_cudaStream_t_t", "std::vector< cudaStream_t > *", 0, 0, (void*)0, 0};
88403 static swig_type_info _swigt__p_std__vectorT_double_t = {"_p_std__vectorT_double_t", "std::vector< double > *", 0, 0, (void*)0, 0};
88404 static swig_type_info _swigt__p_std__vectorT_faiss__BufferList__Buffer_t = {"_p_std__vectorT_faiss__BufferList__Buffer_t", "std::vector< faiss::BufferList::Buffer > *", 0, 0, (void*)0, 0};
88405 static swig_type_info _swigt__p_std__vectorT_faiss__HNSW__NodeDistFarther_t = {"_p_std__vectorT_faiss__HNSW__NodeDistFarther_t", "std::vector< faiss::HNSW::NodeDistFarther > *", 0, 0, (void*)0, 0};
88406 static swig_type_info _swigt__p_std__vectorT_faiss__Index_p_t = {"_p_std__vectorT_faiss__Index_p_t", "std::vector< faiss::Index * > *", 0, 0, (void*)0, 0};
88407 static swig_type_info _swigt__p_std__vectorT_faiss__InvertedLists_const_p_t = {"_p_std__vectorT_faiss__InvertedLists_const_p_t", "std::vector< faiss::InvertedLists const * > *", 0, 0, (void*)0, 0};
88408 static swig_type_info _swigt__p_std__vectorT_faiss__InvertedLists_p_t = {"_p_std__vectorT_faiss__InvertedLists_p_t", "std::vector< faiss::InvertedLists * > *", 0, 0, (void*)0, 0};
88409 static swig_type_info _swigt__p_std__vectorT_faiss__OnDiskInvertedLists__List_t = {"_p_std__vectorT_faiss__OnDiskInvertedLists__List_t", "std::vector< faiss::OnDiskInvertedLists::List > *", 0, 0, (void*)0, 0};
88410 static swig_type_info _swigt__p_std__vectorT_faiss__OperatingPoint_t = {"_p_std__vectorT_faiss__OperatingPoint_t", "std::vector< faiss::OperatingPoint > *", 0, 0, (void*)0, 0};
88411 static swig_type_info _swigt__p_std__vectorT_faiss__ParameterRange_t = {"_p_std__vectorT_faiss__ParameterRange_t", "std::vector< faiss::ParameterRange > *", 0, 0, (void*)0, 0};
88412 static swig_type_info _swigt__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t = {"_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t", "std::vector< faiss::RangeSearchPartialResult::QueryResult > *", 0, 0, (void*)0, 0};
88413 static swig_type_info _swigt__p_std__vectorT_faiss__VectorTransform_p_t = {"_p_std__vectorT_faiss__VectorTransform_p_t", "std::vector< faiss::VectorTransform * > *", 0, 0, (void*)0, 0};
88414 static swig_type_info _swigt__p_std__vectorT_faiss__gpu__GpuResources_p_t = {"_p_std__vectorT_faiss__gpu__GpuResources_p_t", "std::vector< faiss::gpu::GpuResources * > *", 0, 0, (void*)0, 0};
88415 static swig_type_info _swigt__p_std__vectorT_float_t = {"_p_std__vectorT_float_t", "std::vector< float > *", 0, 0, (void*)0, 0};
88416 static swig_type_info _swigt__p_std__vectorT_int_t = {"_p_std__vectorT_int_t", "std::vector< faiss::HNSW::storage_idx_t > *|std::vector< int > *", 0, 0, (void*)0, 0};
88417 static swig_type_info _swigt__p_std__vectorT_long_t = {"_p_std__vectorT_long_t", "std::vector< long > *|std::vector< faiss::Index::idx_t > *|std::vector< faiss::AutoTuneCriterion::idx_t > *", 0, 0, (void*)0, 0};
88418 static swig_type_info _swigt__p_std__vectorT_omp_lock_t_t = {"_p_std__vectorT_omp_lock_t_t", "std::vector< omp_lock_t > *", 0, 0, (void*)0, 0};
88419 static swig_type_info _swigt__p_std__vectorT_std__vectorT_float_t_t = {"_p_std__vectorT_std__vectorT_float_t_t", "std::vector< std::vector< float > > *", 0, 0, (void*)0, 0};
88420 static swig_type_info _swigt__p_std__vectorT_std__vectorT_long_t_t = {"_p_std__vectorT_std__vectorT_long_t_t", "std::vector< std::vector< long > > *|std::vector< std::vector< faiss::InvertedLists::idx_t > > *", 0, 0, (void*)0, 0};
88421 static swig_type_info _swigt__p_std__vectorT_std__vectorT_uint8_t_t_t = {"_p_std__vectorT_std__vectorT_uint8_t_t_t", "std::vector< std::vector< unsigned char > > *|std::vector< std::vector< uint8_t > > *", 0, 0, (void*)0, 0};
88422 static swig_type_info _swigt__p_std__vectorT_std__vectorT_unsigned_long_t_t = {"_p_std__vectorT_std__vectorT_unsigned_long_t_t", "std::vector< std::vector< unsigned long > > *|std::vector< std::vector< size_t > > *", 0, 0, (void*)0, 0};
88423 static swig_type_info _swigt__p_std__vectorT_unsigned_char_t = {"_p_std__vectorT_unsigned_char_t", "std::vector< unsigned char > *|std::vector< uint8_t > *|std::vector< faiss::IndexLSH::uint8_t > *", 0, 0, (void*)0, 0};
88424 static swig_type_info _swigt__p_std__vectorT_unsigned_long_t = {"_p_std__vectorT_unsigned_long_t", "std::vector< unsigned long > *|std::vector< size_t > *", 0, 0, (void*)0, 0};
88425 static swig_type_info _swigt__p_storage_idx_t = {"_p_storage_idx_t", "storage_idx_t *", 0, 0, (void*)0, 0};
88426 static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *", 0, 0, (void*)0, 0};
88427 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0};
88428 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uint64_t *|size_t *|unsigned long *", 0, 0, (void*)0, 0};
88429 static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
88430 
88431 static swig_type_info *swig_type_initial[] = {
88432  &_swigt__p_Crev,
88433  &_swigt__p_FILE,
88434  &_swigt__p_MapLong2Long,
88435  &_swigt__p_Node,
88436  &_swigt__p_T,
88437  &_swigt__p_TI,
88438  &_swigt__p_char,
88439  &_swigt__p_cublasHandle_t,
88440  &_swigt__p_cudaStream_t,
88441  &_swigt__p_double,
88442  &_swigt__p_faiss__ArrayInvertedLists,
88443  &_swigt__p_faiss__AutoTuneCriterion,
88444  &_swigt__p_faiss__BinaryInvertedListScanner,
88445  &_swigt__p_faiss__BufferList,
88446  &_swigt__p_faiss__Cloner,
88447  &_swigt__p_faiss__Clustering,
88448  &_swigt__p_faiss__ClusteringParameters,
88449  &_swigt__p_faiss__ConcatenatedInvertedLists,
88450  &_swigt__p_faiss__GenHammingComputer16,
88451  &_swigt__p_faiss__GenHammingComputer32,
88452  &_swigt__p_faiss__GenHammingComputer8,
88453  &_swigt__p_faiss__GenHammingComputerM8,
88454  &_swigt__p_faiss__HNSW,
88455  &_swigt__p_faiss__HNSWStats,
88456  &_swigt__p_faiss__HNSW__DistanceComputer,
88457  &_swigt__p_faiss__HNSW__MinimaxHeap,
88458  &_swigt__p_faiss__HammingComputer16,
88459  &_swigt__p_faiss__HammingComputer20,
88460  &_swigt__p_faiss__HammingComputer32,
88461  &_swigt__p_faiss__HammingComputer4,
88462  &_swigt__p_faiss__HammingComputer64,
88463  &_swigt__p_faiss__HammingComputer8,
88464  &_swigt__p_faiss__HammingComputerDefault,
88465  &_swigt__p_faiss__HammingComputerM4,
88466  &_swigt__p_faiss__HammingComputerM8,
88467  &_swigt__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t,
88468  &_swigt__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t,
88469  &_swigt__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t,
88470  &_swigt__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t,
88471  &_swigt__p_faiss__IDSelector,
88472  &_swigt__p_faiss__IDSelectorBatch,
88473  &_swigt__p_faiss__IDSelectorRange,
88474  &_swigt__p_faiss__IOReader,
88475  &_swigt__p_faiss__IOWriter,
88476  &_swigt__p_faiss__IVFPQSearchParameters,
88477  &_swigt__p_faiss__IVFSearchParameters,
88478  &_swigt__p_faiss__Index,
88479  &_swigt__p_faiss__Index2Layer,
88480  &_swigt__p_faiss__IndexBinary,
88481  &_swigt__p_faiss__IndexBinaryFlat,
88482  &_swigt__p_faiss__IndexBinaryFromFloat,
88483  &_swigt__p_faiss__IndexBinaryHNSW,
88484  &_swigt__p_faiss__IndexBinaryIVF,
88485  &_swigt__p_faiss__IndexFlat,
88486  &_swigt__p_faiss__IndexFlat1D,
88487  &_swigt__p_faiss__IndexFlatIP,
88488  &_swigt__p_faiss__IndexFlatL2,
88489  &_swigt__p_faiss__IndexFlatL2BaseShift,
88490  &_swigt__p_faiss__IndexHNSW,
88491  &_swigt__p_faiss__IndexHNSW2Level,
88492  &_swigt__p_faiss__IndexHNSWFlat,
88493  &_swigt__p_faiss__IndexHNSWPQ,
88494  &_swigt__p_faiss__IndexHNSWSQ,
88495  &_swigt__p_faiss__IndexIDMap,
88496  &_swigt__p_faiss__IndexIDMap2,
88497  &_swigt__p_faiss__IndexIVF,
88498  &_swigt__p_faiss__IndexIVFFlat,
88499  &_swigt__p_faiss__IndexIVFFlatDedup,
88500  &_swigt__p_faiss__IndexIVFPQ,
88501  &_swigt__p_faiss__IndexIVFPQR,
88502  &_swigt__p_faiss__IndexIVFPQStats,
88503  &_swigt__p_faiss__IndexIVFScalarQuantizer,
88504  &_swigt__p_faiss__IndexIVFStats,
88505  &_swigt__p_faiss__IndexLSH,
88506  &_swigt__p_faiss__IndexPQ,
88507  &_swigt__p_faiss__IndexPQStats,
88508  &_swigt__p_faiss__IndexPreTransform,
88509  &_swigt__p_faiss__IndexRefineFlat,
88510  &_swigt__p_faiss__IndexScalarQuantizer,
88511  &_swigt__p_faiss__IndexShards,
88512  &_swigt__p_faiss__IndexSplitVectors,
88513  &_swigt__p_faiss__IntersectionCriterion,
88514  &_swigt__p_faiss__InvertedListScanner,
88515  &_swigt__p_faiss__InvertedLists,
88516  &_swigt__p_faiss__Level1Quantizer,
88517  &_swigt__p_faiss__LinearTransform,
88518  &_swigt__p_faiss__LockLevels,
88519  &_swigt__p_faiss__MultiIndexQuantizer,
88520  &_swigt__p_faiss__MultiIndexQuantizer2,
88521  &_swigt__p_faiss__NormalizationTransform,
88522  &_swigt__p_faiss__OPQMatrix,
88523  &_swigt__p_faiss__OnDiskInvertedLists,
88524  &_swigt__p_faiss__OnDiskInvertedLists__OngoingPrefetch,
88525  &_swigt__p_faiss__OneRecallAtRCriterion,
88526  &_swigt__p_faiss__OperatingPoint,
88527  &_swigt__p_faiss__OperatingPoints,
88528  &_swigt__p_faiss__PCAMatrix,
88529  &_swigt__p_faiss__ParameterRange,
88530  &_swigt__p_faiss__ParameterSpace,
88531  &_swigt__p_faiss__PermutationObjective,
88532  &_swigt__p_faiss__PolysemousTraining,
88533  &_swigt__p_faiss__ProductQuantizer,
88534  &_swigt__p_faiss__RandomGenerator,
88535  &_swigt__p_faiss__RandomRotationMatrix,
88536  &_swigt__p_faiss__RangeSearchPartialResult,
88537  &_swigt__p_faiss__RangeSearchPartialResult__QueryResult,
88538  &_swigt__p_faiss__RangeSearchResult,
88539  &_swigt__p_faiss__ReconstructFromNeighbors,
88540  &_swigt__p_faiss__RemapDimensionsTransform,
88541  &_swigt__p_faiss__ReproduceDistancesObjective,
88542  &_swigt__p_faiss__ScalarQuantizer,
88543  &_swigt__p_faiss__ScalarQuantizer__DistanceComputer,
88544  &_swigt__p_faiss__SimulatedAnnealingOptimizer,
88545  &_swigt__p_faiss__SimulatedAnnealingParameters,
88546  &_swigt__p_faiss__VectorIOReader,
88547  &_swigt__p_faiss__VectorIOWriter,
88548  &_swigt__p_faiss__VectorTransform,
88549  &_swigt__p_faiss__VisitedTable,
88550  &_swigt__p_faiss__gpu__FlatIndex,
88551  &_swigt__p_faiss__gpu__GpuClonerOptions,
88552  &_swigt__p_faiss__gpu__GpuIndex,
88553  &_swigt__p_faiss__gpu__GpuIndexBinaryFlat,
88554  &_swigt__p_faiss__gpu__GpuIndexBinaryFlatConfig,
88555  &_swigt__p_faiss__gpu__GpuIndexConfig,
88556  &_swigt__p_faiss__gpu__GpuIndexFlat,
88557  &_swigt__p_faiss__gpu__GpuIndexFlatConfig,
88558  &_swigt__p_faiss__gpu__GpuIndexFlatIP,
88559  &_swigt__p_faiss__gpu__GpuIndexFlatL2,
88560  &_swigt__p_faiss__gpu__GpuIndexIVF,
88561  &_swigt__p_faiss__gpu__GpuIndexIVFConfig,
88562  &_swigt__p_faiss__gpu__GpuIndexIVFFlat,
88563  &_swigt__p_faiss__gpu__GpuIndexIVFFlatConfig,
88564  &_swigt__p_faiss__gpu__GpuIndexIVFPQ,
88565  &_swigt__p_faiss__gpu__GpuIndexIVFPQConfig,
88566  &_swigt__p_faiss__gpu__GpuMultipleClonerOptions,
88567  &_swigt__p_faiss__gpu__GpuParameterSpace,
88568  &_swigt__p_faiss__gpu__GpuResources,
88569  &_swigt__p_faiss__gpu__IndexProxy,
88570  &_swigt__p_faiss__gpu__StandardGpuResources,
88571  &_swigt__p_faiss__ivflib__SlidingIndexWindow,
88572  &_swigt__p_float,
88573  &_swigt__p_idx_t,
88574  &_swigt__p_int,
88575  &_swigt__p_long,
88576  &_swigt__p_omp_lock_t,
88577  &_swigt__p_p_faiss__ArrayInvertedLists,
88578  &_swigt__p_p_faiss__ConcatenatedInvertedLists,
88579  &_swigt__p_p_faiss__Index,
88580  &_swigt__p_p_faiss__Index2Layer,
88581  &_swigt__p_p_faiss__IndexFlat,
88582  &_swigt__p_p_faiss__IndexFlat1D,
88583  &_swigt__p_p_faiss__IndexFlatIP,
88584  &_swigt__p_p_faiss__IndexFlatL2,
88585  &_swigt__p_p_faiss__IndexFlatL2BaseShift,
88586  &_swigt__p_p_faiss__IndexHNSW,
88587  &_swigt__p_p_faiss__IndexHNSW2Level,
88588  &_swigt__p_p_faiss__IndexHNSWFlat,
88589  &_swigt__p_p_faiss__IndexHNSWPQ,
88590  &_swigt__p_p_faiss__IndexHNSWSQ,
88591  &_swigt__p_p_faiss__IndexIDMap,
88592  &_swigt__p_p_faiss__IndexIDMap2,
88593  &_swigt__p_p_faiss__IndexIVF,
88594  &_swigt__p_p_faiss__IndexIVFFlat,
88595  &_swigt__p_p_faiss__IndexIVFFlatDedup,
88596  &_swigt__p_p_faiss__IndexIVFPQ,
88597  &_swigt__p_p_faiss__IndexIVFPQR,
88598  &_swigt__p_p_faiss__IndexIVFScalarQuantizer,
88599  &_swigt__p_p_faiss__IndexLSH,
88600  &_swigt__p_p_faiss__IndexPQ,
88601  &_swigt__p_p_faiss__IndexPreTransform,
88602  &_swigt__p_p_faiss__IndexRefineFlat,
88603  &_swigt__p_p_faiss__IndexScalarQuantizer,
88604  &_swigt__p_p_faiss__IndexShards,
88605  &_swigt__p_p_faiss__IndexSplitVectors,
88606  &_swigt__p_p_faiss__InvertedLists,
88607  &_swigt__p_p_faiss__LinearTransform,
88608  &_swigt__p_p_faiss__MultiIndexQuantizer,
88609  &_swigt__p_p_faiss__MultiIndexQuantizer2,
88610  &_swigt__p_p_faiss__NormalizationTransform,
88611  &_swigt__p_p_faiss__OPQMatrix,
88612  &_swigt__p_p_faiss__OnDiskInvertedLists,
88613  &_swigt__p_p_faiss__PCAMatrix,
88614  &_swigt__p_p_faiss__RandomRotationMatrix,
88615  &_swigt__p_p_faiss__RemapDimensionsTransform,
88616  &_swigt__p_p_faiss__VectorTransform,
88617  &_swigt__p_p_faiss__gpu__GpuIndex,
88618  &_swigt__p_p_faiss__gpu__GpuIndexFlat,
88619  &_swigt__p_p_faiss__gpu__GpuIndexFlatIP,
88620  &_swigt__p_p_faiss__gpu__GpuIndexFlatL2,
88621  &_swigt__p_p_faiss__gpu__GpuIndexIVF,
88622  &_swigt__p_p_faiss__gpu__GpuIndexIVFFlat,
88623  &_swigt__p_p_faiss__gpu__GpuIndexIVFPQ,
88624  &_swigt__p_p_faiss__gpu__GpuResources,
88625  &_swigt__p_p_faiss__gpu__IndexProxy,
88626  &_swigt__p_p_faiss__gpu__StandardGpuResources,
88627  &_swigt__p_p_void,
88628  &_swigt__p_std__functionT_void_ffaiss__Index_pF_t,
88629  &_swigt__p_std__listT_faiss__OnDiskInvertedLists__Slot_t,
88630  &_swigt__p_std__mt19937,
88631  &_swigt__p_std__pairT_float_int_t,
88632  &_swigt__p_std__pairT_void_p_unsigned_long_t,
88633  &_swigt__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t,
88634  &_swigt__p_std__priority_queueT_std__pairT_float_int_t_t,
88635  &_swigt__p_std__unordered_mapT_long_long_t,
88636  &_swigt__p_std__unordered_multimapT_long_long_t,
88637  &_swigt__p_std__vectorT_char_t,
88638  &_swigt__p_std__vectorT_cudaStream_t_t,
88639  &_swigt__p_std__vectorT_double_t,
88640  &_swigt__p_std__vectorT_faiss__BufferList__Buffer_t,
88641  &_swigt__p_std__vectorT_faiss__HNSW__NodeDistFarther_t,
88642  &_swigt__p_std__vectorT_faiss__Index_p_t,
88643  &_swigt__p_std__vectorT_faiss__InvertedLists_const_p_t,
88644  &_swigt__p_std__vectorT_faiss__InvertedLists_p_t,
88645  &_swigt__p_std__vectorT_faiss__OnDiskInvertedLists__List_t,
88646  &_swigt__p_std__vectorT_faiss__OperatingPoint_t,
88647  &_swigt__p_std__vectorT_faiss__ParameterRange_t,
88648  &_swigt__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t,
88649  &_swigt__p_std__vectorT_faiss__VectorTransform_p_t,
88650  &_swigt__p_std__vectorT_faiss__gpu__GpuResources_p_t,
88651  &_swigt__p_std__vectorT_float_t,
88652  &_swigt__p_std__vectorT_int_t,
88653  &_swigt__p_std__vectorT_long_t,
88654  &_swigt__p_std__vectorT_omp_lock_t_t,
88655  &_swigt__p_std__vectorT_std__vectorT_float_t_t,
88656  &_swigt__p_std__vectorT_std__vectorT_long_t_t,
88657  &_swigt__p_std__vectorT_std__vectorT_uint8_t_t_t,
88658  &_swigt__p_std__vectorT_std__vectorT_unsigned_long_t_t,
88659  &_swigt__p_std__vectorT_unsigned_char_t,
88660  &_swigt__p_std__vectorT_unsigned_long_t,
88661  &_swigt__p_storage_idx_t,
88662  &_swigt__p_uint32_t,
88663  &_swigt__p_unsigned_char,
88664  &_swigt__p_unsigned_long,
88665  &_swigt__p_void,
88666 };
88667 
88668 static swig_cast_info _swigc__p_Crev[] = { {&_swigt__p_Crev, 0, 0, 0},{0, 0, 0, 0}};
88669 static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
88670 static swig_cast_info _swigc__p_MapLong2Long[] = { {&_swigt__p_MapLong2Long, 0, 0, 0},{0, 0, 0, 0}};
88671 static swig_cast_info _swigc__p_Node[] = { {&_swigt__p_Node, 0, 0, 0},{0, 0, 0, 0}};
88672 static swig_cast_info _swigc__p_T[] = { {&_swigt__p_T, 0, 0, 0},{0, 0, 0, 0}};
88673 static swig_cast_info _swigc__p_TI[] = { {&_swigt__p_TI, 0, 0, 0},{0, 0, 0, 0}};
88674 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
88675 static swig_cast_info _swigc__p_cublasHandle_t[] = { {&_swigt__p_cublasHandle_t, 0, 0, 0},{0, 0, 0, 0}};
88676 static swig_cast_info _swigc__p_cudaStream_t[] = { {&_swigt__p_cudaStream_t, 0, 0, 0},{0, 0, 0, 0}};
88677 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
88678 static swig_cast_info _swigc__p_faiss__ArrayInvertedLists[] = { {&_swigt__p_faiss__ArrayInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
88679 static swig_cast_info _swigc__p_faiss__AutoTuneCriterion[] = { {&_swigt__p_faiss__AutoTuneCriterion, 0, 0, 0}, {&_swigt__p_faiss__OneRecallAtRCriterion, _p_faiss__OneRecallAtRCriterionTo_p_faiss__AutoTuneCriterion, 0, 0}, {&_swigt__p_faiss__IntersectionCriterion, _p_faiss__IntersectionCriterionTo_p_faiss__AutoTuneCriterion, 0, 0},{0, 0, 0, 0}};
88680 static swig_cast_info _swigc__p_faiss__BinaryInvertedListScanner[] = { {&_swigt__p_faiss__BinaryInvertedListScanner, 0, 0, 0},{0, 0, 0, 0}};
88681 static swig_cast_info _swigc__p_faiss__BufferList[] = { {&_swigt__p_faiss__RangeSearchPartialResult, _p_faiss__RangeSearchPartialResultTo_p_faiss__BufferList, 0, 0}, {&_swigt__p_faiss__BufferList, 0, 0, 0},{0, 0, 0, 0}};
88682 static swig_cast_info _swigc__p_faiss__Cloner[] = { {&_swigt__p_faiss__Cloner, 0, 0, 0},{0, 0, 0, 0}};
88683 static swig_cast_info _swigc__p_faiss__Clustering[] = { {&_swigt__p_faiss__Clustering, 0, 0, 0},{0, 0, 0, 0}};
88684 static swig_cast_info _swigc__p_faiss__ClusteringParameters[] = { {&_swigt__p_faiss__Clustering, _p_faiss__ClusteringTo_p_faiss__ClusteringParameters, 0, 0}, {&_swigt__p_faiss__ClusteringParameters, 0, 0, 0},{0, 0, 0, 0}};
88685 static swig_cast_info _swigc__p_faiss__ConcatenatedInvertedLists[] = { {&_swigt__p_faiss__ConcatenatedInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
88686 static swig_cast_info _swigc__p_faiss__GenHammingComputer16[] = { {&_swigt__p_faiss__GenHammingComputer16, 0, 0, 0},{0, 0, 0, 0}};
88687 static swig_cast_info _swigc__p_faiss__GenHammingComputer32[] = { {&_swigt__p_faiss__GenHammingComputer32, 0, 0, 0},{0, 0, 0, 0}};
88688 static swig_cast_info _swigc__p_faiss__GenHammingComputer8[] = { {&_swigt__p_faiss__GenHammingComputer8, 0, 0, 0},{0, 0, 0, 0}};
88689 static swig_cast_info _swigc__p_faiss__GenHammingComputerM8[] = { {&_swigt__p_faiss__GenHammingComputerM8, 0, 0, 0},{0, 0, 0, 0}};
88690 static swig_cast_info _swigc__p_faiss__HNSW[] = { {&_swigt__p_faiss__HNSW, 0, 0, 0},{0, 0, 0, 0}};
88691 static swig_cast_info _swigc__p_faiss__HNSWStats[] = { {&_swigt__p_faiss__HNSWStats, 0, 0, 0},{0, 0, 0, 0}};
88692 static swig_cast_info _swigc__p_faiss__HNSW__DistanceComputer[] = { {&_swigt__p_faiss__HNSW__DistanceComputer, 0, 0, 0},{0, 0, 0, 0}};
88693 static swig_cast_info _swigc__p_faiss__HNSW__MinimaxHeap[] = { {&_swigt__p_faiss__HNSW__MinimaxHeap, 0, 0, 0},{0, 0, 0, 0}};
88694 static swig_cast_info _swigc__p_faiss__HammingComputer16[] = { {&_swigt__p_faiss__HammingComputer16, 0, 0, 0},{0, 0, 0, 0}};
88695 static swig_cast_info _swigc__p_faiss__HammingComputer20[] = { {&_swigt__p_faiss__HammingComputer20, 0, 0, 0},{0, 0, 0, 0}};
88696 static swig_cast_info _swigc__p_faiss__HammingComputer32[] = { {&_swigt__p_faiss__HammingComputer32, 0, 0, 0},{0, 0, 0, 0}};
88697 static swig_cast_info _swigc__p_faiss__HammingComputer4[] = { {&_swigt__p_faiss__HammingComputer4, 0, 0, 0},{0, 0, 0, 0}};
88698 static swig_cast_info _swigc__p_faiss__HammingComputer64[] = { {&_swigt__p_faiss__HammingComputer64, 0, 0, 0},{0, 0, 0, 0}};
88699 static swig_cast_info _swigc__p_faiss__HammingComputer8[] = { {&_swigt__p_faiss__HammingComputer8, 0, 0, 0},{0, 0, 0, 0}};
88700 static swig_cast_info _swigc__p_faiss__HammingComputerDefault[] = { {&_swigt__p_faiss__HammingComputerDefault, 0, 0, 0},{0, 0, 0, 0}};
88701 static swig_cast_info _swigc__p_faiss__HammingComputerM4[] = { {&_swigt__p_faiss__HammingComputerM4, 0, 0, 0},{0, 0, 0, 0}};
88702 static swig_cast_info _swigc__p_faiss__HammingComputerM8[] = { {&_swigt__p_faiss__HammingComputerM8, 0, 0, 0},{0, 0, 0, 0}};
88703 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
88704 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
88705 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
88706 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
88707 static swig_cast_info _swigc__p_faiss__IDSelector[] = { {&_swigt__p_faiss__IDSelector, 0, 0, 0}, {&_swigt__p_faiss__IDSelectorBatch, _p_faiss__IDSelectorBatchTo_p_faiss__IDSelector, 0, 0}, {&_swigt__p_faiss__IDSelectorRange, _p_faiss__IDSelectorRangeTo_p_faiss__IDSelector, 0, 0},{0, 0, 0, 0}};
88708 static swig_cast_info _swigc__p_faiss__IDSelectorBatch[] = { {&_swigt__p_faiss__IDSelectorBatch, 0, 0, 0},{0, 0, 0, 0}};
88709 static swig_cast_info _swigc__p_faiss__IDSelectorRange[] = { {&_swigt__p_faiss__IDSelectorRange, 0, 0, 0},{0, 0, 0, 0}};
88710 static swig_cast_info _swigc__p_faiss__IOReader[] = { {&_swigt__p_faiss__IOReader, 0, 0, 0}, {&_swigt__p_faiss__VectorIOReader, _p_faiss__VectorIOReaderTo_p_faiss__IOReader, 0, 0},{0, 0, 0, 0}};
88711 static swig_cast_info _swigc__p_faiss__IOWriter[] = { {&_swigt__p_faiss__IOWriter, 0, 0, 0}, {&_swigt__p_faiss__VectorIOWriter, _p_faiss__VectorIOWriterTo_p_faiss__IOWriter, 0, 0},{0, 0, 0, 0}};
88712 static swig_cast_info _swigc__p_faiss__IVFPQSearchParameters[] = { {&_swigt__p_faiss__IVFPQSearchParameters, 0, 0, 0},{0, 0, 0, 0}};
88713 static swig_cast_info _swigc__p_faiss__IVFSearchParameters[] = { {&_swigt__p_faiss__IVFSearchParameters, 0, 0, 0}, {&_swigt__p_faiss__IVFPQSearchParameters, _p_faiss__IVFPQSearchParametersTo_p_faiss__IVFSearchParameters, 0, 0},{0, 0, 0, 0}};
88714 static swig_cast_info _swigc__p_faiss__Index[] = { {&_swigt__p_faiss__IndexPQ, _p_faiss__IndexPQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexPreTransform, _p_faiss__IndexPreTransformTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__Index, 0, 0, 0}, {&_swigt__p_faiss__IndexSplitVectors, _p_faiss__IndexSplitVectorsTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIDMap2, _p_faiss__IndexIDMap2To_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFFlat, _p_faiss__IndexIVFFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFFlat, _p_faiss__gpu__GpuIndexIVFFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__MultiIndexQuantizer, _p_faiss__MultiIndexQuantizerTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexScalarQuantizer, _p_faiss__IndexScalarQuantizerTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFScalarQuantizer, _p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexRefineFlat, _p_faiss__IndexRefineFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFPQ, _p_faiss__IndexIVFPQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFPQ, _p_faiss__gpu__GpuIndexIVFPQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexLSH, _p_faiss__IndexLSHTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSWSQ, _p_faiss__IndexHNSWSQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__IndexProxy, _p_faiss__gpu__IndexProxyTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndex, _p_faiss__gpu__GpuIndexTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIDMap, _p_faiss__IndexIDMapTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSW2Level, _p_faiss__IndexHNSW2LevelTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__Index2Layer, _p_faiss__Index2LayerTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlatL2, _p_faiss__IndexFlatL2To_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlatL2, _p_faiss__gpu__GpuIndexFlatL2To_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSWFlat, _p_faiss__IndexHNSWFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlat1D, _p_faiss__IndexFlat1DTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlat, _p_faiss__IndexFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlat, _p_faiss__gpu__GpuIndexFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlatIP, _p_faiss__IndexFlatIPTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlatIP, _p_faiss__gpu__GpuIndexFlatIPTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSW, _p_faiss__IndexHNSWTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSWPQ, _p_faiss__IndexHNSWPQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlatL2BaseShift, _p_faiss__IndexFlatL2BaseShiftTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVF, _p_faiss__gpu__GpuIndexIVFTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVF, _p_faiss__IndexIVFTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__MultiIndexQuantizer2, _p_faiss__MultiIndexQuantizer2To_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexShards, _p_faiss__IndexShardsTo_p_faiss__Index, 0, 0},{0, 0, 0, 0}};
88715 static swig_cast_info _swigc__p_faiss__Index2Layer[] = { {&_swigt__p_faiss__Index2Layer, 0, 0, 0},{0, 0, 0, 0}};
88716 static swig_cast_info _swigc__p_faiss__IndexBinary[] = { {&_swigt__p_faiss__IndexBinaryFlat, _p_faiss__IndexBinaryFlatTo_p_faiss__IndexBinary, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexBinaryFlat, _p_faiss__gpu__GpuIndexBinaryFlatTo_p_faiss__IndexBinary, 0, 0}, {&_swigt__p_faiss__IndexBinary, 0, 0, 0}, {&_swigt__p_faiss__IndexBinaryHNSW, _p_faiss__IndexBinaryHNSWTo_p_faiss__IndexBinary, 0, 0}, {&_swigt__p_faiss__IndexBinaryIVF, _p_faiss__IndexBinaryIVFTo_p_faiss__IndexBinary, 0, 0}, {&_swigt__p_faiss__IndexBinaryFromFloat, _p_faiss__IndexBinaryFromFloatTo_p_faiss__IndexBinary, 0, 0},{0, 0, 0, 0}};
88717 static swig_cast_info _swigc__p_faiss__IndexBinaryFlat[] = { {&_swigt__p_faiss__IndexBinaryFlat, 0, 0, 0},{0, 0, 0, 0}};
88718 static swig_cast_info _swigc__p_faiss__IndexBinaryFromFloat[] = { {&_swigt__p_faiss__IndexBinaryFromFloat, 0, 0, 0},{0, 0, 0, 0}};
88719 static swig_cast_info _swigc__p_faiss__IndexBinaryHNSW[] = { {&_swigt__p_faiss__IndexBinaryHNSW, 0, 0, 0},{0, 0, 0, 0}};
88720 static swig_cast_info _swigc__p_faiss__IndexBinaryIVF[] = { {&_swigt__p_faiss__IndexBinaryIVF, 0, 0, 0},{0, 0, 0, 0}};
88721 static swig_cast_info _swigc__p_faiss__IndexFlat[] = { {&_swigt__p_faiss__IndexFlat, 0, 0, 0}, {&_swigt__p_faiss__IndexFlatL2, _p_faiss__IndexFlatL2To_p_faiss__IndexFlat, 0, 0}, {&_swigt__p_faiss__IndexFlat1D, _p_faiss__IndexFlat1DTo_p_faiss__IndexFlat, 0, 0}, {&_swigt__p_faiss__IndexFlatL2BaseShift, _p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlat, 0, 0}, {&_swigt__p_faiss__IndexFlatIP, _p_faiss__IndexFlatIPTo_p_faiss__IndexFlat, 0, 0},{0, 0, 0, 0}};
88722 static swig_cast_info _swigc__p_faiss__IndexFlat1D[] = { {&_swigt__p_faiss__IndexFlat1D, 0, 0, 0},{0, 0, 0, 0}};
88723 static swig_cast_info _swigc__p_faiss__IndexFlatIP[] = { {&_swigt__p_faiss__IndexFlatIP, 0, 0, 0},{0, 0, 0, 0}};
88724 static swig_cast_info _swigc__p_faiss__IndexFlatL2[] = { {&_swigt__p_faiss__IndexFlatL2, 0, 0, 0}, {&_swigt__p_faiss__IndexFlat1D, _p_faiss__IndexFlat1DTo_p_faiss__IndexFlatL2, 0, 0}, {&_swigt__p_faiss__IndexFlatL2BaseShift, _p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlatL2, 0, 0},{0, 0, 0, 0}};
88725 static swig_cast_info _swigc__p_faiss__IndexFlatL2BaseShift[] = { {&_swigt__p_faiss__IndexFlatL2BaseShift, 0, 0, 0},{0, 0, 0, 0}};
88726 static swig_cast_info _swigc__p_faiss__IndexHNSW[] = { {&_swigt__p_faiss__IndexHNSWFlat, _p_faiss__IndexHNSWFlatTo_p_faiss__IndexHNSW, 0, 0}, {&_swigt__p_faiss__IndexHNSW, 0, 0, 0}, {&_swigt__p_faiss__IndexHNSWSQ, _p_faiss__IndexHNSWSQTo_p_faiss__IndexHNSW, 0, 0}, {&_swigt__p_faiss__IndexHNSWPQ, _p_faiss__IndexHNSWPQTo_p_faiss__IndexHNSW, 0, 0}, {&_swigt__p_faiss__IndexHNSW2Level, _p_faiss__IndexHNSW2LevelTo_p_faiss__IndexHNSW, 0, 0},{0, 0, 0, 0}};
88727 static swig_cast_info _swigc__p_faiss__IndexHNSW2Level[] = { {&_swigt__p_faiss__IndexHNSW2Level, 0, 0, 0},{0, 0, 0, 0}};
88728 static swig_cast_info _swigc__p_faiss__IndexHNSWFlat[] = { {&_swigt__p_faiss__IndexHNSWFlat, 0, 0, 0},{0, 0, 0, 0}};
88729 static swig_cast_info _swigc__p_faiss__IndexHNSWPQ[] = { {&_swigt__p_faiss__IndexHNSWPQ, 0, 0, 0},{0, 0, 0, 0}};
88730 static swig_cast_info _swigc__p_faiss__IndexHNSWSQ[] = { {&_swigt__p_faiss__IndexHNSWSQ, 0, 0, 0},{0, 0, 0, 0}};
88731 static swig_cast_info _swigc__p_faiss__IndexIDMap[] = { {&_swigt__p_faiss__IndexIDMap2, _p_faiss__IndexIDMap2To_p_faiss__IndexIDMap, 0, 0}, {&_swigt__p_faiss__IndexIDMap, 0, 0, 0},{0, 0, 0, 0}};
88732 static swig_cast_info _swigc__p_faiss__IndexIDMap2[] = { {&_swigt__p_faiss__IndexIDMap2, 0, 0, 0},{0, 0, 0, 0}};
88733 static swig_cast_info _swigc__p_faiss__IndexIVF[] = { {&_swigt__p_faiss__IndexIVF, 0, 0, 0}, {&_swigt__p_faiss__IndexIVFScalarQuantizer, _p_faiss__IndexIVFScalarQuantizerTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFPQ, _p_faiss__IndexIVFPQTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFFlat, _p_faiss__IndexIVFFlatTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__IndexIVF, 0, 0},{0, 0, 0, 0}};
88734 static swig_cast_info _swigc__p_faiss__IndexIVFFlat[] = { {&_swigt__p_faiss__IndexIVFFlat, 0, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVFFlat, 0, 0},{0, 0, 0, 0}};
88735 static swig_cast_info _swigc__p_faiss__IndexIVFFlatDedup[] = { {&_swigt__p_faiss__IndexIVFFlatDedup, 0, 0, 0},{0, 0, 0, 0}};
88736 static swig_cast_info _swigc__p_faiss__IndexIVFPQ[] = { {&_swigt__p_faiss__IndexIVFPQ, 0, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__IndexIVFPQ, 0, 0},{0, 0, 0, 0}};
88737 static swig_cast_info _swigc__p_faiss__IndexIVFPQR[] = { {&_swigt__p_faiss__IndexIVFPQR, 0, 0, 0},{0, 0, 0, 0}};
88738 static swig_cast_info _swigc__p_faiss__IndexIVFPQStats[] = { {&_swigt__p_faiss__IndexIVFPQStats, 0, 0, 0},{0, 0, 0, 0}};
88739 static swig_cast_info _swigc__p_faiss__IndexIVFScalarQuantizer[] = { {&_swigt__p_faiss__IndexIVFScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
88740 static swig_cast_info _swigc__p_faiss__IndexIVFStats[] = { {&_swigt__p_faiss__IndexIVFStats, 0, 0, 0},{0, 0, 0, 0}};
88741 static swig_cast_info _swigc__p_faiss__IndexLSH[] = { {&_swigt__p_faiss__IndexLSH, 0, 0, 0},{0, 0, 0, 0}};
88742 static swig_cast_info _swigc__p_faiss__IndexPQ[] = { {&_swigt__p_faiss__IndexPQ, 0, 0, 0},{0, 0, 0, 0}};
88743 static swig_cast_info _swigc__p_faiss__IndexPQStats[] = { {&_swigt__p_faiss__IndexPQStats, 0, 0, 0},{0, 0, 0, 0}};
88744 static swig_cast_info _swigc__p_faiss__IndexPreTransform[] = { {&_swigt__p_faiss__IndexPreTransform, 0, 0, 0},{0, 0, 0, 0}};
88745 static swig_cast_info _swigc__p_faiss__IndexRefineFlat[] = { {&_swigt__p_faiss__IndexRefineFlat, 0, 0, 0},{0, 0, 0, 0}};
88746 static swig_cast_info _swigc__p_faiss__IndexScalarQuantizer[] = { {&_swigt__p_faiss__IndexScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
88747 static swig_cast_info _swigc__p_faiss__IndexShards[] = { {&_swigt__p_faiss__IndexShards, 0, 0, 0},{0, 0, 0, 0}};
88748 static swig_cast_info _swigc__p_faiss__IndexSplitVectors[] = { {&_swigt__p_faiss__IndexSplitVectors, 0, 0, 0},{0, 0, 0, 0}};
88749 static swig_cast_info _swigc__p_faiss__IntersectionCriterion[] = { {&_swigt__p_faiss__IntersectionCriterion, 0, 0, 0},{0, 0, 0, 0}};
88750 static swig_cast_info _swigc__p_faiss__InvertedListScanner[] = { {&_swigt__p_faiss__InvertedListScanner, 0, 0, 0},{0, 0, 0, 0}};
88751 static swig_cast_info _swigc__p_faiss__InvertedLists[] = { {&_swigt__p_faiss__InvertedLists, 0, 0, 0}, {&_swigt__p_faiss__ArrayInvertedLists, _p_faiss__ArrayInvertedListsTo_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_faiss__ConcatenatedInvertedLists, _p_faiss__ConcatenatedInvertedListsTo_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_faiss__OnDiskInvertedLists, _p_faiss__OnDiskInvertedListsTo_p_faiss__InvertedLists, 0, 0},{0, 0, 0, 0}};
88752 static swig_cast_info _swigc__p_faiss__Level1Quantizer[] = { {&_swigt__p_faiss__Level1Quantizer, 0, 0, 0}, {&_swigt__p_faiss__IndexIVF, _p_faiss__IndexIVFTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFScalarQuantizer, _p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFPQ, _p_faiss__IndexIVFPQTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFFlat, _p_faiss__IndexIVFFlatTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__Level1Quantizer, 0, 0},{0, 0, 0, 0}};
88753 static swig_cast_info _swigc__p_faiss__LinearTransform[] = { {&_swigt__p_faiss__RandomRotationMatrix, _p_faiss__RandomRotationMatrixTo_p_faiss__LinearTransform, 0, 0}, {&_swigt__p_faiss__PCAMatrix, _p_faiss__PCAMatrixTo_p_faiss__LinearTransform, 0, 0}, {&_swigt__p_faiss__OPQMatrix, _p_faiss__OPQMatrixTo_p_faiss__LinearTransform, 0, 0}, {&_swigt__p_faiss__LinearTransform, 0, 0, 0},{0, 0, 0, 0}};
88754 static swig_cast_info _swigc__p_faiss__LockLevels[] = { {&_swigt__p_faiss__LockLevels, 0, 0, 0},{0, 0, 0, 0}};
88755 static swig_cast_info _swigc__p_faiss__MultiIndexQuantizer[] = { {&_swigt__p_faiss__MultiIndexQuantizer, 0, 0, 0}, {&_swigt__p_faiss__MultiIndexQuantizer2, _p_faiss__MultiIndexQuantizer2To_p_faiss__MultiIndexQuantizer, 0, 0},{0, 0, 0, 0}};
88756 static swig_cast_info _swigc__p_faiss__MultiIndexQuantizer2[] = { {&_swigt__p_faiss__MultiIndexQuantizer2, 0, 0, 0},{0, 0, 0, 0}};
88757 static swig_cast_info _swigc__p_faiss__NormalizationTransform[] = { {&_swigt__p_faiss__NormalizationTransform, 0, 0, 0},{0, 0, 0, 0}};
88758 static swig_cast_info _swigc__p_faiss__OPQMatrix[] = { {&_swigt__p_faiss__OPQMatrix, 0, 0, 0},{0, 0, 0, 0}};
88759 static swig_cast_info _swigc__p_faiss__OnDiskInvertedLists[] = { {&_swigt__p_faiss__OnDiskInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
88760 static swig_cast_info _swigc__p_faiss__OnDiskInvertedLists__OngoingPrefetch[] = { {&_swigt__p_faiss__OnDiskInvertedLists__OngoingPrefetch, 0, 0, 0},{0, 0, 0, 0}};
88761 static swig_cast_info _swigc__p_faiss__OneRecallAtRCriterion[] = { {&_swigt__p_faiss__OneRecallAtRCriterion, 0, 0, 0},{0, 0, 0, 0}};
88762 static swig_cast_info _swigc__p_faiss__OperatingPoint[] = { {&_swigt__p_faiss__OperatingPoint, 0, 0, 0},{0, 0, 0, 0}};
88763 static swig_cast_info _swigc__p_faiss__OperatingPoints[] = { {&_swigt__p_faiss__OperatingPoints, 0, 0, 0},{0, 0, 0, 0}};
88764 static swig_cast_info _swigc__p_faiss__PCAMatrix[] = { {&_swigt__p_faiss__PCAMatrix, 0, 0, 0},{0, 0, 0, 0}};
88765 static swig_cast_info _swigc__p_faiss__ParameterRange[] = { {&_swigt__p_faiss__ParameterRange, 0, 0, 0},{0, 0, 0, 0}};
88766 static swig_cast_info _swigc__p_faiss__ParameterSpace[] = { {&_swigt__p_faiss__ParameterSpace, 0, 0, 0}, {&_swigt__p_faiss__gpu__GpuParameterSpace, _p_faiss__gpu__GpuParameterSpaceTo_p_faiss__ParameterSpace, 0, 0},{0, 0, 0, 0}};
88767 static swig_cast_info _swigc__p_faiss__PermutationObjective[] = { {&_swigt__p_faiss__PermutationObjective, 0, 0, 0}, {&_swigt__p_faiss__ReproduceDistancesObjective, _p_faiss__ReproduceDistancesObjectiveTo_p_faiss__PermutationObjective, 0, 0},{0, 0, 0, 0}};
88768 static swig_cast_info _swigc__p_faiss__PolysemousTraining[] = { {&_swigt__p_faiss__PolysemousTraining, 0, 0, 0},{0, 0, 0, 0}};
88769 static swig_cast_info _swigc__p_faiss__ProductQuantizer[] = { {&_swigt__p_faiss__ProductQuantizer, 0, 0, 0},{0, 0, 0, 0}};
88770 static swig_cast_info _swigc__p_faiss__RandomGenerator[] = { {&_swigt__p_faiss__RandomGenerator, 0, 0, 0},{0, 0, 0, 0}};
88771 static swig_cast_info _swigc__p_faiss__RandomRotationMatrix[] = { {&_swigt__p_faiss__RandomRotationMatrix, 0, 0, 0},{0, 0, 0, 0}};
88772 static swig_cast_info _swigc__p_faiss__RangeSearchPartialResult[] = { {&_swigt__p_faiss__RangeSearchPartialResult, 0, 0, 0},{0, 0, 0, 0}};
88773 static swig_cast_info _swigc__p_faiss__RangeSearchPartialResult__QueryResult[] = { {&_swigt__p_faiss__RangeSearchPartialResult__QueryResult, 0, 0, 0},{0, 0, 0, 0}};
88774 static swig_cast_info _swigc__p_faiss__RangeSearchResult[] = { {&_swigt__p_faiss__RangeSearchResult, 0, 0, 0},{0, 0, 0, 0}};
88775 static swig_cast_info _swigc__p_faiss__ReconstructFromNeighbors[] = { {&_swigt__p_faiss__ReconstructFromNeighbors, 0, 0, 0},{0, 0, 0, 0}};
88776 static swig_cast_info _swigc__p_faiss__RemapDimensionsTransform[] = { {&_swigt__p_faiss__RemapDimensionsTransform, 0, 0, 0},{0, 0, 0, 0}};
88777 static swig_cast_info _swigc__p_faiss__ReproduceDistancesObjective[] = { {&_swigt__p_faiss__ReproduceDistancesObjective, 0, 0, 0},{0, 0, 0, 0}};
88778 static swig_cast_info _swigc__p_faiss__ScalarQuantizer[] = { {&_swigt__p_faiss__ScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
88779 static swig_cast_info _swigc__p_faiss__ScalarQuantizer__DistanceComputer[] = { {&_swigt__p_faiss__ScalarQuantizer__DistanceComputer, 0, 0, 0},{0, 0, 0, 0}};
88780 static swig_cast_info _swigc__p_faiss__SimulatedAnnealingOptimizer[] = { {&_swigt__p_faiss__SimulatedAnnealingOptimizer, 0, 0, 0},{0, 0, 0, 0}};
88781 static swig_cast_info _swigc__p_faiss__SimulatedAnnealingParameters[] = { {&_swigt__p_faiss__SimulatedAnnealingParameters, 0, 0, 0}, {&_swigt__p_faiss__PolysemousTraining, _p_faiss__PolysemousTrainingTo_p_faiss__SimulatedAnnealingParameters, 0, 0}, {&_swigt__p_faiss__SimulatedAnnealingOptimizer, _p_faiss__SimulatedAnnealingOptimizerTo_p_faiss__SimulatedAnnealingParameters, 0, 0},{0, 0, 0, 0}};
88782 static swig_cast_info _swigc__p_faiss__VectorIOReader[] = { {&_swigt__p_faiss__VectorIOReader, 0, 0, 0},{0, 0, 0, 0}};
88783 static swig_cast_info _swigc__p_faiss__VectorIOWriter[] = { {&_swigt__p_faiss__VectorIOWriter, 0, 0, 0},{0, 0, 0, 0}};
88784 static swig_cast_info _swigc__p_faiss__VectorTransform[] = { {&_swigt__p_faiss__RandomRotationMatrix, _p_faiss__RandomRotationMatrixTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__PCAMatrix, _p_faiss__PCAMatrixTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__OPQMatrix, _p_faiss__OPQMatrixTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__VectorTransform, 0, 0, 0}, {&_swigt__p_faiss__LinearTransform, _p_faiss__LinearTransformTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__RemapDimensionsTransform, _p_faiss__RemapDimensionsTransformTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__NormalizationTransform, _p_faiss__NormalizationTransformTo_p_faiss__VectorTransform, 0, 0},{0, 0, 0, 0}};
88785 static swig_cast_info _swigc__p_faiss__VisitedTable[] = { {&_swigt__p_faiss__VisitedTable, 0, 0, 0},{0, 0, 0, 0}};
88786 static swig_cast_info _swigc__p_faiss__gpu__FlatIndex[] = { {&_swigt__p_faiss__gpu__FlatIndex, 0, 0, 0},{0, 0, 0, 0}};
88787 static swig_cast_info _swigc__p_faiss__gpu__GpuClonerOptions[] = { {&_swigt__p_faiss__gpu__GpuClonerOptions, 0, 0, 0}, {&_swigt__p_faiss__gpu__GpuMultipleClonerOptions, _p_faiss__gpu__GpuMultipleClonerOptionsTo_p_faiss__gpu__GpuClonerOptions, 0, 0},{0, 0, 0, 0}};
88788 static swig_cast_info _swigc__p_faiss__gpu__GpuIndex[] = { {&_swigt__p_faiss__gpu__GpuIndex, 0, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlat, _p_faiss__gpu__GpuIndexFlatTo_p_faiss__gpu__GpuIndex, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlatL2, _p_faiss__gpu__GpuIndexFlatL2To_p_faiss__gpu__GpuIndex, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVF, _p_faiss__gpu__GpuIndexIVFTo_p_faiss__gpu__GpuIndex, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFPQ, _p_faiss__gpu__GpuIndexIVFPQTo_p_faiss__gpu__GpuIndex, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFFlat, _p_faiss__gpu__GpuIndexIVFFlatTo_p_faiss__gpu__GpuIndex, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlatIP, _p_faiss__gpu__GpuIndexFlatIPTo_p_faiss__gpu__GpuIndex, 0, 0},{0, 0, 0, 0}};
88789 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexBinaryFlat[] = { {&_swigt__p_faiss__gpu__GpuIndexBinaryFlat, 0, 0, 0},{0, 0, 0, 0}};
88790 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexBinaryFlatConfig[] = { {&_swigt__p_faiss__gpu__GpuIndexBinaryFlatConfig, 0, 0, 0},{0, 0, 0, 0}};
88791 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexConfig[] = { {&_swigt__p_faiss__gpu__GpuIndexIVFPQConfig, _p_faiss__gpu__GpuIndexIVFPQConfigTo_p_faiss__gpu__GpuIndexConfig, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexConfig, 0, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlatConfig, _p_faiss__gpu__GpuIndexFlatConfigTo_p_faiss__gpu__GpuIndexConfig, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFConfig, _p_faiss__gpu__GpuIndexIVFConfigTo_p_faiss__gpu__GpuIndexConfig, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFFlatConfig, _p_faiss__gpu__GpuIndexIVFFlatConfigTo_p_faiss__gpu__GpuIndexConfig, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexBinaryFlatConfig, _p_faiss__gpu__GpuIndexBinaryFlatConfigTo_p_faiss__gpu__GpuIndexConfig, 0, 0},{0, 0, 0, 0}};
88792 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexFlat[] = { {&_swigt__p_faiss__gpu__GpuIndexFlat, 0, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlatL2, _p_faiss__gpu__GpuIndexFlatL2To_p_faiss__gpu__GpuIndexFlat, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexFlatIP, _p_faiss__gpu__GpuIndexFlatIPTo_p_faiss__gpu__GpuIndexFlat, 0, 0},{0, 0, 0, 0}};
88793 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexFlatConfig[] = { {&_swigt__p_faiss__gpu__GpuIndexFlatConfig, 0, 0, 0},{0, 0, 0, 0}};
88794 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexFlatIP[] = { {&_swigt__p_faiss__gpu__GpuIndexFlatIP, 0, 0, 0},{0, 0, 0, 0}};
88795 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexFlatL2[] = { {&_swigt__p_faiss__gpu__GpuIndexFlatL2, 0, 0, 0},{0, 0, 0, 0}};
88796 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexIVF[] = { {&_swigt__p_faiss__gpu__GpuIndexIVF, 0, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFPQ, _p_faiss__gpu__GpuIndexIVFPQTo_p_faiss__gpu__GpuIndexIVF, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFFlat, _p_faiss__gpu__GpuIndexIVFFlatTo_p_faiss__gpu__GpuIndexIVF, 0, 0},{0, 0, 0, 0}};
88797 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexIVFConfig[] = { {&_swigt__p_faiss__gpu__GpuIndexIVFPQConfig, _p_faiss__gpu__GpuIndexIVFPQConfigTo_p_faiss__gpu__GpuIndexIVFConfig, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFConfig, 0, 0, 0}, {&_swigt__p_faiss__gpu__GpuIndexIVFFlatConfig, _p_faiss__gpu__GpuIndexIVFFlatConfigTo_p_faiss__gpu__GpuIndexIVFConfig, 0, 0},{0, 0, 0, 0}};
88798 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexIVFFlat[] = { {&_swigt__p_faiss__gpu__GpuIndexIVFFlat, 0, 0, 0},{0, 0, 0, 0}};
88799 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexIVFFlatConfig[] = { {&_swigt__p_faiss__gpu__GpuIndexIVFFlatConfig, 0, 0, 0},{0, 0, 0, 0}};
88800 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexIVFPQ[] = { {&_swigt__p_faiss__gpu__GpuIndexIVFPQ, 0, 0, 0},{0, 0, 0, 0}};
88801 static swig_cast_info _swigc__p_faiss__gpu__GpuIndexIVFPQConfig[] = { {&_swigt__p_faiss__gpu__GpuIndexIVFPQConfig, 0, 0, 0},{0, 0, 0, 0}};
88802 static swig_cast_info _swigc__p_faiss__gpu__GpuMultipleClonerOptions[] = { {&_swigt__p_faiss__gpu__GpuMultipleClonerOptions, 0, 0, 0},{0, 0, 0, 0}};
88803 static swig_cast_info _swigc__p_faiss__gpu__GpuParameterSpace[] = { {&_swigt__p_faiss__gpu__GpuParameterSpace, 0, 0, 0},{0, 0, 0, 0}};
88804 static swig_cast_info _swigc__p_faiss__gpu__GpuResources[] = { {&_swigt__p_faiss__gpu__GpuResources, 0, 0, 0}, {&_swigt__p_faiss__gpu__StandardGpuResources, _p_faiss__gpu__StandardGpuResourcesTo_p_faiss__gpu__GpuResources, 0, 0},{0, 0, 0, 0}};
88805 static swig_cast_info _swigc__p_faiss__gpu__IndexProxy[] = { {&_swigt__p_faiss__gpu__IndexProxy, 0, 0, 0},{0, 0, 0, 0}};
88806 static swig_cast_info _swigc__p_faiss__gpu__StandardGpuResources[] = { {&_swigt__p_faiss__gpu__StandardGpuResources, 0, 0, 0},{0, 0, 0, 0}};
88807 static swig_cast_info _swigc__p_faiss__ivflib__SlidingIndexWindow[] = { {&_swigt__p_faiss__ivflib__SlidingIndexWindow, 0, 0, 0},{0, 0, 0, 0}};
88808 static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
88809 static swig_cast_info _swigc__p_idx_t[] = { {&_swigt__p_idx_t, 0, 0, 0},{0, 0, 0, 0}};
88810 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
88811 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
88812 static swig_cast_info _swigc__p_omp_lock_t[] = { {&_swigt__p_omp_lock_t, 0, 0, 0},{0, 0, 0, 0}};
88813 static swig_cast_info _swigc__p_p_faiss__IndexPQ[] = {{&_swigt__p_p_faiss__IndexPQ, 0, 0, 0},{0, 0, 0, 0}};
88814 static swig_cast_info _swigc__p_p_faiss__IndexIVFFlatDedup[] = {{&_swigt__p_p_faiss__IndexIVFFlatDedup, 0, 0, 0},{0, 0, 0, 0}};
88815 static swig_cast_info _swigc__p_p_faiss__IndexPreTransform[] = {{&_swigt__p_p_faiss__IndexPreTransform, 0, 0, 0},{0, 0, 0, 0}};
88816 static swig_cast_info _swigc__p_p_faiss__IndexSplitVectors[] = {{&_swigt__p_p_faiss__IndexSplitVectors, 0, 0, 0},{0, 0, 0, 0}};
88817 static swig_cast_info _swigc__p_p_faiss__IndexIDMap2[] = {{&_swigt__p_p_faiss__IndexIDMap2, 0, 0, 0},{0, 0, 0, 0}};
88818 static swig_cast_info _swigc__p_p_faiss__IndexIVFFlat[] = {{&_swigt__p_p_faiss__IndexIVFFlat, 0, 0, 0},{0, 0, 0, 0}};
88819 static swig_cast_info _swigc__p_p_faiss__gpu__GpuIndexIVFFlat[] = {{&_swigt__p_p_faiss__gpu__GpuIndexIVFFlat, 0, 0, 0},{0, 0, 0, 0}};
88820 static swig_cast_info _swigc__p_p_faiss__MultiIndexQuantizer[] = {{&_swigt__p_p_faiss__MultiIndexQuantizer, 0, 0, 0},{0, 0, 0, 0}};
88821 static swig_cast_info _swigc__p_p_faiss__IndexScalarQuantizer[] = {{&_swigt__p_p_faiss__IndexScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
88822 static swig_cast_info _swigc__p_p_faiss__IndexIVFScalarQuantizer[] = {{&_swigt__p_p_faiss__IndexIVFScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
88823 static swig_cast_info _swigc__p_p_faiss__IndexRefineFlat[] = {{&_swigt__p_p_faiss__IndexRefineFlat, 0, 0, 0},{0, 0, 0, 0}};
88824 static swig_cast_info _swigc__p_p_faiss__gpu__GpuIndexIVFPQ[] = {{&_swigt__p_p_faiss__gpu__GpuIndexIVFPQ, 0, 0, 0},{0, 0, 0, 0}};
88825 static swig_cast_info _swigc__p_p_faiss__IndexIVFPQ[] = {{&_swigt__p_p_faiss__IndexIVFPQ, 0, 0, 0},{0, 0, 0, 0}};
88826 static swig_cast_info _swigc__p_p_faiss__IndexLSH[] = {{&_swigt__p_p_faiss__IndexLSH, 0, 0, 0},{0, 0, 0, 0}};
88827 static swig_cast_info _swigc__p_p_faiss__IndexHNSWSQ[] = {{&_swigt__p_p_faiss__IndexHNSWSQ, 0, 0, 0},{0, 0, 0, 0}};
88828 static swig_cast_info _swigc__p_p_faiss__gpu__IndexProxy[] = {{&_swigt__p_p_faiss__gpu__IndexProxy, 0, 0, 0},{0, 0, 0, 0}};
88829 static swig_cast_info _swigc__p_p_faiss__gpu__GpuIndex[] = {{&_swigt__p_p_faiss__gpu__GpuIndex, 0, 0, 0},{0, 0, 0, 0}};
88830 static swig_cast_info _swigc__p_p_faiss__IndexIDMap[] = {{&_swigt__p_p_faiss__IndexIDMap, 0, 0, 0},{0, 0, 0, 0}};
88831 static swig_cast_info _swigc__p_p_faiss__IndexHNSW2Level[] = {{&_swigt__p_p_faiss__IndexHNSW2Level, 0, 0, 0},{0, 0, 0, 0}};
88832 static swig_cast_info _swigc__p_p_faiss__Index2Layer[] = {{&_swigt__p_p_faiss__Index2Layer, 0, 0, 0},{0, 0, 0, 0}};
88833 static swig_cast_info _swigc__p_p_faiss__gpu__GpuIndexFlatL2[] = {{&_swigt__p_p_faiss__gpu__GpuIndexFlatL2, 0, 0, 0},{0, 0, 0, 0}};
88834 static swig_cast_info _swigc__p_p_faiss__IndexFlatL2[] = {{&_swigt__p_p_faiss__IndexFlatL2, 0, 0, 0},{0, 0, 0, 0}};
88835 static swig_cast_info _swigc__p_p_faiss__IndexHNSWFlat[] = {{&_swigt__p_p_faiss__IndexHNSWFlat, 0, 0, 0},{0, 0, 0, 0}};
88836 static swig_cast_info _swigc__p_p_faiss__IndexIVFPQR[] = {{&_swigt__p_p_faiss__IndexIVFPQR, 0, 0, 0},{0, 0, 0, 0}};
88837 static swig_cast_info _swigc__p_p_faiss__IndexFlat1D[] = {{&_swigt__p_p_faiss__IndexFlat1D, 0, 0, 0},{0, 0, 0, 0}};
88838 static swig_cast_info _swigc__p_p_faiss__gpu__GpuIndexFlat[] = {{&_swigt__p_p_faiss__gpu__GpuIndexFlat, 0, 0, 0},{0, 0, 0, 0}};
88839 static swig_cast_info _swigc__p_p_faiss__IndexFlat[] = {{&_swigt__p_p_faiss__IndexFlat, 0, 0, 0},{0, 0, 0, 0}};
88840 static swig_cast_info _swigc__p_p_faiss__gpu__GpuIndexFlatIP[] = {{&_swigt__p_p_faiss__gpu__GpuIndexFlatIP, 0, 0, 0},{0, 0, 0, 0}};
88841 static swig_cast_info _swigc__p_p_faiss__IndexFlatIP[] = {{&_swigt__p_p_faiss__IndexFlatIP, 0, 0, 0},{0, 0, 0, 0}};
88842 static swig_cast_info _swigc__p_p_faiss__IndexHNSW[] = {{&_swigt__p_p_faiss__IndexHNSW, 0, 0, 0},{0, 0, 0, 0}};
88843 static swig_cast_info _swigc__p_p_faiss__IndexHNSWPQ[] = {{&_swigt__p_p_faiss__IndexHNSWPQ, 0, 0, 0},{0, 0, 0, 0}};
88844 static swig_cast_info _swigc__p_p_faiss__IndexFlatL2BaseShift[] = {{&_swigt__p_p_faiss__IndexFlatL2BaseShift, 0, 0, 0},{0, 0, 0, 0}};
88845 static swig_cast_info _swigc__p_p_faiss__gpu__GpuIndexIVF[] = {{&_swigt__p_p_faiss__gpu__GpuIndexIVF, 0, 0, 0},{0, 0, 0, 0}};
88846 static swig_cast_info _swigc__p_p_faiss__IndexIVF[] = {{&_swigt__p_p_faiss__IndexIVF, 0, 0, 0},{0, 0, 0, 0}};
88847 static swig_cast_info _swigc__p_p_faiss__MultiIndexQuantizer2[] = {{&_swigt__p_p_faiss__MultiIndexQuantizer2, 0, 0, 0},{0, 0, 0, 0}};
88848 static swig_cast_info _swigc__p_p_faiss__IndexShards[] = {{&_swigt__p_p_faiss__IndexShards, 0, 0, 0},{0, 0, 0, 0}};
88849 static swig_cast_info _swigc__p_p_faiss__Index[] = { {&_swigt__p_p_faiss__IndexPQ, _p_p_faiss__IndexPQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFFlatDedup, _p_p_faiss__IndexIVFFlatDedupTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexPreTransform, _p_p_faiss__IndexPreTransformTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__Index, 0, 0, 0}, {&_swigt__p_p_faiss__IndexSplitVectors, _p_p_faiss__IndexSplitVectorsTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIDMap2, _p_p_faiss__IndexIDMap2To_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFFlat, _p_p_faiss__IndexIVFFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__GpuIndexIVFFlat, _p_p_faiss__gpu__GpuIndexIVFFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__MultiIndexQuantizer, _p_p_faiss__MultiIndexQuantizerTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexScalarQuantizer, _p_p_faiss__IndexScalarQuantizerTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFScalarQuantizer, _p_p_faiss__IndexIVFScalarQuantizerTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexRefineFlat, _p_p_faiss__IndexRefineFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__GpuIndexIVFPQ, _p_p_faiss__gpu__GpuIndexIVFPQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFPQ, _p_p_faiss__IndexIVFPQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexLSH, _p_p_faiss__IndexLSHTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSWSQ, _p_p_faiss__IndexHNSWSQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__IndexProxy, _p_p_faiss__gpu__IndexProxyTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__GpuIndex, _p_p_faiss__gpu__GpuIndexTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIDMap, _p_p_faiss__IndexIDMapTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSW2Level, _p_p_faiss__IndexHNSW2LevelTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__Index2Layer, _p_p_faiss__Index2LayerTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__GpuIndexFlatL2, _p_p_faiss__gpu__GpuIndexFlatL2To_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlatL2, _p_p_faiss__IndexFlatL2To_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSWFlat, _p_p_faiss__IndexHNSWFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFPQR, _p_p_faiss__IndexIVFPQRTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlat1D, _p_p_faiss__IndexFlat1DTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__GpuIndexFlat, _p_p_faiss__gpu__GpuIndexFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlat, _p_p_faiss__IndexFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__GpuIndexFlatIP, _p_p_faiss__gpu__GpuIndexFlatIPTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlatIP, _p_p_faiss__IndexFlatIPTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSW, _p_p_faiss__IndexHNSWTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSWPQ, _p_p_faiss__IndexHNSWPQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlatL2BaseShift, _p_p_faiss__IndexFlatL2BaseShiftTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__gpu__GpuIndexIVF, _p_p_faiss__gpu__GpuIndexIVFTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVF, _p_p_faiss__IndexIVFTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__MultiIndexQuantizer2, _p_p_faiss__MultiIndexQuantizer2To_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexShards, _p_p_faiss__IndexShardsTo_p_p_faiss__Index, 0, 0},{0, 0, 0, 0}};
88850 static swig_cast_info _swigc__p_p_faiss__ArrayInvertedLists[] = {{&_swigt__p_p_faiss__ArrayInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
88851 static swig_cast_info _swigc__p_p_faiss__ConcatenatedInvertedLists[] = {{&_swigt__p_p_faiss__ConcatenatedInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
88852 static swig_cast_info _swigc__p_p_faiss__OnDiskInvertedLists[] = {{&_swigt__p_p_faiss__OnDiskInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
88853 static swig_cast_info _swigc__p_p_faiss__InvertedLists[] = { {&_swigt__p_p_faiss__InvertedLists, 0, 0, 0}, {&_swigt__p_p_faiss__ArrayInvertedLists, _p_p_faiss__ArrayInvertedListsTo_p_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_p_faiss__ConcatenatedInvertedLists, _p_p_faiss__ConcatenatedInvertedListsTo_p_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_p_faiss__OnDiskInvertedLists, _p_p_faiss__OnDiskInvertedListsTo_p_p_faiss__InvertedLists, 0, 0},{0, 0, 0, 0}};
88854 static swig_cast_info _swigc__p_p_faiss__RandomRotationMatrix[] = {{&_swigt__p_p_faiss__RandomRotationMatrix, 0, 0, 0},{0, 0, 0, 0}};
88855 static swig_cast_info _swigc__p_p_faiss__PCAMatrix[] = {{&_swigt__p_p_faiss__PCAMatrix, 0, 0, 0},{0, 0, 0, 0}};
88856 static swig_cast_info _swigc__p_p_faiss__OPQMatrix[] = {{&_swigt__p_p_faiss__OPQMatrix, 0, 0, 0},{0, 0, 0, 0}};
88857 static swig_cast_info _swigc__p_p_faiss__LinearTransform[] = {{&_swigt__p_p_faiss__LinearTransform, 0, 0, 0},{0, 0, 0, 0}};
88858 static swig_cast_info _swigc__p_p_faiss__RemapDimensionsTransform[] = {{&_swigt__p_p_faiss__RemapDimensionsTransform, 0, 0, 0},{0, 0, 0, 0}};
88859 static swig_cast_info _swigc__p_p_faiss__NormalizationTransform[] = {{&_swigt__p_p_faiss__NormalizationTransform, 0, 0, 0},{0, 0, 0, 0}};
88860 static swig_cast_info _swigc__p_p_faiss__VectorTransform[] = { {&_swigt__p_p_faiss__RandomRotationMatrix, _p_p_faiss__RandomRotationMatrixTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__PCAMatrix, _p_p_faiss__PCAMatrixTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__OPQMatrix, _p_p_faiss__OPQMatrixTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__VectorTransform, 0, 0, 0}, {&_swigt__p_p_faiss__LinearTransform, _p_p_faiss__LinearTransformTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__RemapDimensionsTransform, _p_p_faiss__RemapDimensionsTransformTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__NormalizationTransform, _p_p_faiss__NormalizationTransformTo_p_p_faiss__VectorTransform, 0, 0},{0, 0, 0, 0}};
88861 static swig_cast_info _swigc__p_p_faiss__gpu__StandardGpuResources[] = {{&_swigt__p_p_faiss__gpu__StandardGpuResources, 0, 0, 0},{0, 0, 0, 0}};
88862 static swig_cast_info _swigc__p_p_faiss__gpu__GpuResources[] = { {&_swigt__p_p_faiss__gpu__GpuResources, 0, 0, 0}, {&_swigt__p_p_faiss__gpu__StandardGpuResources, _p_p_faiss__gpu__StandardGpuResourcesTo_p_p_faiss__gpu__GpuResources, 0, 0},{0, 0, 0, 0}};
88863 static swig_cast_info _swigc__p_p_void[] = { {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
88864 static swig_cast_info _swigc__p_std__functionT_void_ffaiss__Index_pF_t[] = { {&_swigt__p_std__functionT_void_ffaiss__Index_pF_t, 0, 0, 0},{0, 0, 0, 0}};
88865 static swig_cast_info _swigc__p_std__listT_faiss__OnDiskInvertedLists__Slot_t[] = { {&_swigt__p_std__listT_faiss__OnDiskInvertedLists__Slot_t, 0, 0, 0},{0, 0, 0, 0}};
88866 static swig_cast_info _swigc__p_std__mt19937[] = { {&_swigt__p_std__mt19937, 0, 0, 0},{0, 0, 0, 0}};
88867 static swig_cast_info _swigc__p_std__pairT_float_int_t[] = { {&_swigt__p_std__pairT_float_int_t, 0, 0, 0},{0, 0, 0, 0}};
88868 static swig_cast_info _swigc__p_std__pairT_void_p_unsigned_long_t[] = { {&_swigt__p_std__pairT_void_p_unsigned_long_t, 0, 0, 0},{0, 0, 0, 0}};
88869 static swig_cast_info _swigc__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t[] = { {&_swigt__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t, 0, 0, 0},{0, 0, 0, 0}};
88870 static swig_cast_info _swigc__p_std__priority_queueT_std__pairT_float_int_t_t[] = { {&_swigt__p_std__priority_queueT_std__pairT_float_int_t_t, 0, 0, 0},{0, 0, 0, 0}};
88871 static swig_cast_info _swigc__p_std__unordered_mapT_long_long_t[] = { {&_swigt__p_std__unordered_mapT_long_long_t, 0, 0, 0},{0, 0, 0, 0}};
88872 static swig_cast_info _swigc__p_std__unordered_multimapT_long_long_t[] = { {&_swigt__p_std__unordered_multimapT_long_long_t, 0, 0, 0},{0, 0, 0, 0}};
88873 static swig_cast_info _swigc__p_std__vectorT_char_t[] = { {&_swigt__p_std__vectorT_char_t, 0, 0, 0},{0, 0, 0, 0}};
88874 static swig_cast_info _swigc__p_std__vectorT_cudaStream_t_t[] = { {&_swigt__p_std__vectorT_cudaStream_t_t, 0, 0, 0},{0, 0, 0, 0}};
88875 static swig_cast_info _swigc__p_std__vectorT_double_t[] = { {&_swigt__p_std__vectorT_double_t, 0, 0, 0},{0, 0, 0, 0}};
88876 static swig_cast_info _swigc__p_std__vectorT_faiss__BufferList__Buffer_t[] = { {&_swigt__p_std__vectorT_faiss__BufferList__Buffer_t, 0, 0, 0},{0, 0, 0, 0}};
88877 static swig_cast_info _swigc__p_std__vectorT_faiss__HNSW__NodeDistFarther_t[] = { {&_swigt__p_std__vectorT_faiss__HNSW__NodeDistFarther_t, 0, 0, 0},{0, 0, 0, 0}};
88878 static swig_cast_info _swigc__p_std__vectorT_faiss__Index_p_t[] = { {&_swigt__p_std__vectorT_faiss__Index_p_t, 0, 0, 0},{0, 0, 0, 0}};
88879 static swig_cast_info _swigc__p_std__vectorT_faiss__InvertedLists_const_p_t[] = { {&_swigt__p_std__vectorT_faiss__InvertedLists_const_p_t, 0, 0, 0},{0, 0, 0, 0}};
88880 static swig_cast_info _swigc__p_std__vectorT_faiss__InvertedLists_p_t[] = { {&_swigt__p_std__vectorT_faiss__InvertedLists_p_t, 0, 0, 0},{0, 0, 0, 0}};
88881 static swig_cast_info _swigc__p_std__vectorT_faiss__OnDiskInvertedLists__List_t[] = { {&_swigt__p_std__vectorT_faiss__OnDiskInvertedLists__List_t, 0, 0, 0},{0, 0, 0, 0}};
88882 static swig_cast_info _swigc__p_std__vectorT_faiss__OperatingPoint_t[] = { {&_swigt__p_std__vectorT_faiss__OperatingPoint_t, 0, 0, 0},{0, 0, 0, 0}};
88883 static swig_cast_info _swigc__p_std__vectorT_faiss__ParameterRange_t[] = { {&_swigt__p_std__vectorT_faiss__ParameterRange_t, 0, 0, 0},{0, 0, 0, 0}};
88884 static swig_cast_info _swigc__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t[] = { {&_swigt__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t, 0, 0, 0},{0, 0, 0, 0}};
88885 static swig_cast_info _swigc__p_std__vectorT_faiss__VectorTransform_p_t[] = { {&_swigt__p_std__vectorT_faiss__VectorTransform_p_t, 0, 0, 0},{0, 0, 0, 0}};
88886 static swig_cast_info _swigc__p_std__vectorT_faiss__gpu__GpuResources_p_t[] = { {&_swigt__p_std__vectorT_faiss__gpu__GpuResources_p_t, 0, 0, 0},{0, 0, 0, 0}};
88887 static swig_cast_info _swigc__p_std__vectorT_float_t[] = { {&_swigt__p_std__vectorT_float_t, 0, 0, 0},{0, 0, 0, 0}};
88888 static swig_cast_info _swigc__p_std__vectorT_int_t[] = { {&_swigt__p_std__vectorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
88889 static swig_cast_info _swigc__p_std__vectorT_long_t[] = { {&_swigt__p_std__vectorT_long_t, 0, 0, 0},{0, 0, 0, 0}};
88890 static swig_cast_info _swigc__p_std__vectorT_omp_lock_t_t[] = { {&_swigt__p_std__vectorT_omp_lock_t_t, 0, 0, 0},{0, 0, 0, 0}};
88891 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_float_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_float_t_t, 0, 0, 0},{0, 0, 0, 0}};
88892 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_long_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
88893 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_uint8_t_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_uint8_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
88894 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_unsigned_long_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_unsigned_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
88895 static swig_cast_info _swigc__p_std__vectorT_unsigned_char_t[] = { {&_swigt__p_std__vectorT_unsigned_char_t, 0, 0, 0},{0, 0, 0, 0}};
88896 static swig_cast_info _swigc__p_std__vectorT_unsigned_long_t[] = { {&_swigt__p_std__vectorT_unsigned_long_t, 0, 0, 0},{0, 0, 0, 0}};
88897 static swig_cast_info _swigc__p_storage_idx_t[] = { {&_swigt__p_storage_idx_t, 0, 0, 0},{0, 0, 0, 0}};
88898 static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}};
88899 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
88900 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
88901 static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
88902 
88903 static swig_cast_info *swig_cast_initial[] = {
88904  _swigc__p_Crev,
88905  _swigc__p_FILE,
88906  _swigc__p_MapLong2Long,
88907  _swigc__p_Node,
88908  _swigc__p_T,
88909  _swigc__p_TI,
88910  _swigc__p_char,
88911  _swigc__p_cublasHandle_t,
88912  _swigc__p_cudaStream_t,
88913  _swigc__p_double,
88914  _swigc__p_faiss__ArrayInvertedLists,
88915  _swigc__p_faiss__AutoTuneCriterion,
88916  _swigc__p_faiss__BinaryInvertedListScanner,
88917  _swigc__p_faiss__BufferList,
88918  _swigc__p_faiss__Cloner,
88919  _swigc__p_faiss__Clustering,
88920  _swigc__p_faiss__ClusteringParameters,
88921  _swigc__p_faiss__ConcatenatedInvertedLists,
88922  _swigc__p_faiss__GenHammingComputer16,
88923  _swigc__p_faiss__GenHammingComputer32,
88924  _swigc__p_faiss__GenHammingComputer8,
88925  _swigc__p_faiss__GenHammingComputerM8,
88926  _swigc__p_faiss__HNSW,
88927  _swigc__p_faiss__HNSWStats,
88928  _swigc__p_faiss__HNSW__DistanceComputer,
88929  _swigc__p_faiss__HNSW__MinimaxHeap,
88930  _swigc__p_faiss__HammingComputer16,
88931  _swigc__p_faiss__HammingComputer20,
88932  _swigc__p_faiss__HammingComputer32,
88933  _swigc__p_faiss__HammingComputer4,
88934  _swigc__p_faiss__HammingComputer64,
88935  _swigc__p_faiss__HammingComputer8,
88936  _swigc__p_faiss__HammingComputerDefault,
88937  _swigc__p_faiss__HammingComputerM4,
88938  _swigc__p_faiss__HammingComputerM8,
88939  _swigc__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t,
88940  _swigc__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t,
88941  _swigc__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t,
88942  _swigc__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t,
88943  _swigc__p_faiss__IDSelector,
88944  _swigc__p_faiss__IDSelectorBatch,
88945  _swigc__p_faiss__IDSelectorRange,
88946  _swigc__p_faiss__IOReader,
88947  _swigc__p_faiss__IOWriter,
88948  _swigc__p_faiss__IVFPQSearchParameters,
88949  _swigc__p_faiss__IVFSearchParameters,
88950  _swigc__p_faiss__Index,
88951  _swigc__p_faiss__Index2Layer,
88952  _swigc__p_faiss__IndexBinary,
88953  _swigc__p_faiss__IndexBinaryFlat,
88954  _swigc__p_faiss__IndexBinaryFromFloat,
88955  _swigc__p_faiss__IndexBinaryHNSW,
88956  _swigc__p_faiss__IndexBinaryIVF,
88957  _swigc__p_faiss__IndexFlat,
88958  _swigc__p_faiss__IndexFlat1D,
88959  _swigc__p_faiss__IndexFlatIP,
88960  _swigc__p_faiss__IndexFlatL2,
88961  _swigc__p_faiss__IndexFlatL2BaseShift,
88962  _swigc__p_faiss__IndexHNSW,
88963  _swigc__p_faiss__IndexHNSW2Level,
88964  _swigc__p_faiss__IndexHNSWFlat,
88965  _swigc__p_faiss__IndexHNSWPQ,
88966  _swigc__p_faiss__IndexHNSWSQ,
88967  _swigc__p_faiss__IndexIDMap,
88968  _swigc__p_faiss__IndexIDMap2,
88969  _swigc__p_faiss__IndexIVF,
88970  _swigc__p_faiss__IndexIVFFlat,
88971  _swigc__p_faiss__IndexIVFFlatDedup,
88972  _swigc__p_faiss__IndexIVFPQ,
88973  _swigc__p_faiss__IndexIVFPQR,
88974  _swigc__p_faiss__IndexIVFPQStats,
88975  _swigc__p_faiss__IndexIVFScalarQuantizer,
88976  _swigc__p_faiss__IndexIVFStats,
88977  _swigc__p_faiss__IndexLSH,
88978  _swigc__p_faiss__IndexPQ,
88979  _swigc__p_faiss__IndexPQStats,
88980  _swigc__p_faiss__IndexPreTransform,
88981  _swigc__p_faiss__IndexRefineFlat,
88982  _swigc__p_faiss__IndexScalarQuantizer,
88983  _swigc__p_faiss__IndexShards,
88984  _swigc__p_faiss__IndexSplitVectors,
88985  _swigc__p_faiss__IntersectionCriterion,
88986  _swigc__p_faiss__InvertedListScanner,
88987  _swigc__p_faiss__InvertedLists,
88988  _swigc__p_faiss__Level1Quantizer,
88989  _swigc__p_faiss__LinearTransform,
88990  _swigc__p_faiss__LockLevels,
88991  _swigc__p_faiss__MultiIndexQuantizer,
88992  _swigc__p_faiss__MultiIndexQuantizer2,
88993  _swigc__p_faiss__NormalizationTransform,
88994  _swigc__p_faiss__OPQMatrix,
88995  _swigc__p_faiss__OnDiskInvertedLists,
88996  _swigc__p_faiss__OnDiskInvertedLists__OngoingPrefetch,
88997  _swigc__p_faiss__OneRecallAtRCriterion,
88998  _swigc__p_faiss__OperatingPoint,
88999  _swigc__p_faiss__OperatingPoints,
89000  _swigc__p_faiss__PCAMatrix,
89001  _swigc__p_faiss__ParameterRange,
89002  _swigc__p_faiss__ParameterSpace,
89003  _swigc__p_faiss__PermutationObjective,
89004  _swigc__p_faiss__PolysemousTraining,
89005  _swigc__p_faiss__ProductQuantizer,
89006  _swigc__p_faiss__RandomGenerator,
89007  _swigc__p_faiss__RandomRotationMatrix,
89008  _swigc__p_faiss__RangeSearchPartialResult,
89009  _swigc__p_faiss__RangeSearchPartialResult__QueryResult,
89010  _swigc__p_faiss__RangeSearchResult,
89011  _swigc__p_faiss__ReconstructFromNeighbors,
89012  _swigc__p_faiss__RemapDimensionsTransform,
89013  _swigc__p_faiss__ReproduceDistancesObjective,
89014  _swigc__p_faiss__ScalarQuantizer,
89015  _swigc__p_faiss__ScalarQuantizer__DistanceComputer,
89016  _swigc__p_faiss__SimulatedAnnealingOptimizer,
89017  _swigc__p_faiss__SimulatedAnnealingParameters,
89018  _swigc__p_faiss__VectorIOReader,
89019  _swigc__p_faiss__VectorIOWriter,
89020  _swigc__p_faiss__VectorTransform,
89021  _swigc__p_faiss__VisitedTable,
89022  _swigc__p_faiss__gpu__FlatIndex,
89023  _swigc__p_faiss__gpu__GpuClonerOptions,
89024  _swigc__p_faiss__gpu__GpuIndex,
89025  _swigc__p_faiss__gpu__GpuIndexBinaryFlat,
89026  _swigc__p_faiss__gpu__GpuIndexBinaryFlatConfig,
89027  _swigc__p_faiss__gpu__GpuIndexConfig,
89028  _swigc__p_faiss__gpu__GpuIndexFlat,
89029  _swigc__p_faiss__gpu__GpuIndexFlatConfig,
89030  _swigc__p_faiss__gpu__GpuIndexFlatIP,
89031  _swigc__p_faiss__gpu__GpuIndexFlatL2,
89032  _swigc__p_faiss__gpu__GpuIndexIVF,
89033  _swigc__p_faiss__gpu__GpuIndexIVFConfig,
89034  _swigc__p_faiss__gpu__GpuIndexIVFFlat,
89035  _swigc__p_faiss__gpu__GpuIndexIVFFlatConfig,
89036  _swigc__p_faiss__gpu__GpuIndexIVFPQ,
89037  _swigc__p_faiss__gpu__GpuIndexIVFPQConfig,
89038  _swigc__p_faiss__gpu__GpuMultipleClonerOptions,
89039  _swigc__p_faiss__gpu__GpuParameterSpace,
89040  _swigc__p_faiss__gpu__GpuResources,
89041  _swigc__p_faiss__gpu__IndexProxy,
89042  _swigc__p_faiss__gpu__StandardGpuResources,
89043  _swigc__p_faiss__ivflib__SlidingIndexWindow,
89044  _swigc__p_float,
89045  _swigc__p_idx_t,
89046  _swigc__p_int,
89047  _swigc__p_long,
89048  _swigc__p_omp_lock_t,
89049  _swigc__p_p_faiss__ArrayInvertedLists,
89050  _swigc__p_p_faiss__ConcatenatedInvertedLists,
89051  _swigc__p_p_faiss__Index,
89052  _swigc__p_p_faiss__Index2Layer,
89053  _swigc__p_p_faiss__IndexFlat,
89054  _swigc__p_p_faiss__IndexFlat1D,
89055  _swigc__p_p_faiss__IndexFlatIP,
89056  _swigc__p_p_faiss__IndexFlatL2,
89057  _swigc__p_p_faiss__IndexFlatL2BaseShift,
89058  _swigc__p_p_faiss__IndexHNSW,
89059  _swigc__p_p_faiss__IndexHNSW2Level,
89060  _swigc__p_p_faiss__IndexHNSWFlat,
89061  _swigc__p_p_faiss__IndexHNSWPQ,
89062  _swigc__p_p_faiss__IndexHNSWSQ,
89063  _swigc__p_p_faiss__IndexIDMap,
89064  _swigc__p_p_faiss__IndexIDMap2,
89065  _swigc__p_p_faiss__IndexIVF,
89066  _swigc__p_p_faiss__IndexIVFFlat,
89067  _swigc__p_p_faiss__IndexIVFFlatDedup,
89068  _swigc__p_p_faiss__IndexIVFPQ,
89069  _swigc__p_p_faiss__IndexIVFPQR,
89070  _swigc__p_p_faiss__IndexIVFScalarQuantizer,
89071  _swigc__p_p_faiss__IndexLSH,
89072  _swigc__p_p_faiss__IndexPQ,
89073  _swigc__p_p_faiss__IndexPreTransform,
89074  _swigc__p_p_faiss__IndexRefineFlat,
89075  _swigc__p_p_faiss__IndexScalarQuantizer,
89076  _swigc__p_p_faiss__IndexShards,
89077  _swigc__p_p_faiss__IndexSplitVectors,
89078  _swigc__p_p_faiss__InvertedLists,
89079  _swigc__p_p_faiss__LinearTransform,
89080  _swigc__p_p_faiss__MultiIndexQuantizer,
89081  _swigc__p_p_faiss__MultiIndexQuantizer2,
89082  _swigc__p_p_faiss__NormalizationTransform,
89083  _swigc__p_p_faiss__OPQMatrix,
89084  _swigc__p_p_faiss__OnDiskInvertedLists,
89085  _swigc__p_p_faiss__PCAMatrix,
89086  _swigc__p_p_faiss__RandomRotationMatrix,
89087  _swigc__p_p_faiss__RemapDimensionsTransform,
89088  _swigc__p_p_faiss__VectorTransform,
89089  _swigc__p_p_faiss__gpu__GpuIndex,
89090  _swigc__p_p_faiss__gpu__GpuIndexFlat,
89091  _swigc__p_p_faiss__gpu__GpuIndexFlatIP,
89092  _swigc__p_p_faiss__gpu__GpuIndexFlatL2,
89093  _swigc__p_p_faiss__gpu__GpuIndexIVF,
89094  _swigc__p_p_faiss__gpu__GpuIndexIVFFlat,
89095  _swigc__p_p_faiss__gpu__GpuIndexIVFPQ,
89096  _swigc__p_p_faiss__gpu__GpuResources,
89097  _swigc__p_p_faiss__gpu__IndexProxy,
89098  _swigc__p_p_faiss__gpu__StandardGpuResources,
89099  _swigc__p_p_void,
89100  _swigc__p_std__functionT_void_ffaiss__Index_pF_t,
89101  _swigc__p_std__listT_faiss__OnDiskInvertedLists__Slot_t,
89102  _swigc__p_std__mt19937,
89103  _swigc__p_std__pairT_float_int_t,
89104  _swigc__p_std__pairT_void_p_unsigned_long_t,
89105  _swigc__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t,
89106  _swigc__p_std__priority_queueT_std__pairT_float_int_t_t,
89107  _swigc__p_std__unordered_mapT_long_long_t,
89108  _swigc__p_std__unordered_multimapT_long_long_t,
89109  _swigc__p_std__vectorT_char_t,
89110  _swigc__p_std__vectorT_cudaStream_t_t,
89111  _swigc__p_std__vectorT_double_t,
89112  _swigc__p_std__vectorT_faiss__BufferList__Buffer_t,
89113  _swigc__p_std__vectorT_faiss__HNSW__NodeDistFarther_t,
89114  _swigc__p_std__vectorT_faiss__Index_p_t,
89115  _swigc__p_std__vectorT_faiss__InvertedLists_const_p_t,
89116  _swigc__p_std__vectorT_faiss__InvertedLists_p_t,
89117  _swigc__p_std__vectorT_faiss__OnDiskInvertedLists__List_t,
89118  _swigc__p_std__vectorT_faiss__OperatingPoint_t,
89119  _swigc__p_std__vectorT_faiss__ParameterRange_t,
89120  _swigc__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t,
89121  _swigc__p_std__vectorT_faiss__VectorTransform_p_t,
89122  _swigc__p_std__vectorT_faiss__gpu__GpuResources_p_t,
89123  _swigc__p_std__vectorT_float_t,
89124  _swigc__p_std__vectorT_int_t,
89125  _swigc__p_std__vectorT_long_t,
89126  _swigc__p_std__vectorT_omp_lock_t_t,
89127  _swigc__p_std__vectorT_std__vectorT_float_t_t,
89128  _swigc__p_std__vectorT_std__vectorT_long_t_t,
89129  _swigc__p_std__vectorT_std__vectorT_uint8_t_t_t,
89130  _swigc__p_std__vectorT_std__vectorT_unsigned_long_t_t,
89131  _swigc__p_std__vectorT_unsigned_char_t,
89132  _swigc__p_std__vectorT_unsigned_long_t,
89133  _swigc__p_storage_idx_t,
89134  _swigc__p_uint32_t,
89135  _swigc__p_unsigned_char,
89136  _swigc__p_unsigned_long,
89137  _swigc__p_void,
89138 };
89139 
89140 
89141 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
89142 
89143 static swig_const_info swig_const_table[] = {
89144 {0, 0, 0, 0.0, 0, 0}};
89145 
89146 #ifdef __cplusplus
89147 }
89148 #endif
89149 /* -----------------------------------------------------------------------------
89150  * Type initialization:
89151  * This problem is tough by the requirement that no dynamic
89152  * memory is used. Also, since swig_type_info structures store pointers to
89153  * swig_cast_info structures and swig_cast_info structures store pointers back
89154  * to swig_type_info structures, we need some lookup code at initialization.
89155  * The idea is that swig generates all the structures that are needed.
89156  * The runtime then collects these partially filled structures.
89157  * The SWIG_InitializeModule function takes these initial arrays out of
89158  * swig_module, and does all the lookup, filling in the swig_module.types
89159  * array with the correct data and linking the correct swig_cast_info
89160  * structures together.
89161  *
89162  * The generated swig_type_info structures are assigned statically to an initial
89163  * array. We just loop through that array, and handle each type individually.
89164  * First we lookup if this type has been already loaded, and if so, use the
89165  * loaded structure instead of the generated one. Then we have to fill in the
89166  * cast linked list. The cast data is initially stored in something like a
89167  * two-dimensional array. Each row corresponds to a type (there are the same
89168  * number of rows as there are in the swig_type_initial array). Each entry in
89169  * a column is one of the swig_cast_info structures for that type.
89170  * The cast_initial array is actually an array of arrays, because each row has
89171  * a variable number of columns. So to actually build the cast linked list,
89172  * we find the array of casts associated with the type, and loop through it
89173  * adding the casts to the list. The one last trick we need to do is making
89174  * sure the type pointer in the swig_cast_info struct is correct.
89175  *
89176  * First off, we lookup the cast->type name to see if it is already loaded.
89177  * There are three cases to handle:
89178  * 1) If the cast->type has already been loaded AND the type we are adding
89179  * casting info to has not been loaded (it is in this module), THEN we
89180  * replace the cast->type pointer with the type pointer that has already
89181  * been loaded.
89182  * 2) If BOTH types (the one we are adding casting info to, and the
89183  * cast->type) are loaded, THEN the cast info has already been loaded by
89184  * the previous module so we just ignore it.
89185  * 3) Finally, if cast->type has not already been loaded, then we add that
89186  * swig_cast_info to the linked list (because the cast->type) pointer will
89187  * be correct.
89188  * ----------------------------------------------------------------------------- */
89189 
89190 #ifdef __cplusplus
89191 extern "C" {
89192 #if 0
89193 } /* c-mode */
89194 #endif
89195 #endif
89196 
89197 #if 0
89198 #define SWIGRUNTIME_DEBUG
89199 #endif
89200 
89201 
89202 SWIGRUNTIME void
89203 SWIG_InitializeModule(void *clientdata) {
89204  size_t i;
89205  swig_module_info *module_head, *iter;
89206  int init;
89207 
89208  /* check to see if the circular list has been setup, if not, set it up */
89209  if (swig_module.next==0) {
89210  /* Initialize the swig_module */
89211  swig_module.type_initial = swig_type_initial;
89212  swig_module.cast_initial = swig_cast_initial;
89213  swig_module.next = &swig_module;
89214  init = 1;
89215  } else {
89216  init = 0;
89217  }
89218 
89219  /* Try and load any already created modules */
89220  module_head = SWIG_GetModule(clientdata);
89221  if (!module_head) {
89222  /* This is the first module loaded for this interpreter */
89223  /* so set the swig module into the interpreter */
89224  SWIG_SetModule(clientdata, &swig_module);
89225  } else {
89226  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
89227  iter=module_head;
89228  do {
89229  if (iter==&swig_module) {
89230  /* Our module is already in the list, so there's nothing more to do. */
89231  return;
89232  }
89233  iter=iter->next;
89234  } while (iter!= module_head);
89235 
89236  /* otherwise we must add our module into the list */
89237  swig_module.next = module_head->next;
89238  module_head->next = &swig_module;
89239  }
89240 
89241  /* When multiple interpreters are used, a module could have already been initialized in
89242  a different interpreter, but not yet have a pointer in this interpreter.
89243  In this case, we do not want to continue adding types... everything should be
89244  set up already */
89245  if (init == 0) return;
89246 
89247  /* Now work on filling in swig_module.types */
89248 #ifdef SWIGRUNTIME_DEBUG
89249  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
89250 #endif
89251  for (i = 0; i < swig_module.size; ++i) {
89252  swig_type_info *type = 0;
89253  swig_type_info *ret;
89254  swig_cast_info *cast;
89255 
89256 #ifdef SWIGRUNTIME_DEBUG
89257  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
89258 #endif
89259 
89260  /* if there is another module already loaded */
89261  if (swig_module.next != &swig_module) {
89262  type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
89263  }
89264  if (type) {
89265  /* Overwrite clientdata field */
89266 #ifdef SWIGRUNTIME_DEBUG
89267  printf("SWIG_InitializeModule: found type %s\n", type->name);
89268 #endif
89269  if (swig_module.type_initial[i]->clientdata) {
89270  type->clientdata = swig_module.type_initial[i]->clientdata;
89271 #ifdef SWIGRUNTIME_DEBUG
89272  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
89273 #endif
89274  }
89275  } else {
89276  type = swig_module.type_initial[i];
89277  }
89278 
89279  /* Insert casting types */
89280  cast = swig_module.cast_initial[i];
89281  while (cast->type) {
89282  /* Don't need to add information already in the list */
89283  ret = 0;
89284 #ifdef SWIGRUNTIME_DEBUG
89285  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
89286 #endif
89287  if (swig_module.next != &swig_module) {
89288  ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
89289 #ifdef SWIGRUNTIME_DEBUG
89290  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
89291 #endif
89292  }
89293  if (ret) {
89294  if (type == swig_module.type_initial[i]) {
89295 #ifdef SWIGRUNTIME_DEBUG
89296  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
89297 #endif
89298  cast->type = ret;
89299  ret = 0;
89300  } else {
89301  /* Check for casting already in the list */
89302  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
89303 #ifdef SWIGRUNTIME_DEBUG
89304  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
89305 #endif
89306  if (!ocast) ret = 0;
89307  }
89308  }
89309 
89310  if (!ret) {
89311 #ifdef SWIGRUNTIME_DEBUG
89312  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
89313 #endif
89314  if (type->cast) {
89315  type->cast->prev = cast;
89316  cast->next = type->cast;
89317  }
89318  type->cast = cast;
89319  }
89320  cast++;
89321  }
89322  /* Set entry in modules->types array equal to the type */
89323  swig_module.types[i] = type;
89324  }
89325  swig_module.types[i] = 0;
89326 
89327 #ifdef SWIGRUNTIME_DEBUG
89328  printf("**** SWIG_InitializeModule: Cast List ******\n");
89329  for (i = 0; i < swig_module.size; ++i) {
89330  int j = 0;
89331  swig_cast_info *cast = swig_module.cast_initial[i];
89332  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
89333  while (cast->type) {
89334  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
89335  cast++;
89336  ++j;
89337  }
89338  printf("---- Total casts: %d\n",j);
89339  }
89340  printf("**** SWIG_InitializeModule: Cast List ******\n");
89341 #endif
89342 }
89343 
89344 /* This function will propagate the clientdata field of type to
89345 * any new swig_type_info structures that have been added into the list
89346 * of equivalent types. It is like calling
89347 * SWIG_TypeClientData(type, clientdata) a second time.
89348 */
89349 SWIGRUNTIME void
89350 SWIG_PropagateClientData(void) {
89351  size_t i;
89352  swig_cast_info *equiv;
89353  static int init_run = 0;
89354 
89355  if (init_run) return;
89356  init_run = 1;
89357 
89358  for (i = 0; i < swig_module.size; i++) {
89359  if (swig_module.types[i]->clientdata) {
89360  equiv = swig_module.types[i]->cast;
89361  while (equiv) {
89362  if (!equiv->converter) {
89363  if (equiv->type && !equiv->type->clientdata)
89364  SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
89365  }
89366  equiv = equiv->next;
89367  }
89368  }
89369  }
89370 }
89371 
89372 #ifdef __cplusplus
89373 #if 0
89374 {
89375  /* c-mode */
89376 #endif
89377 }
89378 #endif
89379 
89380 
89381 
89382 #ifdef __cplusplus
89383 extern "C" {
89384 #endif
89385 
89386  /* Python-specific SWIG API */
89387 #define SWIG_newvarlink() SWIG_Python_newvarlink()
89388 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
89389 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
89390 
89391  /* -----------------------------------------------------------------------------
89392  * global variable support code.
89393  * ----------------------------------------------------------------------------- */
89394 
89395  typedef struct swig_globalvar {
89396  char *name; /* Name of global variable */
89397  PyObject *(*get_attr)(void); /* Return the current value */
89398  int (*set_attr)(PyObject *); /* Set the value */
89399  struct swig_globalvar *next;
89400  } swig_globalvar;
89401 
89402  typedef struct swig_varlinkobject {
89403  PyObject_HEAD
89404  swig_globalvar *vars;
89406 
89407  SWIGINTERN PyObject *
89408  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
89409 #if PY_VERSION_HEX >= 0x03000000
89410  return PyUnicode_InternFromString("<Swig global variables>");
89411 #else
89412  return PyString_FromString("<Swig global variables>");
89413 #endif
89414  }
89415 
89416  SWIGINTERN PyObject *
89417  swig_varlink_str(swig_varlinkobject *v) {
89418 #if PY_VERSION_HEX >= 0x03000000
89419  PyObject *str = PyUnicode_InternFromString("(");
89420  PyObject *tail;
89421  PyObject *joined;
89422  swig_globalvar *var;
89423  for (var = v->vars; var; var=var->next) {
89424  tail = PyUnicode_FromString(var->name);
89425  joined = PyUnicode_Concat(str, tail);
89426  Py_DecRef(str);
89427  Py_DecRef(tail);
89428  str = joined;
89429  if (var->next) {
89430  tail = PyUnicode_InternFromString(", ");
89431  joined = PyUnicode_Concat(str, tail);
89432  Py_DecRef(str);
89433  Py_DecRef(tail);
89434  str = joined;
89435  }
89436  }
89437  tail = PyUnicode_InternFromString(")");
89438  joined = PyUnicode_Concat(str, tail);
89439  Py_DecRef(str);
89440  Py_DecRef(tail);
89441  str = joined;
89442 #else
89443  PyObject *str = PyString_FromString("(");
89444  swig_globalvar *var;
89445  for (var = v->vars; var; var=var->next) {
89446  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
89447  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
89448  }
89449  PyString_ConcatAndDel(&str,PyString_FromString(")"));
89450 #endif
89451  return str;
89452  }
89453 
89454  SWIGINTERN int
89455  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
89456  char *tmp;
89457  PyObject *str = swig_varlink_str(v);
89458  fprintf(fp,"Swig global variables ");
89459  fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
89460  SWIG_Python_str_DelForPy3(tmp);
89461  Py_DECREF(str);
89462  return 0;
89463  }
89464 
89465  SWIGINTERN void
89466  swig_varlink_dealloc(swig_varlinkobject *v) {
89467  swig_globalvar *var = v->vars;
89468  while (var) {
89469  swig_globalvar *n = var->next;
89470  free(var->name);
89471  free(var);
89472  var = n;
89473  }
89474  }
89475 
89476  SWIGINTERN PyObject *
89477  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
89478  PyObject *res = NULL;
89479  swig_globalvar *var = v->vars;
89480  while (var) {
89481  if (strcmp(var->name,n) == 0) {
89482  res = (*var->get_attr)();
89483  break;
89484  }
89485  var = var->next;
89486  }
89487  if (res == NULL && !PyErr_Occurred()) {
89488  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
89489  }
89490  return res;
89491  }
89492 
89493  SWIGINTERN int
89494  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
89495  int res = 1;
89496  swig_globalvar *var = v->vars;
89497  while (var) {
89498  if (strcmp(var->name,n) == 0) {
89499  res = (*var->set_attr)(p);
89500  break;
89501  }
89502  var = var->next;
89503  }
89504  if (res == 1 && !PyErr_Occurred()) {
89505  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
89506  }
89507  return res;
89508  }
89509 
89510  SWIGINTERN PyTypeObject*
89511  swig_varlink_type(void) {
89512  static char varlink__doc__[] = "Swig var link object";
89513  static PyTypeObject varlink_type;
89514  static int type_init = 0;
89515  if (!type_init) {
89516  const PyTypeObject tmp = {
89517 #if PY_VERSION_HEX >= 0x03000000
89518  PyVarObject_HEAD_INIT(NULL, 0)
89519 #else
89520  PyObject_HEAD_INIT(NULL)
89521  0, /* ob_size */
89522 #endif
89523  (char *)"swigvarlink", /* tp_name */
89524  sizeof(swig_varlinkobject), /* tp_basicsize */
89525  0, /* tp_itemsize */
89526  (destructor) swig_varlink_dealloc, /* tp_dealloc */
89527  (printfunc) swig_varlink_print, /* tp_print */
89528  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
89529  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
89530  0, /* tp_compare */
89531  (reprfunc) swig_varlink_repr, /* tp_repr */
89532  0, /* tp_as_number */
89533  0, /* tp_as_sequence */
89534  0, /* tp_as_mapping */
89535  0, /* tp_hash */
89536  0, /* tp_call */
89537  (reprfunc) swig_varlink_str, /* tp_str */
89538  0, /* tp_getattro */
89539  0, /* tp_setattro */
89540  0, /* tp_as_buffer */
89541  0, /* tp_flags */
89542  varlink__doc__, /* tp_doc */
89543  0, /* tp_traverse */
89544  0, /* tp_clear */
89545  0, /* tp_richcompare */
89546  0, /* tp_weaklistoffset */
89547 #if PY_VERSION_HEX >= 0x02020000
89548  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
89549 #endif
89550 #if PY_VERSION_HEX >= 0x02030000
89551  0, /* tp_del */
89552 #endif
89553 #if PY_VERSION_HEX >= 0x02060000
89554  0, /* tp_version_tag */
89555 #endif
89556 #if PY_VERSION_HEX >= 0x03040000
89557  0, /* tp_finalize */
89558 #endif
89559 #ifdef COUNT_ALLOCS
89560  0, /* tp_allocs */
89561  0, /* tp_frees */
89562  0, /* tp_maxalloc */
89563 #if PY_VERSION_HEX >= 0x02050000
89564  0, /* tp_prev */
89565 #endif
89566  0 /* tp_next */
89567 #endif
89568  };
89569  varlink_type = tmp;
89570  type_init = 1;
89571 #if PY_VERSION_HEX < 0x02020000
89572  varlink_type.ob_type = &PyType_Type;
89573 #else
89574  if (PyType_Ready(&varlink_type) < 0)
89575  return NULL;
89576 #endif
89577  }
89578  return &varlink_type;
89579  }
89580 
89581  /* Create a variable linking object for use later */
89582  SWIGINTERN PyObject *
89583  SWIG_Python_newvarlink(void) {
89584  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
89585  if (result) {
89586  result->vars = 0;
89587  }
89588  return ((PyObject*) result);
89589  }
89590 
89591  SWIGINTERN void
89592  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
89594  swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
89595  if (gv) {
89596  size_t size = strlen(name)+1;
89597  gv->name = (char *)malloc(size);
89598  if (gv->name) {
89599  strncpy(gv->name,name,size);
89600  gv->get_attr = get_attr;
89601  gv->set_attr = set_attr;
89602  gv->next = v->vars;
89603  }
89604  }
89605  v->vars = gv;
89606  }
89607 
89608  SWIGINTERN PyObject *
89609  SWIG_globals(void) {
89610  static PyObject *_SWIG_globals = 0;
89611  if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
89612  return _SWIG_globals;
89613  }
89614 
89615  /* -----------------------------------------------------------------------------
89616  * constants/methods manipulation
89617  * ----------------------------------------------------------------------------- */
89618 
89619  /* Install Constants */
89620  SWIGINTERN void
89621  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
89622  PyObject *obj = 0;
89623  size_t i;
89624  for (i = 0; constants[i].type; ++i) {
89625  switch(constants[i].type) {
89626  case SWIG_PY_POINTER:
89627  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
89628  break;
89629  case SWIG_PY_BINARY:
89630  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
89631  break;
89632  default:
89633  obj = 0;
89634  break;
89635  }
89636  if (obj) {
89637  PyDict_SetItemString(d, constants[i].name, obj);
89638  Py_DECREF(obj);
89639  }
89640  }
89641  }
89642 
89643  /* -----------------------------------------------------------------------------*/
89644  /* Fix SwigMethods to carry the callback ptrs when needed */
89645  /* -----------------------------------------------------------------------------*/
89646 
89647  SWIGINTERN void
89648  SWIG_Python_FixMethods(PyMethodDef *methods,
89649  swig_const_info *const_table,
89650  swig_type_info **types,
89651  swig_type_info **types_initial) {
89652  size_t i;
89653  for (i = 0; methods[i].ml_name; ++i) {
89654  const char *c = methods[i].ml_doc;
89655  if (!c) continue;
89656  c = strstr(c, "swig_ptr: ");
89657  if (c) {
89658  int j;
89659  swig_const_info *ci = 0;
89660  const char *name = c + 10;
89661  for (j = 0; const_table[j].type; ++j) {
89662  if (strncmp(const_table[j].name, name,
89663  strlen(const_table[j].name)) == 0) {
89664  ci = &(const_table[j]);
89665  break;
89666  }
89667  }
89668  if (ci) {
89669  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
89670  if (ptr) {
89671  size_t shift = (ci->ptype) - types;
89672  swig_type_info *ty = types_initial[shift];
89673  size_t ldoc = (c - methods[i].ml_doc);
89674  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
89675  char *ndoc = (char*)malloc(ldoc + lptr + 10);
89676  if (ndoc) {
89677  char *buff = ndoc;
89678  strncpy(buff, methods[i].ml_doc, ldoc);
89679  buff += ldoc;
89680  strncpy(buff, "swig_ptr: ", 10);
89681  buff += 10;
89682  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
89683  methods[i].ml_doc = ndoc;
89684  }
89685  }
89686  }
89687  }
89688  }
89689  }
89690 
89691 #ifdef __cplusplus
89692 }
89693 #endif
89694 
89695 /* -----------------------------------------------------------------------------*
89696  * Partial Init method
89697  * -----------------------------------------------------------------------------*/
89698 
89699 #ifdef __cplusplus
89700 extern "C"
89701 #endif
89702 
89703 SWIGEXPORT
89704 #if PY_VERSION_HEX >= 0x03000000
89705 PyObject*
89706 #else
89707 void
89708 #endif
89709 SWIG_init(void) {
89710  PyObject *m, *d, *md;
89711 #if PY_VERSION_HEX >= 0x03000000
89712  static struct PyModuleDef SWIG_module = {
89713 # if PY_VERSION_HEX >= 0x03020000
89714  PyModuleDef_HEAD_INIT,
89715 # else
89716  {
89717  PyObject_HEAD_INIT(NULL)
89718  NULL, /* m_init */
89719  0, /* m_index */
89720  NULL, /* m_copy */
89721  },
89722 # endif
89723  (char *) SWIG_name,
89724  NULL,
89725  -1,
89726  SwigMethods,
89727  NULL,
89728  NULL,
89729  NULL,
89730  NULL
89731  };
89732 #endif
89733 
89734 #if defined(SWIGPYTHON_BUILTIN)
89735  static SwigPyClientData SwigPyObject_clientdata = {
89736  0, 0, 0, 0, 0, 0, 0
89737  };
89738  static PyGetSetDef this_getset_def = {
89739  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
89740  };
89741  static SwigPyGetSet thisown_getset_closure = {
89742  (PyCFunction) SwigPyObject_own,
89743  (PyCFunction) SwigPyObject_own
89744  };
89745  static PyGetSetDef thisown_getset_def = {
89746  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
89747  };
89748  PyTypeObject *builtin_pytype;
89749  int builtin_base_count;
89750  swig_type_info *builtin_basetype;
89751  PyObject *tuple;
89752  PyGetSetDescrObject *static_getset;
89753  PyTypeObject *metatype;
89754  PyTypeObject *swigpyobject;
89755  SwigPyClientData *cd;
89756  PyObject *public_interface, *public_symbol;
89757  PyObject *this_descr;
89758  PyObject *thisown_descr;
89759  PyObject *self = 0;
89760  int i;
89761 
89762  (void)builtin_pytype;
89763  (void)builtin_base_count;
89764  (void)builtin_basetype;
89765  (void)tuple;
89766  (void)static_getset;
89767  (void)self;
89768 
89769  /* Metaclass is used to implement static member variables */
89770  metatype = SwigPyObjectType();
89771  assert(metatype);
89772 #endif
89773 
89774  /* Fix SwigMethods to carry the callback ptrs when needed */
89775  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
89776 
89777 #if PY_VERSION_HEX >= 0x03000000
89778  m = PyModule_Create(&SWIG_module);
89779 #else
89780  m = Py_InitModule((char *) SWIG_name, SwigMethods);
89781 #endif
89782 
89783  md = d = PyModule_GetDict(m);
89784  (void)md;
89785 
89786  SWIG_InitializeModule(0);
89787 
89788 #ifdef SWIGPYTHON_BUILTIN
89789  swigpyobject = SwigPyObject_TypeOnce();
89790 
89791  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
89792  assert(SwigPyObject_stype);
89793  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
89794  if (!cd) {
89795  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
89796  SwigPyObject_clientdata.pytype = swigpyobject;
89797  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
89798  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
89799 # if PY_VERSION_HEX >= 0x03000000
89800  return NULL;
89801 # else
89802  return;
89803 # endif
89804  }
89805 
89806  /* All objects have a 'this' attribute */
89807  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
89808  (void)this_descr;
89809 
89810  /* All objects have a 'thisown' attribute */
89811  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
89812  (void)thisown_descr;
89813 
89814  public_interface = PyList_New(0);
89815  public_symbol = 0;
89816  (void)public_symbol;
89817 
89818  PyDict_SetItemString(md, "__all__", public_interface);
89819  Py_DECREF(public_interface);
89820  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
89821  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
89822  for (i = 0; swig_const_table[i].name != 0; ++i)
89823  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
89824 #endif
89825 
89826  SWIG_InstallConstants(d,swig_const_table);
89827 
89828  PyDict_SetItemString(md,(char *)"cvar", SWIG_globals());
89829  SWIG_addvarlink(SWIG_globals(),(char *)"hamming_batch_size",Swig_var_hamming_batch_size_get, Swig_var_hamming_batch_size_set);
89830  SWIG_addvarlink(SWIG_globals(),(char *)"distance_compute_blas_threshold",Swig_var_distance_compute_blas_threshold_get, Swig_var_distance_compute_blas_threshold_set);
89831  SWIG_Python_SetConstant(d, "FAISS_VERSION_MAJOR",SWIG_From_int(static_cast< int >(1)));
89832  SWIG_Python_SetConstant(d, "FAISS_VERSION_MINOR",SWIG_From_int(static_cast< int >(4)));
89833  SWIG_Python_SetConstant(d, "FAISS_VERSION_PATCH",SWIG_From_int(static_cast< int >(0)));
89834  SWIG_Python_SetConstant(d, "METRIC_INNER_PRODUCT",SWIG_From_int(static_cast< int >(faiss::METRIC_INNER_PRODUCT)));
89835  SWIG_Python_SetConstant(d, "METRIC_L2",SWIG_From_int(static_cast< int >(faiss::METRIC_L2)));
89836  SWIG_Python_SetConstant(d, "ProductQuantizer_Train_default",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_default)));
89837  SWIG_Python_SetConstant(d, "ProductQuantizer_Train_hot_start",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_hot_start)));
89838  SWIG_Python_SetConstant(d, "ProductQuantizer_Train_shared",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_shared)));
89839  SWIG_Python_SetConstant(d, "ProductQuantizer_Train_hypercube",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_hypercube)));
89840  SWIG_Python_SetConstant(d, "ProductQuantizer_Train_hypercube_pca",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_hypercube_pca)));
89841  SWIG_Python_SetConstant(d, "PolysemousTraining_OT_None",SWIG_From_int(static_cast< int >(faiss::PolysemousTraining::OT_None)));
89842  SWIG_Python_SetConstant(d, "PolysemousTraining_OT_ReproduceDistances_affine",SWIG_From_int(static_cast< int >(faiss::PolysemousTraining::OT_ReproduceDistances_affine)));
89843  SWIG_Python_SetConstant(d, "PolysemousTraining_OT_Ranking_weighted_diff",SWIG_From_int(static_cast< int >(faiss::PolysemousTraining::OT_Ranking_weighted_diff)));
89844  SWIG_Python_SetConstant(d, "IndexPQ_ST_PQ",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_PQ)));
89845  SWIG_Python_SetConstant(d, "IndexPQ_ST_HE",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_HE)));
89846  SWIG_Python_SetConstant(d, "IndexPQ_ST_generalized_HE",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_generalized_HE)));
89847  SWIG_Python_SetConstant(d, "IndexPQ_ST_SDC",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_SDC)));
89848  SWIG_Python_SetConstant(d, "IndexPQ_ST_polysemous",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_polysemous)));
89849  SWIG_Python_SetConstant(d, "IndexPQ_ST_polysemous_generalize",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_polysemous_generalize)));
89850  SWIG_addvarlink(SWIG_globals(),(char *)"indexPQ_stats",Swig_var_indexPQ_stats_get, Swig_var_indexPQ_stats_set);
89851  SWIG_addvarlink(SWIG_globals(),(char *)"indexIVF_stats",Swig_var_indexIVF_stats_get, Swig_var_indexIVF_stats_set);
89852  SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_8bit",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_8bit)));
89853  SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_4bit",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_4bit)));
89854  SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_8bit_uniform",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_8bit_uniform)));
89855  SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_4bit_uniform",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_4bit_uniform)));
89856  SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_fp16",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_fp16)));
89857  SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_minmax",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_minmax)));
89858  SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_meanstd",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_meanstd)));
89859  SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_quantiles",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_quantiles)));
89860  SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_optim",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_optim)));
89861  SWIG_addvarlink(SWIG_globals(),(char *)"hnsw_stats",Swig_var_hnsw_stats_get, Swig_var_hnsw_stats_set);
89862  SWIG_addvarlink(SWIG_globals(),(char *)"IndexIVFPQ_precomputed_table_max_bytes",Swig_var_IndexIVFPQ_precomputed_table_max_bytes_get, Swig_var_IndexIVFPQ_precomputed_table_max_bytes_set);
89863  SWIG_addvarlink(SWIG_globals(),(char *)"indexIVFPQ_stats",Swig_var_indexIVFPQ_stats_get, Swig_var_indexIVFPQ_stats_set);
89864  SWIG_Python_SetConstant(d, "INDICES_CPU",SWIG_From_int(static_cast< int >(faiss::gpu::INDICES_CPU)));
89865  SWIG_Python_SetConstant(d, "INDICES_IVF",SWIG_From_int(static_cast< int >(faiss::gpu::INDICES_IVF)));
89866  SWIG_Python_SetConstant(d, "INDICES_32_BIT",SWIG_From_int(static_cast< int >(faiss::gpu::INDICES_32_BIT)));
89867  SWIG_Python_SetConstant(d, "INDICES_64_BIT",SWIG_From_int(static_cast< int >(faiss::gpu::INDICES_64_BIT)));
89868  SWIG_Python_SetConstant(d, "Device",SWIG_From_int(static_cast< int >(faiss::gpu::Device)));
89869  SWIG_Python_SetConstant(d, "Unified",SWIG_From_int(static_cast< int >(faiss::gpu::Unified)));
89870  SWIG_addvarlink(SWIG_globals(),(char *)"IO_FLAG_MMAP",Swig_var_IO_FLAG_MMAP_get, Swig_var_IO_FLAG_MMAP_set);
89871  SWIG_addvarlink(SWIG_globals(),(char *)"IO_FLAG_READ_ONLY",Swig_var_IO_FLAG_READ_ONLY_get, Swig_var_IO_FLAG_READ_ONLY_set);
89872 
89873  /* needed, else crash at runtime */
89874  import_array();
89875 
89876 #if PY_VERSION_HEX >= 0x03000000
89877  return m;
89878 #else
89879  return;
89880 #endif
89881 }
89882 
random generator that can be used in multithreaded contexts
Definition: utils.h:48
void hammings_knn_hc(int_maxheap_array_t *ha, const uint8_t *a, const uint8_t *b, size_t nb, size_t ncodes, int order)
Definition: hamming.cpp:518
same as _2, but use rank of y+ - rank of y-
intialize centroids with nbits-D hypercube
int km_update_centroids(const float *x, float *centroids, long *assign, size_t d, size_t k, size_t n, size_t k_frozen)
Definition: utils.cpp:1066
void knn_L2sqr_base_shift(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res, const float *base_shift)
Definition: utils.cpp:653
Randomly rotate a set of vectors.
simple (default) implementation as an array of inverted lists
Hamming distance on codes.
Definition: IndexPQ.h:78
result structure for a single query
void check_compatible_for_merge(const IndexIVF &other) const
Definition: IndexIVF.cpp:461
float fvec_L2sqr(const float *x, const float *y, size_t d)
Squared L2 distance between two vectors.
Definition: utils_simd.cpp:502
T * get_val(size_t key)
Return the list of values for a heap.
Definition: Heap.h:360
alternate optimization of reconstruction error
same, shared range for all dimensions
void bincode_hist(size_t n, size_t nbits, const uint8_t *codes, int *hist)
Definition: utils.cpp:1314
Holder of GPU resources for a particular flat index.
Definition: FlatIndex.cuh:22
const float * fvecs_maybe_subsample(size_t d, size_t *n, size_t nmax, const float *x, bool verbose, long seed)
Definition: utils.cpp:1528
void display(bool only_optimal=true) const
easy-to-read output
Definition: AutoTune.cpp:229
Index::idx_t idx_t
Faiss results are 64-bit.
Definition: HNSW.h:52
intialize centroids with nbits-D hypercube
optimized version for 1D &quot;vectors&quot;
Definition: IndexFlat.h:137
set some options on how to copy to GPU
void hammings_knn_mc(const uint8_t *a, const uint8_t *b, size_t na, size_t nb, size_t k, size_t ncodes, int32_t *distances, long *labels)
Definition: hamming.cpp:556
void ranklist_handle_ties(int k, long *idx, const float *dis)
Definition: utils.cpp:1160
share dictionary accross PQ segments
float rand_float()
between 0 and 1
Definition: utils.cpp:130
const char * what() const noexceptoverride
from std::exception
void fvec_madd(size_t n, const float *a, float bf, const float *b, float *c)
Definition: utils_simd.cpp:589
size_t get_mem_usage_kb()
get current RSS usage in kB
int ivec_hist(size_t n, const int *v, int vmax, int *hist)
compute histogram on v
Definition: utils.cpp:1303
void display() const
Definition: IndexBinary.cpp:73
Base class for Faiss exceptions.
Search_type_t
how to perform the search in search_core
Definition: IndexPQ.h:76
void per_line_extrema(T *vals_out, TI *idx_out) const
Definition: Heap.cpp:86
static size_t precomputed_table_max_bytes
2G by default, accommodates tables up to PQ32 w/ 65536 centroids
Definition: IndexIVFPQ.h:56
set implementation optimized for fast access.
Definition: HNSW.h:235
long rand_long()
random long
Definition: utils.cpp:120
parameter space and setters for GPU indexes
Definition: GpuAutoTune.h:39
Filter on generalized Hamming.
Definition: IndexPQ.h:82
size_t merge_result_table_with(size_t n, size_t k, long *I0, float *D0, const long *I1, const float *D1, bool keep_min, long translation)
Definition: utils.cpp:1176
int rand_int()
random positive integer
Definition: utils.cpp:115
long idx_t
all indices are this type
Definition: Index.h:64
size_t ranklist_intersection_size(size_t k1, const long *v1, size_t k2, const long *v2_in)
Definition: utils.cpp:1241
float kmeans_clustering(size_t d, size_t n, size_t k, const float *x, float *centroids)
Definition: Clustering.cpp:238
void pairwise_L2sqr(long d, long nq, const float *xq, long nb, const float *xb, float *dis, long ldq, long ldb, long ldd)
Definition: utils.cpp:1009
void range_search_inner_product(const float *x, const float *y, size_t d, size_t nx, size_t ny, float radius, RangeSearchResult *res)
same as range_search_L2sqr for the inner product similarity
Definition: utils.cpp:947
void knn_inner_product(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_minheap_array_t *res)
Definition: utils.cpp:613
the centroids are already initialized
double getmillisecs()
ms elapsed since some arbitrary epoch
Definition: utils.cpp:70
optimizes the order of indices in a ProductQuantizer
void real_to_binary(size_t d, const float *x_in, uint8_t *x_out)
Definition: utils.cpp:1558
void print_stats() const
display some stats about the inverted lists
[mean - std * rs, mean + std * rs]
double imbalance_factor(int k, const int *hist)
same, takes a histogram as input
Definition: utils.cpp:1279
float fvec_norm_L2sqr(const float *x, size_t d)
Definition: utils_simd.cpp:516
void range_search_L2sqr(const float *x, const float *y, size_t d, size_t nx, size_t ny, float radius, RangeSearchResult *res)
Definition: utils.cpp:932
void matrix_qr(int m, int n, float *a)
Definition: utils.cpp:987
the entries in the buffers are split per query
int merge_with(const OperatingPoints &other, const std::string &prefix="")
add operating points from other to this, with a prefix to the keys
Definition: AutoTune.cpp:167
void display() const
Definition: Index.cpp:95
size_t ivec_checksum(size_t n, const int *a)
compute a checksum on a table.
Definition: utils.cpp:1337
void hammings(const uint8_t *a, const uint8_t *b, size_t na, size_t nb, size_t nbytespercode, hamdis_t *dis)
IVFPQ index for the GPU.
Definition: GpuIndexIVFPQ.h:39
parameters used for the simulated annealing method
TI * get_ids(size_t key)
Correspponding identifiers.
Definition: Heap.h:363
void print_stats() const
display some stats about the inverted lists
Definition: IndexIVF.cpp:440
int random_level()
pick a random level for a new point
Definition: HNSW.cpp:64
long idx_t
all indices are this type
Definition: IndexBinary.h:38
abstract class for the loss function
asymmetric product quantizer (default)
Definition: IndexPQ.h:77
int fvec_madd_and_argmin(size_t n, const float *a, float bf, const float *b, float *c)
Definition: utils_simd.cpp:676
void display() const
print a description on stdout
Definition: AutoTune.cpp:546
[min - rs*(max-min), max + rs*(max-min)]
void fvec_norms_L2(float *ip, const float *x, size_t d, size_t nx)
HE filter (using ht) + PQ combination.
Definition: IndexPQ.h:81
void knn_L2sqr(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res)
Definition: utils.cpp:633
void binary_to_real(size_t d, const uint8_t *x_in, float *x_out)
Definition: utils.cpp:1552
void fvec_norms_L2sqr(float *ip, const float *x, size_t d, size_t nx)
same as fvec_norms_L2, but computes square norms
int storage_idx_t
internal storage of vectors (32 bits: this is expensive)
Definition: HNSW.h:49
possible values of a parameter, sorted from least to most expensive/accurate
Definition: AutoTune.h:125
symmetric product quantizer (SDC)
Definition: IndexPQ.h:80
Index * index_factory(int d, const char *description_in, MetricType metric)
Definition: AutoTune.cpp:722
static void shrink_neighbor_list(DistanceComputer &qdis, std::priority_queue< NodeDistFarther > &input, std::vector< NodeDistFarther > &output, int max_size)
Definition: HNSW.cpp:237
Simulated annealing optimization algorithm for permutations.
MetricType
Some algorithms support both an inner product version and a L2 search version.
Definition: Index.h:45
train_type_t
initialization
void generalized_hammings_knn_hc(int_maxheap_array_t *ha, const uint8_t *a, const uint8_t *b, size_t nb, size_t code_size, int ordered)
Definition: hamming.cpp:729