Host function wrapper class that allocates a function on device and creates its device wrapper. More...
#include <KokkosFunctionWrapper.h>
Public Member Functions | |
| FunctionWrapperHost (const void *function) | |
| Constructor. More... | |
| ~FunctionWrapperHost () | |
| Destructor. More... | |
| FunctionWrapperDeviceBase * | allocate () override final |
| Allocate device function and wrapper. More... | |
| void | copyFunction () override final |
| Copy function to device. More... | |
| void | freeFunction () override final |
| Free host and device copies of function. More... | |
Private Attributes | |
| const Object & | _function_host |
| Reference of the function on host. More... | |
| std::unique_ptr< Object > | _function_copy |
| Copy of the function on host. More... | |
| Object * | _function_device = nullptr |
| Copy of the function on device. More... | |
Host function wrapper class that allocates a function on device and creates its device wrapper.
This class holds the actual device instance of the function and manages its allocation and deallocation, and the device wrapper simply keeps a pointer to it.
| Object | The function class type |
Definition at line 20 of file KokkosFunctionWrapper.h.
|
inline |
Constructor.
| function | Pointer to the function |
Definition at line 142 of file KokkosFunctionWrapper.h.
| Moose::Kokkos::FunctionWrapperHost< Object >::~FunctionWrapperHost | ( | ) |
Destructor.
Definition at line 213 of file KokkosFunctionWrapper.h.
|
finaloverridevirtual |
Allocate device function and wrapper.
Implements Moose::Kokkos::FunctionWrapperHostBase.
Definition at line 172 of file KokkosFunctionWrapper.h.
|
finaloverridevirtual |
Copy function to device.
Implements Moose::Kokkos::FunctionWrapperHostBase.
Definition at line 195 of file KokkosFunctionWrapper.h.
|
finaloverridevirtual |
Free host and device copies of function.
Implements Moose::Kokkos::FunctionWrapperHostBase.
Definition at line 207 of file KokkosFunctionWrapper.h.
|
private |
Copy of the function on host.
Definition at line 163 of file KokkosFunctionWrapper.h.
Referenced by Moose::Kokkos::FunctionWrapperHost< Object >::copyFunction(), and Moose::Kokkos::FunctionWrapperHost< Object >::freeFunction().
|
private |
Copy of the function on device.
Definition at line 167 of file KokkosFunctionWrapper.h.
Referenced by Moose::Kokkos::FunctionWrapperHost< Object >::allocate(), Moose::Kokkos::FunctionWrapperHost< Object >::copyFunction(), and Moose::Kokkos::FunctionWrapperHost< Object >::~FunctionWrapperHost().
|
private |
Reference of the function on host.
Definition at line 159 of file KokkosFunctionWrapper.h.
Referenced by Moose::Kokkos::FunctionWrapperHost< Object >::copyFunction().
1.8.14