Class that dispatches a parallel loop operation of a Kokkos functor. More...
#include <KokkosDispatcher.h>
Public Member Functions | |
| Dispatcher (const void *object) | |
| Constructor. More... | |
| Dispatcher (const Dispatcher &functor) | |
| Copy constructor for parallel dispatch. More... | |
| void | parallelFor (const Policy &policy) override final |
| Dispatch this functor with Kokkos parallel_for() given a Kokkos execution policy. More... | |
| KOKKOS_FUNCTION void | operator() (const ThreadID tid) const |
| The parallel computation entry function called by Kokkos::parallel_for. More... | |
| virtual void | parallelReduce (const Policy &, ::Kokkos::View< Real *, ::Kokkos::HostSpace > &) |
| Dispatch this functor with Kokkos parallel_reduce() given a Kokkos execution policy and result buffer. More... | |
Private Attributes | |
| const Object & | _functor_host |
| Reference of the functor on host. More... | |
| const Object | _functor_device |
| Copy of the functor on device. More... | |
Class that dispatches a parallel loop operation of a Kokkos functor.
Calls operator() of the functor with a specified function tag.
| Operation | The function tag of operator() to be dispatched |
| Object | The functor class type |
Definition at line 59 of file KokkosDispatcher.h.
|
inline |
Constructor.
| object | The pointer to the functor. This dispatcher is constructed by the base class of functors, and the actual type of functors is unknown by the base class. Therefore, it is passed as a void pointer and cast to the actual type here. |
Definition at line 68 of file KokkosDispatcher.h.
|
inline |
Copy constructor for parallel dispatch.
Definition at line 75 of file KokkosDispatcher.h.
|
inline |
The parallel computation entry function called by Kokkos::parallel_for.
Definition at line 89 of file KokkosDispatcher.h.
|
inlinefinaloverridevirtual |
Dispatch this functor with Kokkos parallel_for() given a Kokkos execution policy.
| policy | The Kokkos execution policy |
Reimplemented from Moose::Kokkos::DispatcherBase.
Definition at line 80 of file KokkosDispatcher.h.
|
inlinevirtualinherited |
Dispatch this functor with Kokkos parallel_reduce() given a Kokkos execution policy and result buffer.
| policy | The Kokkos execution policy |
| result | The result buffer |
Reimplemented in Moose::Kokkos::Reducer< Operation, Object >.
Definition at line 45 of file KokkosDispatcher.h.
|
private |
Copy of the functor on device.
Definition at line 102 of file KokkosDispatcher.h.
Referenced by Moose::Kokkos::Dispatcher< Operation, Object >::operator()().
|
private |
Reference of the functor on host.
Definition at line 98 of file KokkosDispatcher.h.
1.8.14