-wien.ac.at [mailto:
> [email protected]] On Behalf Of Dirk Eddelbuettel
> > Sent: Wednesday, April 17, 2013 9:17 AM
> > To: [email protected]
> > Cc: [email protected]
> > Subject: Re: [Rcpp-devel] Best way to compute M'M if M i
April 17, 2013 9:17 AM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [Rcpp-devel] Best way to compute M'M if M is triangular using
> RcppArmadillo
>
>
> On 17 April 2013 at 14:24, F.Tusell wrote:
> | Not a question strictly abou
On Wed, Apr 17, 2013 at 10:24 PM, F.Tusell wrote:
> SEXP Prod1(SEXP M_) {
> const mat M = as(M_) ;
> mat prodM = M ;
> prodM = trans(M) * M ;
> return(wrap(prodM)) ;
> }
Why are you making a copy of M (as prodM) before doing the multiplication ?
Why not just directly do "mat prodM = M.t(
l Message-
From: [email protected]
[mailto:[email protected]] On Behalf Of Dirk Eddelbuettel
Sent: Wednesday, April 17, 2013 9:17 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Rcpp-devel] Best way to compute M&
On 17 April 2013 at 14:24, F.Tusell wrote:
| Not a question strictly about Rcpp but hope this is a right
| place to ask.
|
| I am trying to find out what is the fastest possible way to compute
| M'M for M upper triangular. I have coded,
|
| // [[Rcpp::export]]
| SEXP Prod1(SEXP M_) {
| const