diff --git a/docs/source/API/core/atomics.rst b/docs/source/API/core/atomics.rst index fd2843bb6..fe8ea4e82 100644 --- a/docs/source/API/core/atomics.rst +++ b/docs/source/API/core/atomics.rst @@ -4,11 +4,12 @@ Atomics .. toctree:: :maxdepth: 1 + ./atomics/atomic_load + ./atomics/atomic_store + ./atomics/atomic_exchange ./atomics/atomic_compare_exchange ./atomics/atomic_compare_exchange_strong - ./atomics/atomic_exchange + ./atomics/atomic_assign ./atomics/atomic_fetch_op - ./atomics/atomic_load ./atomics/atomic_op ./atomics/atomic_op_fetch - ./atomics/atomic_store diff --git a/docs/source/API/core/atomics/atomic_assign.rst b/docs/source/API/core/atomics/atomic_assign.rst new file mode 100644 index 000000000..d677bea23 --- /dev/null +++ b/docs/source/API/core/atomics/atomic_assign.rst @@ -0,0 +1,37 @@ +``atomic_assign`` +================= + +.. warning:: + Deprecated since Kokkos 4.5, + use `atomic_store `_ instead. + +.. role:: cppkokkos(code) + :language: cppkokkos + +Defined in header ```` which is included from ```` + +Usage +----- + +.. code-block:: cpp + + atomic_assign(&obj, desired); + // ^^^^^^ + // deprecated since Kokkos 4.5, + // use atomic_store(&obj, desired) instead + +Atomically replaces the current value of ``obj`` with ``desired``. + +Description +----------- + +.. cppkokkos:function:: template void atomic_assign(T* ptr, std::type_identity_t val); + + Atomically writes ``val`` into ``*ptr``. + + ``{ *ptr = val; }`` + + :param ptr: address of the object whose value is to be replaced + :param val: the value to store in the referenced object + :returns: (nothing) + diff --git a/docs/source/API/core/atomics/atomic_exchange.rst b/docs/source/API/core/atomics/atomic_exchange.rst index 6095c9592..ebae4597f 100644 --- a/docs/source/API/core/atomics/atomic_exchange.rst +++ b/docs/source/API/core/atomics/atomic_exchange.rst @@ -13,7 +13,7 @@ Usage auto old = atomic_exchange(&obj, desired); -Atomically replaces the value of ``obj`` with ``desired`` and returs the value before the call. +Atomically replaces the value of ``obj`` with ``desired`` and returns the value before the call. Description ----------- diff --git a/docs/source/API/core/atomics/atomic_op.rst b/docs/source/API/core/atomics/atomic_op.rst index acc02631a..4a04cdd7d 100644 --- a/docs/source/API/core/atomics/atomic_op.rst +++ b/docs/source/API/core/atomics/atomic_op.rst @@ -34,14 +34,6 @@ Description * ``value``: value with which to combine the original value. -.. cppkokkos:function:: template void atomic_assign(T* const ptr_to_value, const T value); - - Atomically executes ``*ptr_to_value = value``. - - * ``ptr_to_value``: address of the to be updated value. - - * ``value``: new value. - .. cppkokkos:function:: template void atomic_decrement(T* const ptr_to_value); Atomically executes ``(*ptr_to_value)--`` or calls ``atomic_fetch_sub(ptr_to_value, T(-1))``.