Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Steven Varga
t;> Gesendet über den BlackBerry® Service von E-Plus. >> >> -Original Message- >> From: Steven Varga >> Sender: rcpp-devel-bounces@lists.r-forge.r-project.orgDate: Mon, 25 Nov >> 2013 23:23:24 >> To: >> Reply-To: steven.va...@gmail.com >>

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Steven Varga
23:23:24 > To: > Reply-To: steven.va...@gmail.com > Subject: Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary > memory > > ___ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Steven Varga
Thanks a lot again; I will look at the views and see how that works out. The matrix size is not modified inside of a layer but the content only (gradient) while the optimizer outside of the instances modifies the weight matrix accoding to gradients. Storing all layers gradients and weights at one

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread Dirk Eddelbuettel
Hi Steven On 25 November 2013 at 23:23, Steven Varga wrote: | Thank you Dirk for the quick response; | and for noting the memory handling. | | I am aware of it and there are other ways of obtaining a pointer to some memory | location. I used malloc/free to put focus on arma::mat copying data du

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-26 Thread szehnder
fast. Best Simon Gesendet über den BlackBerry® Service von E-Plus. -Original Message- From: Steven Varga Sender: rcpp-devel-bounces@lists.r-forge.r-project.orgDate: Mon, 25 Nov 2013 23:23:24 To: Reply-To: steven.va...@gmail.com Subject: Re: [Rcpp-devel] RcppArmadillo matrix with writ

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-25 Thread Steven Varga
Thank you Dirk for the quick response; and for noting the memory handling. I am aware of it and there are other ways of obtaining a pointer to some memory location. I used malloc/free to put focus on arma::mat copying data during assignment and/or not able to use reference as class member. Leaving

Re: [Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-25 Thread Dirk Eddelbuettel
Steven, In a case like this I would try to set up a fist minimal working example using just plain C++, and no R. Once that works, try it with R. For Armadillo, the docs at http://arma.sourceforge.net/docs.html#Mat are your best shot. I presume you saw what it says about strict=true. Also, in

[Rcpp-devel] RcppArmadillo matrix with writeable auxiliary memory

2013-11-25 Thread Steven Varga
Hello, I am having trouble creating arma::mat with external writeable auxiliary memory as class member; ie: struct Example { Example( double *ptr ){ // . see provided minimal working example } arma::mat ExtPtr; // this is what I would like to have } What is it that I am doing wron