19#include "kamping/assertion_levels.hpp"
22#include "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 KASSERT_ENABLED(KAMPING_ASSERTION_LEVEL_NORMAL)
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.
Definitions for builtin MPI operations.
File containing the parameter types used by the KaMPIng library.
auto with_operation_functor(MPI_Op op, Functor &&func)
Helper function that maps an MPI_Op to the matching functor from kamping::ops. In case no function ma...
Definition mpi_ops.hpp:403
Type trait for checking whether a functor is a builtin MPI reduction operation and query correspondin...
Definition mpi_ops.hpp:221
builtin null operation (aka MPI_OP_NULL)
Definition mpi_ops.hpp:185