Make tutorial examples use dynamic linkage. (#343)

* Add shared lib target for GPU version.

* Dynamically link tutorial examples.

* Add shared lib to clean target in GPU Makefile.

* Add clean target to tutorial examples Makefile.

* Minor modifications to tutorial GPU examples.
This commit is contained in:
Lucas Hosseini
2018-02-21 15:36:29 +01:00
committed by GitHub
parent 97eba20218
commit 16aed09c0f
6 changed files with 42 additions and 22 deletions
+2 -2
View File
@@ -36,8 +36,6 @@ int main() {
xq[d * i] += i / 1000.;
}
int k = 4;
faiss::gpu::StandardGpuResources res;
// Using a flat index
@@ -48,6 +46,8 @@ int main() {
index_flat.add(nb, xb); // add vectors to the index
printf("ntotal = %ld\n", index_flat.ntotal);
int k = 4;
{ // search xq
long *I = new long[k * nq];
float *D = new float[k * nq];