From cc3427b4f8e4f856d621a8e8a004909459afdabb Mon Sep 17 00:00:00 2001 From: Yicong Fu Date: Wed, 6 Dec 2023 19:42:44 -0500 Subject: [PATCH] Update ParallelDispatch.md (#453) * Update ParallelDispatch.md * Update docs/source/ProgrammingGuide/ParallelDispatch.md --------- Co-authored-by: Christian Trott --- docs/source/ProgrammingGuide/ParallelDispatch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/ProgrammingGuide/ParallelDispatch.md b/docs/source/ProgrammingGuide/ParallelDispatch.md index 2b96058c0..c88862bd9 100644 --- a/docs/source/ProgrammingGuide/ParallelDispatch.md +++ b/docs/source/ProgrammingGuide/ParallelDispatch.md @@ -20,7 +20,7 @@ Important notes on syntax: A _functor_ is one way to define the body of a parallel loop. It is a class or struct1 with a public `operator()` instance method. That method's arguments depend on both which parallel operation you want to execute (for, reduce, or scan), and on the loop's execution policy (e.g., range or team). For an example of a functor see the section in this chapter for each type of parallel operation. In the most common case of a [`parallel_for()`](../API/core/parallel-dispatch/parallel_for), it takes an integer argument which is the for loop's index. Other arguments are possible; see [Chapter 8 - Hierarchical Parallelism](HierarchicalParallelism). -The `operator()` method must be const, and must be marked with the `KOKKOS_INLINE_FUNCTION` macro. If building with CUDA, this macro will mark your method as suitable for running on the CUDA device (as well as on the host). If not building with CUDA, the macro is unnecessary but harmless. Here is an example of the signature of such a method: +The `operator()` method must be const, and must be marked with the `KOKKOS_FUNCTION` or `KOKKOS_INLINE_FUNCTION` macro. For some backends (such as CUDA and HIP) this macro is necessary to mark mark your method as suitable for running on both accelerator devices and the host. If not building with any backends requiring markup, `KOKKOS_INLINE_FUNCTION` expands to `inline`, and `KOKKOS_FUNCTION` is unnecessary but harmless. Here is an example of the signature of such a method: ```c++ KOKKOS_INLINE_FUNCTION void operator() (...) const;