mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-12 02:13:36 +00:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user