tests/intDoubleLocal.R

library(RLLVMCompile)

isum =
function(x, n)
{
  total = 0
  for(i in 1:n)
      total = total + x[i]
  total
}

compileFunction(isum, DoubleType, list(pointerType(DoubleType), Int32Type), .localVarTypes = list(total = DoubleType))
duncantl/RLLVMCompile documentation built on May 15, 2019, 5:31 p.m.