18#include "kamping/collectives/allreduce.hpp"
19#include "kamping/collectives/alltoall.hpp"
20#include "kamping/communicator.hpp"
25#include "kamping/plugin/plugin_helpers.hpp"
29namespace kamping::plugin {
31namespace dispatch_alltoall {
45 ParameterType::comm_volume_threshold,
46 internal::BufferModifiability::constant,
47 internal::BufferType::in_buffer,
62 template <
typename Arg>
65 std::integral_constant<
67 dispatch_alltoall::ParameterType::comm_volume_threshold>,
68 std::integral_constant<kamping::internal::ParameterType, kamping::internal::ParameterType::send_counts>>;
70 std::integral_constant<kamping::internal::parameter_type_t<Arg>, kamping::internal::parameter_type_v<Arg>>;
71 return ptypes_to_ignore::contains<ptype_entry>;
111 template <
typename...
Args>
114 auto&
send_buf = internal::select_parameter_type<internal::ParameterType::send_buf>(
args...);
118 auto const&
send_counts = internal::select_parameter_type<internal::ParameterType::send_counts>(
args...)
124 dispatch_alltoall::ParameterType::comm_volume_threshold>;
129 internal::select_parameter_type_or_default<volume_threshold_param_type, default_comm_volume_threshold_type>(
162 if (_grid_communicator.has_value()) {
165 _grid_communicator = std::make_optional(this->to_communicator().make_grid_communicator());
170 mutable std::optional<grid::GridCommunicator<DefaultContainerType>>
ParameterType
Parameter types used for the DispatchAlltoall plugin.
Definition alltoall_dispatch.hpp:34
auto comm_volume_threshold(size_t num_bytes)
The threshold for the maximum bottleneck communication volume in number of bytes indicating for when ...
Definition alltoall_dispatch.hpp:42
Plugin to enable grid communication.
File containing the SparseAlltoall plugin.
Helper functions that make casts safer.
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
Plugin providing an alltoallv exchange method which calls one of multiple underlying alltoallv exchan...
Definition alltoall_dispatch.hpp:82
auto alltoallv_dispatch(Args... args) const
Alltoallv exchange method which uses the communication volume to either exchange the data using GridC...
Definition alltoall_dispatch.hpp:112
void initialize() const
Initialized the grid communicator. If not explicitly called by the user this will be done during the ...
Definition alltoall_dispatch.hpp:161
Wrapper for MPI functions that don't require a communicator.
@ no_resize
Policy indicating that the underlying buffer shall never be resized.
internal::OperationBuilder< Op, Commutative > op(Op &&op, Commutative commute=ops::internal::undefined_commutative_tag{})
Passes a reduction operation to ther underlying call. Accepts function objects, lambdas,...
Definition named_parameters.hpp:1155
auto send_buf(internal::ignore_t< Data > ignore)
Generates a dummy send buf that wraps a nullptr.
Definition named_parameters.hpp:51
auto send_counts(Container &&container)
Passes a container as send counts to the underlying call, i.e. the container's storage must contain t...
Definition named_parameters.hpp:203
auto make_data_buffer(Data &&data)
Creates a user allocated DataBuffer containing the supplied data (a container or a single element)
Definition data_buffer.hpp:798
Parameter objects return by named parameter factory functions.
Wrapper struct for std::max.
Definition mpi_ops.hpp:38
Helper type for representing a type list.
Definition parameter_objects.hpp:326
Helper class for using CRTP for mixins. Which are used to implement kamping plugins.
Definition plugin_helpers.hpp:32
Predicate to check whether an argument provided to alltoallv_dispatch shall be discarded in the inter...
Definition alltoall_dispatch.hpp:56
static constexpr bool discard()
Function to check whether an argument provided to DispatchAlltoall::alltoallv_dispatch() shall be dis...
Definition alltoall_dispatch.hpp:63