Class that dispatches an 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. 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 an 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 47 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 56 of file KokkosDispatcher.h.
|
inline |
Copy constructor for parallel dispatch.
Definition at line 63 of file KokkosDispatcher.h.
|
inline |
The parallel computation entry function called by Kokkos.
Definition at line 77 of file KokkosDispatcher.h.
|
inlinefinaloverridevirtual |
Dispatch this functor with Kokkos parallel_for() given a Kokkos execution policy.
policy | The Kokkos execution policy |
Implements Moose::Kokkos::DispatcherBase.
Definition at line 68 of file KokkosDispatcher.h.
|
private |
Copy of the functor on device.
Definition at line 90 of file KokkosDispatcher.h.
Referenced by Moose::Kokkos::Dispatcher< Operation, Object >::operator()().
|
private |
Reference of the functor on host.
Definition at line 86 of file KokkosDispatcher.h.