taichi
taichi copied to clipboard
[Lang] More evaluative build_for
When build ast for "for loop", decorators like "static", "grouped", exprs like "ndrange" are detected directly from ast. However, "mesh-for" is detected via evaluating the iterable statement's value. I made some change that using similar evaluation to detect "grouped" and "ndrange" so that end user can wrap these method into there own iterable. I'm motivated when developing a type hint rich wrapper for taichi, during which I found no way to wrap "grouped" nor "ndrange" into typed one.
/rebase