Skip to content

Commit

Permalink
Add notes
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Oct 25, 2023
1 parent 9dc5204 commit 6230b6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/source/API/core/parallel-dispatch/parallel_for.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ More Detailed Examples are provided in the ExecutionPolicy documentation.

* ``IntegerType`` policy with lambda as the functor. Note that KOKKOS_LAMBDA is the same as [=] KOKKOS_FUNCTION, which means that all of the variables used within the lambda are captured by value. Also, the KOKKOS_LAMBDA and KOKKOS_FUNCTION macros add all of the function specifiers necessary for the target execution space.

.. note::
Code snippet + a short link to compiler explorer.

.. code-block:: cpp
#include<Kokkos_Core.hpp>
Expand All @@ -85,6 +88,9 @@ More Detailed Examples are provided in the ExecutionPolicy documentation.

<a href="https://godbolt.org/z/q9h339vob" target="_blank">Edit on Compiler Explorer</a>

.. note::
Code snippet taken directly from Kokkos Core (``hello_world_lambda.cpp``) + a link containing full source code of the example.

.. ceinclude:: ../../../../../kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp
:language: cpp
:start-after: Kokkos::initialize
Expand Down
File renamed without changes.

0 comments on commit 6230b6f

Please sign in to comment.