![]() |
QMCPACK
|
Public Types | |
using | DualAlloc = DualAllocator< T, DeviceAllocator, HostAllocator > |
Static Public Member Functions | |
static void | fill_n (T *ptr, size_t n, const T &value) |
static void | attachReference (const DualAlloc &from, DualAlloc &to, std::ptrdiff_t ptr_offset) |
static void | updateTo (DualAlloc &alloc, T *host_ptr, size_t n, size_t offset=0) |
update to the device, assumes you are copying starting with the implicit host_ptr. More... | |
static void | updateFrom (DualAlloc &alloc, T *host_ptr, size_t n, size_t offset=0) |
update from the device, assumes you are copying starting with the device_ptr to the implicit host_ptr. More... | |
static void | deviceSideCopyN (DualAlloc &alloc, size_t to, size_t n, size_t from) |
Static Public Attributes | |
static constexpr bool | is_host_accessible = true |
static constexpr bool | is_dual_space = true |
Definition at line 108 of file DualAllocator.hpp.
using DualAlloc = DualAllocator<T, DeviceAllocator, HostAllocator> |
Definition at line 110 of file DualAllocator.hpp.
|
inlinestatic |
Definition at line 116 of file DualAllocator.hpp.
References DualAllocator< T, DeviceAllocator, HostAllocator >::attachReference().
|
inlinestatic |
Definition at line 144 of file DualAllocator.hpp.
References DualAllocator< T, DeviceAllocator, HostAllocator >::get_device_allocator(), DualAllocator< T, DeviceAllocator, HostAllocator >::get_device_ptr(), and qmcplusplus::n.
|
inlinestatic |
Definition at line 114 of file DualAllocator.hpp.
References qmc_allocator_traits< Allocator >::fill_n(), and qmcplusplus::n.
|
inlinestatic |
update from the device, assumes you are copying starting with the device_ptr to the implicit host_ptr.
Definition at line 139 of file DualAllocator.hpp.
References DualAllocator< T, DeviceAllocator, HostAllocator >::get_device_allocator(), DualAllocator< T, DeviceAllocator, HostAllocator >::get_device_ptr(), and qmcplusplus::n.
|
inlinestatic |
update to the device, assumes you are copying starting with the implicit host_ptr.
These follow the openmp target semantics where you only provide the host side of a host_ptr device_ptr pair but the verb relates to what happens on the device.
This is primarily for testing to reduce ifdef code and single "flavor" testing
This a generic API and unlikely to be the best way to handle performance critical transfers, but if you have to use it or ifdef at a level above a xxxCUDA.cu or xxxOMPTarget.hpp file thats an issue.
Definition at line 132 of file DualAllocator.hpp.
References DualAllocator< T, DeviceAllocator, HostAllocator >::get_device_allocator(), DualAllocator< T, DeviceAllocator, HostAllocator >::get_device_ptr(), and qmcplusplus::n.
|
static |
Definition at line 112 of file DualAllocator.hpp.
|
static |
Definition at line 111 of file DualAllocator.hpp.