1#ifndef MPI_IALLREDUCEW_HPP
2#define MPI_IALLREDUCEW_HPP
22 static inline void reduce(T & buf,MPI_Op op, MPI_Request & req)
24#ifndef DISABLE_ALL_RTTI
25 std::cerr <<
"Error: " << __FILE__ <<
":" << __LINE__ <<
" cannot recognize " <<
typeid(T).name() <<
"\n";
37 static inline void reduce(
int & buf,MPI_Op op, MPI_Request & req)
39 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_INT, op, MPI_COMM_WORLD,&req));
49 static inline void reduce(
unsigned int & buf,MPI_Op op, MPI_Request & req)
51 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED, op, MPI_COMM_WORLD,&req));
61 static inline void reduce(
short & buf,MPI_Op op, MPI_Request & req)
63 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_SHORT, op, MPI_COMM_WORLD,&req));
73 static inline void reduce(
unsigned short & buf,MPI_Op op, MPI_Request & req)
75 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED_SHORT, op, MPI_COMM_WORLD,&req));
85 static inline void reduce(
char & buf,MPI_Op op, MPI_Request & req)
87 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_CHAR, op, MPI_COMM_WORLD,&req));
97 static inline void reduce(
unsigned char & buf,MPI_Op op, MPI_Request & req)
99 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED_CHAR, op, MPI_COMM_WORLD,&req));
109 static inline void reduce(
size_t & buf,MPI_Op op, MPI_Request & req)
111 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED_LONG, op, MPI_COMM_WORLD,&req));
121 static inline void reduce(
long int & buf,MPI_Op op, MPI_Request & req)
123 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_LONG, op, MPI_COMM_WORLD,&req));
133 static inline void reduce(
float & buf,MPI_Op op, MPI_Request & req)
135 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_FLOAT, op, MPI_COMM_WORLD,&req));
145 static inline void reduce(
double & buf,MPI_Op op, MPI_Request & req)
147 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_DOUBLE, op, MPI_COMM_WORLD,&req));
Set of wrapping classing for MPI_Iallreduce.