32template <
typename Arg>
34 using type = std::remove_cv_t<std::remove_reference_t<
decltype(std::remove_reference_t<Arg>::parameter_type
37 std::remove_reference_t<Arg>::parameter_type;
46template <
typename T, T v>
53template <
typename Arg>
57template <
typename Arg>
65template <
typename T,
typename U>
79template <
typename ParameterTypeConstant,
size_t Index>
81 return std::numeric_limits<size_t>::max();
95template <
typename ParameterTypeConstant,
size_t Index,
typename Arg>
134 static_assert(
selected_index <
sizeof...(args),
"Could not find the requested parameter type.");
135 return std::get<selected_index>(std::forward_as_tuple(
args...));
153 static_assert(
selected_index <
sizeof...(Args),
"Could not find the requested parameter type.");
154 return std::get<selected_index>(
tuple);
166 static_assert(
selected_index <
sizeof...(Args),
"Could not find the requested parameter type.");
167 return std::get<selected_index>(
tuple);
177 tuple_element_t<find_pos<std::integral_constant<ParameterType, parameter_type>, 0,
Args...>(), std::tuple<Args...>>;
221template <ParameterType parameter_type,
typename Tuple>
242 "The default parameter cannot be constructed from the provided arguments"
246 return std::get<selected_index>(std::forward_as_tuple(
args...));
248 static_assert(!std::is_reference_v<DefaultParameterType>,
"DefaultParameterType must not be a reference.");
257 std::integral_constant<internal::ParameterType, parameter_type>,
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
ParameterType
Each input parameter to one of the MPI calls wrapped by KaMPIng needs to has one of the following tag...
Definition named_parameter_types.hpp:33
constexpr parameter_type_t< Arg > parameter_type_v
Trait for the underlying value of the parameter type of.
Definition named_parameter_selection.hpp:58
constexpr bool has_parameter_type_in_tuple_impl(has_parameter_helper< std::tuple< Args... > >)
Checks if parameter with requested parameter type exists. Wrapper using the functionality from kampin...
Definition named_parameter_selection.hpp:212
constexpr bool has_same_parameter_type()
Check whether two objects have the same parameter type.
Definition named_parameter_selection.hpp:66
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
constexpr bool has_parameter_type_in_tuple()
Checks if parameter with requested parameter type exists.
Definition named_parameter_selection.hpp:222
std:: tuple_element_t< find_pos< std::integral_constant< ParameterType, parameter_type >, 0, Args... >(), std::tuple< Args... > > buffer_type_with_requested_parameter_type
Type of Buffer with requested.
Definition named_parameter_selection.hpp:176
constexpr bool has_parameter_type()
Checks if parameter with requested parameter type exists.
Definition named_parameter_selection.hpp:186
typename ParameterTypeUnwrapping< Arg >::type parameter_type_t
Trait for the underlying type of the parameter type of.
Definition named_parameter_selection.hpp:54
constexpr size_t find_pos()
Base case if there are no parameters: always returns max index indicating that the parameter was not ...
Definition named_parameter_selection.hpp:80
auto & select_parameter_type_in_tuple(std::tuple< Args... > &tuple)
Returns parameter with requested parameter type.
Definition named_parameter_selection.hpp:151
auto & select_parameter_type(Args &... args)
Returns parameter with requested parameter type.
Definition named_parameter_selection.hpp:132
File containing the parameter types used by the KaMPIng library.
Internal namespace marking the code that is not user-facing.
Definition collectives_helpers.hpp:20
T type
Type of the underlying parameter type.
Definition named_parameter_selection.hpp:48
Trait struct used to determine the underlying type and value of the parameter type of an object with ...
Definition named_parameter_selection.hpp:33
std::remove_cv_t< std::remove_reference_t< decltype(std::remove_reference_t< Arg >::parameter_type)> > type
Type of the underlying parameter type.
Definition named_parameter_selection.hpp:34
static constexpr type value
Value of the underlying parameter type.
Definition named_parameter_selection.hpp:36
Helper struct needed to retrieve the types stored in a std::tuple for the has_parameter_type check.
Definition named_parameter_selection.hpp:203