-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix typo retur[n]s * Document atomic_assign * Fiddle with atomics TOC * Remove old doc for atomic_assign
- Loading branch information
Showing
4 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
``atomic_assign`` | ||
================= | ||
|
||
.. warning:: | ||
Deprecated since Kokkos 4.5, | ||
use `atomic_store <atomic_store.html>`_ instead. | ||
|
||
.. role:: cppkokkos(code) | ||
:language: cppkokkos | ||
|
||
Defined in header ``<Kokkos_Atomic.hpp>`` which is included from ``<Kokkos_Core.hpp>`` | ||
|
||
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<class T> void atomic_assign(T* ptr, std::type_identity_t<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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters