Skip to content

Commit

Permalink
Remove default value for atomic ref index
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Feb 27, 2024
1 parent a19cb7d commit d3040d5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def _check_if_supported_ref(ref):
)
def ol_atomic_ref(
ref,
index=0,
index,
memory_order=MemoryOrder.RELAXED,
memory_scope=MemoryScope.DEVICE,
address_space=AddressSpace.GLOBAL,
Expand Down Expand Up @@ -655,7 +655,7 @@ def ol_atomic_ref(

def ol_atomic_ref_ctor_impl(
ref,
index=0,
index,
memory_order=MemoryOrder.RELAXED, # pylint: disable=unused-argument
memory_scope=MemoryScope.DEVICE, # pylint: disable=unused-argument
address_space=AddressSpace.GLOBAL, # pylint: disable=unused-argument
Expand Down
2 changes: 1 addition & 1 deletion numba_dpex/kernel_api/atomic_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class AtomicRef:
def __init__( # pylint: disable=too-many-arguments
self,
ref,
index=0,
index,
memory_order=MemoryOrder.RELAXED,
memory_scope=MemoryScope.DEVICE,
address_space=AddressSpace.GLOBAL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_atomic_fence():
def _kernel(item: Item, a, b):
i = item.get_id(0)

bref = AtomicRef(b)
bref = AtomicRef(b, index=0)

if i == 1:
a[i] += 1
Expand Down

0 comments on commit d3040d5

Please sign in to comment.