[Rcpp-devel] Passing an exposed function to another C++ function as a parameter

2011-08-02 Thread Manuel Castejón Limas
Dear all, I'm rewriting the AMORE package using Rcpp --- in fact it's more like I'm having a lot of fun while rewriting the AMORE package thanks to Rcpp. Nevertheless, I'm facing this little problem that I hope it would be pretty easy for you to solve. Let's consider the C++ function Tanh_f0 d

Re: [Rcpp-devel] Pointer troubles

2011-08-02 Thread Dirk Eddelbuettel
Hi Willem, Thanks a pretty long and complicated post. Could we possibly break it down into smaller pieces? On 2 August 2011 at 11:45, Willem Ligtenberg wrote: | Hi, | | I am trying to wrap around OpenCL. | But I am running into some problems when I try to return pointers to | R. Later I want t

[Rcpp-devel] Pointer troubles

2011-08-02 Thread Willem Ligtenberg
Hi, I am trying to wrap around OpenCL. But I am running into some problems when I try to return pointers to R. Later I want to be able to use these pointers in other c functions. As an example I have the following code: #include "createContext.h" #include #include // Stuff to expose the cl_pla

Re: [Rcpp-devel] wrap returned pointer to class

2011-08-02 Thread romain
Ah, I need to think about this. Will give you an update if i manage to deal with it. Romain Le 2 août 2011 à 11:24, Sebastian Weber a écrit : > Hi! > > The solution you point out there is exactly what I need - but without class > intrusion. The class I am wrapping is not under my control

Re: [Rcpp-devel] wrap returned pointer to class

2011-08-02 Thread Sebastian Weber
Hi! The solution you point out there is exactly what I need - but without class intrusion. The class I am wrapping is not under my control, but belongs to a third party. Or does your solution apply also in a non-intrusive case which I overlooked? Cheers, Sebastian Am 02.08.2011 um 11:10 schr

Re: [Rcpp-devel] wrap returned pointer to class

2011-08-02 Thread romain
Hello sebastian, I think what you are looking for is covered by some enhancements i added recently and described in this thread: http://thread.gmane.org/gmane.comp.lang.r.rcpp/2092 Romain Le 1 août 2011 à 18:07, Sebastian Weber a écrit : > Hi, > > first of all thank you, Dirk and Romain