KaMPIng 0.2.1
(Near) zero-overhead MPI wrapper for C++
Loading...
Searching...
No Matches
kamping::types::mpi_operation_traits< Op, T > Struct Template Reference

Type trait that maps a (functor type, element type) pair to its builtin MPI_Op. More...

#include <reduce_ops.hpp>

Static Public Member Functions

static MPI_Op op ()
 Returns the predefined MPI_Op constant for this operation.
 

Static Public Attributes

static constexpr bool is_builtin
 true if Op applied to T corresponds to a predefined MPI operation constant.
 
static constexpridentity
 The identity element for this operation and data type.
 

Detailed Description

template<typename Op, typename T>
struct kamping::types::mpi_operation_traits< Op, T >

Type trait that maps a (functor type, element type) pair to its builtin MPI_Op.

mpi_operation_traits<Op, T>::is_builtin is true when Op applied to T corresponds to a predefined MPI operation constant. When true, op() returns that constant and identity holds the identity element for the operation.

Example:

mpi_operation_traits<std::plus<>, int>::is_builtin // true
STL-compatible allocator for requesting memory using the builtin MPI allocator.
Definition allocator.hpp:32
STL namespace.
Type trait that maps a (functor type, element type) pair to its builtin MPI_Op.
Definition reduce_ops.hpp:202
static constexpr bool is_builtin
true if Op applied to T corresponds to a predefined MPI operation constant.
Definition reduce_ops.hpp:204
static MPI_Op op()
Returns the predefined MPI_Op constant for this operation.
Template Parameters
OpFunctor type of the operation.
TElement type to apply the operation to.

Member Function Documentation

◆ op()

Returns the predefined MPI_Op constant for this operation.

Only defined when is_builtin is true.

Member Data Documentation

◆ identity

template<typename Op , typename T >
constexpr T kamping::types::mpi_operation_traits< Op, T >::identity
staticconstexpr

The identity element for this operation and data type.

Only defined when is_builtin is true.


The documentation for this struct was generated from the following file: