[mlpack-git] master: delete include omp statement (4c28ae3)
gitdub at mlpack.org
gitdub at mlpack.org
Sun Jun 19 12:04:38 EDT 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/2da9c5bac14a00145c757b8139c245913b86e034...a7e8d3bac60d6aa2717f27e0d4f6c53ff20607f5
>---------------------------------------------------------------
commit 4c28ae3ca96b55f4bf00e59db6bb2eda846a61b6
Author: Keon Kim <kwk236 at gmail.com>
Date: Mon Jun 20 01:04:38 2016 +0900
delete include omp statement
>---------------------------------------------------------------
4c28ae3ca96b55f4bf00e59db6bb2eda846a61b6
src/mlpack/core/data/binarize.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/core/data/binarize.hpp b/src/mlpack/core/data/binarize.hpp
index 6a90db6..c76ec56 100644
--- a/src/mlpack/core/data/binarize.hpp
+++ b/src/mlpack/core/data/binarize.hpp
@@ -9,7 +9,6 @@
#define MLPACK_CORE_DATA_BINARIZE_HPP
#include <mlpack/core.hpp>
-#include <omp.h>
namespace mlpack {
namespace data {
@@ -82,9 +81,10 @@ void Binarize(const arma::Mat<T>& input,
const size_t dimension)
{
output = input;
+ const int totalCols = static_cast<int>(input.n_cols);
#pragma omp parallel for
- for (int i = 0; i < input.n_cols; ++i)
+ for (int i = 0; i < totalCols; ++i)
{
if (input(dimension, i) > threshold)
output(dimension, i) = 1;
More information about the mlpack-git
mailing list