aboutsummaryrefslogtreecommitdiff
path: root/dist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dist.cpp')
-rw-r--r--dist.cpp1
1 files changed, 1 insertions, 0 deletions
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));