explorations/copyArray.R

library(RLLVMCompile)

copyDoubleArray =
function(src, n)
{
    ans = numeric(n)
    for(i in 1:n)
        ans[i] = src[i]
    ans
}

cp = compileFunction(copyDoubleArray, REALSXPType, list(DoublePtrType, Int32Type))
duncantl/R2llvm documentation built on May 14, 2019, 9:42 a.m.