Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::mpi::is_mpi_op< Op, T > Struct Template Reference

Determine if a function object has an associated MPI_Op. More...

#include <operations.hpp>

Inheritance diagram for boost::mpi::is_mpi_op< Op, T >:
Collaboration diagram for boost::mpi::is_mpi_op< Op, T >:

Detailed Description

template<typename Op, typename T>
struct boost::mpi::is_mpi_op< Op, T >

Determine if a function object has an associated MPI_Op.

This trait determines if a function object type Op, when used with argument type T, has an associated MPI_Op. If so, is_mpi_op<Op,T> will derive from mpl::false_ and will contain a static member function op that takes no arguments but returns the associated MPI_Op value. For instance, is_mpi_op<std::plus<int>,int>::op() returns MPI_SUM.

Users may specialize is_mpi_op for any other class templates that map onto operations that have MPI_Op equivalences, such as bitwise OR, logical and, or maximum. However, users are encouraged to use the standard function objects in the functional and boost/mpi/operations.hpp headers whenever possible. For function objects that are class templates with a single template parameter, it may be easier to specialize is_builtin_mpi_op.


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