KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
Type trait for checking whether a functor is a builtin MPI reduction operation and query corresponding MPI_Op
.
More...
#include <mpi_ops.hpp>
Static Public Member Functions | |
static MPI_Op | op () |
get the MPI_Op for a builtin type | |
Static Public Attributes | |
static constexpr bool | is_builtin |
true if the operation defined by Op is a builtin MPI operation for the type Datatype | |
static constexpr T | identity |
The identity of this operation applied on this datatype. | |
Type trait for checking whether a functor is a builtin MPI reduction operation and query corresponding MPI_Op
.
Example:
Op | type of the operation |
Datatype | type to apply the operation to |
|
static |
get the MPI_Op for a builtin type
This member is only defined if value
is true
. It can then be used to query the predefined constant of type MPI_OP
matching the functor defined by type Op
, e.g. returns MPI_SUM
if Op
is kamping::ops::plus<>
.
MPI_Op
constant
|
staticconstexpr |
The identity of this operation applied on this datatype.
The identity of a {value, operation} pair is the value for which the following two equation holds:
identity operation value = value
value operation identity = value
|
staticconstexpr |
true
if the operation defined by Op
is a builtin MPI operation for the type Datatype
Note that this is only true if the MPI_Datatype
corresponding to the C++ datatype Datatype
supports the operation according to the standard. If MPI supports the operation for this type, then this is true for functors defined in kamping::ops
and there corresponding type-aliased equivalents in the standard library.