42 #ifndef TEUCHOS_RAW_MPI_TRAITS_H 43 #define TEUCHOS_RAW_MPI_TRAITS_H 84 static int adjustCount(
const int count) {
bool *junk1; T *junk2 = &junk1;
return 0; }
86 static MPI_Datatype
type() {
bool *junk1; T *junk2 = &junk1;
return MPI_DATATYPE_NULL; }
88 static MPI_Op
sumOp() {
bool *junk1; T *junk2 = &junk1;
return MPI_OP_NULL; }
90 static MPI_Op
maxOp() {
bool *junk1; T *junk2 = &junk1;
return MPI_OP_NULL; }
92 static MPI_Op
minOp() {
bool *junk1; T *junk2 = &junk1;
return MPI_OP_NULL; }
95 #ifndef DOXYGEN_SHOULD_SKIP_THIS 96 template <>
class TEUCHOS_DEPRECATED RawMPITraits<char> {
101 static int adjustCount(
const int count) {
return count; }
103 static MPI_Datatype type() {
return MPI_CHAR; }
105 static MPI_Op sumOp() {
return MPI_SUM; }
107 static MPI_Op maxOp() {
return MPI_MAX; }
109 static MPI_Op minOp() {
return MPI_MIN; }
114 template <>
class TEUCHOS_DEPRECATED RawMPITraits<int> {
117 static int adjustCount(
const int count) {
return count; }
119 static MPI_Datatype type() {
return MPI_INT; }
121 static MPI_Op sumOp() {
return MPI_SUM; }
123 static MPI_Op maxOp() {
return MPI_MAX; }
125 static MPI_Op minOp() {
return MPI_MIN; }
130 template <>
class TEUCHOS_DEPRECATED RawMPITraits<float> {
133 static int adjustCount(
const int count) {
return count; }
135 static MPI_Datatype type() {
return MPI_FLOAT; }
137 static MPI_Op sumOp() {
return MPI_SUM; }
139 static MPI_Op maxOp() {
return MPI_MAX; }
141 static MPI_Op minOp() {
return MPI_MIN; }
146 template <>
class TEUCHOS_DEPRECATED RawMPITraits<double> {
149 static int adjustCount(
const int count) {
return count; }
151 static MPI_Datatype type() {
return MPI_DOUBLE; }
153 static MPI_Op sumOp() {
return MPI_SUM; }
155 static MPI_Op maxOp() {
return MPI_MAX; }
157 static MPI_Op minOp() {
return MPI_MIN; }
171 template <
class T>
class TEUCHOS_DEPRECATED RawMPITraits< std::complex<T> > {
174 static int adjustCount(
const int count) {
return (2*count); }
178 static MPI_Op sumOp() {
return MPI_SUM; }
181 #endif // DOXYGEN_SHOULD_SKIP_THIS 185 #endif // TEUCHOS_RAW_MPI_TRAITS_H Teuchos header file which uses auto-configuration information to include necessary C++ headers...
static MPI_Op maxOp()
Return the MPI_Op object for a max reduction.
static MPI_Op sumOp()
Return the MPI_Op object for a sum reduction.
static MPI_Op minOp()
Return the MPI_Op object for a min reduction.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos, as well as a number of utility routines.
Templated traits class that allows a datatype to be used with MPI that MPI can directly handle...
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.