Skip to content

Commit

Permalink
[lang] Make dynamic indexing compatible with grouped loop indices of …
Browse files Browse the repository at this point in the history
…ndrange fors
  • Loading branch information
strongoier committed Oct 19, 2021
1 parent 3211e4f commit 71fe76a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/taichi/lang/stmt_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,13 @@ def build_grouped_ndrange_for(ctx, node):
template = '''
if ti.static(1):
__ndrange = 0
{} = ti.expr_init(ti.Vector([0] * len(__ndrange.dimensions), disable_local_tensor=True))
___begin = ti.Expr(0)
___end = __ndrange.acc_dimensions[0]
___begin = ti.cast(___begin, ti.i32)
___end = ti.cast(___end, ti.i32)
__ndrange_I = ti.Expr(ti.core.make_id_expr(''))
ti.core.begin_frontend_range_for(__ndrange_I.ptr, ___begin.ptr, ___end.ptr)
{} = ti.expr_init(ti.Vector([0] * len(__ndrange.dimensions), dt=ti.i32))
__I = __ndrange_I
for __grouped_I in range(len(__ndrange.dimensions)):
__grouped_I_tmp = 0
Expand Down

0 comments on commit 71fe76a

Please sign in to comment.