Le 07/04/11 05:07, Christian Gunning a écrit :
The issue is that when calling wrap it creates an unprotected SEXP, and
Rcpp is not responsible for these. If the programmer passes an
unprotected SEXP to ::create, it is his responsability to protect it.
Just to clarify -- in the case of a naive u
Thank you, Romain. Looks like your simple workaround fixes all my problems.
Günter
On Apr 6, 2011, at 6:22 AM, Romain Francois wrote:
> H. I'm afraid I can't fix this.
>
> Here is the story: both wrap(X) and wrap(X) create a new SEXP and allocate
> memory. When wrap(Y) is called, s
> The issue is that when calling wrap it creates an unprotected SEXP, and
> Rcpp is not responsible for these. If the programmer passes an
> unprotected SEXP to ::create, it is his responsability to protect it.
Just to clarify -- in the case of a naive user who's not protecting
objects: a single w
Le 06/04/11 17:12, Davor Cubranic a écrit :
To make it harder for users to shoot themselves in the foot with 'List::create(Named("x") =
wrap(X), ...', is it possible to make it simply illegal to assign an explicit "wrap" to a
"Named"? This would force everyone to use implicit wraps, which as yo
To make it harder for users to shoot themselves in the foot with
'List::create(Named("x") = wrap(X), ...', is it possible to make it simply
illegal to assign an explicit "wrap" to a "Named"? This would force everyone to
use implicit wraps, which as you said are safe.
Davor
On 2011-04-06, at 4:
H. I'm afraid I can't fix this.
Here is the story: both wrap(X) and wrap(X) create a new SEXP and
allocate memory. When wrap(Y) is called, since the created object is
large, R calls the GC to collect unprotected SEXP to free some space. So
my guess is that at that point the SEXP that i
Good news. I can reproduce it.
Bas news. This is likely a PROTECT problem with the Rcpp::List constructor.
Wearing my bugbuster costume, and getting ready for a fight.
Romain
Le 07/03/11 23:03, "Günter J. Hitsch" a écrit :
I'm new to Rcpp and RcppArmadillo---so far I like it a lot! Thanks to
On 8 March 2011 at 14:50, baptiste auguie wrote:
| I get the same incorrect results as Günter for both the and
| versions.
Ack, thanks for the confirmation.
Maybe Romain has a chance to take a look as I do not have a Mac handy.
Dirk
--
Dirk Eddelbuettel | [email protected] | http://dirk.edd
Hi,
I get the same incorrect results as Günter for both the and
versions.
Cheers,
baptiste
sessionInfo()
R version 2.12.2 Patched (2011-03-02 r54645)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets gr
Hi Guenter,
On 7 March 2011 at 16:03, "Günter J. Hitsch" wrote:
|
| I'm new to Rcpp and RcppArmadillo---so far I like it a lot! Thanks to the
| developers for their good work.
|
| I run into a peculiar kind of problem when I try to pass a "large" Armadillo
| object back to R. Here's some code
I'm new to Rcpp and RcppArmadillo---so far I like it a lot! Thanks to the
developers for their good work.
I run into a peculiar kind of problem when I try to pass a "large" Armadillo
object back to R. Here's some code to replicate the problem in stylized form:
extern "C" SEXP testFun(SEXP L
11 matches
Mail list logo