Skip to content

Commit

Permalink
add static ndrange test
Browse files Browse the repository at this point in the history
  • Loading branch information
feisuzhu committed Jul 4, 2022
1 parent 42a9cae commit 6e20127
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/python/test_ndrange.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,15 @@ def example():
r"Every argument of ndrange should be an integer scalar or a tuple/list of \(int, int\)"
):
example()


@test_utils.test()
def test_static_ndrange_should_accept_numpy_integer():
a, b = np.int64(0), np.int32(10)

@ti.kernel
def example():
for i in ti.static(ti.ndrange((a, b))):
pass

example()

0 comments on commit 6e20127

Please sign in to comment.