Questions tagged [rcppparallel]

RcppParallel provides a system for R programmers to easily develop portable parallel algorithms.

The RcppParallel homepage contains usage instructions and examples.

53 questions
0
votes
1 answer

Rcpp::Function in parellel for section

I am trying to parallelize for cycle computing fitness value of individuals. For this whole algorithm I am using Rcpp, but fitness function is passed from R. So I am trying to do something like this: #pragma omp parallel for for (int i = 0; i <…
P. Soltes
  • 38
  • 7
0
votes
0 answers

Nested namespaces in Rcpp

I have a working R package including the necessary R/Cpp working. My question here is more of a 'good practices' when using nested namespace. Currently, my package has; 1) cost functions, 2) optimization functions, 3) parallel workers that call the…
skatz
  • 115
  • 7
0
votes
1 answer

Apply function to multiple groups using Rcpp and R function

I'm trying to apply a function to multiple groups/id's in r using the foreach package. It's taking forever to run using parallel processing via %dopar%, so I was wondering if it's possible to run the apply or for loop portion in c++ via rcpp or…
user2566907
  • 99
  • 10
0
votes
1 answer

std::mt19937 in Rcpp

This problem arose from testing my R (RcppParallel) package on windows through the win-builder-r, as for my mac there is not a problem. "error: 'mt19937' is not a member of 'std'" Additionally, this error comes…
skatz
  • 115
  • 7
0
votes
0 answers

Can we pass Rcpp::List or a vector of vectors to RcppParallel function?

I have an R list which I convert to vector of vectors in Rcpp. Now I want to use RcppParallel to use multiple cores. Can I pass such a list or vector of vectors to RcppParallel similar to IntegerMatrix or IntegerVectors?
user8401743
  • 110
  • 8
0
votes
2 answers

Threadsafe function pointer with Rcpp and RcppParallel via std::shared_ptr

I would like to use a threadsafe function pointer to be applied in an RcppPrallel worker. But I have already problems with this tiny example. No matter if I use it in a package and add SystemRequirements: C++11 in the DESCRIPTION file, or use it in…
maxatSOflow
  • 269
  • 3
  • 10
0
votes
1 answer

Rcppparallel bootstrap

I presume, or rather hope, that I have a singular fixable problem or perhaps many smaller ones and should give up. Either way I am relatively new to Rcpp and extremely uninformed on parallel computation and can't find a solution online. The problem…
skatz
  • 115
  • 7
0
votes
0 answers

My Rcpp code delays to show printed message

I have a Rcpp code inside of which I have a message to be printed out as: "The no. of iteration is ---" after each 100 iteration. For this I used the code: Rcout << "The number of iteration is : " << t << "\n"; The problem with this code is that…
gultu
  • 143
  • 10
1 2 3
4