inst/tests/test.R

require(cxxfunplus)
dso <- cxxfunctionplus(signature(x = "integer", y = "numeric"), 
                       'return ScalarReal(INTEGER(x)[0] * REAL(y)[0]);', 
                       save.dso = TRUE)
show(dso) 
fx <- grab.cxxfun(dso)
fx(3L, 4)

Try the cxxfunplus package in your browser

Any scripts or data that you put into this service are public.

cxxfunplus documentation built on Aug. 23, 2023, 9:06 a.m.