32template <
typename RecvCounts,
typename RecvDispls>
91 "If a custom send type is provided, send count(s) have to be provided, too."
101 "If a custom recv type is provided, send count(s) have to be provided, too."
108 "If a custom recv type is given, kamping is not able to deduce the correct size of the recv buffer. "
109 "Therefore, a sufficiently large recv buffer (with resize policy \"no_resize\") must be provided by the user."
117 internal::select_parameter_type_or_default<internal::ParameterType::send_type, default_mpi_send_type>(
121 .construct_buffer_or_rebind();
123 if constexpr (std::is_same_v<send_value_type, unused_tparam>) {
131 internal::select_parameter_type_or_default<internal::ParameterType::recv_type, default_mpi_recv_type>(
135 .construct_buffer_or_rebind();
170 .construct_buffer_or_rebind()) {
180 "If a custom send_recv type is provided, the send_recv count has to be provided, too."
187 "If a custom send_recv type is given, kamping is not able to deduce the correct size of the "
188 "recv/send_recv buffer. "
189 "Therefore, a sufficiently large recv/send_recv buffer (with resize policy \"no_resize\") must be provided by "
200 internal::select_parameter_type_or_default<internal::ParameterType::send_recv_type, default_mpi_send_recv_type>(
204 .construct_buffer_or_rebind();
211 "mpi_send_type is either a lvalue reference (in this case it returned by reference), or a non-reference type "
213 "this case it is returned by value)."
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
constexpr BufferResizePolicy no_resize
Definition data_buffer.hpp:299
auto recv_type_out()
Indicates to deduce the receive type in the underlying call and return it as part of underlying call'...
Definition named_parameters.hpp:1252
auto send_recv_type_out()
Indicates to deduce the send/recv type in the underlying call and return it as part of underlying cal...
Definition named_parameters.hpp:1297
auto send_type_out()
Indicates to deduce the send type in the underlying call and return it as part of underlying call's r...
Definition named_parameters.hpp:1209
decltype(auto) select_parameter_type_or_default(std::tuple< DefaultArguments... > default_arguments, Args &... args)
Checks if parameter with requested parameter type exists, if not constructs a default value.
Definition named_parameter_selection.hpp:239
@ recv_count
Tag used to represent the number of elements to be received.
@ recv_type
Tag used to represent a recv type in an MPI call.
@ send_type
Tag used to represent a send type in an MPI call.
@ send_count
Tag used to represent the number of elements to be sent.
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.
Factory methods for buffer wrappers.
Internal namespace marking the code that is not user-facing.
Definition collectives_helpers.hpp:20
constexpr auto determine_mpi_send_recv_datatype(Args &... args) -> decltype(internal::select_parameter_type_or_default< internal::ParameterType::send_recv_type, decltype(kamping::send_recv_type_out())>(std::make_tuple(), args...) .construct_buffer_or_rebind())
Deduce the MPI_Datatype to use as send_recv_type in a collective operation which accepts only one par...
Definition collectives_helpers.hpp:166
static constexpr bool is_parameter_given_as_in_buffer
Checks if a data buffer with requested parameter type exists and it is an input parameter (i....
Definition named_parameter_check.hpp:384
size_t compute_required_recv_buf_size_in_vectorized_communication(RecvCounts const &recv_counts, RecvDispls const &recv_displs, size_t comm_size)
Compute the required size of the recv buffer in vectorized communication (i.e. MPI operation that tak...
Definition collectives_helpers.hpp:33
std::conditional_t< std::is_rvalue_reference_v< T >, std::remove_reference_t< T >, T > remove_rvalue_reference_t
If the given type T is an rvalue reference,i.e. T = U&&, the type alias refers to U....
Definition collectives_helpers.hpp:61
constexpr auto determine_mpi_datatypes(Args &... args)
Deduce the MPI_Datatype to use on the send and recv side. If kamping::send_type() is given,...
Definition collectives_helpers.hpp:79