library(RLLVMCompile)
f = function(n) {
ctr = 0L
for(i in 1:n)
for(j in 1:i) {
if(i == j)
printf("diagonal %d\n", i)
ctr = ctr + 1L
}
ctr
}
fc = compileFunction(f, Int32Type, Int32Type)
stopifnot(.llvm(fc, 10) == 55L)
cat("okay\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.