Put idx_t in the faiss namespace (#2582)

Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2582

A few more or less cosmetic improvements
* Index::idx_t was in the Index object, which does not make much sense, this diff moves it to faiss::idx_t
* replace multiprocessing.dummy with multiprocessing.pool
* add Alexandr as a core contributor of Faiss in the README ;-)

```
for i in $( find . -name \*.cu -o -name \*.cuh -o -name \*.h -o -name \*.cpp ) ; do
  sed -i s/Index::idx_t/idx_t/ $i
done
```

For the fbcode deps:
```
for i in $( fbgs Index::idx_t --exclude fbcode/faiss -l ) ; do
   sed -i s/Index::idx_t/idx_t/ $i
done
```

Reviewed By: algoriddle

Differential Revision: D41437507

fbshipit-source-id: 8300f2a3ae97cace6172f3f14a9be3a83999fb89
This commit is contained in:
Matthijs Douze
2022-11-30 08:25:30 -08:00
committed by Facebook GitHub Bot
parent 699a9712b9
commit a996a4a052
158 changed files with 557 additions and 662 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
#include <faiss/IndexFlat.h>
// 64-bit int
using idx_t = faiss::Index::idx_t;
using idx_t = faiss::idx_t;
int main() {
int d = 64; // dimension
+1 -1
View File
@@ -13,7 +13,7 @@
#include <faiss/IndexFlat.h>
#include <faiss/IndexIVFFlat.h>
using idx_t = faiss::Index::idx_t;
using idx_t = faiss::idx_t;
int main() {
int d = 64; // dimension
+1 -1
View File
@@ -12,7 +12,7 @@
#include <faiss/IndexFlat.h>
#include <faiss/IndexIVFPQ.h>
using idx_t = faiss::Index::idx_t;
using idx_t = faiss::idx_t;
int main() {
int d = 64; // dimension