Commit 5ca05218 authored by matthijs's avatar matthijs

move to C++11

parent 3ba41afe
...@@ -27,9 +27,9 @@ class FaissException : public std::exception { ...@@ -27,9 +27,9 @@ class FaissException : public std::exception {
int line); int line);
/// from std::exception /// from std::exception
virtual const char* what() const _GLIBCXX_USE_NOEXCEPT const char* what() const noexcept override
{ return msg.c_str(); } { return msg.c_str(); }
virtual ~FaissException () _GLIBCXX_USE_NOEXCEPT {} ~FaissException () noexcept override {}
std::string msg; std::string msg;
}; };
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
CC=g++ CC=g++
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -Dnullptr=NULL -Doverride= -fopenmp CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -std=c++11 -fopenmp
LDFLAGS=-g -fPIC -fopenmp LDFLAGS=-g -fPIC -fopenmp
# common linux flags # common linux flags
...@@ -62,11 +62,11 @@ BLASCFLAGS=-DFINTEGER=int ...@@ -62,11 +62,11 @@ BLASCFLAGS=-DFINTEGER=int
# This is for Centos: # This is for Centos:
BLASLDFLAGS?=/usr/lib64/libopenblas.so.0 BLASLDFLAGS?=/usr/lib64/libopenblas.so.0
# for Ubuntu 16: # for Ubuntu 16:
# sudo apt-get install libopenblas-dev python-numpy python-dev # sudo apt-get install libopenblas-dev python-numpy python-dev
# BLASLDFLAGS?=/usr/lib/libopenblas.so.0 # BLASLDFLAGS?=/usr/lib/libopenblas.so.0
# for Ubuntu 14: # for Ubuntu 14:
# sudo apt-get install libopenblas-dev liblapack3 python-numpy python-dev # sudo apt-get install libopenblas-dev liblapack3 python-numpy python-dev
# BLASLDFLAGS?=/usr/lib/libopenblas.so.0 /usr/lib/lapack/liblapack.so.3.0 # BLASLDFLAGS?=/usr/lib/libopenblas.so.0 /usr/lib/lapack/liblapack.so.3.0
# #
...@@ -102,12 +102,12 @@ SWIGEXEC=swig ...@@ -102,12 +102,12 @@ SWIGEXEC=swig
# #
# python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()" # python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()"
# python -c "import numpy ; print numpy.get_include()" # python -c "import numpy ; print numpy.get_include()"
# #
# or, for Python 3, with # or, for Python 3, with
# #
# python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())" # python3 -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())"
# python3 -c "import numpy ; print(numpy.get_include())" # python3 -c "import numpy ; print(numpy.get_include())"
# #
PYTHONCFLAGS=-I/usr/include/python2.7/ -I/usr/lib64/python2.7/site-packages/numpy/core/include/ PYTHONCFLAGS=-I/usr/include/python2.7/ -I/usr/lib64/python2.7/site-packages/numpy/core/include/
...@@ -138,7 +138,7 @@ NVCCFLAGS= $(CUDAFLAGS) \ ...@@ -138,7 +138,7 @@ NVCCFLAGS= $(CUDAFLAGS) \
-ccbin $(CC11) -DFAISS_USE_FLOAT16 -ccbin $(CC11) -DFAISS_USE_FLOAT16
# BLAS LD flags for nvcc (used to generate an executable) # BLAS LD flags for nvcc (used to generate an executable)
# if BLASLDFLAGS contains several flags, each one may # if BLASLDFLAGS contains several flags, each one may
# need to be prepended with -Xlinker # need to be prepended with -Xlinker
BLASLDFLAGSNVCC=-Xlinker $(BLASLDFLAGS) BLASLDFLAGSNVCC=-Xlinker $(BLASLDFLAGS)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Tested on macOS Sierra (10.12.2) with llvm installed using Homebrew (https://brew.sh) # Tested on macOS Sierra (10.12.2) with llvm installed using Homebrew (https://brew.sh)
# brew install llvm # brew install llvm
CC=/usr/local/opt/llvm/bin/clang++ CC=/usr/local/opt/llvm/bin/clang++
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -Dnullptr=NULL -I/usr/local/opt/llvm/include -Doverride= CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -Dnullptr=NULL -I/usr/local/opt/llvm/include -std=c++11
LDFLAGS=-g -fPIC -fopenmp -L/usr/local/opt/llvm/lib LDFLAGS=-g -fPIC -fopenmp -L/usr/local/opt/llvm/lib
# common mac flags # common mac flags
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# port install g++-mp-6 # port install g++-mp-6
CC=/opt/local/bin/g++-mp-6 CC=/opt/local/bin/g++-mp-6
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -Doverride= CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -std=c++11
LDFLAGS=-g -fPIC -fopenmp LDFLAGS=-g -fPIC -fopenmp
......
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