21#include <kassert/kassert.hpp>
24#include "kamping/assertion_levels.hpp"
26#include "kamping/collectives/barrier.hpp"
27#include "kamping/collectives/collectives_helpers.hpp"
28#include "kamping/collectives/ibarrier.hpp"
29#include "kamping/comm_helper/is_same_on_all_ranks.hpp"
34#include "kamping/p2p/iprobe.hpp"
35#include "kamping/p2p/isend.hpp"
36#include "kamping/p2p/recv.hpp"
37#include "kamping/request_pool.hpp"
39#include "kamping/topology_communicator.hpp"
82 template <
typename...>
84 template <
typename,
template <
typename...>
typename>
86template <
typename...
Args>
88 using namespace internal;
96 internal::select_parameter_type<internal::ParameterType::send_buf>(
args...).construct_buffer_or_rebind();
102 internal::select_parameter_type_or_default<internal::ParameterType::recv_buf, default_recv_buf_type>(
109 static_assert(!std::is_const_v<recv_value_type>,
"The receive buffer must not have a const value_type.");
112 internal::determine_mpi_datatypes<send_value_type, recv_value_type, decltype(recv_buf)>(
args...);
118 internal::select_parameter_type_or_default<internal::ParameterType::send_count, default_send_count_type>(
122 .construct_buffer_or_rebind();
131 internal::select_parameter_type_or_default<internal::ParameterType::recv_count, default_recv_count_type>(
135 .construct_buffer_or_rebind();
145 "There are no send counts given and the number of elements in send_buf is not divisible by the number "
159 "Recv buffer is not large enough to hold all received elements.",
174 this->mpi_communicator()
177 this->mpi_error_hook(
err,
"MPI_Alltoall");
178 return make_mpi_result<std::tuple<
Args...>>(
Helper functions that make casts safer.
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
T value_type
The value type.
Definition allocator.hpp:53
constexpr int light
Assertion level for lightweight assertions.
Definition assertion_levels.hpp:13
auto neighbor_alltoall(Args... args) const
Wrapper for MPI_Neighbor_alltoall.
Definition alltoall.hpp:87
static constexpr auto alloc_new
Convenience wrapper for creating library allocated containers. See AllocNewT for details.
Definition data_buffer.hpp:194
auto send_count(int count)
Passes count as send count to the underlying call.
Definition named_parameters.hpp:321
auto send_type(MPI_Datatype send_type)
Passes send_type as send type to the underlying call.
Definition named_parameters.hpp:1195
auto recv_buf(Container &&container)
Passes a container, into which the received elements will be written, to the underlying call....
Definition named_parameters.hpp:859
auto send_buf(internal::ignore_t< Data > ignore)
Generates a dummy send buf that wraps a nullptr.
Definition named_parameters.hpp:51
auto send_count_out()
Indicates to deduce the send count and return it to the caller as part of the underlying call's resul...
Definition named_parameters.hpp:347
auto recv_count(int count)
Passes count as recv count to the underlying call.
Definition named_parameters.hpp:490
auto recv_type(MPI_Datatype recv_type)
Passes recv_type as recv type to the underlying call.
Definition named_parameters.hpp:1238
auto recv_count_out()
Indicates to deduce the recv count and return it to the caller as part of the underlying call's resul...
Definition named_parameters.hpp:516
Utility that maps C++ types to types that can be understood by MPI.
Template magic to check named parameters passed to wrappers at compile time.
#define KAMPING_REQUIRED_PARAMETERS(...)
Wrapper to pass (possibly empty) list of parameter type names as required parameters to KAMPING_CHECK...
Definition named_parameter_check.hpp:52
#define KAMPING_OPTIONAL_PARAMETERS(...)
Wrapper to pass (possibly empty) list of parameter type names as optional parameters to KAMPING_CHECK...
Definition named_parameter_check.hpp:58
#define KAMPING_CHECK_PARAMETERS(args, required, optional)
Assertion macro that checks if passed parameters are correct, i.e., all parameter types are unique,...
Definition named_parameter_check.hpp:80
Template magic to implement named parameters in cpp.
Factory methods for buffer wrappers.
static constexpr bool has_to_be_computed
Checks if the buffer has to be computed by kamping, i.e. if it is an output parameter or the buffer h...
Definition named_parameter_check.hpp:398
Some functions and types simplifying/enabling the development of wrapped MPI calls in KaMPIng.