isum =
function(x, n)
{
total = 0
for(i in 1:n)
total = total + x[i]
total
}
Can we get the type inference to recognize that, if x is VectorType(NumericType()), then total should be
numeric and not integer.
The RLLVMCompile currently uses the heuristic that total would be an integer, but it doesn't look ahead.
In the isum example again
Can we get the type inference to recognize that, if x is VectorType(NumericType()), then total should be numeric and not integer. The RLLVMCompile currently uses the heuristic that total would be an integer, but it doesn't look ahead.