[Rcpp-devel] Default empty values for vector and matrices

2014-02-17 Thread Alessandro Mammana
Dear all, I am trying to write an Rcpp function that accepts optionally a vector, but I cannot figure out what default value I should give to it. First I tried the following: // [[Rcpp::export]] int nilVec(NumericVector v = R_NilValue){ int sum = 0; for (int i = 0; i < v.length(); ++i){

Re: [Rcpp-devel] Default empty values for vector and matrices

2014-02-17 Thread Romain Francois
Le 17 févr. 2014 à 12:17, Alessandro Mammana a écrit : > Dear all, > I am trying to write an Rcpp function that accepts optionally a > vector, but I cannot figure out what default value I should give to > it. > > First I tried the following: > > // [[Rcpp::export]] > int nilVec(NumericVector v

Re: [Rcpp-devel] Profiling Rcpp compiled through sourceCpp or cxxfunction

2014-02-17 Thread Luke.Domanski
That's fine, Just wanted to double check given that once an email on a mailing list is a few days old, it is unlikely that people will find and comment on it. Once I figure it out I'll report back with the solution. Cheers, Luke. > From: Dirk Eddelbuettel [mailto:e...@debian.org] > Sent: Monda

Re: [Rcpp-devel] Profiling Rcpp compiled through sourceCpp or cxxfunction

2014-02-17 Thread Dirk Eddelbuettel
On 17 February 2014 at 19:57, luke.doman...@csiro.au wrote: | That's fine, | | Just wanted to double check given that once an email on a mailing list is a few days old, it is unlikely that people will find and comment on it. | | Once I figure it out I'll report back with the solution. That wou

Re: [Rcpp-devel] Profiling Rcpp compiled through sourceCpp or cxxfunction

2014-02-17 Thread Luke.Domanski
I'll try my best :). If worse comes to I install Google Perftools locally to solve my immediate need. But ultimately my colleagues and I will need to come up with a workflow for use/installation/recommendation on organisation wide shared systems where commercial profilers are already installed.