diff options
author | graehl <graehl@gmail.com> | 2015-06-25 05:12:39 +0300 |
---|---|---|
committer | graehl <graehl@gmail.com> | 2015-06-25 05:28:03 +0300 |
commit | cd9d683829f8670506dbc640712444ef9553fe6d (patch) | |
tree | 63a821260581d3bdbaa0ebaccf9b51f0468c7841 | |
parent | 28bdadf328c63ee086e8aa5de23cfe0c11728c5b (diff) |
c++11 compile
-rw-r--r-- | src/Makefile | 4 | ||||
-rw-r--r-- | src/model.cpp | 2 | ||||
-rw-r--r-- | src/neuralTM.h | 2 | ||||
-rw-r--r-- | src/trainNeuralNetwork.cpp | 2 | ||||
-rw-r--r-- | src/util.h | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile index 1611ccb..2a27405 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,12 +1,12 @@ ### Compilation options. # C++ compiler. Tested with g++ and Intel icpc. -CXX=/usr/bin/g++ +CXX=g++ #CXX=icpc # Compiler options. Note that -DEIGEN_NO_DEBUG is essential for good performance! #CFLAGS=-g -CFLAGS=-O3 -DEIGEN_NO_DEBUG -DNDEBUG +CFLAGS=-O3 -DEIGEN_NO_DEBUG -DNDEBUG $(CXXFLAGS) # Architecture. Set to x86_64 or i686 to override. ARCH:=$(shell uname -m) diff --git a/src/model.cpp b/src/model.cpp index 3767f4b..919e005 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -44,7 +44,7 @@ void model::resize(int ngram_size, premultiplied = false; } -void model::initialize(mt19937 &init_engine, +void model::initialize(boost::random::mt19937 &init_engine, bool init_normal, double init_range, double init_bias, diff --git a/src/neuralTM.h b/src/neuralTM.h index 14bc7bf..4ad6752 100644 --- a/src/neuralTM.h +++ b/src/neuralTM.h @@ -6,7 +6,7 @@ #include <cstdlib> #include <boost/shared_ptr.hpp> -#include <../3rdparty/Eigen/Dense> +#include <Eigen/Dense> #include "util.h" #include "vocabulary.h" diff --git a/src/trainNeuralNetwork.cpp b/src/trainNeuralNetwork.cpp index 97af03b..63ee27d 100644 --- a/src/trainNeuralNetwork.cpp +++ b/src/trainNeuralNetwork.cpp @@ -316,7 +316,7 @@ int main(int argc, char** argv) //unsigned seed = std::time(0); unsigned seed = 1234; //for testing only - mt19937 rng(seed); + boost::random::mt19937 rng(seed); /////////////////////////READING IN THE TRAINING AND VALIDATION DATA/////////////////// ///////////////////////////////////////////////////////////////////////////////////// @@ -271,8 +271,8 @@ extern Timer timer; #define start_timer(x) timer.start(x) #define stop_timer(x) timer.stop(x) #else -#define start_timer(x) 0 -#define stop_timer(x) 0 +#define start_timer(x) (void)0 +#define stop_timer(x) (void)0 #endif int setup_threads(int n_threads); |