deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
|
#include <deal.II/base/memory_space_data.h>
Public Member Functions | |
MemorySpaceData () | |
void | copy_to (T *begin, const std::size_t n_elements) |
void | copy_from (const T *begin, const std::size_t n_elements) |
Public Attributes | |
Kokkos::View< T *, Kokkos::HostSpace > | values_host_buffer |
Kokkos::View< T *, typename MemorySpace::kokkos_space > | values |
std::shared_ptr< T > | values_sm_ptr |
std::vector< ArrayView< const T > > | values_sm |
Structure which stores data on the host or the device depending on the template parameter MemorySpace
. Valid choices are MemorySpace::Host and MemorySpace::Default. The data is copied into the structure which then owns the data and will release the memory when the destructor is called.
Definition at line 43 of file memory_space_data.h.
MemorySpace::MemorySpaceData< T, MemorySpace >::MemorySpaceData | ( | ) |
void MemorySpace::MemorySpaceData< T, MemorySpace >::copy_to | ( | T * | begin, |
const std::size_t | n_elements | ||
) |
Copy the class member values to begin
. If the data is on the device it is moved to the host.
void MemorySpace::MemorySpaceData< T, MemorySpace >::copy_from | ( | const T * | begin, |
const std::size_t | n_elements | ||
) |
Copy the data in begin
to the class member values. The pointer begin
must be on the host.
Kokkos::View<T *, Kokkos::HostSpace> MemorySpace::MemorySpaceData< T, MemorySpace >::values_host_buffer |
Kokkos View owning a host buffer used for MPI communication.
Definition at line 66 of file memory_space_data.h.
Kokkos::View<T *, typename MemorySpace::kokkos_space> MemorySpace::MemorySpaceData< T, MemorySpace >::values |
Kokkos View owning the data on the device (unless values_sm_ptr
is used).
Definition at line 74 of file memory_space_data.h.
std::shared_ptr<T> MemorySpace::MemorySpaceData< T, MemorySpace >::values_sm_ptr |
Pointer to data on the host. The pointer points to the same data as values
when using shared memory and the memory space is MemorySpace::Host. Otherwise it is not set.
Definition at line 86 of file memory_space_data.h.
std::vector<ArrayView<const T> > MemorySpace::MemorySpaceData< T, MemorySpace >::values_sm |
Pointers to the data of the processes sharing the same memory.
Definition at line 91 of file memory_space_data.h.