Host functor wrapper class that allocates a functor on device and creates its device wrapper. More...
#include <KokkosFunctorWrapper.h>
Public Member Functions | |
| FunctorWrapperHost (const void *functor) | |
| Constructor. More... | |
| ~FunctorWrapperHost () | |
| Desturctor. More... | |
| FunctorWrapperDeviceBase * | allocate () override final |
| Allocate device functor and wrapper. More... | |
| void | copyFunctor () override final |
| Copy functor to device. More... | |
| void | freeFunctor () override final |
| Free host and device copies of functor. More... | |
Private Attributes | |
| const Object & | _functor_host |
| Reference of the functor on host. More... | |
| std::unique_ptr< Object > | _functor_copy |
| Copy of the functor on host. More... | |
| Object * | _functor_device = nullptr |
| Copy of the functor on device. More... | |
Host functor wrapper class that allocates a functor on device and creates its device wrapper.
This class holds the actual device instance of the functor and manages its allocation and deallocation, and the device wrapper simply keeps a pointer to it.
| Object | The functor class type |
Definition at line 20 of file KokkosFunctorWrapper.h.
|
inline |
Constructor.
| functor | Pointer to the functor |
Definition at line 102 of file KokkosFunctorWrapper.h.
| Moose::Kokkos::FunctorWrapperHost< Object >::~FunctorWrapperHost | ( | ) |
Desturctor.
Definition at line 170 of file KokkosFunctorWrapper.h.
|
finaloverridevirtual |
Allocate device functor and wrapper.
Implements Moose::Kokkos::FunctorWrapperHostBase.
Definition at line 129 of file KokkosFunctorWrapper.h.
|
finaloverridevirtual |
Copy functor to device.
Implements Moose::Kokkos::FunctorWrapperHostBase.
Definition at line 152 of file KokkosFunctorWrapper.h.
|
finaloverridevirtual |
Free host and device copies of functor.
Implements Moose::Kokkos::FunctorWrapperHostBase.
Definition at line 164 of file KokkosFunctorWrapper.h.
|
private |
Copy of the functor on host.
Definition at line 120 of file KokkosFunctorWrapper.h.
Referenced by Moose::Kokkos::FunctorWrapperHost< Object >::copyFunctor(), and Moose::Kokkos::FunctorWrapperHost< Object >::freeFunctor().
|
private |
Copy of the functor on device.
Definition at line 124 of file KokkosFunctorWrapper.h.
Referenced by Moose::Kokkos::FunctorWrapperHost< Object >::allocate(), Moose::Kokkos::FunctorWrapperHost< Object >::copyFunctor(), and Moose::Kokkos::FunctorWrapperHost< Object >::~FunctorWrapperHost().
|
private |
Reference of the functor on host.
Definition at line 116 of file KokkosFunctorWrapper.h.
Referenced by Moose::Kokkos::FunctorWrapperHost< Object >::copyFunctor().
1.8.14