atomic_assign#

Warning

Deprecated since Kokkos 4.5, use atomic_store instead.

Defined in header <Kokkos_Atomic.hpp> which is included from <Kokkos_Core.hpp>

Usage#

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#

template<class T>
void atomic_assign(T *ptr, std::type_identity_t<T> val);#

Atomically writes val into *ptr.

{ *ptr = val; }

Parameters:
  • ptr – address of the object whose value is to be replaced

  • val – the value to store in the referenced object

Returns:

(nothing)