|
KaMPIng 0.2.0
Flexible and (near) zero-overhead C++ bindings for MPI
|
Wrapper for a user defined reduction operation based on a functor object. More...
#include <mpi_ops.hpp>
Public Member Functions | |
| void | operator= (UserOperationWrapper< is_commutative, T, Op > &)=delete |
| void | operator= (UserOperationWrapper< is_commutative, T, Op > &&)=delete |
| UserOperationWrapper (Op &&op) | |
| creates an MPI operation for the specified functor | |
| T | operator() (T const &lhs, T const &rhs) const |
| Call the wrapped operation. | |
| MPI_Op | get_mpi_op () |
Static Public Member Functions | |
| static void | execute (void *invec, void *inoutvec, int *len, MPI_Datatype *) |
| wrapper around the provided functor which is called by MPI | |
Wrapper for a user defined reduction operation based on a functor object.
Internally, this creates an MPI_Op which is freed upon destruction.
| is_commutative | whether the operation is commutative or not |
| T | the type to apply the operation to. |
| Op | type of the functor object to wrap |
|
inline |
creates an MPI operation for the specified functor
| op | the functor to call for reduction. this has to be a binary function applicable to two arguments of type T which return a result of type T |
|
inline |
MPI_Op constructed for the provided functor.Do not free this operation manually, because the destructor calls it. Some MPI implementations silently segfault if an MPI_Op is freed multiple times.