KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
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 on operation wrapper. | |
MPI_Op | op () |
T | operator() (T const &lhs, T const &rhs) const |
Call the underlying operation with the provided arguments. | |
T | identity () |
Static Public Attributes | |
static constexpr bool | is_builtin |
indicates if this is a builtin operation | |
static constexpr bool | commutative |
indicates if this 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 on operation wrapper.
op | the operation maybe a function object a lambda or a std::function |
commutative | May be any instance of commutative , or non_commutative. Passing undefined_commutative is only supported for builtin operations. |
T kamping::internal::ReduceOperation< T, Op, Commutative >::identity | ( | ) |
MPI_Op kamping::internal::ReduceOperation< T, Op, Commutative >::op | ( | ) |
MPI_Op
associated with this operation