Class that dispatches a parallel reduction operation of a Kokkos functor. More...
#include <KokkosDispatcher.h>
Public Types | |
| using | value_type = Real[] |
| using | size_type = ::Kokkos::View< Real * >::size_type |
Public Member Functions | |
| Reducer (const void *object) | |
| Constructor. More... | |
| Reducer (const Reducer &functor) | |
| Copy constructor for parallel dispatch. More... | |
| void | parallelReduce (const Policy &policy, ::Kokkos::View< Real *, ::Kokkos::HostSpace > &result) override final |
| Dispatch this functor with Kokkos parallel_reduce() given a Kokkos execution policy and result buffer. More... | |
| KOKKOS_FUNCTION void | operator() (const ThreadID tid, value_type result) const |
| The parallel computation entry function called by Kokkos::parallel_reduce. More... | |
| virtual void | parallelFor (const Policy &) |
| Dispatch this functor with Kokkos parallel_for() given a Kokkos execution policy. More... | |
| KOKKOS_FUNCTION void | join (value_type result, const value_type source) const |
| Functions required by the reducer concept of Kokkos. More... | |
| KOKKOS_FUNCTION void | init (value_type result) const |
Public Attributes | |
| size_type | value_count |
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 reduction 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 112 of file KokkosDispatcher.h.
| using Moose::Kokkos::Reducer< Operation, Object >::size_type = ::Kokkos::View<Real *>::size_type |
Definition at line 145 of file KokkosDispatcher.h.
| using Moose::Kokkos::Reducer< Operation, Object >::value_type = Real[] |
Definition at line 144 of file KokkosDispatcher.h.
|
inline |
Constructor.
| object | The pointer to the functor. This reducer 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 121 of file KokkosDispatcher.h.
|
inline |
Copy constructor for parallel dispatch.
Definition at line 128 of file KokkosDispatcher.h.
|
inline |
Definition at line 165 of file KokkosDispatcher.h.
|
inline |
Functions required by the reducer concept of Kokkos.
Definition at line 161 of file KokkosDispatcher.h.
|
inline |
The parallel computation entry function called by Kokkos::parallel_reduce.
Definition at line 152 of file KokkosDispatcher.h.
Dispatch this functor with Kokkos parallel_for() given a Kokkos execution policy.
| policy | The Kokkos execution policy |
Reimplemented in Moose::Kokkos::Dispatcher< Operation, Object >.
Definition at line 35 of file KokkosDispatcher.h.
|
inlinefinaloverridevirtual |
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 from Moose::Kokkos::DispatcherBase.
Definition at line 135 of file KokkosDispatcher.h.
|
private |
Copy of the functor on device.
Definition at line 179 of file KokkosDispatcher.h.
Referenced by Moose::Kokkos::Reducer< Operation, Object >::init(), and Moose::Kokkos::Reducer< Operation, Object >::operator()().
|
private |
Reference of the functor on host.
Definition at line 175 of file KokkosDispatcher.h.
| size_type Moose::Kokkos::Reducer< Operation, Object >::value_count |
Definition at line 147 of file KokkosDispatcher.h.
Referenced by Moose::Kokkos::Reducer< Operation, Object >::parallelReduce().
1.8.14