19#include "kamping/assertion_levels.hpp"
20#include "kamping/kassert/kassert.hpp"
37template <
typename Op,
typename Commutative>
66 if constexpr (std::is_same_v<std::remove_reference_t<std::remove_const_t<Op>>,
MPI_Op>) {
67#if KAMPING_ASSERT_ENABLED(KAMPING_ASSERTION_LEVEL_NORMAL)
69 with_operation_functor(_op, [](
auto operation) {
74 "The provided builtin operation is not compatible with datatype T."
81 static_assert(std::is_invocable_r_v<T, Op, T const&, T const&>,
"Type of custom operation does not match.");
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
Parameter wrapping an operation passed to reduce-like MPI collectives. This wraps an MPI operation wi...
Definition operation_builder.hpp:38
OperationBuilder & operator=(OperationBuilder &&)=default
Move assignment operator for OperationsBuilder.
static constexpr ParameterType parameter_type
The type of parameter this object encapsulates.
Definition operation_builder.hpp:40
OperationBuilder(OperationBuilder const &)=delete
Copy constructor is deleted as buffers should only be moved.
auto build_operation()
constructs an operation for the given type T
Definition operation_builder.hpp:65
OperationBuilder & operator=(OperationBuilder const &)=delete
Copy assignment operator is deleted as buffers should only be moved.
OperationBuilder(Op &&op, Commutative commutative_tag)
constructs an Operation builder
Definition operation_builder.hpp:46
OperationBuilder(OperationBuilder &&)=default
Move constructor for OperationsBuilder.
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
@ op
Tag used to represent a reduce operation in a MPI call.
MPI reduction operation wrappers.
File containing the parameter types used by the KaMPIng library.
Null operation (MPI_OP_NULL).
Definition reduce_ops.hpp:172
Type trait that maps a (functor type, element type) pair to its builtin MPI_Op.
Definition reduce_ops.hpp:202