1 #ifndef MPI_IALLREDUCEW_HPP
2 #define MPI_IALLREDUCEW_HPP
22 static inline void reduce(T & buf,MPI_Op op, MPI_Request & req)
24 std::cerr <<
"Error: " << __FILE__ <<
":" << __LINE__ <<
" cannot recognize " <<
typeid(T).name() <<
"\n";
35 static inline void reduce(
int & buf,MPI_Op op, MPI_Request & req)
37 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_INT, op, MPI_COMM_WORLD,&req));
47 static inline void reduce(
unsigned int & buf,MPI_Op op, MPI_Request & req)
49 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED, op, MPI_COMM_WORLD,&req));
59 static inline void reduce(
short & buf,MPI_Op op, MPI_Request & req)
61 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_SHORT, op, MPI_COMM_WORLD,&req));
71 static inline void reduce(
unsigned short & buf,MPI_Op op, MPI_Request & req)
73 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED_SHORT, op, MPI_COMM_WORLD,&req));
83 static inline void reduce(
char & buf,MPI_Op op, MPI_Request & req)
85 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_CHAR, op, MPI_COMM_WORLD,&req));
95 static inline void reduce(
unsigned char & buf,MPI_Op op, MPI_Request & req)
97 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED_CHAR, op, MPI_COMM_WORLD,&req));
107 static inline void reduce(
size_t & buf,MPI_Op op, MPI_Request & req)
109 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_UNSIGNED_LONG, op, MPI_COMM_WORLD,&req));
119 static inline void reduce(
long int & buf,MPI_Op op, MPI_Request & req)
121 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_LONG, op, MPI_COMM_WORLD,&req));
131 static inline void reduce(
float & buf,MPI_Op op, MPI_Request & req)
133 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_FLOAT, op, MPI_COMM_WORLD,&req));
143 static inline void reduce(
double & buf,MPI_Op op, MPI_Request & req)
145 MPI_SAFE_CALL(MPI_Iallreduce(MPI_IN_PLACE, &buf, 1,MPI_DOUBLE, op, MPI_COMM_WORLD,&req));
Set of wrapping classing for MPI_Iallreduce.