From 3f82e644c40def869a5b5d294573982cec7b057c Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Mon, 18 Jan 2016 17:34:07 +0100 Subject: ProjectionObserver & dist(): using more cores in computations. --- dist.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'dist.cpp') diff --git a/dist.cpp b/dist.cpp index 422aa10..0a241ec 100644 --- a/dist.cpp +++ b/dist.cpp @@ -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)); -- cgit v1.2.3