Skip to content

Commit

Permalink
moved call to omp to the proper location
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathalie Vialaneix committed Sep 16, 2024
1 parent 12e9dd8 commit 4859da5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/adjClustFast.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// #define ARMA_64BIT_WORD 1
#include <RcppArmadillo.h>
#if defined(_OPENMP)
#include <omp.h>
#endif
// [[Rcpp::depends(RcppArmadillo)]]

// write RcppExports.R with:
Expand Down Expand Up @@ -86,7 +89,6 @@ arma::mat matL_sparse_rowCumsums(const arma::SpMat<double> & Csq, const int & h,
arma::mat out(p, h+1, arma::fill::zeros);

#if defined(_OPENMP)
#include <omp.h>
#pragma omp parallel for num_threads(nthreads)
#endif

Expand Down Expand Up @@ -127,7 +129,6 @@ arma::mat matL_full_rowCumsums(const arma::mat & Csq, const int & h, int nthread
arma::mat out(p, h+1, arma::fill::zeros);

#if defined(_OPENMP)
#include <omp.h>
#pragma omp parallel for num_threads(nthreads)
#endif

Expand Down Expand Up @@ -220,7 +221,6 @@ arma::mat matR_sparse_rowCumsums(const arma::SpMat<double> & Csq, const int & h,
arma::mat out(p, h+1, arma::fill::zeros);

#if defined(_OPENMP)
#include <omp.h>
#pragma omp parallel for num_threads(nthreads)
#endif

Expand Down Expand Up @@ -259,7 +259,6 @@ arma::mat matR_full_rowCumsums(const arma::mat & Csq, const int & h, int nthread
arma::mat out(p, h+1, arma::fill::zeros);

#if defined(_OPENMP)
#include <omp.h>
#pragma omp parallel for num_threads(nthreads)
#endif

Expand Down

0 comments on commit 4859da5

Please sign in to comment.