20#include <kassert/kassert.hpp>
23#include "kamping/assertion_levels.hpp"
25#include "kamping/collectives/collectives_helpers.hpp"
30#include "kamping/topology_communicator.hpp"
73 template <
typename...>
75 template <
typename,
template <
typename...>
typename>
77template <
typename...
Args>
79 using namespace internal;
87 internal::select_parameter_type<internal::ParameterType::send_buf>(
args...).construct_buffer_or_rebind();
93 internal::select_parameter_type_or_default<internal::ParameterType::recv_buf, default_recv_buf_type>(
100 static_assert(!std::is_const_v<recv_value_type>,
"The receive buffer must not have a const value_type.");
103 internal::determine_mpi_datatypes<send_value_type, recv_value_type, decltype(recv_buf)>(
args...);
109 internal::select_parameter_type_or_default<internal::ParameterType::send_count, default_send_count_type>(
113 .construct_buffer_or_rebind();
122 internal::select_parameter_type_or_default<internal::ParameterType::recv_count, default_recv_count_type>(
126 .construct_buffer_or_rebind();
136 "There are no send counts given and the number of elements in send_buf is not divisible by the number "
150 "Recv buffer is not large enough to hold all received elements.",
165 this->mpi_communicator()
168 this->mpi_error_hook(
err,
"MPI_Alltoall");
169 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:78
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:323
auto recv_count(int count)
Passes count as recv count to the underlying call.
Definition named_parameters.hpp:492
auto recv_buf(Container &&container)
Passes a container, into which the received elements will be written, to the underlying call....
Definition named_parameters.hpp:861
auto recv_type(MPI_Datatype recv_type)
Passes recv_type as recv type to the underlying call.
Definition named_parameters.hpp:1302
auto send_type(MPI_Datatype send_type)
Passes send_type as send type to the underlying call.
Definition named_parameters.hpp:1259
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:349
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:518
auto send_buf(internal::ignore_t< Data > ignore)
Generates a dummy send buf that wraps a nullptr.
Definition named_parameters.hpp:53
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.