Re: [Rcpp-devel] Using Rcpp::Function in parallel with TBB mutex lock & a reference.

2025-02-10 Thread Kumar MS
Thank you very much for the clear answers, Dirk! They greatly help! Cheers, Kumar On Sat, Feb 8, 2025 at 1:17 PM Dirk Eddelbuettel wrote: > > On 7 February 2025 at 14:01, Kumar MS wrote: > | Thank you Dirk. Your observation is correct. I am left with two > questions. As &

Re: [Rcpp-devel] Using Rcpp::Function in parallel with TBB mutex lock & a reference.

2025-02-07 Thread Kumar MS
Thank you Dirk. Your observation is correct. I am left with two questions. As always, I appreciate your answers. 1. Except for this single step of calling an R function (model matrix-like objects that are being created by an external library in R), all my other computations are now implemented in

[Rcpp-devel] Using Rcpp::Function in parallel with TBB mutex lock & a reference.

2025-02-07 Thread Kumar MS
Hello Rcpp developers, The following R/Rcpp code attempts to take in a data frame, a model formula (passed as string), and uses Rcpp::Function to call R's model matrix function to create model matrices B times in parallel. Each time a model matrix is created, it is formed after permuting a given

[Rcpp-devel] Operating on sparse matrices in a list.

2024-12-11 Thread Kumar MS
Hello Rcpp developers, The following simple code attempts to instantiate every sparse matrix in a given R list of sparse matrices ("dgCMatrix"). The code compiles OK, but crashes at runtime with a segmentation fault. I followed the as<> approach outlined in https://gallery.rcpp.org/articles/dynam