MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / convolve11cpp

Function convolve11cpp

inst/examples/ConvolveBenchmarks/convolve11_cpp.cpp:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9
10RcppExport SEXP convolve11cpp(SEXP a, SEXP b) {
11 NumericVector xa(a); int n_xa = xa.size() ;
12 NumericVector xb(b); int n_xb = xb.size() ;
13 NumericVector xab(n_xa + n_xb - 1,0.0);
14
15 Range r( 0, n_xb-1 );
16 for(int i=0; i<n_xa; i++, r++){
17 xab[ r ] += noNA(xa[i]) * noNA(xb) ;
18 }
19 return xab ;
20}
21
22#include "loopmacro.h"
23LOOPMACRO_CPP(convolve11cpp)

Callers

nothing calls this directly

Calls 2

noNAFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected