Skip to content

Commit

Permalink
Prefer non Impl:: atomic_{load,store} in AtomicDataElement since usin…
Browse files Browse the repository at this point in the history
…g relaxed memory order
  • Loading branch information
dalg24 committed Feb 28, 2023
1 parent 416d7b7 commit 2a7629d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/src/impl/Kokkos_Atomic_View.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AtomicDataElement {

KOKKOS_INLINE_FUNCTION
const_value_type operator=(const_value_type& val) const {
Kokkos::Impl::atomic_store(ptr, val, Kokkos::Impl::memory_order_relaxed);
Kokkos::atomic_store(ptr, val);
return val;
}

Expand Down Expand Up @@ -194,9 +194,7 @@ class AtomicDataElement {
bool operator>(const_value_type& val) const { return *ptr > val; }

KOKKOS_INLINE_FUNCTION
operator value_type() const {
return Kokkos::Impl::atomic_load(ptr, Kokkos::Impl::memory_order_relaxed);
}
operator value_type() const { return Kokkos::atomic_load(ptr); }
};

template <class ViewTraits>
Expand Down

0 comments on commit 2a7629d

Please sign in to comment.