[Rcpp-commits] r1586 - pkg/Rcpp/inst/examples/ConvolveBenchmarks
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jun 17 23:21:15 CEST 2010
Author: romain
Date: 2010-06-17 23:21:14 +0200 (Thu, 17 Jun 2010)
New Revision: 1586
Modified:
pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve4_cpp.cpp
Log:
cosmetic change
Modified: pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve4_cpp.cpp
===================================================================
--- pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve4_cpp.cpp 2010-06-17 21:18:24 UTC (rev 1585)
+++ pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve4_cpp.cpp 2010-06-17 21:21:14 UTC (rev 1586)
@@ -10,13 +10,12 @@
int n_xa = xa.size() ;
int n_xb = xb.size() ;
int nab = n_xa + n_xb - 1;
- Rcpp::NumericVector xab(nab);
+ Rcpp::NumericVector xab(nab,0.0);
double* pa = xa.begin() ;
double* pb = xb.begin() ;
double* pab = xab.begin() ;
int i,j=0;
- for (i = 0; i < nab; i++) pab[i] = 0.0;
for (i = 0; i < n_xa; i++)
for (j = 0; j < n_xb; j++)
pab[i + j] += pa[i] * pb[j];
More information about the Rcpp-commits
mailing list