Skip to content

Commit

Permalink
Update ops.py
Browse files Browse the repository at this point in the history
  • Loading branch information
neozhaoliang authored Mar 8, 2022
1 parent 7958124 commit 103bd5d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/taichi/lang/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ def atomic_sub(x, y):
>>> print(x) # [-1, -2, -3] the new value of x
>>> print(z) # [0, 0, 0], the old value of x
>>>
>>> ti.atomic_sub(1, x) # will raises TaichiSyntaxError
>>> ti.atomic_sub(1, x) # will raise TaichiSyntaxError
"""
return impl.expr_init(
expr.Expr(_ti_core.expr_atomic_sub(x.ptr, y.ptr), tb=stack_info()))
Expand Down Expand Up @@ -1211,7 +1211,7 @@ def atomic_min(x, y):
>>> print(x) # 1 the new value of x
>>> print(z) # 2, the old value of x
>>>
>>> ti.atomic_min(1, x) # will raises TaichiSyntaxError
>>> ti.atomic_min(1, x) # will raise TaichiSyntaxError
"""
return impl.expr_init(
expr.Expr(_ti_core.expr_atomic_min(x.ptr, y.ptr), tb=stack_info()))
Expand Down Expand Up @@ -1242,7 +1242,7 @@ def atomic_max(x, y):
>>> print(x) # 2 the new value of x
>>> print(z) # 1, the old value of x
>>>
>>> ti.atomic_max(1, x) # will raises TaichiSyntaxError
>>> ti.atomic_max(1, x) # will raise TaichiSyntaxError
"""
return impl.expr_init(
expr.Expr(_ti_core.expr_atomic_max(x.ptr, y.ptr), tb=stack_info()))
Expand Down Expand Up @@ -1273,7 +1273,7 @@ def atomic_and(x, y):
>>> print(x) # [1, 0, 1] the new value of x
>>> print(z) # [-1, 0, 1], the old value of x
>>>
>>> ti.atomic_and(1, x) # will raises TaichiSyntaxError
>>> ti.atomic_and(1, x) # will raise TaichiSyntaxError
"""
return impl.expr_init(
expr.Expr(_ti_core.expr_atomic_bit_and(x.ptr, y.ptr), tb=stack_info()))
Expand Down Expand Up @@ -1304,7 +1304,7 @@ def atomic_or(x, y):
>>> print(x) # [-1, 2, 3] the new value of x
>>> print(z) # [-1, 0, 1], the old value of x
>>>
>>> ti.atomic_or(1, x) # will raises TaichiSyntaxError
>>> ti.atomic_or(1, x) # will raise TaichiSyntaxError
"""
return impl.expr_init(
expr.Expr(_ti_core.expr_atomic_bit_or(x.ptr, y.ptr), tb=stack_info()))
Expand Down Expand Up @@ -1335,7 +1335,7 @@ def atomic_xor(x, y):
>>> print(x) # [-2, 2, 2] the new value of x
>>> print(z) # [-1, 0, 1], the old value of x
>>>
>>> ti.atomic_xor(1, x) # will raises TaichiSyntaxError
>>> ti.atomic_xor(1, x) # will raise TaichiSyntaxError
"""
return impl.expr_init(
expr.Expr(_ti_core.expr_atomic_bit_xor(x.ptr, y.ptr), tb=stack_info()))
Expand Down

0 comments on commit 103bd5d

Please sign in to comment.