Commit 11143583 authored by matthijs's avatar matthijs

make GPU headers C++03 compatible

parent db1ca184
......@@ -177,7 +177,9 @@ requires:
See the example makefile on how to set the flags.
The nvcc-specific flags to pass to the compiler:
The nvcc-specific flags to pass to the compiler, based on your desired
compute capability. Only compute capability 3.5+ is supported. For
example:
-gencode arch=compute_35,code="compute_35"
-gencode arch=compute_52,code="compute_52"
......@@ -237,7 +239,7 @@ to enable and run it.
Hot to use Faiss in your own projects
=====================================
C++
C++
---
The makefile generates a static and a dynamic library
......@@ -245,20 +247,19 @@ The makefile generates a static and a dynamic library
libfaiss.a
libfaiss.so (or libfaiss.dylib)
the executable should be linked to one of these. If you use
the executable should be linked to one of these. If you use
the static version (.a), add the LDFLAGS found in the Makefile.
Python
------
To import Faiss in your own Python project, you need the files
To import Faiss in your own Python project, you need the files
faiss.py
faiss.py
swigfaiss.py / swigfaiss_gpu.py
_swigfaiss.so / _swigfaiss_gpu.so
_swigfaiss.so / _swigfaiss_gpu.so
to be visible in the PYTHONPATH or in the current directory.
to be visible in the PYTHONPATH or in the current directory.
Then Faiss can be used in python with
import faiss
# Doxyfile 1.8.5
# This file describes the settings to be used by the documentation system
......@@ -131,7 +132,7 @@ INLINE_INHERITED_MEMB = NO
# shortest path that makes the file name unique will be used
# The default value is: YES.
FULL_PATH_NAMES = NO
FULL_PATH_NAMES = YES
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
# Stripping is only done if one of the specified strings matches the left-hand
......
......@@ -80,7 +80,7 @@ class IndexProxy : public faiss::Index {
private:
/// Collection of Index instances, with their managing worker thread
mutable std::vector<std::pair<faiss::Index*,
std::unique_ptr<WorkerThread>>> indices_;
std::unique_ptr<WorkerThread> > > indices_;
};
......
......@@ -64,7 +64,7 @@ class StandardGpuResources : public GpuResources {
std::unordered_map<int, cudaStream_t> defaultStreams_;
/// Other streams we can use, per each device
std::unordered_map<int, std::vector<cudaStream_t>> alternateStreams_;
std::unordered_map<int, std::vector<cudaStream_t> > alternateStreams_;
/// Async copy stream to use for GPU <-> CPU pinned memory copies
std::unordered_map<int, cudaStream_t> asyncCopyStreams_;
......@@ -73,7 +73,7 @@ class StandardGpuResources : public GpuResources {
std::unordered_map<int, cublasHandle_t> blasHandles_;
/// Temporary memory provider, per each device
std::unordered_map<int, std::unique_ptr<StackDeviceMemory>> memory_;
std::unordered_map<int, std::unique_ptr<StackDeviceMemory> > memory_;
/// Pinned memory allocation for use with this GPU
void* pinnedMemAlloc_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment