[Rcpp-commits] r2072 - pkg/Rcpp/inst/examples/ConvolveBenchmarks

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Sep 4 18:52:16 CEST 2010


Author: edd
Date: 2010-09-04 18:52:15 +0200 (Sat, 04 Sep 2010)
New Revision: 2072

Modified:
   pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve3_cpp.cpp
Log:
remove loop to set memory of new vector to zero


Modified: pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve3_cpp.cpp
===================================================================
--- pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve3_cpp.cpp	2010-09-03 16:51:24 UTC (rev 2071)
+++ pkg/Rcpp/inst/examples/ConvolveBenchmarks/convolve3_cpp.cpp	2010-09-04 16:52:15 UTC (rev 2072)
@@ -12,7 +12,6 @@
     int nab = n_xa + n_xb - 1;
     Rcpp::NumericVector xab(nab);
 
-    for (int i = 0; i < nab; i++) xab[i] = 0.0;
     for (int i = 0; i < n_xa; i++)
         for (int j = 0; j < n_xb; j++) 
             xab[i + j] += xa[i] * xb[j];



More information about the Rcpp-commits mailing list