Re: [Rd] invoking R function in C++ in parallel

2015-01-31 Thread Zheng Da
Thank you both. I think I have got the answer I need. I'll need to turn to another direction to search for my solution. Best, Da On Sat, Jan 31, 2015 at 8:32 PM, Dirk Eddelbuettel wrote: > > On 31 January 2015 at 19:29, Gábor Csárdi wrote: > | On Sat, Jan 31, 2015 at 7:05 PM, Dirk Eddelbuettel

[Rd] invoking R function in C++ in parallel

2015-01-31 Thread Zheng Da
Hello, I'm writing an R extension in C++. In the extension, I want to invoke an R function directly and it works when I use Rcpp in the serial code. But what I really want is to invoke the R function in parallel with openmp. When I do so, I got segmentation fault. I remember someone said that R i

Re: [Rd] How to maintain memory in R extension

2014-11-12 Thread Zheng Da
Thank you, Gabor and Martin. It helps a lot. Da On Wed, Nov 12, 2014 at 1:20 PM, Martin Morgan wrote: > On 11/12/2014 05:36 AM, Zheng Da wrote: >> >> Hello, >> >> I wrote a system to perform data analysis in C++. Now I am integrating >> it to R. I need to al

[Rd] How to maintain memory in R extension

2014-11-12 Thread Zheng Da
Hello, I wrote a system to perform data analysis in C++. Now I am integrating it to R. I need to allocate memory for my own C++ data structures, which can't be represented by any R data structures. I create a global hashtable to keep a reference to the C++ data structures. Whenever I allocate one,