diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-18 17:34:07 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-18 17:34:07 +0100 |
commit | 3f82e644c40def869a5b5d294573982cec7b057c (patch) | |
tree | adfe466f1d819b490d2a66e6dff06343b21db22f /dist.cpp | |
parent | 796fba5f7fa7514719d9c58c99cc2f41cf5ece47 (diff) |
ProjectionObserver & dist(): using more cores in computations.
Diffstat (limited to 'dist.cpp')
-rw-r--r-- | dist.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -10,6 +10,7 @@ arma::mat mp::dist(const arma::mat &X, mp::DistFunc dfunc) arma::uword n = X.n_rows; arma::mat D(n, n, arma::fill::zeros); + #pragma omp parallel for shared(X, D) for (arma::uword i = 0; i < n; i++) { for (arma::uword j = 0; j < i; j++) { D(i, j) = dfunc(X.row(i), X.row(j)); |