Teuchos - Trilinos Tools Package Version of the Day
Static Public Member Functions
Teuchos::RawMPITraits< T > Class Template Reference

Templated traits class that allows a datatype to be used with MPI that MPI can directly handle. More...

#include <Teuchos_RawMPITraits.hpp>

List of all members.

Static Public Member Functions

static int adjustCount (const int count)
 Return the adjusted std::cout of items.
static MPI_Datatype type ()
 Return the raw MPI data type of the template argument.
static MPI_Op sumOp ()
 Return the MPI_Op object for a sum reduction.
static MPI_Op maxOp ()
 Return the MPI_Op object for a max reduction.
static MPI_Op minOp ()
 Return the MPI_Op object for a min reduction.

Detailed Description

template<class T>
class Teuchos::RawMPITraits< T >

Templated traits class that allows a datatype to be used with MPI that MPI can directly handle.

A specialization of this traits class should only be created for datatypes that can be directly handled by MPI in some way. Note that this traits class assumes that the datatype T is directly composed of datatypes that MPI can directly handle. This traits interface allows for specializations to create user-defined MPI_Datatype and MPI_Op objects to be returned from their static functions.

Note:
  • This class should not compile if it is instantiated by accident.
  • It should only be included if MPI is available and the MPI header must be included before this header file.
  • Template specializations exist for datatypes: char, int, float, and double.
  • A partial template specialization exists for std::complex<T> where it is assumed that the real type T is directly handlable with MPI.
  • Only sum reductions are supported for all data types.
  • The reductions max and min are only supported by datatypes whee ScalarTraits<T>::isComparable==true which is a compile-time boolean that can be used in template metaprogramming techniques.

Definition at line 68 of file Teuchos_RawMPITraits.hpp.


Member Function Documentation

template<class T >
static int Teuchos::RawMPITraits< T >::adjustCount ( const int  count) [inline, static]

Return the adjusted std::cout of items.

Definition at line 71 of file Teuchos_RawMPITraits.hpp.

template<class T >
static MPI_Datatype Teuchos::RawMPITraits< T >::type ( ) [inline, static]

Return the raw MPI data type of the template argument.

Definition at line 73 of file Teuchos_RawMPITraits.hpp.

template<class T >
static MPI_Op Teuchos::RawMPITraits< T >::sumOp ( ) [inline, static]

Return the MPI_Op object for a sum reduction.

Definition at line 75 of file Teuchos_RawMPITraits.hpp.

template<class T >
static MPI_Op Teuchos::RawMPITraits< T >::maxOp ( ) [inline, static]

Return the MPI_Op object for a max reduction.

Definition at line 77 of file Teuchos_RawMPITraits.hpp.

template<class T >
static MPI_Op Teuchos::RawMPITraits< T >::minOp ( ) [inline, static]

Return the MPI_Op object for a min reduction.

Definition at line 79 of file Teuchos_RawMPITraits.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines