|
enum | KeyValue { invalid_key = ~static_cast<key_type>( 0 )
} |
| invalid key in sparse map
|
|
enum | Index { own = 0
, ghost = 1
, total = 2
} |
| index (own or ghost)
|
|
using | memory_space = MemorySpace |
| memory space to store the sparse grid
|
|
using | entity_type = EntityType |
| entity type on sparse grid
|
|
using | halo_pattern_type = NodeHaloPattern<NumSpaceDim> |
| sparse grid halo pattern (TODO currently reusing Halo's Node pattern)
|
|
using | value_type = Value |
| value type of entities on sparse grid
|
|
using | key_type = Key |
| key type in sparse map
|
|
using | aosoa_member_types = DataTypes |
| data members in AoSoA structure
|
|
using | tuple_type = Cabana::Tuple<aosoa_member_types> |
| AoSoA tuple type.
|
|
template<std::size_t M> |
using | member_data_type |
| AoSoA member data type.
|
|
using | buffer_view = Kokkos::View<tuple_type*, memory_space> |
| communication data buffer view type
|
|
using | steering_view = Kokkos::View<key_type*, memory_space> |
|
using | tile_index_space |
| tile index space type TODO
|
|
using | counting_view |
|
|
template<class SparseArrayType> |
| SparseHalo (const halo_pattern_type pattern, const std::shared_ptr< SparseArrayType > &sparse_array) |
| constructor
|
|
template<class SparseArrayType> |
MPI_Comm | getComm (const SparseArrayType sparse_array) const |
| Get the communicator.
|
|
template<class DecompositionTag, class LocalGridType> |
void | buildCommData (DecompositionTag decomposition_tag, const std::shared_ptr< LocalGridType > &local_grid, const std::array< int, num_space_dim > &nid, std::vector< buffer_view > &buffers, std::vector< steering_view > &steering, std::vector< tile_index_space > &spaces) |
| Build communication data.
|
|
template<class LocalGridType> |
void | updateTileSpace (const std::shared_ptr< LocalGridType > &local_grid) |
| update tile index space according to current partition
|
|
template<class ExecSpace, class SparseMapType> |
void | register_halo (SparseMapType &map) |
| register valid halos (according to grid activation status in sparse map) in the steerings
|
|
void | clear (MPI_Comm comm) |
| clear guiding information in sparse halo,
|
|
void | collectNeighborCounting (MPI_Comm comm, const bool is_neighbor_counting_collected=false) const |
| neighbor tile counting, communication needed only if the counting is non-zero
|
|
void | scatterValidSendAndRecvRanks (MPI_Comm comm, std::vector< int > &valid_sends, std::vector< int > &valid_recvs, const bool is_neighbor_counting_collected=false) const |
| collect all valid ranks for sparse grid scatter operations
|
|
void | gatherValidSendAndRecvRanks (MPI_Comm comm, std::vector< int > &valid_sends, std::vector< int > &valid_recvs, const bool is_neighbor_counting_collected=false) const |
| collect all valid ranks for sparse grid gather operations
|
|
template<class ExecSpace, class SparseArrayType> |
void | gather (const ExecSpace &exec_space, SparseArrayType &sparse_array, const bool is_neighbor_counting_collected=false) const |
| Gather data into our ghosted share space from their owners.
|
|
template<class ExecSpace, class ReduceOp, class SparseArrayType> |
void | scatter (const ExecSpace &exec_space, const ReduceOp &reduce_op, SparseArrayType &sparse_array, const bool is_neighbor_counting_collected=false) const |
| Scatter data from our ghosts to their owners using the given type of reduce operation.
|
|
template<class ExecSpace, class SparseArrayType> |
void | packBuffer (const ExecSpace &exec_space, const buffer_view &buffer, const steering_view &tile_steering, SparseArrayType &sparse_array, const int count) const |
| Pack sparse arrays at halo regions into a buffer.
|
|
template<class ReduceOp, class ExecSpace, class SparseArrayType, class SparseMapType> |
void | unpackBuffer (const ReduceOp &reduce_op, const ExecSpace &exec_space, const buffer_view &buffer, const steering_view &tile_steering, const SparseArrayType &sparse_array, SparseMapType &map, const int count) const |
| Unpack a sparse array communication buffer.
|
|
|
template<class T> |
static KOKKOS_INLINE_FUNCTION void | unpackOp (ScatterReduce::Sum, const T &buffer_val, T &array_val) |
| Reduce an element into the buffer. Sum reduction.
|
|
template<class T> |
static KOKKOS_INLINE_FUNCTION void | unpackOp (ScatterReduce::Min, const T &buffer_val, T &array_val) |
| Reduce an element into the buffer. Min reduction.
|
|
template<class T> |
static KOKKOS_INLINE_FUNCTION void | unpackOp (ScatterReduce::Max, const T &buffer_val, T &array_val) |
| Reduce an element into the buffer. Max reduction.
|
|
template<class T> |
static KOKKOS_INLINE_FUNCTION void | unpackOp (ScatterReduce::Replace, const T &buffer_val, T &array_val) |
| Reduce an element into the buffer. Replace reduction.
|
|
template<class ReduceOp, std::size_t N, std::size_t M, class SoAType> |
static KOKKOS_FORCEINLINE_FUNCTION std::enable_if_t< 3==M, void > | unpackTupleMember (const ReduceOp &reduce_op, const tuple_type &src_tuple, SoAType &dst_soa, const int soa_idx, const Kokkos::Array< std::size_t, M > &extents, const std::integral_constant< std::size_t, N >, const std::integral_constant< std::size_t, M >) |
| Unpack a sparse arrays element (a tuple) in a buffer (for case tuple members with rank == 3)
|
|
template<class ReduceOp, std::size_t N, std::size_t M, class SoAType> |
static KOKKOS_FORCEINLINE_FUNCTION std::enable_if_t< 2==M, void > | unpackTupleMember (const ReduceOp &reduce_op, const tuple_type &src_tuple, SoAType &dst_soa, const int soa_idx, const Kokkos::Array< std::size_t, M > &extents, const std::integral_constant< std::size_t, N >, const std::integral_constant< std::size_t, M >) |
| Unpack a sparse arrays element (a tuple) in a buffer (for case tuple members with rank == 2)
|
|
template<class ReduceOp, std::size_t N, std::size_t M, class SoAType> |
static KOKKOS_FORCEINLINE_FUNCTION std::enable_if_t< 1==M, void > | unpackTupleMember (const ReduceOp &reduce_op, const tuple_type &src_tuple, SoAType &dst_soa, const int soa_idx, const Kokkos::Array< std::size_t, M > &extents, const std::integral_constant< std::size_t, N >, const std::integral_constant< std::size_t, M >) |
| Unpack a sparse arrays element (a tuple) in a buffer (for case tuple members with rank == 1)
|
|
template<class ReduceOp, std::size_t N, std::size_t M, class SoAType> |
static KOKKOS_FORCEINLINE_FUNCTION std::enable_if_t< 0==M, void > | unpackTupleMember (const ReduceOp &reduce_op, const tuple_type &src_tuple, SoAType &dst_soa, const int soa_idx, const Kokkos::Array< std::size_t, M > &, const std::integral_constant< std::size_t, N >, const std::integral_constant< std::size_t, M >) |
| Unpack a sparse arrays element (a tuple) in a buffer (for case tuple members with rank == 0)
|
|
template<class ReduceOp, class SoAType> |
static KOKKOS_FORCEINLINE_FUNCTION void | unpackTuple (const ReduceOp &reduce_op, const tuple_type &src_tuple, SoAType &dst_soa, const int soa_idx, const std::integral_constant< std::size_t, 0 >) |
| Unpack a sparse arrays tuple for it's member with index 0.
|
|
template<class ReduceOp, std::size_t N, class SoAType> |
static KOKKOS_FORCEINLINE_FUNCTION void | unpackTuple (const ReduceOp &reduce_op, const tuple_type &src_tuple, SoAType &dst_soa, const int soa_idx, const std::integral_constant< std::size_t, N >) |
| Unpack a sparse arrays tuple for all members when element ID!=0.
|
|
template<class MemorySpace, class DataTypes, class EntityType, std::size_t NumSpaceDim, unsigned long long cellBitsPerTileDim, typename Value = int, typename Key = uint64_t>
class Cabana::Grid::Experimental::SparseHalo< MemorySpace, DataTypes, EntityType, NumSpaceDim, cellBitsPerTileDim, Value, Key >
General multiple array halo communication plan for migrating shared data between sparse grid blocks. Arrays may be defined on different entity types and have different data types.
The halo operates on an arbitrary set of arrays. Each of these arrays must be defined on the same local grid meaning they that share the same communicator and halo size. The arrays must also reside in the same memory space. These requirements are checked at construction.