AoSoA and slice extensions for Kokkos deep copy and mirrors. More...
#include <Cabana_AoSoA.hpp>
#include <Cabana_ParticleList.hpp>
#include <Cabana_Slice.hpp>
#include <impl/Cabana_TypeTraits.hpp>
#include <Kokkos_Core.hpp>
#include <exception>
#include <type_traits>
Go to the source code of this file.
Namespaces | |
namespace | Cabana |
Core: particle data structures and algorithms. | |
Functions | |
template<class Space, class SrcAoSoA> | |
AoSoA< typename SrcAoSoA::member_types, Space, SrcAoSoA::vector_length > | Cabana::create_mirror (const Space &, const SrcAoSoA &src, typename std::enable_if<(!std::is_same< typename SrcAoSoA::memory_space, typename Space::memory_space >::value)>::type *=0) |
Allocate a mirror of the given AoSoA in the given space. | |
template<class Space, class SrcAoSoA> | |
SrcAoSoA | Cabana::create_mirror_view (const Space &, const SrcAoSoA &src, typename std::enable_if<(std::is_same< typename SrcAoSoA::memory_space, typename Space::memory_space >::value)>::type *=0) |
Create a mirror view of the given AoSoA in the given space. Same space specialization returns the input AoSoA. | |
template<class Space, class SrcAoSoA> | |
AoSoA< typename SrcAoSoA::member_types, Space, SrcAoSoA::vector_length > | Cabana::create_mirror_view (const Space &space, const SrcAoSoA &src, typename std::enable_if<(!std::is_same< typename SrcAoSoA::memory_space, typename Space::memory_space >::value)>::type *=0) |
Create a mirror view of the given AoSoA in the given memory space. Different space specialization allocates a new AoSoA. | |
template<class Space, class SrcAoSoA> | |
SrcAoSoA | Cabana::create_mirror_view_and_copy (const Space &, const SrcAoSoA &src, typename std::enable_if<(std::is_same< typename SrcAoSoA::memory_space, typename Space::memory_space >::value &&is_aosoa< SrcAoSoA >::value)>::type *=0) |
Create a mirror view of the given AoSoA in the given memory space and copy the contents of the input AoSoA. Same space specialization returns the input AoSoA. | |
template<class Space, class SrcAoSoA> | |
AoSoA< typename SrcAoSoA::member_types, Space, SrcAoSoA::vector_length > | Cabana::create_mirror_view_and_copy (const Space &space, const SrcAoSoA &src, typename std::enable_if<(!std::is_same< typename SrcAoSoA::memory_space, typename Space::memory_space >::value &&is_aosoa< SrcAoSoA >::value)>::type *=0) |
Create a mirror of the given AoSoA in the given memory space and deep copy the AoSoA into the mirror. Different space specialization allocates a new AoSoA and performs the deep copy. | |
template<class DstAoSoA, class SrcAoSoA> | |
void | Cabana::deep_copy (DstAoSoA &dst, const SrcAoSoA &src, typename std::enable_if<(is_aosoa< DstAoSoA >::value &&is_aosoa< SrcAoSoA >::value)>::type *=0) |
Deep copy data between compatible AoSoA objects. | |
template<class DstMemorySpace, class SrcMemorySpace, int DstVectorLength, int SrcVectorLength, class... FieldTags> | |
void | Cabana::deep_copy (ParticleList< DstMemorySpace, DstVectorLength, FieldTags... > &dst, const ParticleList< SrcMemorySpace, SrcVectorLength, FieldTags... > &src) |
Deep copy data between compatible ParticleList objects. | |
template<class AoSoA_t> | |
void | Cabana::deep_copy (AoSoA_t &aosoa, const typename AoSoA_t::tuple_type &tuple) |
Fill an AoSoA with a tuple. | |
template<class DstSlice, class SrcSlice> | |
void | Cabana::deep_copy (DstSlice &dst, const SrcSlice &src, typename std::enable_if<(is_slice< DstSlice >::value &&is_slice< SrcSlice >::value)>::type *=0) |
Deep copy data between compatible Slice objects. | |
template<class Slice_t> | |
void | Cabana::deep_copy (Slice_t &slice, const typename Slice_t::value_type scalar) |
Fill a slice with a scalar. | |
template<class DstMemorySpace, class SrcMemorySpace, int VectorLength, class... FieldTags> | |
auto | Cabana::create_mirror_view_and_copy (DstMemorySpace, ParticleList< SrcMemorySpace, VectorLength, FieldTags... > plist_src, typename std::enable_if< std::is_same< SrcMemorySpace, DstMemorySpace >::value >::type *=0) |
Create a mirror of the given ParticleList in the given memory space. | |
template<class DstMemorySpace, class SrcMemorySpace, int VectorLength, class... FieldTags> | |
auto | Cabana::create_mirror_view_and_copy (DstMemorySpace, ParticleList< SrcMemorySpace, VectorLength, FieldTags... > plist_src, typename std::enable_if< !std::is_same< SrcMemorySpace, DstMemorySpace >::value >::type *=0) |
Create a mirror of the given ParticleList in the given memory space. | |
AoSoA and slice extensions for Kokkos deep copy and mirrors.