[mlpack-git] master: Restores size_t for openMP loop counters, changes CmakeLists to require OpenMP version 3 (074d726)
gitdub at mlpack.org
gitdub at mlpack.org
Fri Jul 8 05:35:59 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/34cf8d94f79c9a72ff4199676033b060cd039fcd...425324bf7fb7c86c85d10a909d8a59d4f69b7164
>---------------------------------------------------------------
commit 074d7267a1926c5af9732dc47142af9a5a179f48
Author: Yannis Mentekidis <mentekid at gmail.com>
Date: Fri Jul 8 10:35:59 2016 +0100
Restores size_t for openMP loop counters, changes CmakeLists to require OpenMP version 3
>---------------------------------------------------------------
074d7267a1926c5af9732dc47142af9a5a179f48
CMakeLists.txt | 6 +++---
src/mlpack/methods/lsh/lsh_search_impl.hpp | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63407e6..84b3245 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,8 +18,8 @@ endif()
# First, define all the compilation options.
# We default to debugging mode for developers.
-option(DEBUG "Compile with debugging information." ON)
-option(PROFILE "Compile with profiling information." ON)
+option(DEBUG "Compile with debugging information." OFF)
+option(PROFILE "Compile with profiling information." OFF)
option(ARMA_EXTRA_DEBUG "Compile with extra Armadillo debugging symbols." OFF)
option(MATLAB_BINDINGS "Compile MATLAB bindings if MATLAB is found." OFF)
option(TEST_VERBOSE "Run test cases with verbose output." OFF)
@@ -237,7 +237,7 @@ add_definitions(-DBOOST_TEST_DYN_LINK)
# This way we can skip calls to functions defined in omp.h with code like:
# if (HAS_OPENMP == 1) { openMP code here }
# If OpenMP is found, define HAS_OPENMP to be 1. Otherwise define it to be 0.
-find_package(OpenMP)
+find_package(OpenMP 3)
if (OPENMP_FOUND)
add_definitions(-DHAS_OPENMP)
set(HAS_OPENMP "1")
diff --git a/src/mlpack/methods/lsh/lsh_search_impl.hpp b/src/mlpack/methods/lsh/lsh_search_impl.hpp
index 6e125a7..cbbcb81 100644
--- a/src/mlpack/methods/lsh/lsh_search_impl.hpp
+++ b/src/mlpack/methods/lsh/lsh_search_impl.hpp
@@ -850,7 +850,7 @@ void LSHSearch<SortPolicy>::Search(const arma::mat& querySet,
schedule(dynamic)
// Go through every query point. Use long int because some compilers complain
// for openMP unsigned index variables.
- for (long long int i = 0; i < querySet.n_cols; i++)
+ for (size_t i = 0; i < querySet.n_cols; i++)
{
// Hash every query into every hash table and eventually into the
@@ -922,7 +922,7 @@ Search(const size_t k,
schedule(dynamic)
// Go through every query point. Use long int because some compilers complain
// for openMP unsigned index variables.
- for (long long int i = 0; i < referenceSet->n_cols; i++)
+ for (size_t i = 0; i < referenceSet->n_cols; i++)
{
// Hash every query into every hash table and eventually into the
// 'secondHashTable' to obtain the neighbor candidates.
More information about the mlpack-git
mailing list