|
KaMPIng 0.2.1
(Near) zero-overhead MPI wrapper for C++
|
Wraps an operation and translates it to a builtin MPI_Op or constructs a custom operation.
More...
#include <mpi_ops.hpp>
Public Member Functions | |
| ReduceOperation (Op &&op, Commutative commutative) | |
| Constructs an operation wrapper. | |
| MPI_Op | op () |
| T | operator() (T const &lhs, T const &rhs) const |
| Call the underlying operation with the provided arguments. | |
| T | identity () |
| Returns the identity element for this operation and data type. | |
Static Public Attributes | |
| static constexpr bool | is_builtin |
| True if this is a predefined MPI operation. | |
| static constexpr bool | commutative |
| True if the operation is commutative. | |
Wraps an operation and translates it to a builtin MPI_Op or constructs a custom operation.
| T | the argument type of the operation |
| Op | the type of the operation |
| Commutative | tag indicating if this type is commutative |
| kamping::internal::ReduceOperation< T, Op, Commutative >::ReduceOperation | ( | Op && | op, |
| Commutative | commutative ) |
Constructs an operation wrapper.
| op | the operation (function object, lambda, or std::function) |
| commutative | commutativity tag (kamping::ops::commutative or kamping::ops::non_commutative) |
| T kamping::internal::ReduceOperation< T, Op, Commutative >::identity | ( | ) |
Returns the identity element for this operation and data type.
Only available when is_builtin == true. For custom operations this member does not exist; callers must guard with if constexpr (operation.is_builtin).
| MPI_Op kamping::internal::ReduceOperation< T, Op, Commutative >::op | ( | ) |
MPI_Op associated with this operation.