taichi.js
taichi.js copied to clipboard
Support `for(let i = start; i < begin; i += stride)` in kernels
Taichi.js currently only supports range-for loops:
for(let i of range(n)){
...
}
and while-loops:
while(cond){
...
}
A top-level range-for loop in a kernel will be parallelised. All while-loops will be serial.
We should also support traditional for loops of the form
for(let i = start; i < begin; i += stride){
...
}
And we should implement them by translating this into a while-loop.