Skip to content

Commit

Permalink
Merge pull request #301 from antoinemeyer5/120-API-core-atomics-atomi…
Browse files Browse the repository at this point in the history
…c_load

#120: API-core-atomics-atomic_load from md to rst
  • Loading branch information
fnrizzi authored Mar 3, 2023
2 parents 2546f86 + 2536d2c commit 969fc4f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 28 deletions.
28 changes: 0 additions & 28 deletions docs/source/API/core/atomics/atomic_load.md

This file was deleted.

25 changes: 25 additions & 0 deletions docs/source/API/core/atomics/atomic_load.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
``atomic_load``
===============

.. role:: cppkokkos(code)
:language: cppkokkos

Header File: ``<Kokkos_Core.hpp>``

Usage
-----

.. code-block:: cpp
value = atomic_load(ptr_to_value);
Atomically reads the value at the address given by ``ptr_to_value``.

Description
-----------

.. cppkokkos:function:: template<class T> T atomic_load(T* const ptr_to_value);
Atomically executes ``value = *ptr_to_value; return value;``.
* ``ptr_to_value``: address of the to be updated value.
* ``value``: value at address ``ptr_to_value``.

0 comments on commit 969fc4f

Please sign in to comment.