Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-21 Thread Dillon Hammill
__ From: Dirk Eddelbuettel Sent: Wednesday, 18 August 2021 11:40 AM To: Dillon Hammill Cc: Dirk Eddelbuettel ; rcpp-devel@lists.r-forge.r-project.org Subject: Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel On 18 August 2021 at 01:26, Dillon Hammill wrote: | Thanks for your help D

Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-17 Thread Dillon Hammill
From: Dirk Eddelbuettel Sent: Wednesday, 18 August 2021 5:37 AM To: Dillon Hammill Cc: Dirk Eddelbuettel ; rcpp-devel@lists.r-forge.r-project.org Subject: Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel On 17 August 2021 at 19:19, Dillon Hammill wrote

Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-17 Thread Dirk Eddelbuettel
On 18 August 2021 at 01:26, Dillon Hammill wrote: | Thanks for your help Dirk, I think I have everything I need to get things working now. I just needed a push in the right direction to discover wrap and as from Rcpp - they are awesome! They are indeed. (And, if I may, feature prominently in t

Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-17 Thread Dillon Hammill
-devel@lists.r-forge.r-project.org Subject: Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel Thanks Dirk. Please correct me if I am wrong, but does this mean that my Rcpp functions should be written using standard STL objects too - and I just include wrappers to handle conversion of the inp

Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-17 Thread Dillon Hammill
ubject: Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel Dillon, The point of RMatrix and RVector in RcppParallel is to shield objects inside the RcppParallel blocks using Intel TBB from any interaction with the outer R process which may, or may not, run a gc() to rearrange its memory.

Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-17 Thread Dirk Eddelbuettel
On 17 August 2021 at 19:19, Dillon Hammill wrote: | What is the easiest way to perform this conversion (say for vector to RVector or vector of vectors to matrix)? I always find that the existing RcppParallel that JJ and Kevin set up years ago excels there. Study them, they do it right, they wor

[Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-17 Thread Dillon Hammill
Hi everyone, Apologies if this is the wrong place to ask for help with Rcpp/RcppParallel. I have recently began using Rcpp and RcppParallel to speed up an algorithm that I have written in R ( I still have a lot to learn!). I have had no issues converting my R code into Rcpp code, but I am strug

Re: [Rcpp-devel] Apply Defined Rcpp Functions In Parallel

2021-08-17 Thread Dirk Eddelbuettel
Dillon, The point of RMatrix and RVector in RcppParallel is to shield objects inside the RcppParallel blocks using Intel TBB from any interaction with the outer R process which may, or may not, run a gc() to rearrange its memory. Where they work, you should not use Rcpp's own NumericMatrix and a