|
template<class Pattern, class... ArrayTypes> |
| Halo (const Pattern &pattern, const int width, const ArrayTypes &... arrays) |
| Constructor.
|
|
template<class ExecutionSpace, class... ArrayTypes> |
void | gather (const ExecutionSpace &exec_space, const ArrayTypes &... arrays) const |
| Gather data into our ghosts from their owners.
|
|
template<class ExecutionSpace, class ReduceOp, class... ArrayTypes> |
void | scatter (const ExecutionSpace &exec_space, const ReduceOp &reduce_op, const ArrayTypes &... arrays) const |
| Scatter data from our ghosts to their owners using the given type of reduce operation.
|
|
template<class Array_t> |
MPI_Comm | getComm (const Array_t &array) const |
| Get the communicator.
|
|
template<class Array_t, class... ArrayTypes> |
MPI_Comm | getComm (const Array_t &array, const ArrayTypes &... arrays) const |
| Get the communicator and check to make sure all are the same.
|
|
template<class Array_t> |
auto | getLocalGrid (const Array_t &array) |
|
template<class Array_t, class... ArrayTypes> |
auto | getLocalGrid (const Array_t &array, const ArrayTypes &... arrays) |
|
template<class DecompositionTag, std::size_t NumSpaceDim, class... ArrayTypes> |
void | buildCommData (DecompositionTag decomposition_tag, const int width, const std::array< int, NumSpaceDim > &nid, std::vector< Kokkos::View< char *, memory_space > > &buffers, std::vector< Kokkos::View< int **, memory_space > > &steering, const ArrayTypes &... arrays) |
| Build communication data.
|
|
template<std::size_t NumArray> |
void | buildSteeringVector (const std::array< IndexSpace< 4 >, NumArray > &spaces, const std::array< std::size_t, NumArray > &value_byte_sizes, const int buffer_bytes, const int buffer_num_element, std::vector< Kokkos::View< int **, memory_space > > &steering) |
| Build 3d steering vector.
|
|
template<std::size_t NumArray> |
void | buildSteeringVector (const std::array< IndexSpace< 3 >, NumArray > &spaces, const std::array< std::size_t, NumArray > &value_byte_sizes, const int buffer_bytes, const int buffer_num_element, std::vector< Kokkos::View< int **, memory_space > > &steering) |
| Build 2d steering vector.
|
|
template<class ExecutionSpace, class... ArrayViews> |
void | packBuffer (const ExecutionSpace &exec_space, const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, ArrayViews... array_views) const |
| Pack arrays into a buffer.
|
|
template<class ExecutionSpace, class ReduceOp, class... ArrayViews> |
void | unpackBuffer (const ReduceOp &reduce_op, const ExecutionSpace &exec_space, const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, ArrayViews... array_views) const |
| Unpack arrays from a buffer.
|
|
|
template<class ArrayView> |
static KOKKOS_INLINE_FUNCTION std::enable_if_t< 4==ArrayView::rank, void > | packElement (const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const ArrayView &array_view) |
|
template<class ArrayView> |
static KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==ArrayView::rank, void > | packElement (const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const ArrayView &array_view) |
|
template<class... ArrayViews> |
static KOKKOS_INLINE_FUNCTION void | packArray (const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const std::integral_constant< std::size_t, 0 >, const Cabana::ParameterPack< ArrayViews... > &array_views) |
| Pack an array into a buffer.
|
|
template<std::size_t N, class... ArrayViews> |
static KOKKOS_INLINE_FUNCTION void | packArray (const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const std::integral_constant< std::size_t, N >, const Cabana::ParameterPack< ArrayViews... > &array_views) |
| Pack an array into a 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, class ArrayView> |
static KOKKOS_INLINE_FUNCTION std::enable_if_t< 4==ArrayView::rank, void > | unpackElement (const ReduceOp &reduce_op, const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const ArrayView &array_view) |
|
template<class ReduceOp, class ArrayView> |
static KOKKOS_INLINE_FUNCTION std::enable_if_t< 3==ArrayView::rank, void > | unpackElement (const ReduceOp &reduce_op, const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const ArrayView &array_view) |
|
template<class ReduceOp, class... ArrayViews> |
static KOKKOS_INLINE_FUNCTION void | unpackArray (const ReduceOp &reduce_op, const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const std::integral_constant< std::size_t, 0 >, const Cabana::ParameterPack< ArrayViews... > &array_views) |
| Unpack an array from a buffer.
|
|
template<class ReduceOp, std::size_t N, class... ArrayViews> |
static KOKKOS_INLINE_FUNCTION void | unpackArray (const ReduceOp reduce_op, const Kokkos::View< char *, memory_space > &buffer, const Kokkos::View< int **, memory_space > &steering, const int element_idx, const std::integral_constant< std::size_t, N >, const Cabana::ParameterPack< ArrayViews... > &array_views) |
| Unpack an array from a buffer.
|
|
template<class MemorySpace>
class Cabana::Grid::Halo< MemorySpace >
General multiple array halo communication plan for migrating shared data between 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.