Skip to content

Commit

Permalink
[Example] Fix block_dim warning in ggui (#5128)
Browse files Browse the repository at this point in the history
* fix block dim warning in ggui

* fix block dim warning in ggui

* fix block dim warning in ggui
  • Loading branch information
neozhaoliang authored Jun 13, 2022
1 parent 573f89e commit a0bdb66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/taichi/examples/ggui_examples/mpm3d_ggui.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def substep(g_x: float, g_y: float, g_z: float):
for I in ti.grouped(grid_m):
grid_v[I] = ti.zero(grid_v[I])
grid_m[I] = 0
ti.block_dim(n_grid)
ti.loop_config(block_dim=n_grid)
for p in x:
if used[p] == 0:
continue
Expand Down Expand Up @@ -114,7 +114,7 @@ def substep(g_x: float, g_y: float, g_z: float):
cond = (I < bound) & (grid_v[I] < 0) | \
(I > n_grid - bound) & (grid_v[I] > 0)
grid_v[I] = 0 if cond else grid_v[I]
ti.block_dim(n_grid)
ti.loop_config(block_dim=n_grid)
for p in x:
if used[p] == 0:
continue
Expand Down

0 comments on commit a0bdb66

Please sign in to comment.