hi. i normally build under macosx, but trying to track down a memory
problem have started using (the wonderful) valgrind under linux. the
linux machine has a newer g++ (4.7.2 versus 4.2.1). the compiler on the
linux machine was giving me warnings like:
warning: deleting object of polymorphi
hi. a little more on this same subject.
let's say one RCPP_EXPORT_CLASS's two classes: a and b, and let's say
that b contains some number of a's (as std::vector, say).
then, the following appear to be true:
1. if you pass one of the a's from a b object to a method of a, the
a object is *copied
hi. i have been trying to understand how to pass objects back and forth
by reference (in order to avoid copying). this works smoothly if one is
calling a method on the object. but, i was having trouble figuring this
out for "free functions" (i.e., non-member functions, i.e.,
non-methods). the t
Dirk,
thanks for the reply. i'll think about Nice Additions as i become more
familiar with the magic of Rcpp. i would guess, since reference classes
can make it, so can pass-by-value S4 objects.
> In general, though, it helps to remember that we have to play the hand
> we've been dealt. This i
hi. the Rcpp-modules document, section 2.2.2, mentions that one can
write a routine to disambiguate between different constructors taking
the same number of arguments.
i wonder, in the case one has *not* provided such a disambiguator, would
it be possible to offer up an error message, maybe at co
hi. i'm having a grand time with Rcpp. (though it's amazing how
annoying procedural+non-REPL languages have become in the last decade
that i've ignored them! ;-)
in my application, some of my classes are a good fit for reference
classes (large arrays). however, some of my classes are better as
(since i've just been here...)
.../unitTests/runit.Vector.R has these tests:
test.List.erase <- function(){
fun <- list_erase
d <- list( x = 1:10, y = letters[1:10] )
checkEquals(fun(d),
list( y = letters[1:10] ),
msg = "List.erase" )
}
test.List.e
hi. i am again reporting some finding. (please let me know if this is
not an appropriate use of the list)
my question was, if i want to return from C++ an R list of reference
objects (i.e., i'm using Rcpp::Module), how would i do that?
the little test below appears to do this.
cheers.
t
hi. this is just me reporting on a learning exercise, in case it might
be of help to someone else. the summary is that one might need to
expose the types of member classes (in particular, *vector* types) of
classes that are being exported with the RCPP_EXPOSED_CLASS directive.
in compiling the f
hi. the scenario is use cxxfunction to create a module, load it, use it
minimally, then *re*-load the module (by mistake -- well, actually,
after a failed compile of modified code), attempt to use it. the result
is
*** caught segfault ***
address 0xd8, cause 'memory not mapped'
Traceback:
hi, all. i've had great success speeding up my computations using
Rcpp/C++. (thanks to the list for the help getting up and running.)
but...
now, when i scale up (from a 554x415 matrix to a 2592x1936 matrix), my
run time slows down, and experimenting, it seems it's the cost of
copying my datase
> Fixed in rev 4273 -- thanks for the detailed and reproducible bug
> report!
great -- thanks!!
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Dirk,
> Show reprocucible errors, or the mail doesn't exist ;-)
works for me! (**) build the example skeleton with attributes=FALSE, "R
CMD build", install.packages(), library(), run rcpp_hello_world(), note
that a list with two items (each a 2 element vector) is returned. (or,
just enter rcpp_h
hi. if i Rcpp.package.skeleton(), i get this single R file,
anRpackage/R/rcpp_hello_world.R:
rcpp_hello_world <- function(){
.Call( "rcpp_hello_world", PACKAGE = "anRpackage" )
}
on the other hand, if i Rcpp.package.skeleton(attributes=TRUE), i get
two R files: RcppExports.R and
J J,
thanks. actually, if you track the source file line number, and inject
"#line" directives around your injections, you don't need to rewrite
error messages.
e.g., let's say we're at line number 77 of file cluster.cc, and we see:
// [[Rcpp::export]]
int int_lots_in_one_out(std::list il)
Dirk,
thanks for being tolerant of newbie confusion.
i *am* looking at some other issue, though as it's in template-land, and
i've lived a temperate template-free life heretofore, i may have to
declare defeat. stay tuned.
>| 2. alternatively, could you parse the output of "g++ -E" (rather
>| t
JJ,
thanks for the reply. i'm very sympathetic to not wanting to bundle a
full-on C++ parser. two things i wonder:
1. could you, on seeing the [[Rcpp::export]], parse the succeeding
function, then output your conversion code block, then output the lines
(that you've already partially parsed) f
hi. first, i should mention that i think Rcpp is amazing! i'm enjoying
the learning process, and it speeds up my formerly-R code greatly.
(some trivial image processing thing that i was only doing in R in order
to combine two learning activities into one.)
but... ;-)
if i sourceCpp() the follow
hi. another "find" in experimenting is that [[Rcpp::export]] and the
RcppExport (in, e.g.,
// [[Rcpp::export]]
RcppExport SEXP pass1(Rcpp::IntegerVector rgbtotype,
Rcpp::IntegerMatrix pixmap,
int toosmall) {...}
are mutually exclusive. that's
hi. i'm trying to understand the difference between using sourceCpp()
and using R CMD compile/shlib. (i seem to get different results using
the different methods.) if that's an FAQ, apologies, but any
enlightenment would be appreciated!
experimenting, i ran into this problem that i haven't seen
20 matches
Mail list logo