Re: [Rcpp-devel] Slices of 3d arrays as matrices

2012-10-24 Thread Douglas Bates
On Wed, Oct 24, 2012 at 11:14 AM, Giovanni Petris wrote: > Hi Doug, > > Thank you for your answer and for your patience reading my confusing code. I > have read the jss paper on RcppEigen and the Eigen tutorial. I am very > excited about the opportunities that RcppEigen (and Rcpp) gives to the R

Re: [Rcpp-devel] R/Rcpp/RcppEigen Optimization WAS: NumericVector Double mismatch when indexing an array

2012-10-24 Thread Douglas Bates
On Tue, Oct 23, 2012 at 6:01 PM, Darren Cook wrote: >> What gives? What I found that does speed up the code dramatically >> is the -march switch. I guess that can't be repo-ed because it is >> CPU dependent, right? Here's the important settings that I used to >> compile R from source: >> >> CC=

Re: [Rcpp-devel] Slices of 3d arrays as matrices

2012-10-24 Thread Giovanni Petris
Hi Doug, Thank you for your answer and for your patience reading my confusing code. I have read the jss paper on RcppEigen and the Eigen tutorial. I am very excited about the opportunities that RcppEigen (and Rcpp) gives to the R programmer. Thank you so much for the very useful contribution!

Re: [Rcpp-devel] Slices of 3d arrays as matrices

2012-10-24 Thread Douglas Bates
On Tue, Oct 23, 2012 at 5:52 PM, Giovanni Petris wrote: > Thank you Doug and Dirk. > > I was afraid I had to move to Eigen... The problem now is that in the > transition I am working with matrices both of type NumericMatrix and > Map. > > The following snippet is a loop that is giving me trouble