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);
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
valinto*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)
Deprecated since version 4.5: Use
atomic_store()instead.